Just saw your other email.
Submitting from an action and forwarding from that instead of the browser
seems a good idea but Ive not tried it myself for resources outside the same
webapp.
Im not sure if it works or what needs to be done to make it work for that
situation. Sorry :-(

If you cant find a way to get that idea working then the other alternative
is to continue trying to submit straight from the browser to the other
servlet:

I dont think you will be able to use the action attribute of <html:form> for
this as it will actually go and look up info about the form from struts
config based on this. I forgot about that!

If this form doesnt need to have an associated actionForm you could use a
normal <form> tag (ie not a taglib) instead of the <html:form> tag. Make
sure theres no slash before the http.

Now on the other hand if you are using an action and actionForm then you
could set the action attribute as the path to that action, but in your code
to submit the form, you have javascript that will change the action property
in the clientside document object model using javascript:

function doSubmit()
{
document.forms[0].action='http://localhost:7001/ManageStyle/servlet/stylegen
eralinfoservlet';
document.forms[0].submit();
}

(Adapt as required)

Hope this helps.
regards
Andrew


-----Original Message-----
From: Amit Badheka [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 18:43
To: [EMAIL PROTECTED]
Subject: Re: urgent


Hi Andrew,
thanks for reply,

the exact error message i am pasting here -

javax.servlet.jsp.JspException: Cannot retrieve mapping for action
 /http://localhost:7001/ManageStyle/servlet/stylegeneralinfoservlet

I hope it can help you understand the problem, and will be great help for
me.

Amit.

----- Original Message -----
From: "Andrew Hill" <[EMAIL PROTECTED]>
To: "Amit Badheka" <[EMAIL PROTECTED]>
Sent: Wednesday, December 11, 2002 3:40 PM
Subject: RE: urgent


> Is that / supposed to be there in the front of http - or is it just copy
and
> paste error writing the email?
>
> -----Original Message-----
> From: Amit Badheka [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 11, 2002 18:09
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: Re: urgent
>
>
> Hi Andrew,
> thanks for reply,
>
> If I give the below url as action and submit the form I am getting error
as
> not a valid url
> /http://localhost:7001/ManageStyle/servlet/stylegeneralinfoservlet.ser
>
> and if I try with ActionForward from action then it is not giving any
error,
> but also not doing anything.
>
> ----- Original Message -----
> From: "Andrew Hill" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, December 11, 2002 3:13 PM
> Subject: RE: urgent
>
>
> > No joy with the javascript submit() huh? :-(
> >
> > Are you getting any error messages?
> > Are you submitting to the correct url? (ie: forms action is set
> > appropriately)
> >
> > -----Original Message-----
> > From: Amit Badheka [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, December 11, 2002 17:36
> > To: Struts Users Mailing List
> > Subject: urgent
> >
> >
> > Hi All,
> >
> > I have a requirement to call a servlet from a action class or jsp. The
> > servlet is residing on the war file other than struts app. Hence, there
> are
> > two different context.
> >
> > The servlet is used for file upload so my jsp should contain
> multipart/form
> > data. so, I have to call post method of the servlet.
> >
> > If I am using html:link I am able to call the servlet, but the form data
> can
> > not be passed.
> >
> > I also tried with action forward but it is not calling servlet.(may be
> b'cos
> > it is not in same context).
> >
> > Is there any way to achieve something like this.
> >
> >
> >
> >
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> >
>
>


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

Reply via email to