This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to get Action Form in Struts ..." Watch "How to get Action Form in Struts ..." New topic
Author

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 logon.do.. but i have a filter on logon.do 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,
Harry
Nimchi Yung
Ranch Hand

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

request.getParameter("username")....

--Nimchi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get Action Form in Struts ...
 
Similar Threads
Problems deploying struts 2 app on weblogic 10gR3
WHAT THE $%#^%# IS HAPPENING HERE?
How to avoid sending authentication parameters in request url?
Using Struts and AJAX together causing redirection problems.
Problem invoking filter