struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Navjot Singh" <navjo...@net4india.net>
Subject RE: Struts and inter-application messaging
Date Wed, 09 Jul 2003 15:16:56 GMT
think simple.

+ Struts does the job with in 1 context so when you forward for same
application, it works.
+ to forward to external app, use response.sendRedirect(externalURI).

encode the url before redirecting

HTH
-navjot
PS - it's almost 9pm here.


|-----Original Message-----
|From: douglas reames [mailto:dougrms@hotmail.com]
|Sent: Wednesday, July 09, 2003 8:36 PM
|To: struts-user@jakarta.apache.org
|Cc: dougr@rmsfinance.com
|Subject: Struts and inter-application messaging
|
|
|Good morning,
|
|BACKGROUND:
|I have a struts application that needs to:
|
|[a] Process a request within its own context.  Output:-  string to add
|parameters to URI path:  SQL=SELECT no, product,   vendor_no FROM table
|WHERE no=103,
|
|[b] Append parameters string from [a] to URI - that forwards control for
|future processing outside of Struts app.  Output:-
|http://same-server:8080/cocoon/excel-reports?SQL=SELECT no, product,
|vendor_no FROM table WHERE no=103, and  finally
|
|[c] Forward request to external application to complete processing
|sequence.
|
|PROBLEM:
|[a] and [b] are no problem.
|
|But when I attempt to Forward the result with a mapping.findForward(URI
|string), I get an illegal argument  exception -
|"java.lang.IllegalArgumentException: Path
|http://same-server:8080/cocoon/excel-reports?SQL=SELECT no, product,
|vendor_no FROM table WHERE no=103 does not start with a "/" character".
|This method, as I now understand it, restricts forwarding to
|intra-application.
|
|I get the same result when using org.apache.struts.actions.ForwardAction.
|
|QUESTION:
|What is the Struts way to handle forwarding a request to an external
|application?
|
|Best regards,
|Douglas Reames
|919 929 3465
|
|_________________________________________________________________
|Help STOP SPAM with the new MSN 8 and get 2 months FREE*
|http://join.msn.com/?page=features/junkmail
|
|
|---------------------------------------------------------------------
|To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
|For additional commands, e-mail: struts-user-help@jakarta.apache.org
|
|


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message