This content has been marked as final.
Show 3 replies
-
1. Re: Error when loading Seam page with a Captcha
shivdeepk Nov 9, 2007 8:47 AM (in response to shivdeepk)Hi All,
[sorry about the double post]
I get an IllegalArgumentException when trying to load an XHTML page with a Captcha. I use seam-gen and modified the build.xml to include jcaptcha-all.jar. Any help would be very much appreciated:
Exception:02:13:37,559 ERROR [STDERR] 09-Nov-2007 02:13:37 com.sun.facelets.FaceletViewHandler handleRenderException SEVERE: Error Rendering View[/registration.xhtml] java.lang.IllegalArgumentException: Setter not found for property class at javax.faces.component.UIComponentBase$AttributesMap.put(UIComponentBase.java:1594) at javax.faces.component.UIComponentBase$AttributesMap.put(UIComponentBase.java:1499) at com.sun.facelets.tag.jsf.ComponentRule$LiteralAttributeMetadata.applyMetadata (ComponentRule.java:49) at com.sun.facelets.tag.MetadataImpl.applyMetadata(MetadataImpl.java:36) at com.sun.facelets.tag.MetaTagHandler.setAttributes(MetaTagHandler.java:62) at com.sun.facelets.tag.jsf.ComponentHandler.apply (ComponentHandler.java:144) at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47) ........ ........
environment:Seam 2.0.0.GA JBoss 4.2.1.GA JDK 1.5 Linux (Xubuntu Gutsy)
web.xml:<servlet-name>Seam Resource Servlet</servlet-name> <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class> <servlet-mapping> <servlet-name>Seam Resource Servlet</servlet-name> <url-pattern>/seam/resource/*</url-pattern> </servlet-mapping>
menu.xhtml:<s:link view="/registration.xhtml" value="Register" rendered="#{not identity.loggedIn}"/>
registration.xhtml:<h:graphicImage value="/seam/resource/captcha?#{captcha.id}" /> <h:outputLabel for="verifyCaptcha">Please enter the letters shown</h:outputLabel> <s:div> <h:inputText id="verifyCaptcha" value="#{captcha.response}" required="true"> <s:validate/> </h:inputText> <s:div class="error"><h:message for="verifyCaptcha" /></s:div> </s:div>
application.xml:<module> <ejb>lib/jcaptcha-all.jar</ejb> </module>
pages.xml:<page view-id="/registration.xhtml"> <navigation from-action="#{registration.registerUser}"> <rule if="#{not registration.verified}"> <redirect view-id="/registration.xhtml"/> </rule> <rule if="#{registration.verified}"> <redirect view-id="/home.xhtml"/> </rule> </navigation> </page>
package structure:MyApp.ear META-INF\application.xml MyApp.war lib\jcaptcha-all.jar
-
2. Re: Error when loading Seam page with a Captcha
gavin.king Nov 9, 2007 1:11 PM (in response to shivdeepk)Use
<s:div styleClass="..../>
-
3. Re: Error when loading Seam page with a Captcha
shivdeepk Nov 9, 2007 3:39 PM (in response to shivdeepk)It worked. Thanks Gavin!