aspose file tools*
The moose likes Struts and the fly likes Struts Passing parameters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Passing parameters" Watch "Struts Passing parameters" New topic
Author

Struts Passing parameters

raju sand
Greenhorn

Joined: Jun 16, 2013
Posts: 8
hey please help me

how can i send parameter values to stuts action class

actually i have list i displayed following way

ex:

1_link1
2_link2
3_link3


if i click link 1 i want parameter as 1
if i click link2 want parmeter 2


if i send html:link action=/actionclass?param=1"

but it shown in url

i dont want to shoow the param in url so how can i


please hrlp me
Saif Asif
Ranch Hand

Joined: Aug 11, 2011
Posts: 440

Greetings Raju ,

How about using the struts form with HTTP POST ? That way the param wont be shown in the URL .

Another way would be to use hidden values to pass the parameters from one action to another.


Muhammad Saif Asif Mirza
OCJA(5/6) OCJP(6) OCJWCD(6)
raju sand
Greenhorn

Joined: Jun 16, 2013
Posts: 8
its resolve with javascript action using with hidden value

but is der any other way to achieve it
Saif Asif
Ranch Hand

Joined: Aug 11, 2011
Posts: 440

There are several other ways to pass values between struts actions but for your case , those wont prove good. I'll tell you anyway

1. Use OGNL expressions in your struts.xml file to pass parameter from one action to another
2. Use the hidden value strategy
3. Make user of the ValueStack to pass paramters using JSTL and OGNL between the action classes.

Do post back for any further queries.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts Passing parameters