You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mustafa Cayci <ac...@yahoo.com> on 2008/06/25 18:27:06 UTC

Newbie: Call a servlet in another application and set attribute

Hello,

I am fairly new to Struts.  I have two applications.  AppA is a Struts application and AppB is another application.  I have an Action class in AppA.  Within execute() method, I am creating some objects.  I would like to call the servlet in AppB and somehow I want to pass these objects to the servlet in AppB. SO far I have this

    public ActionForward execute(ActionMapping mapping, ActionForm form, 
                                 HttpServletRequest request, 
                                 HttpServletResponse response) throws Exception {
...
        response.sendRedirect("/testsqlservlet/testsqlservlet?Object=" + object);
...

But this is a problem because even if I use SSL (i.e. https://) this redirect will be in cleartext and anybody can modify the "object".  What are my options? I am hope I explained myself clearly.

Thanks,

Mustafa



      

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


Re: Newbie: Call a servlet in another application and set attribute

Posted by Marc Ende <ml...@e-beyond.de>.
Hi Mustafa,

if I understand you correctly you're trying to pass an object in another
webapp. That's not a really struts-usecase. I think you're looking for 
a webservice or another kind of procedurecalls (like rmi).

I think you should look for axis, cxf or another project which are more
helpful for this kind of uses.

Marc

Am Mittwoch, den 25.06.2008, 09:27 -0700 schrieb Mustafa Cayci:
> I am fairly new to Struts.  I have two applications.  AppA is a Struts application and AppB is another application.  I have an Action class in AppA.  Within execute() method, I am creating some objects.  I would like to call the servlet in AppB and somehow I want to pass these objects to the servlet in AppB. SO far I have this
> 
>     public ActionForward execute(ActionMapping mapping, ActionForm form, 
>                                  HttpServletRequest request, 
>                                  HttpServletResponse response) throws Exception {
> ...
>         response.sendRedirect("/testsqlservlet/testsqlservlet?Object=" + object);
> ...
> 
> But this is a problem because even if I use SSL (i.e. https://) this redirect will be in cleartext and anybody can modify the "object".  What are my options? I am hope I explained myself clearly.



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


Re: Newbie: Call a servlet in another application and set attribute

Posted by Dave Newton <ne...@yahoo.com>.
--- On Wed, 6/25/08, Mustafa Cayci <ac...@yahoo.com> wrote:
> I am fairly new to Struts.  I have two applications.  AppA
> is a Struts application and AppB is another application.  I
> have an Action class in AppA.  Within execute() method, I am
> creating some objects.  I would like to call the servlet in
> AppB and somehow I want to pass these objects to the
> servlet in AppB. SO far I have this
> 
>     public ActionForward execute(ActionMapping mapping,
> ActionForm form, 
>                                  HttpServletRequest
> request, 
>                                  HttpServletResponse
> response) throws Exception {
> ...
>        
> response.sendRedirect("/testsqlservlet/testsqlservlet?Object="
> + object);
> ...
> 
> But this is a problem because even if I use SSL (i.e.
> https://) this redirect will be in cleartext and anybody
> can modify the "object".  What are my options? I
> am hope I explained myself clearly.

Put it in the session?

That's not passing the object, either; that's passing the string representation of the object. A bit different.

Dave


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