You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Emi Lu <em...@encs.concordia.ca> on 2009/03/05 21:22:05 UTC

Access ActionForm methods/varaibles in JSP

Good morning,

In JSP file, may I know how to get action bean please?

<form action="..." name="f1">
    <%
       if(f1.getCode().equals('abc'))
       {

    %>
    <table>   ... ...  </table>
    <%
       }
    %>
</form>



In JSP, I'd like to know how to call "methods, fields" in action form bean?

Thanks a lot!
--
Lu Ying



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Access ActionForm methods/varaibles in JSP

Posted by Emi Lu <em...@encs.concordia.ca>.
> I suggest that you not embed Java code in JSPs in scriptlets like this.
>  It's better to use Struts tags instead.
> Are you looking at using Struts 1 or Struts 2?

Struts1 for now. Do you have a simple code. I am not sure I quite 
understand how you propose to use java code in JSP?

Thanks,
--
Lu Ying




> 
> On Thu, Mar 5, 2009 at 3:22 PM, Emi Lu <em...@encs.concordia.ca> wrote:
> 
>> Good morning,
>>
>> In JSP file, may I know how to get action bean please?
>>
>> <form action="..." name="f1">
>>   <%
>>      if(f1.getCode().equals('abc'))
>>      {
>>
>>   %>
>>   <table>   ... ...  </table>
>>   <%
>>      }
>>   %>
>> </form>
>>
>>
>>
>> In JSP, I'd like to know how to call "methods, fields" in action form bean?
>>
>> Thanks a lot!
>> --
>> Lu Ying
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Access ActionForm methods/varaibles in JSP

Posted by Jim Kiley <jh...@summa-tech.com>.
I suggest that you not embed Java code in JSPs in scriptlets like this.
 It's better to use Struts tags instead.
Are you looking at using Struts 1 or Struts 2?

jk

On Thu, Mar 5, 2009 at 3:22 PM, Emi Lu <em...@encs.concordia.ca> wrote:

> Good morning,
>
> In JSP file, may I know how to get action bean please?
>
> <form action="..." name="f1">
>   <%
>      if(f1.getCode().equals('abc'))
>      {
>
>   %>
>   <table>   ... ...  </table>
>   <%
>      }
>   %>
> </form>
>
>
>
> In JSP, I'd like to know how to call "methods, fields" in action form bean?
>
> Thanks a lot!
> --
> Lu Ying
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com