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

How to get form values

Kai Unewisse

Joined: Nov 10, 2002
Posts: 10
Hi again,
I am a little bit confused. I defined a FormBean AForm with parameter p1 and p2.
I use :
<html:form action="/aAction">
<html:hidden property="p1" />
<html:hidden property="p1" />

I said in struts-config :
<action path="/aAction"
<forward ... />
Do I have to do something with the FormBean in the Action like that to use the Bean in the next JSP page :
AForm af = (AForm) actionForm;
request.setAttribute("name", af );
How can I receive Attributes from the FormBean ?
<jsp:useBean id="some" type="AForm" scope="request"> ???
But I receive then an empty field when I say :
<html:text size='5' property="p1" name="some" />
I agree. Here's the link:
subject: How to get form values
It's not a secret anymore!