struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hayrol Reyes Mejía <>
Subject ActionRedirect with wrong absolute path
Date Thu, 30 Aug 2007 16:31:03 GMT
Hi guys, I'm having a problem with Struts 1.2 and a IAS environment, the problem is as follow:


The application use Struts 1.2 and Hibernate 3 and OraclaeAS 10g ( The Application
works very well in the developer OAS, but doesn't in the production's OAS (two servers).

The problems occurss when the application need to do a ActionRedirect (redirect true), after
a simple update/insert into the DB (with Hibernate). The flow is as follow:
 1).- The "" is launched and it goes well and show the Product.jsp (with the
show section actived).
 2).- The user press the "Update" buttom, then the "" action is executed and
the Product.jsp is showed (with the edit section actived).
 3).- The user modify the product info and press the "Save" buttom, then the ""
action is executed with the parameter "save" ..... then the action class calls to the "save"
method of the ProductForm and the ActionRedirect is configured to point to "",
after the commit to the DB the action is executed and "" show the Product.jsp
with relevant changes included.


This normal process works very well in our developers environment IAS but doesn't in the production
IAS. In the production environment the application committed the changes but the last ActionRedirect
( is not executed and the browser show a "Error Page" related to the connection
problems, however the changes are committed correctly in the DB.


The worst is that I get no error log related to the problem.


After looking and looking for a error (in the App log, IAS log, http log, etc) I found (with
a help of a snifer program) that the action is creating the next ActionRedirect
using the URL <>
 ... and this aproach fails becouse the <>  is
a DNS name that already has the :7777 configured at itself. This is a two IAS enviroment (
and and its behind a front web accessed by a single
<> , in other words the ActionRedirect will not fails if the URL
will be, but Struts is adding the DNS
and the physical port number where the app is installed. The application is only installed
into the IAS on port 7777 and is accessed using
<>  (port 80)... but there is a internal port change.
More clearly: <>   --> Works <>
  --> Doesn't work <-- It's causing the error. <>
  --> Works --> Works <-- It's the IP of server7
I'm doing the following in the method that build the next action:
public ActionForward processActionForward(ActionMapping mapping, HttpServletRequest request,
ActionForward forward) {

       ActionRedirect ar = new ActionRedirect("/");   // <--- I'm using
relativity and redirect is true

       ar.addParameter("param1", "100"));

       ar.addParameter("param2", "month");
return ar;
But when Struts execute the Forward (redirect true) after a POST .. then it adds the
<>  before the contextPath and the action url.
How I can tell Struts doesn't add the :7777 <>  port to the
action URL and leave the correct <> ?
Or, how I can tell Struts that add the internal <>
 before the contextPath and Action URL?
Or What I can use to deal with this lame environment?

Can somebody help me?

Thanks in advance,


Hayrol Reyes

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message