File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Doubt in Form Bean population Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Doubt in Form Bean population" Watch "Doubt in Form Bean population" New topic

Doubt in Form Bean population

Hemanth Pallavajula
Ranch Hand

Joined: Oct 07, 2004
Posts: 38
hi Friends,

I have a doubt in regard to population of data into form beans by Struts. I know that Struts internally uses request.getParameter() to get the value of a parameter. What I am trying to do is that, I am putting the two attributes as part of the query string. Thse attributes data needs to get populated in the form bean. Is this possible..?

I tried and I am getting NULL values.

Here is the code in the JSP:-

The code within the Action class is:-

The output is:-
bean.getId() is NULL
bean.getName() is NULL
Parameter Names :

Please help me in this regard.

Cheers,<br />Hemanth...<br />(When opportunity doesn't knock, build a door.)
sreenath reddy
Ranch Hand

Joined: Sep 21, 2003
Posts: 415
try saying method="POST" in ur form tag .......
I agree. Here's the link:
subject: Doubt in Form Bean population
It's not a secret anymore!