Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get Action Form in Struts ...

 
Harry Singh
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can get the information from the HttpServletRequest.

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

--Nimchi
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic