Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deployment problem w/ Tomcat or JBuilder 6- Please HELP!!!

Status
Not open for further replies.

ianohlander

Programmer
Feb 28, 2002
12
0
0
US
Ok, honestly, I don't know if my problem is JBuilder 6 (or at least how I'm using it) or with the Tomcat server I downloaded.

After having read 3 books on JSP, I have written a couple of JSP's and when I run them inside the JBuilder environement (with its Tomcat engine) it runs fine. I can open up a browser, point it to the local server and my JSP name, and it works exactly as I want. Now, for deployment testing purposes, I also downloaded Tomcat as a stand-alone server and installed it. I know it works, because when I run it, I can run all the Servlet and JSP examples that come with Tomcat.

But I wanted to test deployment. JBuilder 6 automatically creates my WAR for me (its just called Default). Following the HORRENDOUS Tomcat documentation (or I must simply be dumb), I put the WAR in the WEBAPPS directory of my stand-alone Tomcat. I run Tomcat and it generates the "Default" directory, complete with JSP page, web.xml file (which looks exactly like JBuilder's XML file for my program- almost nothing there- all it says is:

<?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>
<!DOCTYPE web-app PUBLIC &quot;-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN&quot; &quot;<web-app />

), and classes. So I point my browser to &quot; But I keep getting an error that says that the JSP is not available.

So what am I doing wrong? Is my set up in JBuilder wrong (I haven't changed it. It's out of the box) or am I not doing something right with Tomcat.

After some searching I found a suggestion that I add something like this to the context manager. So I added the following to the Server.xml (in the commented tags that said context manager- is that where it goes?):


< Context path=&quot;/Default&quot; docBase=&quot;webapps/Default&quot; debug=&quot;0&quot; reloadable=&quot;true&quot; >
< /Context >


It didn't work- Tomcat wouldn't even run.

Please help me! I am so frustrated. The JSP is simple, it works in JBuilder, but I need it to work with Tomcat alone.

Thank you for anyhelp you can offer.

Ian Ohlander
ianohlander@yahoo.com
 
The name of the application will be the same as the name of the WAR file (not including the .war extension) that you dropped into the webapps directory. This application name is the starting point for resources within your application. Therefore, the url you need to use in your first example is : &quot; If you put a Context element in the server.xml file, the context path=&quot;/Default&quot; will be the application name and you will use the same url as shown above. I don't think you include the &quot;webapps/&quot; in the docBase parameter when creating a Context element, although I am not certain about that. Hopefully this helps you some.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top