For Programmers: Free Programming Magazines  


Home > Archive > Java Help > September 2004 > Difference between <jsp:useBean> and <bean:define> ?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Difference between <jsp:useBean> and <bean:define> ?
Anan H. Samiti

2004-09-25, 3:59 pm

When I define something like the following in my ActionClass (in a Struts/JSP Architecture)

request.setAttribute("myVo", myVoObject);

I could access this object from my JSP page (as far as I know) by declaring a bean like:

<jsp:useBean id="myVo" class="mypackage.myVo" />

resp.

<bean:define id="myid" name="myVo" property="getVo" type="mypackage.myVo" />



But what is the difference?

Is the next html:text tag valid for both declarations?

<html:text name="myidValue" property="myValue" size="10" value="<%= myVo.getMyValue() %>" />

Anan

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com