Win a copy of Programming with Types this week in the Angular and TypeScript forum
or The Design of Web APIs in the Web Services forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Joe Ess
  • salvin francis

help with a jsp application

 
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.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • 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 VI Editor Redhat
  • 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,
 
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
 
Something about .... going for a swim. With this tiny ad ...
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!