wood burning stoves 2.0*
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
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: 60782
    
  65

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: 9943
    
159

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: 9943
    
159

Also, have a look at Context in Tomcat5.x
 
jQuery in Action, 2nd edition
 
subject: Context tag
 
Similar Threads
How easy ProSpring is to read?
Keyboard input using "import java.io.*;" OR "import java.util.scanner;"
Starting android programming
"Bitter Java" - Release Announcement - Manning
Need Recomendation Books For JAX-WS/JAX-RS