Can we mix java code and struts together. Meaning if I want to assign a java variable a value which is stored in a struts tag or form bean property <% String str = <bean:write name="myBean" property="midrange"/>; System.out.println("string ::"+str); %>
This obviously fails..giving a compile time error. How do i assign values stored in beans to java variables. Excuse me for writing scriplets in jsp page when we really have struts framework.Its a temp solution.
<blockquote><font size="1" face="Verdana, Arial">quote:</font><hr>I have no special talent. <b>I am only passionately curious.</b> <br /> <br />Albert Einstein <hr></blockquote>
posted 10 years ago
You can't insert a <bean:write> tag inside a java scriptlet. However, everything that a <bean:write> tag can do, you can do in java. You just have to change the syntax.