Everything works if I don't configure the validation.
I just added this in my validation.xml:

 <formset>
        <form name="loginForm">
            <field
                property="username"
                depends="required">
                    <arg key="label.username"/>
            </field>
            <field
                property="password"
                depends="required,mask">
                    <arg key="label.password"/>
                    <var>
                        <var-name>mask</var-name>
                        <var-value>^[0-9a-zA-Z]*$</var-value>
                    </var>
            </field>
        </form>
    </formset>

this is in my struts-config.xml:
   <action
            path="/LoginSubmit"
            type="it.unifi.tesi.struts.prova.ProvaAction"
            name="loginForm"
            scope="request"
            validate="true"
            input="/pages/Login.jsp">
       <exception
                key="login.failed"
                path="/pages/Login.jsp"
                type="it.unifi.tesi.struts.prova.InvalidLoginException"/>
        <exception
                path="/pages/SystemError.jsp"
                type="it.unifi.tesi.struts.prova.SystemException"/>
        <forward path="/pages/Welcome.jsp" name="registered"/>
        <forward path="/pages/Error.jsp" name="error"/>
        </action>

and this is my form:
<html:form action='LoginSubmit'>
        <table cols='2' border='0'>
                <tbody>
        <tr>
        <td><bean:message key="label.username"/></td>
        <td><html:text property='username'/></td>
        </tr>
        <tr>
        <td><bean:message key="label.password"/></td>
        <td><html:password property='password'/></td>
        </tr>
        <tr>
        <td colspan='2' align='center'>
        <html:submit><bean:message key="button.submit"/></html:submit>
        <html:reset><bean:message key="button.reset"/></html:reset>
         </td>
        </tr>
        </tbody>
        </table>
<jsp:useBean id="user_data" scope="session" class="it.unifi.tesi.struts.prova.User" />

</html:form>

thanks
eve

That appears to be a Tiles error, not a validator error; does it work if you don't configure any validation? If so, what validator configuration do you add that leads to the error below?

L.

eve wrote:
I have tiles working in my application. As i try to use the validator i get the following error
which may it be the cause?






javax.servlet.ServletException: Can't get definitions factory from context.

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)

org.apache.jsp.pages.Login_jsp._jspService(org.apache.jsp.pages.Login_jsp:75)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause
javax.servlet.jsp.JspException: Can't get definitions factory from context.

org.apache.struts.taglib.tiles.InsertTag.processDefinitionName(InsertTag.java:577)

org.apache.struts.taglib.tiles.InsertTag.createTagHandler(InsertTag.java:476)
    org.apache.struts.taglib.tiles.InsertTag.doStartTag(InsertTag.java:438)

org.apache.jsp.pages.Login_jsp._jspx_meth_tiles_insert_0(org.apache.jsp.pages.Login_jsp:91)

org.apache.jsp.pages.Login_jsp._jspService(org.apache.jsp.pages.Login_jsp:68)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to