Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help with a jsp application

 
Tony Lavalle
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Tony Lavalle
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok so do i name it context.xml?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmm I tried tht and still i get nothing. location i have for my applet is c:\myjspapp,
 
Rich Raposa
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic