*
The moose likes JSP and the fly likes jsp:getProperty gives null Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp:getProperty gives null" Watch "jsp:getProperty gives null" New topic
Author

jsp:getProperty gives null

sam liyanage
Ranch Hand

Joined: Nov 25, 2008
Posts: 1071
I created bean class in my package.


how i set the values for bean class using jsp setproperty
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

sam liyanage
Ranch Hand

Joined: Nov 25, 2008
Posts: 1071
but still it gives null

Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

the useBean instance is different . give the id attribute name as same name
sam liyanage
Ranch Hand

Joined: Nov 25, 2008
Posts: 1071
I change it as below.then it says " duplicate local variable name mybean "

Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575



if you want to get the value just use <jsp:getProperty name="mybean" property="name"/> . no need to create the same bean again.

it is like below.which will cause compile time error.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsp:getProperty gives null
 
Similar Threads
cannot find symbol
complex data type in axis 2 web service
Exception in thread "main" org.springframework.beans.factory.BeanCreationException:
Error setting the expression with value [Ljava.lang.String;@1d05b0a
request time expression