• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Update a Registration page using JSF and MySQL Database.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 <h:outputText value="#{login.username}"/> over to the managed bean employeeupd.java? Please help.....
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Saloon Keeper
Posts: 28468
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Can you really tell me that we aren't dealing with suspicious baked goods? And then there is this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic