0

spring security popup login window with chinese

asked 2009-06-11 16:08:39 +0800

cui2100 gravatar image cui2100
6

Hi!
who can tell me how can I popup the login window of spring security with chinese language ? I think this needs to revise the zkspring.jar

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2009-06-12 01:17:48 +0800

bdrhoa gravatar image bdrhoa
90 2

This example just overrides the user name & password fields.

Your security context needs:

. . .
    <http auto-config="true" >
        . . . 
           <!-- use own login page rather than the default one provided by the SPRING (not ZK) frame work (no .zul or .jsp) -->
        <form-login login-page="/login.zul"/>
        
    </http>
. . .

login.zul
<?taglib uri="/WEB-INF/tld/web/core.dsp.tld" prefix="c"?>
<?page id="testZul" title="CUSTOM ZK + SPRING SECURITY LOGIN"?>
<window id="loginwin" title="CUSTOM ZK + SPRING SECURITY LOGIN" border="normal" width="500px">
	<groupbox>
		<caption>Valid users</caption>
	<grid>
		<columns>
			<column label="${c:l('app.username')}"/>
			<column label="${c:l('app.password')}"/>
		</columns>
		<rows>
			<row>
				rod <label value="koala"/>
			</row>
			<row>
				dianne <label value="emu"/>
			</row>
			<row>
				scott <label value="wombat"/>
			</row>
			<row>
				peter <label value="opal"/>
			</row>
		</rows>
	</grid>
	</groupbox>
    <!-- this form-login-page form is also used as the
         form-error-page to ask for a login again. -->
    <html style="color:red" if="${not empty param.login_error}">
      <![CDATA[
        Your login attempt was not successful, try again.<br/><br/>
        Reason: ${SPRING_SECURITY_LAST_EXCEPTION.message}
       ]]>
    </html>

	<groupbox>
	<caption>ZUL Login</caption>
    <h:form id="f" name="f" action="j_spring_security_check" method="POST"
    xmlns:h="http://www.w3.org/1999/xhtml">
    	<grid>
    		<rows>
    			<row> 
    				<label value="${c:l('app.username')}"/>
    				<textbox id="u" name="j_username"/>
    			</row>
    			<row>
    				<label value="${c:l('app.password')}"/>
					<textbox id="passwordbox" name="j_password" type="password" constraint="no empty"/>
    			</row>
    	
    			<row><checkbox id="r" name="_spring_security_remember_me"/>Don't ask for my password for two weeks</row>
    			<row spans="2"><hbox>
    				<h:input type="submit" value="Submit Query"/>
  	  				<h:input type="reset" value="Reset"/>
    			</hbox></row>
    		</rows>
    	</grid>
    </h:form>
    </groupbox>
</window>

link publish delete flag offensive edit

answered 2009-06-12 13:19:48 +0800

cui2100 gravatar image cui2100
6

thank you very much! I will try it.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-06-11 16:08:39 +0800

Seen: 351 times

Last updated: Jun 12 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More