How to send value using achor tag in Struts 2

How to send value using anchor tag in Struts2 please give me an example and I know we can achieve this using url tag, but I want it using anchor tag.

Assign hidden value using Struts2 tag

How assign the hidden value using Struts tag inside of iteration. My JSP code looks like this: <s:iterator value=collegelist> <s:hidden name=hiddenname value='<s:property value=colleg

How to set value of tag dynamically using javascript in struts2

I am new to Struts2.I unable to pass tag value dynamically through javascript.I have done this way <s:url id=temId action=updateProduct.action var=productTag> <s:param name=prodId&gt

How to use jquery autocomplete functionality in struts2 without using struts autocompleter tag

I am using jquery autocomplete functionality in struts2 without using struts autocompleter tag but its not work? <html <head <script> $(document).ready(function({ alert(Autocomplete); $

Struts 2: how to send JSON to action

How to send Json to action, on Struts2?

How to send value of textfield using onClickTopics struts2 jquery plugin

I’d like to send my textfield value when onClickTopics of one button. This button will reload the data from Jquery grid, but before reloading back bean of struts needs to compare few values from textf

how to display value to the select tag in struts2

How to display value to the select tag in struts2, I am using list of values as Map My code first type: action class, private Map<Integer, String> mapForSelect; mapForSelect.put(1, map 1); map

How to send post value ajax using onclick a tag?

How to send post value ajax using onclick a tag ? i create like this code but i not have any post value how can i do that ? ………………………………………………………………….

Struts | assign a value to a logic tag using Javascript

How do I assign a value to a struts logic tag using Javascript, I have tried many ways but never worked out. here’s the sample code: <logic:equal name=myName property=myId value=idValue >

How to show pagination using display tag in struts2

I am using struts2 and hibernate and now i want to know how to use the display tag in struts2. I have an action class which is fetching all the cities from database. Here is my action pa

How to retrieve the value of the select tag in Struts 2

I am using struts select tag to retrieve value from my database in displayed in the form on JSP page I stored the value in list object using following code ps = con.prepareStatement(select emp_ty_nam


The anchor a tag in Struts2 as well as the other tags could be parametrized with the param tag. Just place param tag in the body of the anchor tag. For example

<s:a action="myaction"><s:param name="myparam" value="%{property}"/></s:a> 

Create it like any other parameterized link.

Personally, I prefer to use JSP EL:

<a target="_blank" rel="nofollow" href="displayMails?foo=${someActionProperty}">${subject}</a>

But if you insist on tags:

<a target="_blank" rel="nofollow" href="displayMails?foo=<s:property value='%{someActionProperty}'/>">
  <s:property value="%{subject}"/>

… To use the S2 action name in the HREF.

<a target="_blank" rel="nofollow" href="<s:url action='displayMails'/>?foo=${someActionProperty}">${subject}</a>

At this point we’re back to having no idea why the S2 tag isn’t what you actually want.