Nils-Helge Garli Hegvik wrote:
I believe most servlet containers prevent sharing of session objects
between applications by default. But it probably can be configured to
be allowed (consult the documentation for your server to find out
I know some containers support this, but it is container-specific
functionality and outside of the servlet spec.
how). A shared cache is also an option. But the easiest would be to
put them in the same application.
Agreed. Other options include a web service or other RPC mechanism, a
shared database, serialization to/from a shared disk location, etc. In
all cases you will need to be able to serialize the data you want to
pass and 're-hydrate' it on the other end.
L.
Nils-H
On Wed, Jun 25, 2008 at 7:29 PM, Mustafa Cayci <[EMAIL PROTECTED]> wrote:
Hello Dave,
Let me try to understan what you mean. Are you saying that I should be doing
this
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception
{
....
HttpSession session = request.getSession();
session.setAttribute("Principal",principal);
response.sendRedirect("/testsqlservlet/testsqlservlet");
...
Because this did not work.
Thanks,
Mustafa
----- Original Message ----
From: Dave Newton <[EMAIL PROTECTED]>
To: Struts Users Mailing List <user@struts.apache.org>
Sent: Wednesday, June 25, 2008 12:58:09 PM
Subject: Re: Newbie: Call a servlet in another application and set attribute
--- On Wed, 6/25/08, Mustafa Cayci <[EMAIL PROTECTED]> 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: [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]