RE: ActionForward bug and Struts 1.1-b2

2002-08-20 Thread Galbreath, Mark

RedirectingActionForward redirect = new RedirectingActionForward(home.do);
return redirect;
?
Mark


-Original Message-
From: Aymeric Alibert [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 20, 2002 5:22 PM

In my action class, when I create an ActionForward object using an absolute
path, Struts does not forward to the proper page.

The following code is working in Struts 1.1-b1:

public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest req, HttpServletResponse res) {

...
RedirectingActionForward redirect = new
RedirectingActionForward(http://localhost:8080/myapp/home.do;);
return redirect;
}

In Struts 1.1-b2, the same code tries to redirect to
http://localhost:8080/myapp/http:/localhost:8080/myapp/home.do

I had the same problem when using regular ActionForward instead of
RedirectingActionForward.

Any suggestion?

Thanks,
Aymeric.

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




RE: ActionForward bug and Struts 1.1-b2

2002-08-20 Thread Aymeric Alibert

Mark,
 
In my case, I woud like to use the complete path to build the ActionForward.
 
When a user access a part of the site that requires login, I first save the current 
page path
in the session using something like:
HomAction.java
 session.setAttribute(PAGE_MEMORY,  + req.getRequestURL());
 return mapping.findForward(logon);

After the logon is completed, I send back the user to the requested page:
 
LogonAction.java
  String lastPage = (String) session.getAttribute(PAGE_MEMORY);
  if (lastPage != null) {
session.removeAttribute(PAGE_MEMORY);
return new RedirectingActionForward(lastPage);
  }

How can I retrieve the current page name home.do and use it instead of using the 
full path (req.getRequestURL())?
 
Thanks,

Aymeric


 [EMAIL PROTECTED] 08/20/02 04:26PM 
RedirectingActionForward redirect = new RedirectingActionForward(home.do);
return redirect;
?
Mark


-Original Message-
From: Aymeric Alibert [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, August 20, 2002 5:22 PM

In my action class, when I create an ActionForward object using an absolute
path, Struts does not forward to the proper page.

The following code is working in Struts 1.1-b1:

public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest req, HttpServletResponse res) {

...
RedirectingActionForward redirect = new
RedirectingActionForward(http://localhost:8080/myapp/home.do;);
return redirect;
}

In Struts 1.1-b2, the same code tries to redirect to
http://localhost:8080/myapp/http:/localhost:8080/myapp/home.do 

I had the same problem when using regular ActionForward instead of
RedirectingActionForward.

Any suggestion?

Thanks,
Aymeric.

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




RE: ActionForward bug and Struts 1.1-b2

2002-08-20 Thread Galbreath, Mark

Try this before redirecting:

ForwardConfig forwardConfig = new ForwardConfig();
forwardConfig.setContextRelative( true);

Mark

-Original Message-
From: Aymeric Alibert [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 20, 2002 5:40 PM

Mark,
 
In my case, I woud like to use the complete path to build the ActionForward.
 
When a user access a part of the site that requires login, I first save the
current page path
in the session using something like:
HomAction.java
 session.setAttribute(PAGE_MEMORY,  + req.getRequestURL());
 return mapping.findForward(logon);

After the logon is completed, I send back the user to the requested page:
 
LogonAction.java
  String lastPage = (String) session.getAttribute(PAGE_MEMORY);
  if (lastPage != null) {
session.removeAttribute(PAGE_MEMORY);
return new RedirectingActionForward(lastPage);
  }

How can I retrieve the current page name home.do and use it instead of
using the full path (req.getRequestURL())?
 
Thanks,

Aymeric


 [EMAIL PROTECTED] 08/20/02 04:26PM 
RedirectingActionForward redirect = new RedirectingActionForward(home.do);
return redirect;
?
Mark


-Original Message-
From: Aymeric Alibert [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, August 20, 2002 5:22 PM

In my action class, when I create an ActionForward object using an absolute
path, Struts does not forward to the proper page.

The following code is working in Struts 1.1-b1:

public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest req, HttpServletResponse res) {

...
RedirectingActionForward redirect = new
RedirectingActionForward(http://localhost:8080/myapp/home.do;);
return redirect;
}

In Struts 1.1-b2, the same code tries to redirect to
http://localhost:8080/myapp/http:/localhost:8080/myapp/home.do 

I had the same problem when using regular ActionForward instead of
RedirectingActionForward.

Any suggestion?

Thanks,
Aymeric.

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

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




RE: ActionForward bug and Struts 1.1-b2

2002-08-20 Thread Galbreath, Mark

actually, contextRelative should probably be false in your case.

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 20, 2002 6:10 PM
To: 'Struts Users Mailing List'
Subject: RE: ActionForward bug and Struts 1.1-b2


Try this before redirecting:

ForwardConfig forwardConfig = new ForwardConfig();
forwardConfig.setContextRelative( true);

Mark

-Original Message-
From: Aymeric Alibert [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 20, 2002 5:40 PM

Mark,
 
In my case, I woud like to use the complete path to build the ActionForward.
 
When a user access a part of the site that requires login, I first save the
current page path
in the session using something like:
HomAction.java
 session.setAttribute(PAGE_MEMORY,  + req.getRequestURL());
 return mapping.findForward(logon);

After the logon is completed, I send back the user to the requested page:
 
LogonAction.java
  String lastPage = (String) session.getAttribute(PAGE_MEMORY);
  if (lastPage != null) {
session.removeAttribute(PAGE_MEMORY);
return new RedirectingActionForward(lastPage);
  }

How can I retrieve the current page name home.do and use it instead of
using the full path (req.getRequestURL())?
 
Thanks,

Aymeric


 [EMAIL PROTECTED] 08/20/02 04:26PM 
RedirectingActionForward redirect = new RedirectingActionForward(home.do);
return redirect;
?
Mark


-Original Message-
From: Aymeric Alibert [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, August 20, 2002 5:22 PM

In my action class, when I create an ActionForward object using an absolute
path, Struts does not forward to the proper page.

The following code is working in Struts 1.1-b1:

public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest req, HttpServletResponse res) {

...
RedirectingActionForward redirect = new
RedirectingActionForward(http://localhost:8080/myapp/home.do;);
return redirect;
}

In Struts 1.1-b2, the same code tries to redirect to
http://localhost:8080/myapp/http:/localhost:8080/myapp/home.do 

I had the same problem when using regular ActionForward instead of
RedirectingActionForward.

Any suggestion?

Thanks,
Aymeric.

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

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




RE: ActionForward bug and Struts 1.1-b2

2002-08-20 Thread Aymeric Alibert

Thanks Mark.

I have it working by using :
HomAction.java
 session.setAttribute(PAGE_MEMORY, req.getServletPath());
return mapping.findForward(logon);

LogonAction.java
if (lastPage != null) {
session.removeAttribute(PAGE_MEMORY);
RedirectingActionForward forwardConfig =  new 
RedirectingActionForward(lastPage);
forwardConfig.setContextRelative(true);
return forwardConfig;   
}

I still think that preventing the creation of ActionForward using absolute path is a 
strong limitation.
In most of the cases, the forward should reside in the struts-config file, but I can 
also  see the need to 
dynamically build an ActionForward from a 'non struts' source.

Aymeric.


 [EMAIL PROTECTED] 08/20/02 05:11PM 
actually, contextRelative should probably be false in your case.

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, August 20, 2002 6:10 PM
To: 'Struts Users Mailing List'
Subject: RE: ActionForward bug and Struts 1.1-b2


Try this before redirecting:

ForwardConfig forwardConfig = new ForwardConfig();
forwardConfig.setContextRelative( true);

Mark

-Original Message-
From: Aymeric Alibert [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, August 20, 2002 5:40 PM

Mark,
 
In my case, I woud like to use the complete path to build the ActionForward.
 
When a user access a part of the site that requires login, I first save the
current page path
in the session using something like:
HomAction.java
 session.setAttribute(PAGE_MEMORY,  + req.getRequestURL());
 return mapping.findForward(logon);

After the logon is completed, I send back the user to the requested page:
 
LogonAction.java
  String lastPage = (String) session.getAttribute(PAGE_MEMORY);
  if (lastPage != null) {
session.removeAttribute(PAGE_MEMORY);
return new RedirectingActionForward(lastPage);
  }

How can I retrieve the current page name home.do and use it instead of
using the full path (req.getRequestURL())?
 
Thanks,

Aymeric


 [EMAIL PROTECTED] 08/20/02 04:26PM 
RedirectingActionForward redirect = new RedirectingActionForward(home.do);
return redirect;
?
Mark


-Original Message-
From: Aymeric Alibert [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, August 20, 2002 5:22 PM

In my action class, when I create an ActionForward object using an absolute
path, Struts does not forward to the proper page.

The following code is working in Struts 1.1-b1:

public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest req, HttpServletResponse res) {

...
RedirectingActionForward redirect = new
RedirectingActionForward(http://localhost:8080/myapp/home.do;);
return redirect;
}

In Struts 1.1-b2, the same code tries to redirect to
http://localhost:8080/myapp/http:/localhost:8080/myapp/home.do 

I had the same problem when using regular ActionForward instead of
RedirectingActionForward.

Any suggestion?

Thanks,
Aymeric.

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

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



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