tags:

views:

534

answers:

2

i have jsp file in which most of tha struts tag now for some field i have to use simple html tag but when i put html tag the format of page is chaged. if i use only struts tag then each strut tag are written in new row so. how can i show two different struts tag in single row.

+1  A: 

You can use normal HTML tags along with Struts tags in a JSP. Struts isn't strict in that way. Regarding the error that you get, it would be much better if you could post the code you use and describe in detail the error that you get.

Note that I haven't really worked in Struts2 - only in Struts 1, but I assume you should still be able to mix normal HTML tags with Struts tags in Struts2 too...

Shivasubramanian A
i have solve that problem by putting theme=simple in form tag.so that struts can not add it own format.and then simple write string directly as html. beacause label is not working when we use theme=simple.
lakhaman
A: 

Hello Lakhaman

u won't believe that I just logged-in to post the same issue. for instance:

<s:submit label="login" />
<s:submit label="cancel" />

OR

 <s:submit label="login" align="left"/><s:submit label="cancel" align="right"/>

it wd render a code :

    <tr>
    <td colspan="2"><div align="left"><input type="submit" id="Login_0" value="Submit"/>
</div></td>
</tr>
<tr>
    <td colspan="2"><div align="right"><input type="submit" id="Login_1" value="Submit"/>
</div></td>
</tr>

i.e. it renders tabulated format of the same code. And I am still unable to resolve the issue. But my concern is your approach! I mean i didn't get where did u put theme=simple in form tag? what was meant by form tag? I don't think there is any form tag in struts.xml in struts2.

did u meant anythg else? cld u plz elaborate or provide exact code snipet! tx