• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Context tag

 
Asha Pathik
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I've just started with servlets and unfortunately I am not able to run the very first example in Chapter 1 of Falkner's Servlet and JSP book. So if any body is following that book and knows where to put the "jspbook.xml" and other files, please help. For past four days I've tried every possible combination but it is not working.
Thanks
 
vishwanath nadimpally
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't read the book. But if "jspbook" is the name of your web application and if you are wondering where to put the "jspbook.xml", it should go in to your tomcat's conf/Catalina/localhost/ directory.

You can also copy everything with in the <context></context> tags in the "jspbook.xml" and put it in your server.xml inside your <host></host> tags.

hope this is what you are looking for.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64717
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the Tomcat forum.
 
Asha Pathik
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I tried what you said to do Vishwanath but it is still not working. My jspbook.xml contains following code:


and web.xml file contains following code:


I've installed Tomcat in Tomcat directory and under the webpps directory i've created "jspbook" which contains a WEB-INF folder which has the web.xml file.

Please tell what has to be done in order to run this application.
Asha
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I havent worked much with Tomcat, but i guess, this should work - Place the jspbook.xml in the webapps directory.

Try it out.
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, have a look at Context in Tomcat5.x
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic