The Struts bean:write tag can probably do this for you. 

<bean:write name="student" property="fullName"/>

Check the source to see how it is done. 

For more help with taglibs generally, please visit our friends at
Jakarta Taglibs or the JSP Forum at JGuru. 

http://jakarta.apache.org/taglibs/index.html

http://jguru.com/forums/JSP

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


Yaman Kumar wrote:
> 
> Hi,
> I'm newbee to JSP taglibraries, I'm having some doubts
> in creating a tag library declared below.
> 
> <disp:print name="student" property="fullName" />
> 
> In TagHandler java flile I have got all these into methods, But
> how would I invoke getFullName() method on student instance
> some thing like
> student.getFullName(); in TagHandler class.
> As  this information in getter/setter methods is in String format.
> 
> I tried like this and I'm not able to go ahead.
> 
> objName = pageContext.getAttribute(getName());
> nameType= objName.getClass().getType();
> objType = getType(); //tag handler method
> if(nameType.equals(objType) ){
> 
>    //here i would like to call
> 
> }
> 
> TIA
> Rayaku
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to