File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes request parameter set in html:link showing the classname instead of value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "request parameter set in html:link showing the classname instead of value" Watch "request parameter set in html:link showing the classname instead of value" New topic
Author

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

Shyam Gee
Greenhorn

Joined: Sep 01, 2008
Posts: 3
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

Joined: Sep 01, 2008
Posts: 3
Sorry one correction. The output is,

com.jumper.dao.Listingcategory@749436
Shyam Gee
Greenhorn

Joined: Sep 01, 2008
Posts: 3
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>.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: request parameter set in html:link showing the classname instead of value
 
Similar Threads
Show Table from the database
Using bean:write with html:link
Struts logic:iterate + html:link
Using both struts html:link and bean:write error
Using bean:write with html:link