Re: RequestDispatcher and WEB-INF
rf wrote: It is strange that RequestDispatcher considers only jsp and html, why not other extns like jpg/gif or why not just any other resource - is this because of any security concern? I don't think it's security, but I looked at the Servlet spec (page 55) and couldn't find a specific reason. It looks like it was originally intended that a RequestDispatcher should represent only a servlet, and that you could forward to that servlet to continue processing the request, but there is also the include method of RequestDispatcher for when you wish to output /some/ data and then allow the included resource to continue processing. Perhaps the very fact that HTML files are allowed to be the target resources of RequestDispatchers at all was added on at some later point for developer convenience. Certainly there is more [programmatic] flexibility if you are forwarding to or including a servlet (or JSP, which is really a servlet). Erik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: RequestDispatcher and WEB-INF
It is strange that RequestDispatcher considers only jsp and html, why not other extns like jpg/gif or why not just any other resource - is this because of any security concern? Also, I have not understood your workaround Mr Edson, can you please tell me in more detail how to get around my problem? Thanks ~rf --- Edson Alves Pereira <[EMAIL PROTECTED]> wrote: > You need the CGI module to do this, that´s not a > hard work but only > with Apache, Tomcat don´t deal with CGI. > > > -- > > De: Erik Price[SMTP:[EMAIL PROTECTED]] > > Responder: Tomcat Users List > > Enviada:quinta-feira, 20 de fevereiro de 2003 > 14:31 > > Para: Tomcat Users List > > Assunto:Re: RequestDispatcher and WEB-INF > > > > I do not think you can forward to a .exe file, not > sure of what the spec > > says but the Javadoc says only JSP or HTML files. > > > > This link will probably get broken in your mail > client, but if you > > reassemble it you can read the doc: > > > > > http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/RequestDispatc > > > her.html#forward(javax.servlet.ServletRequest,%20javax.servlet.ServletResp > > onse) > > > > Erik > > > > > > >>-Original Message- > > >>From: rf [mailto:[EMAIL PROTECTED]] > > >>Sent: Thursday, February 20, 2003 3:51 AM > > >>To: [EMAIL PROTECTED] > > >>Subject: RequestDispatcher and WEB-INF > > >> > > >> > > >>I want to give out an exe after an > authorization. So I > > >>put the exe in WEB-INF to avoid direct access, > and > > >>tried to do: > > >> RequestDispatcher rd = > > >>req.getRequestDispatcher("/WEB-INF/my.exe"); > > >> rd.forward (req, res); > > >> > > >>Tomcat 4.0.6 says /WEb-INF/my.exe cannot be > found. > > >> > > >>I dont know how this is different from what > Craig > > >>mentioned at > > > >>http://marc.theaimsgroup.com/?l=tomcat-user&m=99790295202902&w=2 > > >> > > >> > > >>Thank you > > >>Rf > > >> > > >> > > > >>__ > > >>Do you Yahoo!? > > >>Yahoo! Tax Center - forms, calculators, tips, > more > > >>http://taxes.yahoo.com/ > > >> > > > >>- > > >>To unsubscribe, e-mail: > [EMAIL PROTECTED] > > >>For additional commands, e-mail: > [EMAIL PROTECTED] > > >> > > > > > > > > > > > > > > > > - > > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > > > > > > > - > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > __ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: RequestDispatcher and WEB-INF
You need the CGI module to do this, that´s not a hard work but only with Apache, Tomcat don´t deal with CGI. > -- > De: Erik Price[SMTP:[EMAIL PROTECTED]] > Responder:Tomcat Users List > Enviada: quinta-feira, 20 de fevereiro de 2003 14:31 > Para: Tomcat Users List > Assunto: Re: RequestDispatcher and WEB-INF > > I do not think you can forward to a .exe file, not sure of what the spec > says but the Javadoc says only JSP or HTML files. > > This link will probably get broken in your mail client, but if you > reassemble it you can read the doc: > > http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/RequestDispatc > her.html#forward(javax.servlet.ServletRequest,%20javax.servlet.ServletResp > onse) > > Erik > > > >>-Original Message- > >>From: rf [mailto:[EMAIL PROTECTED]] > >>Sent: Thursday, February 20, 2003 3:51 AM > >>To: [EMAIL PROTECTED] > >>Subject: RequestDispatcher and WEB-INF > >> > >> > >>I want to give out an exe after an authorization. So I > >>put the exe in WEB-INF to avoid direct access, and > >>tried to do: > >>RequestDispatcher rd = > >>req.getRequestDispatcher("/WEB-INF/my.exe"); > >> rd.forward (req, res); > >> > >>Tomcat 4.0.6 says /WEb-INF/my.exe cannot be found. > >> > >>I dont know how this is different from what Craig > >>mentioned at > >>http://marc.theaimsgroup.com/?l=tomcat-user&m=99790295202902&w=2 > >> > >> > >>Thank you > >>Rf > >> > >> > >>__ > >>Do you Yahoo!? > >>Yahoo! Tax Center - forms, calculators, tips, more > >>http://taxes.yahoo.com/ > >> > >>- > >>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>For additional commands, e-mail: [EMAIL PROTECTED] > >> > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >
Re: RequestDispatcher and WEB-INF
I do not think you can forward to a .exe file, not sure of what the spec says but the Javadoc says only JSP or HTML files. This link will probably get broken in your mail client, but if you reassemble it you can read the doc: http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/RequestDispatcher.html#forward(javax.servlet.ServletRequest,%20javax.servlet.ServletResponse) Erik -Original Message- From: rf [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 20, 2003 3:51 AM To: [EMAIL PROTECTED] Subject: RequestDispatcher and WEB-INF I want to give out an exe after an authorization. So I put the exe in WEB-INF to avoid direct access, and tried to do: RequestDispatcher rd = req.getRequestDispatcher("/WEB-INF/my.exe"); rd.forward (req, res); Tomcat 4.0.6 says /WEb-INF/my.exe cannot be found. I dont know how this is different from what Craig mentioned at http://marc.theaimsgroup.com/?l=tomcat-user&m=99790295202902&w=2 Thank you Rf __ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: RequestDispatcher and WEB-INF
The web-inf is protected, ie it's not a part of the web app. At least not in terms of being able to serve files from within it. --mikej -=- mike jackson [EMAIL PROTECTED] > -Original Message- > From: rf [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 20, 2003 3:51 AM > To: [EMAIL PROTECTED] > Subject: RequestDispatcher and WEB-INF > > > I want to give out an exe after an authorization. So I > put the exe in WEB-INF to avoid direct access, and > tried to do: > RequestDispatcher rd = > req.getRequestDispatcher("/WEB-INF/my.exe"); >rd.forward (req, res); > > Tomcat 4.0.6 says /WEb-INF/my.exe cannot be found. > > I dont know how this is different from what Craig > mentioned at > http://marc.theaimsgroup.com/?l=tomcat-user&m=99790295202902&w=2 > > > Thank you > Rf > > > __ > Do you Yahoo!? > Yahoo! Tax Center - forms, calculators, tips, more > http://taxes.yahoo.com/ > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]