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 Action Form in Struts ... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to get Action Form in Struts ..." Watch "How to get Action Form in Struts ..." New topic

How to get Action Form in Struts ...

Harry Singh
Ranch Hand

Joined: May 02, 2001
Posts: 124
Hi Gurus,

I have just srated some development on struts.. and basically i am using some filters with struts log in.. so i am capturing username/password and sending it to but i have a filter on and in that filter i need to get an acces to that initial log on sturts form.. so that i can use sumthing like this..

DForm logonForm = (DForm) form;
String username = (String) logonForm.get("username");
String password = (String) logonForm.get("password");

Is there a way i can get an instance of form in my filter?

Thanks & Regards,
Nimchi Yung
Ranch Hand

Joined: Jan 27, 2004
Posts: 71
You can get the information from the HttpServletRequest.


I agree. Here's the link:
subject: How to get Action Form in Struts ...
jQuery in Action, 3rd edition