java - How to pass multiple parameters using html link in Struts1.x -


i trying pass multiple parameters struts action class using html link property. having link, should take 2 parameters jsp page action class.

how achieve this?

quote the documentation:

if prefer specify java.util.map contains of request parameters added hyperlink, use 1 of following techniques:

  • specify name attribute - named jsp bean (optionally scoped value of scope attribute) must identify java.util.map containing parameters.
  • specify both name , property attributes - specified property getter method called on bean identified name (and optional scope) attributes, in order return java.util.map containing parameters.

as map processed, keys assumed names of query parameters appended hyperlink. value associated each key must either string or string array representing parameter value(s), or object tostring() method called. if string array specified, more 1 value same query parameter name created.

supplmenting these 2 methods, can nest 1 or more tags dynamically add parameters in logic-friendly way (such executing loop assigns name/value pairs @ runtime). method not compete aforementioned; adds parameters in addition whatever parameters specified.

you can use regular html <a> tag , create url using standard <c:url> tag jstl.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -