Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jsp:getProperty

 
Suhas Saheer
Greenhorn
Posts: 17
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

I was going thru Head First JSP and Servlets.

Please see the below code snippet

Test.jsp
<form action=“TestBean.jsp”>
name: <input type=“text” name=“userName”>
ID#: <input type=“text” name=“userID”>
<input type=”submit”>
</form> </body></html>

TestBean.jsp
<jsp:useBean id=”person” type=”foo.Person” class=”foo.Employee”>
<jsp:setProperty name=”person” property=”name” param=”userName” />
</jsp:useBean>

When i run the program, i get the following exception...

org.apache.jasper.JasperException: /pages/JSTLTestPage3.jsp(12,0) GetProperty has invalid attribute: param


Please help me folks...

 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35753
412
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suhas,
Welcome to JavaRanch!

The error message refers to JSTLTestPage3.jsp, but you didn't post that page. Can you look for the source code that goes with the error message?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35753
412
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, what are you trying to do? getProperty doesn't have a param attribute.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65535
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's also no such action as GetProperty -- did you mean getProperty?
 
Suhas Saheer
Greenhorn
Posts: 17
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Jeanne Boyarsky
Actually the TestBean.jsp is the JSTLTestPage3.jsp

@Bear Bibeault Yes, i was refering to the getProperty action.
 
Vijitha Kumara
Bartender
Posts: 3953
21
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suhas Saheer wrote:When i run the program, i get the following exception...
org.apache.jasper.JasperException: /pages/JSTLTestPage3.jsp(12,0) GetProperty has invalid attribute: param

I think you are requesting the wrong page JSTLTestPage3.jsp instead Test.jsp ?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!