File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts2 parameters is coming null in action class

 
Santhosh Kalisamy
Ranch Hand
Posts: 59
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Action class


struts.xml



And JSP Page (Login.jsp)


web.xml




username & password is always coming null on Action class... Could anyone tell me, what am I missing?

But, the execute() has been executed properly. I am deploying this application on JBoss 5.1.0 and struts2-core-2.3.4.jar has been used


 
Mohana Rao Sv
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try the following snippet.
 
Santhosh Kalisamy
Ranch Hand
Posts: 59
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mohana.

But, it didn't work. Even, I tried introducing Beans. In that case, beans coming as null.

Even, I tried to give alert before form submit. Javascript Alert came good.



But, still null in Action class.
 
Santhosh Kalisamy
Ranch Hand
Posts: 59
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Removing Interceptors from Application worked. Does anyone tell me, what's wrong with my Interceptors configuration?

struts.xml



 
Santhosh Kalisamy
Ranch Hand
Posts: 59
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I found this is a problem with Interceptors, closing this thread.

Please follow below thread....

Struts2 parameters is coming null in action class when using Interceptors
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic