2

I am trying to migrate Struts 1 tags to Struts 2. Is there any cheat sheet available to do it?(I don't see any for migrating tags.) Need to know the equivalent tags in struts2

Especially : <html:base/> in struts1 equals to <s:head/> in struts2 ?

html:html
html:base
html:link forward
html:link page
html:html
html:form action
html:hidden
html:submit>
Roman C
  • 49,761
  • 33
  • 66
  • 176
rolling stone
  • 543
  • 1
  • 8
  • 26

1 Answers1

5

This is a table I've used long time ago:

+--------------------------+-------------------------------------+
|  <bean:write name=       | <s:property value=                  |
+==========================+=====================================+
| <bean:message key=       | <s:text name=                       |
+--------------------------+-------------------------------------+
| <html:rewrite            | <s:url value=                       |
+--------------------------+-------------------------------------+
| <html:link action=       | <s:a action=                        |
+--------------------------+-------------------------------------+
| <html:img action=        | <img src==                          |
+--------------------------+-------------------------------------+
| <html:img page=          | <img src=                           |
+--------------------------+-------------------------------------+
| <html:hidden property=   | <s:hidden name=                     |
+--------------------------+-------------------------------------+
| <html:submit             | <s:submit                           |
+--------------------------+-------------------------------------+
| </html:submit>           | </s:submit                          |
+--------------------------+-------------------------------------+
| <html:form               | <s:form                             |
+--------------------------+-------------------------------------+
| </html:form              | </s:form                            |
+--------------------------+-------------------------------------+
| <html:text               | <s:textfield                        |
+--------------------------+-------------------------------------+
| <html:password           | <s:password                         |
+--------------------------+-------------------------------------+
| <html:select property=   | <s:select  name=                    |
+--------------------------+-------------------------------------+
| <html:optionsCollection  | <s:select list= listKey= listValue= |
+--------------------------+-------------------------------------+
| <html:checkbox property= | <s:checkbox name=                   |
+--------------------------+-------------------------------------+
| <html:file               | <s:file name=                       |
+--------------------------+-------------------------------------+
| <html:button             | <input type=“button”                |
+--------------------------+-------------------------------------+

other you can find in my answers.

Roman C
  • 49,761
  • 33
  • 66
  • 176
  • 1
    Thanks mate helpful – rolling stone Nov 13 '17 at 16:34
  • You never know who upvoted your question but you can ask if you need it. If the question or answer is helpful then it should be accepted and upvoted. You should know that and it is absolutely free upvoting someone's answer. – Roman C Dec 27 '17 at 14:26