Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

request parameter set in html:link showing the classname instead of value

 
Shyam Gee
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Guys,

I am using struts 1.3. In my jsp I am passing a param as follows,




When I do a request.getParameter in the action class it returns the name of the class of the bean instead of the actual value.

Action Class Snippet:



Output:The value of title is: com.jumper.dao@749436.

What is confusing is the <bean:write> which is operating on the same property of the same bean, within <logic:iterate> tags is correctly displaying the values in jsp. But when the same property of the same bean is passed as a param in the request it doesnt display the value but the class name of the bean. Can someone tell me what I need to do to get the value of the bean property instead of the class name.

Thanks,
Shyam
 
Shyam Gee
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry one correction. The output is,

com.jumper.dao.Listingcategory@749436
 
Shyam Gee
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Guys,

Sorry wanted to add one more point. The bean 'categoryList' was set as a request attribute in the action class that forwarded to the jsp being presented. It contains a List<Listingcategory>.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic