Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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
 
Well don't expect me to do the dishes! This ad has been cleaned for your convenience:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic