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 will not
display in 1.html. That is my problem. If I manage to make
http://myhost:8080/myapp/server.do/chapter1/images/1.html work, this scheme
will request 1.jpg automatically and correctly from my server. At the end,
1.html will be displayed correctly with 1.jpg in it.

Am I clear enough?

On 9/23/05, Murray Collingwood <[EMAIL PROTECTED]> wrote:
>
> Sorry Emre
>
> From your first paragraph it sounds as though you want to be able to
> download a file
> using an action class. Why not modify your URL a little to do just that,
> http://myhost:8080/myapp/server.do?file=/chapter1/images/1.jpg
>
> Perhaps you could explain the reasons why the above won't work, this will
> help us
> understand the problem better.
>
> Kind regards
> mc
>
>
> On 23 Sep 2005 at 15:15, 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.
> >
> > On 9/23/05, Murray Collingwood <[EMAIL PROTECTED] > wrote:
> > Same questions same answers...
> >
> > http://wiki.apache.org/struts/StrutsFileDownload
> >
> > Kind regards
> > mc
> >
> >
> > On 23 Sep 2005 at 11:41, emre akbas wrote:
> >
> > > 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 previous emails, prefix mapping,
> i.e.
> > > *.do, is not suitable to do this. He suggested to me that I use suffix
> > > mapping which is sth. like /do/* . I have tried suffix mapping but no
> > > success. request.getPathInfo() returns null.
> > > All I want to do is to get the request.getPathInfo(), or the full URL
> of the
> > > request, within a downloadaction class.
> > > Thanks in advance.
> > >
> >
> >
> >
> > FOCUS Computing
> > Mob: 0415 24 26 24
> > [EMAIL PROTECTED]
> > http://www.focus-computing.com.au
> >
> >
> >
> > --
> > No virus found in this outgoing message.
> > Checked by AVG Anti-Virus.
> > Version: 7.0.344 / Virus Database: 267.11.4/109 - Release Date:
> 21/09/2005
> >
> >
> >
>
>
>
> FOCUS Computing
> Mob: 0415 24 26 24
> [EMAIL PROTECTED]
> http://www.focus-computing.com.au
>
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.11.4/109 - Release Date: 21/09/2005
>
>

Reply via email to