I think the title explain my quesion. I need to add a link (or a button) in a label/span (never understand the real difference) by using Struts2 tags.
<s:label cssClass="menu_span">
<s:submit value="Login" />
</s:label>
This doesnt work. Also, i didnt see the s:span
(like s:html
, s:body
, s:head
, s:title
, s:img
, and so on...)
I t开发者_如何学Pythonried to watch the tag references, but seems that isnt possible do it!
Thanks
First, you don't need to use Struts2 tags where standard HTML tags work fine (which is why there isn't an s:html
tag, etc.) Tag libraries in JSP are there to simplify and standardize your HTML output to make it easier on you. When the tag syntax is practically the same as the output generated, they cease to be useful.
Second, what are you trying to achieve by wrapping a submit button in a label? Labels are used to associate text with a form element such as a radio button, checkbox, text field, etc. Buttons are already clickable, so I don't follow what you are trying to do.
精彩评论