aspose file tools*
The moose likes JSP and the fly likes help with JSP tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "help with JSP tag" Watch "help with JSP tag" New topic
Author

help with JSP tag

shah rah
Ranch Hand

Joined: Jan 04, 2007
Posts: 124
RegistrationForm regform = (RegistrationForm)form;
request.setAttribute("fullname",regform );
inside my jsp page

Welcome!
<%= ((org.apache.struts.company.RegistrationForm)request.getAttribute("fullname")).getfirstName()%>  
<%= ((org.apache.struts.company.RegistrationForm)request.getAttribute("fullname")).getlastName()%>

This works.., but I would like to know how to use jsp: useBean tag or any other jsp tag to do the above. appreciate help.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61656
    
  67

"shah_rah", you have previously been warned on one or more occasions regarding adjusting your display name to meet JavaRanch standards. This is not optional. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it prior to your next post.

Your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Be aware that accounts with invalid display names are removed.

bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61656
    
  67

If you are using JSP 2.0 (you did not include version information as requested by forum guidelines), it's as easy as:

${fullname.firstName}

${fullname.lastName}
shah rah
Ranch Hand

Joined: Jan 04, 2007
Posts: 124
how do i find out the JSP version? I am using eclipe 3.2.1 and I downloaded some plugins. pls help.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61656
    
  67

The IDE you use is irrelevant. What container are you using with it? Tomcat? If so, which version?

Knowing what versions of Servlets and JSP you are using is something you need to know before writing a single character of code.
[ January 20, 2007: Message edited by: Bear Bibeault ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: help with JSP tag