Patrick Loretz

Greenhorn
+ Follow
since Apr 23, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Patrick Loretz

I found the problem, it seems that LoginBean.java in the strutsfiles.zip is different from that in the listings.
The .zip version is storing them as method variables, which is what messed me up (good lesson for me though).
That is the 2nd difference between the listings and the .zip file I found. The other was with the MessageResources.properties file missing a few entries.
Both had me banging my head against the wall, but also helped me understand a bit more about what is actually going on.
Thanks again for the great examples and article.
[ April 23, 2003: Message edited by: Patrick Loretz ]
20 years ago
I found this Struts article very helpful in getting started, better than anything else I've read. I also found this thread helpful in dealing with the problem of where to put struts.jar (and where not to put it).
What I am now running into with this example seems to be a problem with the HttpServletRequest information.
The userId and passWord I enter do not make it to the LoginBean.
This initially showed itself as a java.lang.NullPointerException in the
if (!userId.equals(passWord)) statement
A simple println showed that both useId and passWord are null prior to that if statement.
LoginForm is happy with the values entered, as it successfully checks for null or spaces.
I am using Tomcat 4.0.1 and Struts 1.0.2 on both Linux and Windows with the same results.
Any ideas would be appreciated.
Thank you,
Patrick
20 years ago