Using Strust2 to make a simple landing interface, you can check the username of the login.
Make a login username and password into JavaBean, that is, to encapsulate it.
User class omitted
Loginaction
Struts.xml Configuration
Login Login Interface
Success and Error interface omitted
In this case, I made such a mistake.
Since username and password are encapsulated, the submission of my login interface is written like this
<input name= "username" .................>
This has always been a null pointer exception
I was the first to cancel than the user this code, found to be available, so there is no check the login interface
Then the package class is canceled, the user name and password are written in the action also useful,
But in turn, there's a 500 anomaly.
Later found the page on the submission made a small error
With the user name and password encapsulated, the page's submission should be changed to "property name. Object Name"
Make a simple landing with struts2