Hello, to All. I'm as searching long time how to create login from on primefaces for Sprint Secutiry+ Sprint WebFlow, but cant found any question.
And my implementing dotn work. Can somebody help me to implement this?
I have login page:
I have next faces config:Code:<ui:define name="mainZone"> <h:form prependId="false"> <p:growl id="messages" showDetail="true" sticky="true" autoUpdate="true" /> <p:panelGrid columns="2"> <f:facet name="header"> <h:outputText style="text-align: center" value="Введите ваши идентификационные данные" /> </f:facet> <p:row> <p:column> <h:outputLabel for="j_username" value="Ваш логин:" /> </p:column> <p:column> <p:inputText id='j_username' name='j_username' label="Логин" required="true" /> </p:column> </p:row> <p:row> <p:column> <h:outputLabel for="j_password" value="Ваш пароль:" /> </p:column> <p:column> <p:password id='j_password' name='j_password' label="Пароль" required="true" /> </p:column> </p:row> <p:row> <p:column style="text-align: center"> <h:outputLabel for="_spring_security_remember_me" value="Запомнить Вас?" /> </p:column> <p:column> <p:selectBooleanCheckbox id='_spring_security_remember_me' name='_spring_security_remember_me'/> </p:column> </p:row> <p:row> <p:column colspan="2" style="text-align: center"> <p:commandButton action="login" value="Войти в систему" /> </p:column> </p:row> <f:facet name="footer"> <h:outputText style="text-align: center; font-size: xx-small;" value="#{asgePortalVersion.version}" /> </f:facet> </p:panelGrid> </h:form> </ui:define>
I have the next security config:Code:<navigation-rule> <from-view-id>/login.xhtml</from-view-id> <navigation-case> <from-outcome>login</from-outcome> <to-view-id>/j_spring_security_check.html</to-view-id> </navigation-case> </navigation-rule>
And next config in web.xml:Code:... <form-login login-page="/login.html" authentication-failure-url="/login.html" login-processing-url="/j_spring_security_check.html" /> ...
Or may be somebody post working code with primefaces?Code:<context-param> <param-name>javax.faces.DEFAULT_SUFFIX</param-name> <param-value>.xhtml</param-value> </context-param> .... <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>*.html</url-pattern> </servlet-mapping>


Reply With Quote
