Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts Passing parameters

 
raju sand
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 440
Eclipse IDE Hibernate Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
raju sand
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
its resolve with javascript action using with hidden value

but is der any other way to achieve it
 
Saif Asif
Ranch Hand
Posts: 440
Eclipse IDE Hibernate Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic