Using Struts2 Tags (II)

16 January 2008

Please go through Using Struts2 Tags (I) before reading this one.

Hello.jsp

<body>
<h2><s:property value="message"/></h2>
 
<h3>Languages</h3>
<ul>
    <li>
        <s:url id="url" action="Hello ">
            <s:param name="request_locale">en</s:param>
        </s:url>
        <s:a href="%{url}">English</s:a>
    </li>
    <li>
        <s:url id="url" action="Hello ">
            <s:param name="request_locale">es</s:param>
        </s:url>
        <s:a href="%{url}">Espanol</s:a>
    </li>
</ul>
</body>

Explanation:

“%{url}” will be evaluated to the url defined with the s:url tag. On the Start and Hello pages, we use two different Struts tags to create links. We create Resource links, Direct links, and Links with parameters.

Do follow the other posts on this topic.

del.icio.us:Using Struts2 Tags (II)  digg:Using Struts2 Tags (II)  spurl:Using Struts2 Tags (II)  wists:Using Struts2 Tags (II)  simpy:Using Struts2 Tags (II)  newsvine:Using Struts2 Tags (II)  blinklist:Using Struts2 Tags (II)  furl:Using Struts2 Tags (II)  reddit:Using Struts2 Tags (II)  fark:Using Struts2 Tags (II)  blogmarks:Using Struts2 Tags (II)  Y!:Using Struts2 Tags (II)  smarking:Using Struts2 Tags (II)  magnolia:Using Struts2 Tags (II)  segnalo:Using Struts2 Tags (II)  gifttagging:Using Struts2 Tags (II)

Top Of Page | Trackback

If you found this page useful, consider linking to it. Simply copy and paste the code below into your web site.

It will look like this: Using Struts2 Tags (II)

Leave a Reply