This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts 1.3- redirect a jsp to another jsp by hiding parameters in the URL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 1.3- redirect a jsp to another jsp by hiding parameters in the URL" Watch "Struts 1.3- redirect a jsp to another jsp by hiding parameters in the URL" New topic
Author

Struts 1.3- redirect a jsp to another jsp by hiding parameters in the URL

aditya bhagavathula
Greenhorn

Joined: Jul 27, 2011
Posts: 2
I have a struts application , where jsp1 has to redirect to another jsp on different server.While doing this I also want to send the parameters to other application and hide them [not showing them in the URL]

1) I first thought of writing a scriplet and do a response.sendRedirect(destination URL).By doing this, I could still see the attached parametersin the QueryString.

What are the possible options and if somebody could direct me in right way that would be great.

I am trying to do sth like this in my jsp

bean:parameter id="param1" name="param1" property="userName" />

<%

java.util.HashMap params = new java.util.HashMap(); params.put("userName", "param1"); params.put("passWord","param2"); pageContext.setAttribute("paramsName", params); %>

homepage.jsp

Here is my struts config


<action path="/homePagePre" type="com.ford.mpl.superg.action.home.HomePagePreAction" name="homeForm" scope="session" validate="false" parameter="method" input="/jsp/APSTest.jsp"> <forward name="httpGet" path="tile.home"></forward> <forward name="home" path="tile.home"></forward> <forward name="showBulletin" path="/jsp/home/completeBulletinMessage.jsp"></forward> </action>
aditya bhagavathula
Greenhorn

Joined: Jul 27, 2011
Posts: 2
aditya bhagavathula wrote:I have a struts application , where jsp1 has to redirect to another jsp on different server.While doing this I also want to send the parameters to other application and hide them [not showing them in the URL]

1) I first thought of writing a scriplet and do a response.sendRedirect(destination URL).By doing this, I could still see the attached parametersin the QueryString.

What are the possible options and if somebody could direct me in right way that would be great.

I am trying to do sth like this in my jsp

bean:parameter id="param1" name="param1" property="userName" />

<%

java.util.HashMap params = new java.util.HashMap(); params.put("userName", "param1"); params.put("passWord","param2"); pageContext.setAttribute("paramsName", params); %>

homepage.jsp

Here is my struts config


<action path="/homePagePre" type="com.ford.mpl.superg.action.home.HomePagePreAction" name="homeForm" scope="session" validate="false" parameter="method" input="/jsp/APSTest.jsp"> <forward name="httpGet" path="tile.home"></forward> <forward name="home" path="tile.home"></forward> <forward name="showBulletin" path="/jsp/home/completeBulletinMessage.jsp"></forward> </action>


Any Help?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts 1.3- redirect a jsp to another jsp by hiding parameters in the URL
 
Similar Threads
does html link provide
use html:link pass two param
enctype="multipart/form-data" request.getParameter() issue
Struts html:link problem
Invoking a page URL .. need to append parameters to a URL IBM Portal