It's not a secret anymore!*
The moose likes JSF and the fly likes Update a Registration page using JSF and MySQL Database. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Update a Registration page using JSF and MySQL Database." Watch "Update a Registration page using JSF and MySQL Database." New topic
Author

Update a Registration page using JSF and MySQL Database.

gg mathew
Greenhorn

Joined: Aug 20, 2013
Posts: 1
I'm developing a web application using JSF 2.2 and MySQL in Nebeans 7.2 . I'm new to the concept of JSF. I've finished creating the registration page and a login page. What i now want is on a customer home page there is a link to update their details (i.e. details of their registration page). The following code is the update registration page.xhtml



This is the faces-config.xml



This is my managed bean


how will I be able to update the fields in the registration table? How will I be able to extract the <hutputText value="#{login.username}"/> over to the managed bean employeeupd.java? Please help.....
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2247
    
    7

You don't use the login bean. Instead you should use another bean for the update of the registration page.

From your page you already are using "employeeupd.xxx". So which bean are you referring to "employeeupd"?

I don't recommend cluttering 2 pages of attributes into a single bean.

About the username, you can put into the session scope and in the registration update page, fetch it from the session instead of the bean.


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15964
    
  19

You'll get better support when you strip out non-essentials from your examples. Anything that won't fit on one screen is more than it's worth my time to read unless I'm being paid for it. Plus, one of the first steps to solving any problem is to simplify it.

Because it's more than my bleary early-morning eyes can read, I can't comment on what you are specifically asking. But I will say this: J2EE comes with a built-in security system. It's integrated into the J2EE APIs, it's always available, and it was debugged over a decade ago. Which is more than I can say for user-designed login services. Over that same 10 years or so, I can't say I've ever seen a really secure user-designed login, even in the financial systems I've worked with. In your particular case, even if you don't make any of the usual mistakes that even non-hackers can quickly punch through, I think an SQL injection would make soggy paper-maché out of your security in no time at all.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Update a Registration page using JSF and MySQL Database.
 
Similar Threads
newbie null reference exception
connection b/w Two pages
inputText tag not working properly
bean in JSP cannot be resolved
The requested resource () is not available