Hi Amarakoon,

I think you are expecting those header attributes to behave like cookies, but that's not so.

The action forward you choose is translated by struts into a 'redirect' response, so instead of going out through the JSP layer, it goes straight out to the browser as a W3C-defined 'redirect' and tells it to go to the new URL. All headers are dropped by the browser, they don't get passed around.

Adam

A Amarakoon on 30/03/06 16:54, wrote:
By the way my struts.config looks like this.

        <action path  = /login"
              type  = "my.actionClass"
              name  = "LoginForm"
              scope = "request" validate="false">
<forward name = "destUrl" path = "http://localhost:8080/HeadSimulator/checker.do"; 
redirect="true" contextRelative="false" />


----- Original Message -----
From: A Amarakoon <[EMAIL PROTECTED]>
Date: Thursday, March 30, 2006 9:14 am
Subject: response.addHeader problem


Struts 1.2.7 on windows.
I am trying add cutom http header within action. The I do redirect to a another web app. Problem I have is that web app does not see the headers I added.
Am I missing something?

my action class:
      response.addHeader("header1","myFirstHeader");
      response.addHeader("header2","mySecondHeader");

     ActionForward toAction= new ActionForward ();
     ActionForward fromAction = mapping.findForward("destUrl");
fromAction.setPath(fromAction.getPath()); toAction.setRedirect(true); return toAction;


thanks

rukka



-------------------------------------------------------------------
--
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