aspose file tools*
The moose likes Tomcat and the fly likes help with a jsp application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "help with a jsp application " Watch "help with a jsp application " New topic
Author

help with a jsp application

Tony Lavalle
Ranch Hand

Joined: Jan 18, 2005
Posts: 36
I need a little help from all you experienced folks. I have a jsp class that we are using tomcat I am using 5.5.7 and the book uses 4.x not sure but it calls for us to put a context path in the server.xml file in 5 where would i put this:

<context path="/myapp"
docBase="c:\myjspapp"
debug="0"
reloadable="true" />

can anyone help me with please.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

It's case sensitive. Try using:
<Context ......

In version 5, you can still do this but the recommended practice is to create an xml fragment file that contains just the Context tag. Give it the same name as your context with an ".xml" extension and place the file under TOMCAT_HOME/conf/Catalina/localhost.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Tony Lavalle
Ranch Hand

Joined: Jan 18, 2005
Posts: 36
ok so do i name it context.xml?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Only if you context is named "context"

If your context is named myapp, then the fragment file would be named myapp.xml
Tony Lavalle
Ranch Hand

Joined: Jan 18, 2005
Posts: 36
hmm I tried tht and still i get nothing. location i have for my applet is c:\myjspapp,
Rich Raposa
Ranch Hand

Joined: Dec 06, 2001
Posts: 46
You might need to define your docBase correctly. For example:

<?xml version='1.0' encoding='utf-8'?>
<Context docBase="C:/myapp_dir" path="/myapp" privileged="true">
</Context>

If you have JSP, just put it in the c:/myapp_dir directory and you should be able to access it from your browser similar to:

http://localhost:8080/myapp/hello.jsp


Rich Raposa<br /><a href="http://www.javalicense.com" target="_blank" rel="nofollow">http://www.javalicense.com</a><br />Buy Java courseware -> get a free XBox!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: help with a jsp application