tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Whitby" <>
Subject Re: Fw: Servlet problem
Date Mon, 20 Feb 2006 23:04:24 GMT
There is a problem with this though.  I start off with searchitem.jsp OR 
searchmatch.jsp.  I want to end up at itemlist.jsp, matchlist.jsp or 
searchnone.jsp depending on what's said below.

When I click the button (which appears on both searchitem.jsp AND 
searchmatch.jsp albeit with slightly different parameters) the servlet will 
eventually (when I've coded it fully) do a search of the database to find 
items based on the search parameters.  If nothing is found then it redirects 
the user to searchnone.jsp.  If an item or more than one item is found then 
the page will redirect to itemlist.jsp or matchlist.jsp depending on whether 
the command has come from searchitem.jsp or searchmatch.jsp.  How is best to 
do this then based on what I've said?

I have the mapping twice yes, once for searchitem.jsp and once for 
searchmatch.jsp, which both use the same servlet - SearchServlet.  Is there 
any wy map both pages in one go?


----- Original Message ----- 
From: "Caldarale, Charles R" <>
To: "Tomcat Users List" <>
Sent: Monday, February 20, 2006 10:36 PM
Subject: RE: Fw: Servlet problem

> From: Mark Whitby []
> Subject: Re: Fw: Servlet problem
> Yeah but that's not what I want to happen.  I want the
> servlet to redirect the user to searchnone.jsp as per
> the servlet code and not to the servlet itself, if that
> makes sense?

The ACTION parameter in a form specifies a URL, not a file system path.
Try replacing "WEB-INF/classes/SearchServlet" with "/searchmatch.jsp"
(not sure about the leading slash).

By the way, you have your servlet mapping specified twice.

 - Chuck

MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message