Hello,

I have used seam 2.0 successfully before with jboss 4.2 and jsf. Now I had 
downgrade do jboss 4.0.5 and  seam 1.2.1.

I'm not being able to get the authentication method called. All I get is 
"Conversion error" from the faces (myfaces) validator.
Here are some config files:

in components.xml

  | <security:identity authenticate-method="#{authenticator.authenticate}" />
  | 

My web.xml

  | <?xml version="1.0" ?>
  | 
  | <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee";
  |     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  |     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";>
  | 
  | 
  |     <!-- Seam -->
  |     <listener>
  |             <listener-class>
  |                     org.jboss.seam.servlet.SeamListener
  |             </listener-class>
  |     </listener>
  |     <!-- MyFaces -->
  |     <listener>
  |             <listener-class>
  |                     org.apache.myfaces.webapp.StartupServletContextListener
  |             </listener-class>
  |     </listener>
  |     <context-param>
  |             <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
  |             <param-value>client</param-value>
  |     </context-param>
  |     <servlet>
  |             <servlet-name>Faces Servlet</servlet-name>
  |             <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
  |             <load-on-startup>1</load-on-startup>
  |     </servlet>
  |     <!-- Faces Servlet Mapping -->
  |     <servlet-mapping>
  |             <servlet-name>Faces Servlet</servlet-name>
  |             <url-pattern>*.fise</url-pattern>
  |     </servlet-mapping>
  |     <context-param>
  |             <param-name>javax.faces.CONFIG_FILES</param-name>
  |             <param-value>/WEB-INF/navigation.xml</param-value>
  |     </context-param>
  |     <context-param>
  |             <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
  |             <param-value>.xhtml</param-value>
  |     </context-param>
  | 
  | </web-app>
  | 

In faces-config.xml

  | <faces-config>
  |     <application>
  |             <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
  |             <locale-config>
  |                     <default-locale>pt_BR</default-locale>
  |             </locale-config>
  |     </application>
  |       
  | </faces-config>
  | 

My authentication method


  | @In
  |     EntityManager entityManager;
  |     @In
  |     Identity identity;
  |     
  |     public boolean authenticate() {
  |             try {
  |                     entityManager.createQuery("from User where username = 
:username and password = :password").setParameter("username", 
identity.getUsername()).setParameter("password",
  |                                     
identity.getPassword()).getSingleResult();
  | 
  |                     return true;
  |             } catch (NoResultException ex) {
  |                     FacesMessages.instance().add("Invalid 
username/password");
  |                     return false;
  |             }
  | 
  |     }
  | 

Can anybody help? 
Thanks

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098905#4098905

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098905
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to