Thank you for the help.  This worked for me too.  I used the same forward
from struts-config in the jsp as I used in the RouterAction (which didn't
work)  I'll have my router action go to a jsp that redirects.  Sort of
clugee (sp) but gets the job done for now.

Thank you and thanks to all the others who helped.

Bart


"Arumbakkam, Praveen \(Contractor\)" <[EMAIL PROTECTED]> wrote on
09/22/2004 03:12:58 PM:

> Bmf5:
>
> Here is what I did to forward to a local file using the logic:redirect
> tag.
>
> 1. Declare a global forward in your struts-config.xml -
>
> <global-forwards>
>    <forward name="handHeld"
> path="file:///C:/AIM/AuditorWorkQueueHandheld.html" redirect="true" />
> </global-forwards>
>
> 2. In a test JSP, I added:
> <logic:redirect forward="test" />
>
>
>
> The redirect worked. Of course, this was just a test which I did with a
> logic tag.
>
> Praveen
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 22, 2004 1:50 PM
> To: Struts Users Mailing List
> Subject: Re: Forward to a file on hard drive
>
>
>
>
>
>
> I'm sorry to report it doesn't work.  As best I can tell It wants to
> find
> the file in the application context.  I base that on the 404 and the
> location being the RouterAction with parm...
>
> http://localhost:9080/AIM/router.do?destination=handHeld
>
> from a forward of
>
> forward name="handHeld"
> path="file:///C:/AIM/AuditorWorkQueueHandheld.html"
> redirect="true"
>
> This is the toString on the Forward in my RouterAction
>
> Forward =
> ForwardConfig[name=handHeld,path=file:///C:/AIM/AuditorWorkQueueHandheld
> ..html,redirect=true,contextRelative=false]
>
> I may have to try the stream to response suggestion or hardcode it some
> javascript.
>
> Bart
>
> "Frank W. Zammetti (MLists)" <[EMAIL PROTECTED]> wrote on 09/22/2004
> 02:12:00 PM:
>
> > Ok, seems like my brain is asleep earlier than usual today...
> >
> > I agree, if that is indeed the case, the redirect should in all
> > probability work as Hubert says.  I would expect it to until I saw
> > otherwise anyway.
> >
> > --
> > Frank W. Zammetti
> > Founder and Chief Software Architect
> > Omnytex Technologies
> > http://www.omnytex.com
> >
> > On Wed, September 22, 2004 2:08 pm, Hubert Rabago said:
> > > Hmm... and my understanding was that the file is installed on the
> > > user's machine.
> > >
> > > "and then render the html page from the local hard drive."
> > >
> > > If I misunderstood, then the code sample I posted wouldn't work.
> > >
> > > Hubert
> > >
> > > On Wed, 22 Sep 2004 14:05:43 -0400 (EDT), Frank W. Zammetti (MLists)
> > > <[EMAIL PROTECTED]> wrote:
> > >> That presumes that the app server is on the same box as the client
> > >> (which
> > >> is, I think, the only way the file:// path would work).  IF that's
> the
> > >> case, then yes, Hubert's suggestion would probably work just fine.
> I
> > >> had
> > >> assumed, from the description given, that this wasn't the case.
> > >>
> > >> --
> > >> Frank W. Zammetti
> > >> Founder and Chief Software Architect
> > >> Omnytex Technologies
> > >> http://www.omnytex.com
> > >>
> > >>
> > >>
> > >> On Wed, September 22, 2004 2:03 pm, Hubert Rabago said:
> > >> > In that case, try something like
> > >> >
> > >> > <forward name="something" path="file:///C:/path/to/file.html"
> > >> > redirect="true"/>
> > >> >
> > >> >
> > >> > On Wed, 22 Sep 2004 14:00:23 -0400, [EMAIL PROTECTED]
> > >> > <[EMAIL PROTECTED]> wrote:
> > >> >>
> > >> >>
> > >> >> "Frank W. Zammetti (MLists)" <[EMAIL PROTECTED]> wrote on
> > >> 09/22/2004
> > >> >> 01:34:07 PM:
> > >> >>
> > >> >> > Are you actually trying to FORWARD to the file or is your
> intention
> > >> to
> > >> >> > initiate download of the file?
> > >> >>
> > >> >> FORWARD
> > >> >>
> > >> >>
> > >> >> >
> > >> >> > Your specifying an HTML file though, so I assume you want the
> user
> > >> to
> > >> >> see
> > >> >> > that page... So, the question is, is it a one-time page
> display
> or
> > >> are
> > >> >> you
> > >> >> > trying to redirect them to another webapp?
> > >> >>
> > >> >> > Can you be more specific about what your really trying to do?
> > >> >>
> > >> >> Apologies for the vagueness.  Many thanks for the help.
> > >> >>
> > >> >> My piece of this system is a web app but it's presented through
> a
> > >> >> browser
> > >> >> embedded in a fat client.  When the users click a certain link I
> need
> > >> to
> > >> >> do
> > >> >> some action stuff (which is working) and then render the html
> page
> > >> from
> > >> >> the
> > >> >> local hard drive.  Once it's displayed I'm out of the picture
> and
> the
> > >> >> fat
> > >> >> c/s app is supposed to takeover.
> > >> >>
> > >> >>
> > >> >>
> > >> >>
> > >> >> > If you just need to display it, you could always open a stream
> on
> > >> the
> > >> >> file
> > >> >> > and render it to response manually.  Seems like a lot of work
> > >> >> though...
> > >> >> >
> > >> >> > Can you be more specific about what your really trying to do?
> > >> >> >
> > >> >> > --
> > >> >> > Frank W. Zammetti
> > >> >> > Founder and Chief Software Architect
> > >> >> > Omnytex Technologies
> > >> >> > http://www.omnytex.com
> > >> >> >
> > >> >> > On Wed, September 22, 2004 1:23 pm, [EMAIL PROTECTED]
> said:
> > >> >> > >
> > >> >> > >
> > >> >> > >
> > >> >> > >
> > >> >> > > This doesn't work either.  I get a 404 for a local resource
> or
> an
> > >> >> outside
> > >> >> > > url.  I don't want to hardcode the document.location but I
> don't
> > >> >> know
> > >> >> what
> > >> >> > > other choices there are.
> > >> >> > >
> > >> >> > >
> > >> >> > > Hubert Rabago <[EMAIL PROTECTED]> wrote on 09/22/2004
> 12:00:00
> > >> PM:
> > >> >> > >
> > >> >> > >> If you need to forward to a resource outside the current
> web
> > >> >> context,
> > >> >> > >> you can try using a redirect.
> > >> >> > >>
> > >> >> > >> <forward name="lapTop" path="http://gmail.google.com";
> > >> >> redirect="true"/>
> > >> >> > >>
> > >> >> > >> Now, whether it'll work when you point it to a local
> resource...
> > >>  I
> > >> >> > >> think what you'll get is the user's browser will try to
> look
> for
> > >> >> that
> > >> >> > >> file on the user's machine.
> > >> >> > >>
> > >> >> > >> Hubert
> > >> >> > >>
> > >> >> > >> On Wed, 22 Sep 2004 11:50:29 -0400,
> [EMAIL PROTECTED]
> > >> >> > >> <[EMAIL PROTECTED]> wrote:
> > >> >> > >> >
> > >> >> > >> >
> > >> >> > >> > Is it possible to forward to a file on a hard drive?  I
> set
> up
> > >> a
> > >> >> > >> global
> > >> >> > >> > forward like this
> > >> >> > >> >
> > >> >> > >> > forward name="lapTop"
> > >> >> path="C:\project\WorkQueueLaptop.html"
> > >> >> > >> >
> > >> >> > >> > I've since learned that the path is context relative so
> this
> > >> is a
> > >> >> no
> > >> >> > > go.
> > >> >> > >> > What technique do I need to use?  Is it possible to
> handle
> > >> this
> > >> >> form
> > >> >> > > the
> > >> >> > >> > config file?
> > >> >> > >> >
> > >> >>
> > >> >>
> ---------------------------------------------------------------------
> > >> >> 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]
> > >>
> > >>
> > >
> >
> >
> > ---------------------------------------------------------------------
> > 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]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to