This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Tomcat and the fly likes Context  tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Context  tag" Watch "Context  tag" New topic
Author

Context tag

Asha Pathik
Ranch Hand

Joined: Feb 08, 2006
Posts: 143
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


SCJP 1.5
vishwanath nadimpally
Ranch Hand

Joined: Jan 25, 2005
Posts: 116
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

Joined: Jan 10, 2002
Posts: 61084
    
  66

Moved to the Tomcat forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Asha Pathik
Ranch Hand

Joined: Feb 08, 2006
Posts: 143
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

Joined: Jul 20, 2005
Posts: 10067
    
163

I havent worked much with Tomcat, but i guess, this should work - Place the jspbook.xml in the webapps directory.

Try it out.


[My Blog] [JavaRanch Journal]
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10067
    
163

Also, have a look at Context in Tomcat5.x
 
wood burning stoves
 
subject: Context tag