wood burning stoves
The moose likes Servlets and the fly likes problems with search servlet 2.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "problems with search servlet 2.1" Watch "problems with search servlet 2.1" New topic

problems with search servlet 2.1

Chris Davies
Ranch Hand

Joined: Feb 26, 2003
Posts: 110
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
<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">
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.

One day all greenhorns will run free ...
I agree. Here's the link: http://aspose.com/file-tools
subject: problems with search servlet 2.1
It's not a secret anymore!