Hi Everybody,
Me and a friend have hit a stumbling block. We are developing an online portal for school using JSPs, Servlets and Tomcat. We want to pass parameters to a servlet using URL rewriting.
The path we have to our JSPs is:
C:\tomcat\webapps\portal\jsp\<our jsp files.....>
The path we have to our servlets is:
C:\tomcat\webapps\portal\web-inf\classes\<our servlet files....>
When we use a button on a jsp and use ACTION="../servlet/<our servlet>
it works fine. The servlet picks up the parameter using the getParameter method. Tomcat finds the servlet directory properly.
When we use an href on a jsp and try to use URL rewriting it doesn't work.
When we use <href="../servlet/<our servlet>?ACTION=admin it tries to find the path exactly as written, including the "servlet" directory.
It looks for
http://localhost:8080/portal/servlet/<our servlet>?ACTION=admin
This is close but when we use the buttons on a jsp Tomcat correctly finds the servlet directory. When we use URL rewriting it tries to find the exact path written.
Anybody run into this before, any ideas??? I thought it could be the web.xml file (currently we don't use one). I only thought this file was necessary for multiple servlets???
Thanks in advance,
Graham (As green as a greenhorn gets...)