• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

tomcat error

 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
i'm trying to set up a search using the following servlet
Search Servlet
though i'm having problems but maybe i'm just confusing myself. i have a standalone tomcat 4.0.4 server running on sunsolaris 2.6 OS.
The context path in the tomcat conf/server.xml file is set to /../../library, which of course contains the directories WEB-INF/ AND WEB-INF/lib WEB-INF/classes.
I have set the library/WEB-INF/web.xml file as described in steps 2 and 3, put the config.txt file in the library/WEB-INF directory and the searchPackage.jar file in the library/WEB-INF/lib directory.
My config.txt file is
root - unix path from root to config.txt, ie /f/http/supportserv/lis/webapps/library/WEB-INF/config.txt
web - tomcat server root http://hera/company.co.uk:8081
I have also put the html form code on the web page like the following
<html>
<form action="http://hera/company.co.uk:8081?f/http/supportserv/lis/webapps/library/WEB-INF/config.txt">
<input type="Text" name="search"> <input type="Submit" value="Search">
</form>
</html>
When i put the the form code onthe jsp page it is ok, but when i make teh changes to the web.xml file and add the servlet mapping and add the searchPackage.jar to the library/WEB-INF/lib directory then i get
the following 404 - library/home.jsp not found. (ie its not finding the context path - i've checked on the borwser and its pointing to the correct file, so why is it not finding it ?
Can you see where i'm going wrong ?
Any help appreciated.
Cheers
Chris
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
step 2 and 3 in what document?

<form action="http://hera/company.co.uk:8081?f/http/supportserv/lis/webapps/library/WEB-INF/config.txt">
That looks totally messed up.

What exactly do you have for the context element in server.xml ? Where is the home.jsp file located? What is in the address bar when you get the 404 message?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

The context path in the tomcat conf/server.xml file is set to /../../library, which of course contains the directories WEB-INF/ AND WEB-INF/lib WEB-INF/classes.


That does not sound right to me - how did you come up with that context path? For Tomcat 4 you should not have to mess with the server.xml at all if you are creating an application under the normal webapps directory.
Bill
 
Chris Davies
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

step 2 and 3 in what document?
<form action="http://hera/company.co.uk:8081?f/http/supportserv/lis/webapps/library/WEB-INF/config.txt">
That looks totally messed up.
What exactly do you have for the context element in server.xml ? Where is the home.jsp file located? What is in the address bar when you get the 404 message?


i'm trying to implemetn this search servlet -
http://www.servletsuite.com/servlets/search.htm
here is my context path in the server.xml


and this is where the home.jsp file is - f/http/supportserv/lis/webapps.

That does not sound right to me - how did you come up with that context path? For Tomcat 4 you should not have to mess with the server.xml at all if you are creating an application under the normal webapps directory.
Bill



thanks - i'm creating a directory from the root of the folder at this directory
/f/http/supportserv/lis/webapps, which is why iset it in the server.xml. tomcat is located in this directory -
hera:/Basis+/basisv91/java2/java/jakarta-tomcat-4.0.4>
reply
    Bookmark Topic Watch Topic
  • New Topic