You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Martin Lidgard <ma...@arkatay.com> on 2005/04/18 03:03:45 UTC

Handling requests for .asp files

Hi.
 
I am trying to get Tomcat to respond to requests for files with an ".asp"
extension in order to let Turbine handle the request and redirect to the
appropriate Velocity page. The reason for this seemingly strange need is
that I want to handle external references (on other web sites) to my site
from when the site was on an ASP-based server.
 
The problem is that Tomcat does not seem to respond at all to requests for
urls with ".asp" as an extension.  The extensions ".as" and ".aspp" work
fine. Could there be some filter that tells Tomcat to not process the
request or tries to forward the request somewhere? I can't find anything
"asp" in conf/server.xml, conf/web.xml, or my WEB-INF/web.xml and none of
the log files even register the http-request, which makes me think that the
problem lies in my servlet container configuration rather than the servlet.
 
Googling for "tomcat handling asp requests" doesn't seem to generate the
desired set of answers, so any pointers would be greatly appreciated.
 
I'm using Tomcat 4.1 on Linux.
 
Thanks for your attention.

Martin



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


SV: Handling requests for .asp files

Posted by Martin Lidgard <ma...@arkatay.com>.
Thanks for the pointers. 
The problem ended up being that the redirect required not only an
HTTP-StatusCode (301 - Moved permanently) but also a
httpServletResponse.setHeader("Location", "http://newurl"). Without the
header, Mozilla shows the originally requested page which contains a
redirect javascript, whereas Internet Explorer just shows a generic error
page.

/Martin 

Martin Lidgard
Arkatay Consulting
mail://martin@arkatay.com
http://www.arkatay.com	 

-----Ursprungligt meddelande-----
Från: QM [mailto:qm300@brandxdev.net] 
Skickat: den 18 april 2005 03:33
Till: Tomcat Users List
Ämne: Re: Handling requests for .asp files

On Mon, Apr 18, 2005 at 03:03:45AM +0200, Martin Lidgard wrote:
: I am trying to get Tomcat to respond to requests for files with an ".asp"
: extension in order to let Turbine handle the request and redirect to the
: appropriate Velocity page.
: [snip]
: The problem is that Tomcat does not seem to respond at all to requests for
: urls with ".asp" as an extension.  The extensions ".as" and ".aspp" work
: fine.

How are you mapping the .as and .aspp extensions?  Through a servlet mapping
in yoru webapp's web.xml?

You could also check the global web.xml. That one defines the mapping for
.jsp files; maybe someone at your site put in a mapping for .asp as well...?

Another thought -- do you access Tomcat directly, or do you go through
Apache as an intermediary?


-QM

-- 

software   -- http://www.brandxdev.net/
tech news  -- http://www.RoarNetworX.com/ code scan  --
http://www.JxRef.org/

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



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


Re: Handling requests for .asp files

Posted by QM <qm...@brandxdev.net>.
On Mon, Apr 18, 2005 at 03:03:45AM +0200, Martin Lidgard wrote:
: I am trying to get Tomcat to respond to requests for files with an ".asp"
: extension in order to let Turbine handle the request and redirect to the
: appropriate Velocity page.
: [snip]  
: The problem is that Tomcat does not seem to respond at all to requests for
: urls with ".asp" as an extension.  The extensions ".as" and ".aspp" work
: fine.

How are you mapping the .as and .aspp extensions?  Through a servlet
mapping in yoru webapp's web.xml?

You could also check the global web.xml. That one defines the mapping
for .jsp files; maybe someone at your site put in a mapping for .asp as
well...?

Another thought -- do you access Tomcat directly, or do you go through
Apache as an intermediary?


-QM

-- 

software   -- http://www.brandxdev.net/
tech news  -- http://www.RoarNetworX.com/
code scan  -- http://www.JxRef.org/

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