aspose file tools*
The moose likes Tomcat and the fly likes Configuration questions for Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Configuration questions for Tomcat" Watch "Configuration questions for Tomcat" New topic
Author

Configuration questions for Tomcat

michael bradly
Ranch Hand

Joined: Oct 06, 2000
Posts: 112
I've installed Tomcat, and through following a few examples I've managed to make servlets and jsps work, however it's tediously held together right now and I'm looking for more flexibility.
I've been following the examples at: http://developer.apple.com/internet/java/tomcat1.html and have been able to get most of them to work. I've created a directory tomcat/webapps/mine/WEB-INF and have placed my web.xml file in there as well as a /classes directory. I've followed the modifications to server.xml and web.xml as per instructed on the webpage, however I can not get my .html and .jsp documents to work in the directory I created. I have only been able to get them to work under tomcat/webapps/ROOT directory.
Any suggestions on what needs to be changed either in the server.xml or web.xml file would be greatly apprectiated to get .html and .jsp files to work in a directory other then /ROOT. My lack of knowledge in this area is becomming counter-productive.
Regards, Michael
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12671
    
    5
How are you trying to address the pages?
what does your server.xml for "mine" look like?
Which version of Tomcat?
Recent Tomcats don't require an entry in server.xml as long as Tomcat can find the WEB-INF directory and web.xml file.
Bill
michael bradly
Ranch Hand

Joined: Oct 06, 2000
Posts: 112
How are you trying to address the pages?
I've tried to pull up pages via localhost:8080/mine/somepage.html which does not work for me... However, I can pull up pages if I put them into /ROOT/myDir via localhost:8080/myDir/somepage.html
what does your server.xml for "mine" look like?
I've followed the example on the page that I listed with my previous post. My server.xml is the original configuration with this modification to it:

Which version of Tomcat?
tomcat-4.1.18
I've been able to test servlets in the directory /mine/WEB-INF/classes, but not .html or .jsp, whereas I can test .html and .jsp if I place them into the /ROOT directory however I get an error if I try a servlet which I'm sure is due to the servlets not being in the directory path that tomcat is using for /ROOT.
Ideally I would like both .jsp/servlet and .html to work in the same directory so I can work on more complex examples and am unsure as to what configuration I would need to make this possible.
Regards, Michael
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12671
    
    5
Lets try this:
comment out your entry in server.xml, make sure you have a valid web.xml at
webapps/mine/WEB-INF/web.xml
and restart Tomcat. Tomcat should recognize your mine directory as an application without an entry in server.xml if it finds WEB-INF and web.xml.
Bill
michael bradly
Ranch Hand

Joined: Oct 06, 2000
Posts: 112
Thanks for you help... I couldn't get your suggestion to work, and after hours of frustration I just reinstalled tomcat... and it WORKS!
Well, on the plus side I did a lot of research and now know more, but I do feel silly that a simple reinstall solved my problems and it took me hours to do it
The next time I have a problem I'll make sure the cord is connected and I have power on.
Thanks again, Michael

Originally posted by William Brogden:
Lets try this:
comment out your entry in server.xml, make sure you have a valid web.xml at
webapps/mine/WEB-INF/web.xml
and restart Tomcat. Tomcat should recognize your mine directory as an application without an entry in server.xml if it finds WEB-INF and web.xml.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Configuration questions for Tomcat
 
Similar Threads
JSP file location under Tomcat
is there something wrong with my classpath?
can't access tomcat-docs webapp
Tomcat 404 error
Having trouble getting Tomcat up and running