0

I am using Struts2 framework to implement the MVC architecture in my Web application. While allowing the user to obtain an ID-specific session, I need to take the username and password from a JSP form. Instead of passing this data to the Action class directly, I want to check the validity of the values in an Interceptor and then check or continue the flow depending on business logic-specific criteria.

Hence, my quest is to obtain the user data from the JSP form in the Interceptor. What is (if there's any) way to do that?

Thanks in advance!

Yash
  • 1
  • 2
  • possible duplicate of [Interceptor can't access Action Parameters](http://stackoverflow.com/questions/17650146/interceptor-cant-access-action-parameters) – Roman C Dec 16 '14 at 09:25

1 Answers1

1

If you are validating the username and password through a call to a DB or another service,it would be better to have a separate action for it. However subsequent calls to business logic can be prehandled via the request context in the interceptor itself.

abhati
  • 309
  • 1
  • 6