servlet mapping and relative path
Hi I had some html file with relative path to images,html files . Then i start used servlet-mapping on web.xml and all the relative path cause 404 error. I found (by enable debuging on server.xml) that the URI is missing the 'context' (which is 'gpp') without servlet mapping - 2001-06-13 11:26:14 - ContextManager: ProcessRequest: R( /gpp/html/main/blue.html) 2001-06-13 11:26:14 - ContextManager: After processing: R( /gpp + /html/main/blue.html + null) with servlet mapping 2001-06-13 11:29:03 - ContextManager: ProcessRequest: R( /html/main/blue.html) 2001-06-13 11:29:03 - ContextManager: After processing: R( + /html/main/blue.html + null) 2001-06-13 11:29:03 - ContextManager: No handler for request R( + /html/main/blue.html + null) 404 2001-06-13 11:29:03 - Ctx( ): 404 R( + /html/main/blue.html + null) null 2001-06-13 11:29:03 - Ctx( ): Handler tomcat.notFoundHandler(null/null) tomcat.notFoundHandler Note that the request without mapping conatins the context=gpp and with servlet mapping its miss. Any idea ?
RE: reload web.xml from servlet?
I guess that a destroy() on the servlet should cause a new init() with the ServletConfig as published on the web.xml.But it might be that it works only if the container call a destroy() . -Original Message- From: Sebastian Schulz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 12, 2001 2:23 PM To: [EMAIL PROTECTED] Subject: reload web.xml from servlet? hi, is it possible to reload the servlets web.xml from a runing servlet, so that a changed web.xml can affect the servlet without having to restart tomcat? many thanks in advance! basti
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 ?
RE: problems with sendRedirect() on relative path
Alex , actually i just learnd that using the RequestDispatcher is a better solution since the response is for this request while redirct is creating new requestresponse. By the way the RequestDispatch is showing static pages. Thanks -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 06, 2001 12:43 PM To: [EMAIL PROTECTED] Subject: Re: problems with sendRedirect() on relative path Hi Ofer! You can specify a different context, that will not contain the /servlet prefix. The prefix is set by context. I don't think the suggestion that was sent before (RequestDispatcher) will work, since it's a static page. Un saludo, Alex. Ofer Baranes wrote: 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 ?
problems with Tomcat 3.2.1 samples
Hi there , i install Tomcat 3.2.1 and i try to run its samples , but it failed. What's wrong or miss in the next steps which i follow : 1 - add to my autoexec.bat : set TOMCAT_HOME=c:\tmct321 set JAVA_HOME=c:\jdk13002 set PATH = %PATH%;c:\;c:\jdk13002\bin;c:\jdk13002; 2 - run the tomcat.bat file : tomcat.bat start 3 - open webapps\examples\servlets\index.html and hit the execute button which fails(all the other examples failed as well) I haven't done any change to the server.xml. Am i using right the tomcat.bat ? should i use the web.xml in any way ? What is wrong here ?!