struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Firat TIRYAKI" <fi...@pleksus.com.tr>
Subject Re: Migration of a servlet that uses pathinfo to struts
Date Mon, 17 Nov 2003 10:34:37 GMT
I think you should manage this situation in the web.xml, don't include it in
struts action servlet, just run it stand alone.

F.


----- Original Message ----- 
From: "Chris Searle" <chris@empolis.no>
To: <struts-user@jakarta.apache.org>
Sent: Monday, November 17, 2003 12:30 PM
Subject: Migration of a servlet that uses pathinfo to struts


>
> We have a old servlet that is used to expose a set of directories
> (with various checks for access etc).
>
> This is based on the use of request.getPathInfo() and the servlet has
> a servlet mapping of /files/*
>
>   http://server/app/files/path/to/file
>
> returns a path info of /files/path/to/file
>
> Now - the app is being migrated to the struts framework - and I'm not
> sure how best to approach this.
>
> I have tried creating a struts action with a path="files/*" and this
> is working for:
>
>   http://server/app/do/files/filename.ext
>
> Pathinfo read from the request in the action execute method contains
> /files/filename.ext
>
> However
>
>   http://server/app/do/files/path/filename.ext
>
> returns a 500 error and
>
> 2003-11-17 10:57:59,447 ERROR [org.apache.struts.action.RequestProcessor]
>  Invalid path /files/path/ was requested
>
> in the log.
>
> I know that I can switch over to using a request parameter but I'd
> like to avoid that if possible.
>
> Is this possible?
>
> I did try some searching in the archives - but I guess I'm not good at
> phrasing the search string - so - any links to a previous answer would
> also be great.
>
> Many thanks.
>
> -- 
> Chris Searle
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>


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


Mime
View raw message