You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Phillip Gibb <ph...@prism.co.za> on 2001/06/06 12:11:52 UTC
RE: problems with sendRedirect() on relative path
try using getContext() and getRequestDispatcher() and then include(req, res)
you can set a context in the server.xml to point to a directory where you
keep these static pages eg "staticPages" with the path set to
"c:\staticPages"
then using the
config.getContext("/staticPages").getRequestDispatcher().include 'or
forward' (request, response)
will forward to the or include the static page
this is not the same as redirect but it's just another suggestion that might
help
Phill
-----Original Message-----
From: Ofer Baranes [mailto:OferB@fundtech.co.il]
Sent: 06 June 2001 12:45
To: 'tomcat-user@jakarta.apache.org'
Subject: problems with sendRedirect() on relative path
Hi
I am tring to use the HttpServletResponse sendRedirect() method to show a
static page but i can't use relative path only static path (which include
the context).The problem occure because of the default '/servlet' prefix
which is used on tomcat conf\servel.xml.This default prefix force that each
accses to servlet will contain the /servlet on the URI.
Does anyone know how to solve that ?