struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <lukaszlen...@apache.org>
Subject Re: Jsp fields are null at startup
Date Fri, 02 Mar 2018 12:37:31 GMT
2018-03-02 13:31 GMT+01:00 albert kao <albertkao3@gmail.com>:
> My jsp fields username and password are null at startup (jsp page is
> loaded).
> Why?
> That make the "Invalid Username/Password. Please try again." message appear
> when the page is loaded.
> How to fix that?

Use two methods:
- execute() to display a form
- authenticate() to perform validation and login action

You must understand that flow in Struts is as follow:

request -> action -> jsp

so even opening a page, the execute() method is called


Regards
-- 
Ɓukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message