Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 26136 invoked from network); 30 Aug 2007 16:24:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Aug 2007 16:24:10 -0000 Received: (qmail 71562 invoked by uid 500); 30 Aug 2007 16:23:56 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 71550 invoked by uid 500); 30 Aug 2007 16:23:56 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 71539 invoked by uid 99); 30 Aug 2007 16:23:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2007 09:23:56 -0700 X-ASF-Spam-Status: No, hits=3.5 required=10.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Hayrol.Reyes@mhcp.gob.ni designates 165.98.49.17 as permitted sender) Received: from [165.98.49.17] (HELO mail2.conicyt.gob.ni) (165.98.49.17) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 30 Aug 2007 16:24:49 +0000 Received: from svdgtec40.mhcp.gob.ni ([10.1.116.31]) by mail2.conicyt.gob.ni (SMSSMTP 4.1.9.35) with SMTP id M2007083010224825283 for ; Thu, 30 Aug 2007 10:22:48 -0600 Received: from svdgtec39.mhcp.gob.ni ([10.1.116.34]) by svdgtec40.mhcp.gob.ni with Microsoft SMTPSVC(6.0.3790.1830); Thu, 30 Aug 2007 10:31:03 -0600 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C7EB23.28174CAD" Subject: ActionRedirect with wrong absolute path X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Thu, 30 Aug 2007 10:31:03 -0600 Message-ID: <70A19F605AF50E47974605D6D1279B4C8E0E2A@svdgtec39.mhcp.gob.ni> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: ActionRedirect with wrong absolute path thread-index: AcfrIygIyCASlC+1Rm6DbEzAJODVkA== From: =?iso-8859-1?Q?Hayrol_Reyes_Mej=EDa?= To: X-OriginalArrivalTime: 30 Aug 2007 16:31:03.0489 (UTC) FILETIME=[283E1B10:01C7EB23] X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01C7EB23.28174CAD Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi guys, I'm having a problem with Struts 1.2 and a IAS environment, the = problem is as follow: =20 The application use Struts 1.2 and Hibernate 3 and OraclaeAS 10g = (10.1.0.2). 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 "show_Product.do" 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 "edit_Product.do" = 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 "edit_Product.do" 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 "show_Product.do", after = the commit to the DB the action is executed and "show_Product.do" show = the Product.jsp with relevant changes included. =20 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 = (show_Product.do) is not executed and the browser show a "Error Page" = related to the connection problems, however the changes are committed = correctly in the DB. =20 The worst is that I get no error log related to the problem. =20 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 = edit_Product.do action is creating the next ActionRedirect using the URL = http://www.domain.com:7777/app/show_Product.do = ... and this aproach = fails becouse the www.domain.com is a DNS name = that already has the :7777 configured at itself. This is a two IAS = enviroment (server7.comp.com and server8.comp.com) and its behind a = front web accessed by a single http://www.domain.com = , in other words the ActionRedirect will not = fails if the URL will be = http://server7.comp.com:7777/app/show_Product.do, but Struts is adding = the DNS domain.com and the physical port number where the app is = installed. The application is only installed into the server7.comp.com = IAS on port 7777 and is accessed using www.domain.com/app/index.jsp = (port 80)... but there is a = internal port change. =20 More clearly: =20 http://www.domain.com/app/index.jsp = --> Works =20 http://www.domain.com:7777/app/index.jsp = --> Doesn't work <-- It's = causing the error. =20 http://server7.comp.com:7777/app/index.jsp = --> Works =20 http://192.168.1.50:7777/app/index.jsp --> Works <-- It's the IP of = server7 =20 I'm doing the following in the method that build the next action: =20 public ActionForward processActionForward(ActionMapping mapping, = HttpServletRequest request, ActionForward forward) { ActionRedirect ar =3D new ActionRedirect("/show_Product.do"); = // <--- I'm using relativity and redirect is true ar.addParameter("param1", "100")); ar.addParameter("param2", "month"); return ar; } =20 But when Struts execute the Forward (redirect true) after a POST .. then = it adds the www.domain.com:7777 before = the contextPath and the action url. =20 How I can tell Struts doesn't add the :7777 = port to the action URL and leave the = correct www.domain.com/app ? =20 Or, how I can tell Struts that add the internal = http://server7.comp.com:7777 = before the contextPath and = Action URL? =20 Or What I can use to deal with this lame environment? Can somebody help me? Thanks in advance, =20 Hayrol Reyes ------_=_NextPart_001_01C7EB23.28174CAD--