This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Struts and the fly likes login with Struts2&MySQL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "login with Struts2&MySQL" Watch "login with Struts2&MySQL" New topic

login with Struts2&MySQL

kessy cruz

Joined: Dec 13, 2010
Posts: 29
Goodday all,
Please, i created a login page where i want to get the username and password from a Mysql database. Please, can somebody help me edit the code to be enable to get the username & password so that the user can login.
this is the code
Mohana Rao Sv
Ranch Hand

Joined: Aug 01, 2007
Posts: 485

Hi Cruz, Don't do database activities in action it's not industry standard's. Don't do this even for practice it awkward. Here the problem is you are returning true or false but you are supposed to return result type based on the condition T/F you have to specify the result type success / Failure page. And your execute method should have return type string.

ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
kessy cruz

Joined: Dec 13, 2010
Posts: 29
I did some modification but please I need some detail help. I'm new and I'm learning on my own. Hope †☺ hear from you.
It is sorta covered in the JavaRanch Style Guide.
subject: login with Struts2&MySQL
It's not a secret anymore!