Re: Struts action servlet mapping, getPathInfo() returns null

2005-09-27 Thread Laurie Harper
Remember that servlet mapping and action paths are two entirely seperate things. For servlet mappings, *.do/** would be infix, not suffix -- and infix is not allowed. Suffix means, roughly, 'at the end'. In other words, you can either have 'text*' (prefix mapping) or '*text' (suffix mapping). I

Re: Struts action servlet mapping, getPathInfo() returns null

2005-09-27 Thread emre akbas
Again, thank you very much Laurie. I couldn't understand how ** wildcard mapping could work with suffix mapping (*.do). I have tried, in web.xml, *.do/** but tomcat said "invalid url-pattern". If I manage to get ** wilcard mapping work with *.do, I will be able to correctly process a request like

Re: Struts action servlet mapping, getPathInfo() returns null

2005-09-24 Thread Laurie Harper
Did you look at the documentation on wildcard mappings yet? If you use /do/admin/** it'll match arbitrarily 'deep' URLs. L. emre akbas wrote: Thank you Dave. I'm afraid predefined mapping schemes like /do/admin/*/*" and "/do/admin/*/*/* won't work for me since I want to implement a generic fil

Re: Struts action servlet mapping, getPathInfo() returns null

2005-09-24 Thread emre akbas
Thank you Dave. I'm afraid predefined mapping schemes like /do/admin/*/*" and "/do/admin/*/*/* won't work for me since I want to implement a generic file server. I cannot know the length of the URL nor its number of tokens separated with "/". Actually, I have written such a fileserver using plain o

Re: Struts action servlet mapping, getPathInfo() returns null

2005-09-23 Thread Dave Newton
emre akbas wrote: Sorry, but I don't think that you've understand my question. I wan to get the full URL of the request in my action class. None of the examples in the wiki page you posted addresses this issue. The URL of the request is available from the HttpServletRequest object. See the J

Re: Struts action servlet mapping, getPathInfo() returns null

2005-09-23 Thread emre akbas
No problem. I don't want to pass the filename as a request parameter as you suggested since this way my server cannot serve html file properly. Say I have two files: 1.html and 1.jpg and assume that 1.jpg is used within 1.html When I request 1.html using your suggested method, the image 1.jpg wil

Re: Struts action servlet mapping, getPathInfo() returns null

2005-09-23 Thread emre akbas
Sorry, but I don't think that you've understand my question. I wan to get the full URL of the request in my action class. None of the examples in the wiki page you posted addresses this issue. On 9/23/05, Murray Collingwood <[EMAIL PROTECTED]> wrote: > > Same questions same answers... > > http://w

Struts action servlet mapping, getPathInfo() returns null

2005-09-23 Thread emre akbas
Hi, I want to do sth like the following: When a user clicks the link: http://myhost:8080/myapp/server.do/chapter1/images/1.jpg I want to get the "/chapter1/images/1.jpg" part of the request and then serve the requested file. "server.do" is a downloadaction. As Laurie Harper stated in one of his pre