Solved

JSF example errors

Posted on 2010-09-19
2
789 Views
Last Modified: 2013-11-24

hi,
I am trying to run chapter 4 related example from link

http://jsfcompref.com/code_download.html

I got this kind of error

<Sep 19, 2010 3:29:14 PM EDT> <Error> <HTTP> <BEA-101017> <[ServletContext@21864173[app:_auto_generated_ear_ module:CR_CH04 path:/CR_CH04 spec-version:2.5], request: weblogic.servlet.internal.ServletRequestImpl@83ba01[
POST /CR_CH04/faces/register.jsp HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Referer: http://localhost:7001/CR_CH04/faces/register.jsp
Accept-Language: en-us
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)
Content-Length: 334
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: JSESSIONID=wsGGMWjPHQ7NJKJVrz12hNMmdQxx6v6pxfm1cWhvqPywcD6j1hSz!-1918873751

]] Root cause of ServletException.
javax.faces.el.EvaluationException: Exception while invoking expression #{userBean.validateEmail}
      at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:168)
      at javax.faces.component._ComponentUtils.callValidators(_ComponentUtils.java:181)
      at javax.faces.component.UIInput.validateValue(UIInput.java:313)
      at javax.faces.component.UIInput.validate(UIInput.java:354)
      at javax.faces.component.UIInput.processValidators(UIInput.java:184)
      Truncated. see log file for complete stacktrace

Caused By: java.lang.NoSuchMethodException: com.jsfcompref.register.UserBean.validateEmail(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)
      at java.lang.Class.getMethod(Class.java:1605)
      at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:121)
      at javax.faces.component._ComponentUtils.callValidators(_ComponentUtils.java:181)
      at javax.faces.component.UIInput.validateValue(UIInput.java:313)
      at javax.faces.component.UIInput.validate(UIInput.java:354)
      Truncated. see log file for complete stacktrace

 after click in register button whch appeared after clicking first link as in screenshot.

(Chapter 4 Examples
Non functional Register.jsp to show managed properties, Pages 55-56

Sports_Interests.jsp page showing further managed bean and property examples, Pages 57-74

--------------------------------------------------------------------------------


when i click link (at url http://localhost:7001/CR_CH04/)

Non functional Register.jsp to show managed properties, Pages 55-56)

Please advise how can i fix it. Any links ideas sample code, resources etc highly appreciated. Thanks in advance



jsf-ch4.JPG
0
Comment
Question by:gudii9
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 20

Accepted Solution

by:
Sathish David  Kumar N earned 250 total points
ID: 33714210
Can you post your JSP ?
0
 
LVL 6

Assisted Solution

by:__geof__
__geof__ earned 250 total points
ID: 33714269
Exactly as the error says. The method validateEmail doesn't exist. You need to create it. To do so, you need a class that implements Validator and register it in your faces-config.

See http://blogs.sun.com/johnc/entry/validating_an_email_address_in and/or http://www.roseindia.net/jsf/validator.shtml for examples.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question