tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: Problem with forward in Servlet Filter
Date Fri, 03 Oct 2003 14:38:04 GMT

Howdy,
This belongs on the tomcat-user list, not tomcat-dev.  Please report your question there and
we can try to help ;)

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Michal Šiplák [mailto:msiplak@ew.sk]
>Sent: Friday, October 03, 2003 10:30 AM
>To: Tomcat Developers List
>Subject: Problem with forward in Servlet Filter
>
>I use tomcat 4
>I try write secure servlet fitler. When I recognize that user is not
>authorized I try change web resource whith RequestDispatcher. But response
>is only "404 not found"
>
>This is example of my code:
>
>doFilter.....{
>
>		if(userHaveRights())
>		{
>
>			String path =
>((HttpServletRequest)request).getContextPath()+"/errorpages/errMessage.jsp"
>;
>			try{
>				RequestDispatcher ds =
>this.ctx.getRequestDispatcher(cesta);
>				ds.forward(request,response);
>				return;
>			}
>			catch(Exception e){
>				System.err.println("SOMETHING");
>			}
>		}
>		else
>		{
>			chain.doFilter(request, response);
>		}
>
>}
>
>Thanks for advice.
>
>Michal
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org




This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message