shimingxy 5 年之前
父节点
当前提交
31d2e69018
共有 72 个文件被更改,包括 2062 次插入1101 次删除
  1. 57 2
      maxkey-core/src/main/java/org/maxkey/domain/Groups.java
  2. 20 12
      maxkey-core/src/main/java/org/maxkey/web/InitApplicationContext.java
  3. 15 0
      maxkey-core/src/main/java/org/maxkey/web/tag/St.java
  4. 68 0
      maxkey-core/src/main/java/org/maxkey/web/tag/StaticTagDirective.java
  5. 2 12
      maxkey-dao/src/main/resources/org/maxkey/dao/persistence/xml/mysql/AccountsMapper.xml
  6. 1 12
      maxkey-dao/src/main/resources/org/maxkey/dao/persistence/xml/mysql/ApplicationsMapper.xml
  7. 1 12
      maxkey-dao/src/main/resources/org/maxkey/dao/persistence/xml/mysql/GroupsMapper.xml
  8. 0 2
      maxkey-protocols/maxkey-protocol-authorize/bin/main/.gitignore
  9. 1 1
      maxkey-protocols/maxkey-protocol-cas/bin/main/.gitignore
  10. 0 2
      maxkey-protocols/maxkey-protocol-desktop/bin/main/.gitignore
  11. 0 2
      maxkey-protocols/maxkey-protocol-extendapi/bin/main/.gitignore
  12. 1 1
      maxkey-protocols/maxkey-protocol-formbased/bin/main/.gitignore
  13. 0 2
      maxkey-protocols/maxkey-protocol-ltpa/bin/main/.gitignore
  14. 1 1
      maxkey-protocols/maxkey-protocol-oauth-2.0/bin/main/.gitignore
  15. 0 1
      maxkey-protocols/maxkey-protocol-saml-2.0/bin/main/.gitignore
  16. 0 2
      maxkey-protocols/maxkey-protocol-tokenbased/bin/main/.gitignore
  17. 12 2
      maxkey-web-manage/.classpath
  18. 1 2
      maxkey-web-manage/.settings/org.eclipse.core.resources.prefs
  19. 2 4
      maxkey-web-manage/.settings/org.eclipse.wst.common.component
  20. 32 2
      maxkey-web-manage/src/main/java/org/maxkey/MaxKeyMgtApplication.java
  21. 14 2
      maxkey-web-manage/src/main/java/org/maxkey/MaxKeyMgtConfig.java
  22. 4 4
      maxkey-web-manage/src/main/java/org/maxkey/web/contorller/AccountsController.java
  23. 2 2
      maxkey-web-manage/src/main/java/org/maxkey/web/endpoint/CaptchaEndpoint.java
  24. 1 1
      maxkey-web-manage/src/main/resources/log4j2.xml
  25. 19 0
      maxkey-web-manage/src/main/resources/messages/message.properties
  26. 125 89
      maxkey-web-manage/src/main/resources/templates/views/accounts/appAccountsList.ftl
  27. 41 75
      maxkey-web-manage/src/main/resources/templates/views/apps/appsList.ftl
  28. 7 12
      maxkey-web-manage/src/main/resources/templates/views/apps/cas/appAdd.ftl
  29. 9 14
      maxkey-web-manage/src/main/resources/templates/views/apps/cas/appUpdate.ftl
  30. 31 36
      maxkey-web-manage/src/main/resources/templates/views/apps/desktop/appAdd.ftl
  31. 32 37
      maxkey-web-manage/src/main/resources/templates/views/apps/desktop/appUpdate.ftl
  32. 26 31
      maxkey-web-manage/src/main/resources/templates/views/apps/extendapi/appAdd.ftl
  33. 27 32
      maxkey-web-manage/src/main/resources/templates/views/apps/extendapi/appUpdate.ftl
  34. 30 34
      maxkey-web-manage/src/main/resources/templates/views/apps/formbased/appAdd.ftl
  35. 30 35
      maxkey-web-manage/src/main/resources/templates/views/apps/formbased/appUpdate.ftl
  36. 21 26
      maxkey-web-manage/src/main/resources/templates/views/apps/ltpa/appAdd.ftl
  37. 24 29
      maxkey-web-manage/src/main/resources/templates/views/apps/ltpa/appUpdate.ftl
  38. 26 31
      maxkey-web-manage/src/main/resources/templates/views/apps/oauth20/appAdd.ftl
  39. 27 34
      maxkey-web-manage/src/main/resources/templates/views/apps/oauth20/appUpdate.ftl
  40. 27 32
      maxkey-web-manage/src/main/resources/templates/views/apps/saml20/appAdd.ftl
  41. 30 35
      maxkey-web-manage/src/main/resources/templates/views/apps/saml20/appUpdate.ftl
  42. 3 9
      maxkey-web-manage/src/main/resources/templates/views/apps/tokenbased/appAdd.ftl
  43. 4 9
      maxkey-web-manage/src/main/resources/templates/views/apps/tokenbased/appUpdate.ftl
  44. 197 0
      maxkey-web-manage/src/main/resources/templates/views/config/ipaddrfilter/ipaddrfilterList.ftl
  45. 0 0
      maxkey-web-manage/src/main/resources/templates/views/config/ipaddrfilter/ipaddrfilterList2.jsp
  46. 5 8
      maxkey-web-manage/src/main/resources/templates/views/config/passwordpolicy/passwordpolicy.ftl
  47. 5 0
      maxkey-web-manage/src/main/resources/templates/views/exception/error.ftl
  48. 0 12
      maxkey-web-manage/src/main/resources/templates/views/groupapp/addGroupAppsList.jsp
  49. 1 12
      maxkey-web-manage/src/main/resources/templates/views/groupapp/groupAppsList.jsp
  50. 1 5
      maxkey-web-manage/src/main/resources/templates/views/groups/groupAdd.jsp
  51. 117 41
      maxkey-web-manage/src/main/resources/templates/views/groups/groupsList.ftl
  52. 119 39
      maxkey-web-manage/src/main/resources/templates/views/logs/loginAppsHistoryList.ftl
  53. 85 0
      maxkey-web-manage/src/main/resources/templates/views/logs/loginAppsHistoryList2.ftl
  54. 162 0
      maxkey-web-manage/src/main/resources/templates/views/logs/loginHistoryList.ftl
  55. 0 79
      maxkey-web-manage/src/main/resources/templates/views/logs/loginHistoryList.jsp
  56. 93 0
      maxkey-web-manage/src/main/resources/templates/views/logs/loginHistoryList2.ftl
  57. 150 0
      maxkey-web-manage/src/main/resources/templates/views/logs/logsList.ftl
  58. 0 99
      maxkey-web-manage/src/main/resources/templates/views/logs/logsList.jsp
  59. 73 0
      maxkey-web-manage/src/main/resources/templates/views/logs/logsList2.ftl
  60. 5 8
      maxkey-web-manage/src/main/resources/templates/views/main.ftl
  61. 1 1
      maxkey-web-manage/src/main/resources/templates/views/orgs/orgsList.ftl
  62. 206 0
      maxkey-web-manage/src/main/resources/templates/views/orgs/orgsList2.jsp
  63. 5 9
      maxkey-web-manage/src/main/resources/templates/views/report/loginApp.ftl
  64. 5 9
      maxkey-web-manage/src/main/resources/templates/views/report/loginBrowser.ftl
  65. 4 8
      maxkey-web-manage/src/main/resources/templates/views/report/loginDay.ftl
  66. 4 8
      maxkey-web-manage/src/main/resources/templates/views/report/loginMonth.ftl
  67. 4 8
      maxkey-web-manage/src/main/resources/templates/views/report/loginYear.ftl
  68. 6 6
      maxkey-web-manage/src/main/resources/templates/views/userinfo/changePassword.ftl
  69. 0 64
      maxkey-web-manage/src/main/resources/templates/views/userinfo/selectUserTypeList.jsp
  70. 26 1
      maxkey-web-maxkey/src/main/java/org/maxkey/MaxKeyApplication.java
  71. 13 0
      maxkey-web-maxkey/src/main/java/org/maxkey/MaxKeyConfig.java
  72. 1 1
      maxkey-web-maxkey/src/main/resources/log4j2.xml

+ 57 - 2
maxkey-core/src/main/java/org/maxkey/domain/Groups.java

@@ -2,11 +2,13 @@ package org.maxkey.domain;
 
 import java.io.Serializable;
 
+import javax.persistence.Table;
+
 import org.apache.mybatis.jpa.persistence.JpaBaseDomain;
 import org.hibernate.validator.constraints.Length;
 
 
-
+@Table(name = "GROUPS")  
 public class Groups extends JpaBaseDomain implements Serializable{
 	/**
 	 * 
@@ -18,7 +20,12 @@ public class Groups extends JpaBaseDomain implements Serializable{
 	@Length(max=60)
 	private String name;
 	private int isdefault;
-	
+	String description;
+	String createdBy;
+	String createdDate;
+	String modifiedBy;
+	String modifiedDate;
+	String status;
 	
 	public Groups() {}
 	
@@ -58,6 +65,54 @@ public class Groups extends JpaBaseDomain implements Serializable{
 		this.isdefault = isdefault;
 	}
 
+	public String getDescription() {
+		return description;
+	}
+
+	public void setDescription(String description) {
+		this.description = description;
+	}
+
+	public String getCreatedBy() {
+		return createdBy;
+	}
+
+	public void setCreatedBy(String createdBy) {
+		this.createdBy = createdBy;
+	}
+
+	public String getCreatedDate() {
+		return createdDate;
+	}
+
+	public void setCreatedDate(String createdDate) {
+		this.createdDate = createdDate;
+	}
+
+	public String getModifiedBy() {
+		return modifiedBy;
+	}
+
+	public void setModifiedBy(String modifiedBy) {
+		this.modifiedBy = modifiedBy;
+	}
+
+	public String getModifiedDate() {
+		return modifiedDate;
+	}
+
+	public void setModifiedDate(String modifiedDate) {
+		this.modifiedDate = modifiedDate;
+	}
+
+	public String getStatus() {
+		return status;
+	}
+
+	public void setStatus(String status) {
+		this.status = status;
+	}
+
 	/* (non-Javadoc)
 	 * @see java.lang.Object#toString()
 	 */

+ 20 - 12
maxkey-core/src/main/java/org/maxkey/web/InitApplicationContext.java

@@ -21,6 +21,8 @@ import org.maxkey.util.PathUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ConfigurableApplicationContext;
 import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
 import org.springframework.web.context.support.WebApplicationContextUtils;
 
@@ -28,8 +30,11 @@ import org.springframework.web.context.support.WebApplicationContextUtils;
  * @author Crystal.Sea
  *
  */
-public class InitWebContext extends HttpServlet {
-    private static final Logger _logger = LoggerFactory.getLogger(InitWebContext.class);
+public class InitApplicationContext extends HttpServlet {
+    private static final Logger _logger = LoggerFactory.getLogger(InitApplicationContext.class);
+    
+    ApplicationContext   applicationContext;
+    
    /**
     * 
     */
@@ -62,8 +67,12 @@ public class InitWebContext extends HttpServlet {
    /**
     * 
     */
-   public InitWebContext() {
-      
+   public InitApplicationContext() {
+	   this.applicationContext=WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
+   }
+   
+   public InitApplicationContext(ConfigurableApplicationContext  applicationContext) {
+	   this.applicationContext=applicationContext;
    }
    
    public void  loadCaches(){
@@ -71,8 +80,8 @@ public class InitWebContext extends HttpServlet {
        _logger.info("Load Caches ");
        
 	   try {
-			if(WebApplicationContextUtils.getWebApplicationContext(this.getServletContext()).containsBean("cacheFactory")){
-				CacheFactory cacheFactory=WebApplicationContextUtils.getWebApplicationContext(this.getServletContext()).getBean("cacheFactory", CacheFactory.class);
+			if(applicationContext.containsBean("cacheFactory")){
+				CacheFactory cacheFactory=applicationContext.getBean("cacheFactory", CacheFactory.class);
 				cacheFactory.start();
 			}
 		} catch (BeansException e) {
@@ -82,11 +91,11 @@ public class InitWebContext extends HttpServlet {
 	   
    }
    public void listDataBaseVariables(){
-	   if(WebApplicationContextUtils.getWebApplicationContext(this.getServletContext()).containsBean("dataSource")){
+	   if(applicationContext.containsBean("dataSource")){
 	      try {
 	         _logger.info("----------------------------------------------------------------------------------------------------");
 	         _logger.info("List DatabaseMetaData Variables ");
-	         Connection connection = ((javax.sql.DataSource)WebApplicationContextUtils.getWebApplicationContext(this.getServletContext()).getBean("dataSource")).getConnection();
+	         Connection connection = ((javax.sql.DataSource)applicationContext.getBean("dataSource")).getConnection();
 	      
 	         java.sql.DatabaseMetaData databaseMetaData = connection.getMetaData();
 	         _logger.info("DatabaseProductName   :   "   +   databaseMetaData.getDatabaseProductName());  
@@ -113,10 +122,10 @@ public class InitWebContext extends HttpServlet {
    
    //propertySourcesPlaceholderConfigurer
    public void listProperties(){
-	   if(WebApplicationContextUtils.getWebApplicationContext(this.getServletContext()).containsBean("propertySourcesPlaceholderConfigurer")){
+	   if(applicationContext.containsBean("propertySourcesPlaceholderConfigurer")){
 	         _logger.info("----------------------------------------------------------------------------------------------------");
 	         _logger.info("List Properties Variables ");
-	         PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer = ((PropertySourcesPlaceholderConfigurer)WebApplicationContextUtils.getWebApplicationContext(this.getServletContext()).getBean("propertySourcesPlaceholderConfigurer"));
+	         PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer = ((PropertySourcesPlaceholderConfigurer)applicationContext.getBean("propertySourcesPlaceholderConfigurer"));
 	         Properties properties=(Properties)propertySourcesPlaceholderConfigurer.getAppliedPropertySources().get(PropertySourcesPlaceholderConfigurer.LOCAL_PROPERTIES_PROPERTY_SOURCE_NAME).getSource();
 	         Set<Object> keyValue = properties.keySet();
 	         SortedSet<String> keyValueSet=new TreeSet<String>();
@@ -158,8 +167,7 @@ public class InitWebContext extends HttpServlet {
       _logger.info("+                        MaxKey Version 1.0 GA");
       _logger.info("");
       _logger.info("+                    Copyright (c) 2018-2019 Maxkey .");
-      _logger.info("+               We're focus on Identity and Access Management ");
-      _logger.info("+                     https://github.com/shimingxy/MaxKey");
+      _logger.info("+                    https://github.com/shimingxy/MaxKey");
       _logger.info("----------------------------------------------------------------------------------------------------");
    }
 

+ 15 - 0
maxkey-core/src/main/java/org/maxkey/web/tag/St.java

@@ -0,0 +1,15 @@
+package org.maxkey.web.tag;
+
+public class St {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		String cv="com.ddm.core.utils.TestClass@InnerClass1@InnerClass2@p2";
+		
+		String[] c = cv.trim().split("@");
+		for(String cs : c) {
+			System.out.println(cs);
+		}
+	}
+
+}

+ 68 - 0
maxkey-core/src/main/java/org/maxkey/web/tag/StaticTagDirective.java

@@ -0,0 +1,68 @@
+package org.maxkey.web.tag;
+
+import java.io.IOException;
+import java.lang.reflect.Field;
+import java.util.Map;
+
+import freemarker.core.Environment;
+import freemarker.template.TemplateDirectiveBody;
+import freemarker.template.TemplateDirectiveModel;
+import freemarker.template.TemplateException;
+import freemarker.template.TemplateModel;
+/**
+    *  静态变量读取
+ *   <@static/>
+ * @author Crystal.Sea
+ *
+ */
+
+@FreemarkerTag("static")
+public class StaticTagDirective implements TemplateDirectiveModel {
+	
+
+	@Override
+	public void execute(Environment env, Map params, TemplateModel[] loopVars, TemplateDirectiveBody body)
+			throws TemplateException, IOException {
+		 
+	        // 获取字符串变量
+	        String[] c = params.get("name").toString().trim().split("@");
+	 
+	        StringBuffer sb = new StringBuffer();
+	        try {
+	            if(null == c || c.length < 2) {
+	                throw new TemplateException("至少应该包含一个@符。", env);
+	            }
+	 
+	            Class<?> clazz = null;
+	            for(int i=0;i<c.length;i++) {
+	                sb.append(c[i]).append("@");
+	                if(i == 0) {
+	                    clazz = Class.forName(c[i]);
+	                } else if(i != c.length - 1) {
+	                    Class<?>[] clazzs = clazz.getDeclaredClasses();
+	                    boolean flag = false;
+	                    for(Class<?> clz : clazzs) {
+	                        if(clz.getSimpleName().equals(c[i])) {
+	                            clazz = clz;
+	                            flag = true;
+	                            break;
+	                        }
+	                    }
+	                    if(!flag) {
+	                        throw new TemplateException("内部类 " + sb.substring(0, sb.length() - 1) + " 未找到。", env);
+	                    }
+	                } else {
+	                    Field sp = clazz.getDeclaredField(c[i]);
+	                    env.getOut().write(sp.get(clazz).toString());
+	                }
+	            }
+	        } catch (ClassNotFoundException e) {
+	            throw new TemplateException("类 " + sb.substring(0, sb.length() - 1) + " 未找到。", e.getCause(), env);
+	        } catch (NoSuchFieldException e) {
+	            throw new TemplateException("属性 " + sb.substring(0, sb.length() - 1) + " 未找到。", e.getCause(), env);
+	        } catch (IllegalAccessException e) {
+	            throw new TemplateException("没权限访问 " + sb.substring(0, sb.length() - 1) + " 属性。", e.getCause(), env);
+	        }
+	}
+
+}

+ 2 - 12
maxkey-dao/src/main/resources/org/maxkey/dao/persistence/xml/mysql/AccountsMapper.xml

@@ -19,24 +19,14 @@
     
 	
 	
-	<select id="grid" parameterType="Accounts" resultType="Accounts">
+	<select id="queryPageResults" parameterType="Accounts" resultType="Accounts">
 		SELECT
 			*
 		FROM
-			APP_ACCOUNTS
+			ACCOUNTS
 		WHERE
 			 (1=1)	
 		<include refid="where_statement"/>
 	</select>
 	
-	<select id="count" parameterType="Accounts" resultType="java.lang.Integer">
-		SELECT
-			COUNT(*) 
-		FROM
-			APP_ACCOUNTS
-		WHERE
-			 (1=1)	
-		<include refid="where_statement"/>
-	</select>
-
 </mapper>

+ 1 - 12
maxkey-dao/src/main/resources/org/maxkey/dao/persistence/xml/mysql/ApplicationsMapper.xml

@@ -24,7 +24,7 @@
 	</sql>
 	
 	
-	<select id="grid" parameterType="Applications" resultType="Applications">
+	<select id="queryPageResults" parameterType="Applications" resultType="Applications">
 		SELECT
 			*
 		FROM
@@ -35,16 +35,5 @@
 		ORDER BY SORTORDER 
 	</select>
 	
-	<select id="count" parameterType="Applications" resultType="java.lang.Integer">
-		SELECT
-			COUNT(*) 
-		FROM
-			APPLICATIONS
-		WHERE
-			 (1=1)	
-		<include refid="where_statement"/>
-		
-	</select>
-	
 	
 </mapper>

+ 1 - 12
maxkey-dao/src/main/resources/org/maxkey/dao/persistence/xml/mysql/GroupsMapper.xml

@@ -13,7 +13,7 @@
     
 	
 	
-	<select id="grid" parameterType="Groups" resultType="Groups">
+	<select id="queryPageResults" parameterType="Groups" resultType="Groups">
 		SELECT
 			*
 		FROM
@@ -23,17 +23,6 @@
 		<include refid="where_statement"/>
 	</select>
 	
-	<select id="count" parameterType="Groups" resultType="java.lang.Integer">
-		SELECT
-			COUNT(*) 
-		FROM
-			GROUPS
-		WHERE
-			 (1=1)	
-		<include refid="where_statement"/>
-	</select>
-	
-	
 	
 	<update id="logisticDelete" parameterType="Groups" >
     	UPDATE GROUPS SET

+ 0 - 2
maxkey-protocols/maxkey-protocol-authorize/bin/main/.gitignore

@@ -1,2 +0,0 @@
-/META-INF/
-/org/

+ 1 - 1
maxkey-protocols/maxkey-protocol-cas/bin/main/.gitignore

@@ -1,2 +1,2 @@
-/META-INF/
 /org/
+/META-INF/

+ 0 - 2
maxkey-protocols/maxkey-protocol-desktop/bin/main/.gitignore

@@ -1,2 +0,0 @@
-/META-INF/
-/org/

+ 0 - 2
maxkey-protocols/maxkey-protocol-extendapi/bin/main/.gitignore

@@ -1,2 +0,0 @@
-/META-INF/
-/org/

+ 1 - 1
maxkey-protocols/maxkey-protocol-formbased/bin/main/.gitignore

@@ -1,2 +1,2 @@
-/META-INF/
 /org/
+/META-INF/

+ 0 - 2
maxkey-protocols/maxkey-protocol-ltpa/bin/main/.gitignore

@@ -1,2 +0,0 @@
-/META-INF/
-/org/

+ 1 - 1
maxkey-protocols/maxkey-protocol-oauth-2.0/bin/main/.gitignore

@@ -1,2 +1,2 @@
-/META-INF/
 /org/
+/META-INF/

+ 0 - 1
maxkey-protocols/maxkey-protocol-saml-2.0/bin/main/.gitignore

@@ -1,2 +1 @@
-/META-INF/
 /org/

+ 0 - 2
maxkey-protocols/maxkey-protocol-tokenbased/bin/main/.gitignore

@@ -1,2 +0,0 @@
-/META-INF/
-/org/

+ 12 - 2
maxkey-web-manage/.classpath

@@ -1,7 +1,17 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="src/main/resources"/>
-	<classpathentry kind="src" path="src/main/java"/>
+	<classpathentry kind="src" output="bin/main" path="src/main/resources">
+		<attributes>
+			<attribute name="gradle_scope" value="main"/>
+			<attribute name="gradle_used_by_scope" value="main,test"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="src" output="bin/main" path="src/main/java">
+		<attributes>
+			<attribute name="gradle_scope" value="main"/>
+			<attribute name="gradle_used_by_scope" value="main,test"/>
+		</attributes>
+	</classpathentry>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
 	<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
 	<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer">

+ 1 - 2
maxkey-web-manage/.settings/org.eclipse.core.resources.prefs

@@ -1,3 +1,2 @@
 eclipse.preferences.version=1
-encoding//src/main/resources/templates/views/login.ftl=UTF-8
-encoding/<project>=UTF-8
+encoding/<project>=UTF-8

+ 2 - 4
maxkey-web-manage/.settings/org.eclipse.wst.common.component

@@ -1,12 +1,10 @@
-<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
 	<wb-module deploy-name="maxkey-web-manage">
 		<property name="context-root" value="maxkey-mgt"/>
 		<wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/resources"/>
 		<wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/java"/>
 		<wb-resource deploy-path="/" source-path="src/main/webapp"/>
-        <wb-resource deploy-path="/WEB-INF/classes" source-path="/static"/>
-        <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
-        <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
 		<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/maxkey-core/maxkey-core">
 			<dependency-type>uses</dependency-type>
 		</dependent-module>

+ 32 - 2
maxkey-web-manage/src/main/java/org/maxkey/MaxKeyMgtApplication.java

@@ -1,26 +1,56 @@
 package org.maxkey;
 
 
+import java.util.Date;
+
+import javax.servlet.ServletException;
+
+import org.maxkey.web.InitApplicationContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.builder.SpringApplicationBuilder;
 import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.ImportResource;
 
 @SpringBootApplication
 @ImportResource(locations={"classpath:spring/maxkey-mgt.xml"})
 @ComponentScan(basePackages = {
-		"org.maxkey.MaxKeyConfig"
+		"org.maxkey.MaxKeyMgtConfig"
 	}
 )
 public class MaxKeyMgtApplication extends SpringBootServletInitializer {
+	private static final Logger _logger = LoggerFactory.getLogger(MaxKeyMgtApplication.class);
+	
 
+	@Bean
+	MaxKeyMgtConfig MaxKeyMgtConfig() {
+		return new MaxKeyMgtConfig();
+	}
+	
 	public static void main(String[] args) {
-		SpringApplication.run(MaxKeyMgtApplication.class, args);
+		
+		ConfigurableApplicationContext  applicationContext =SpringApplication.run(MaxKeyMgtApplication.class, args);
+		InitApplicationContext initWebContext=new InitApplicationContext(applicationContext);
+		try {
+			initWebContext.init(null);
+		} catch (ServletException e) {
+			e.printStackTrace();
+			_logger.error("",e);
+		}
+		_logger.info("MaxKeyMgt at "+new Date(applicationContext.getStartupDate()));
+		_logger.info("MaxKeyMgt Server Port "+applicationContext.getBean(MaxKeyMgtConfig.class).getPort());
+		_logger.info("MaxKeyMgt started.");
+		
+		
 	}
 
 	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
+		
 		return application.sources(MaxKeyMgtApplication.class);
 	}
 

+ 14 - 2
maxkey-web-manage/src/main/java/org/maxkey/MaxKeyMgtConfig.java

@@ -1,10 +1,22 @@
 package org.maxkey;
 
-import org.springframework.context.annotation.ComponentScan;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.ImportResource;
+import org.springframework.context.annotation.PropertySource;
+import org.springframework.stereotype.Component;
 
 @Configuration
+@Component
+@PropertySource("classpath:/application.properties")
 public class MaxKeyMgtConfig {
+	@Value("${server.port:8080}")
+    private int port;
 
+	public int getPort() {
+		return port;
+	}
+
+	public void setPort(int port) {
+		this.port = port;
+	}
 }

+ 4 - 4
maxkey-web-manage/src/main/java/org/maxkey/web/contorller/AccountsController.java

@@ -43,7 +43,7 @@ public class AccountsController {
 	
 	@RequestMapping(value={"/list"})
 	public ModelAndView appAccountsList(){
-		ModelAndView modelAndView=new ModelAndView("app/accounts/list");
+		ModelAndView modelAndView=new ModelAndView("/accounts/appAccountsList");
 		return modelAndView;
 	}
 
@@ -56,14 +56,14 @@ public class AccountsController {
 	
 	@RequestMapping(value = { "/forwardSelect/{appId}" })
 	public ModelAndView forwardSelect(@PathVariable("appId") String appId) {
-		ModelAndView modelAndView=new ModelAndView("app/accounts/appAccountsAddSelect");
+		ModelAndView modelAndView=new ModelAndView("/accounts/appAccountsAddSelect");
 		modelAndView.addObject("appId",appId);
 		return modelAndView;
 	}
 	
 	@RequestMapping(value = { "/forwardAdd" })
 	public ModelAndView forwardAdd(@ModelAttribute("appAccounts") Accounts appAccounts) {
-		ModelAndView modelAndView=new ModelAndView("app/accounts/appAccountsAdd");
+		ModelAndView modelAndView=new ModelAndView("/accounts/appAccountsAdd");
 		Applications  app= applicationsService.get(appAccounts.getAppId());
 		appAccounts.setAppName(app.getName());
 		modelAndView.addObject("model",appAccounts);
@@ -88,7 +88,7 @@ public class AccountsController {
 	
 	@RequestMapping(value = { "/forwardUpdate/{id}" })
 	public ModelAndView forwardUpdate(@PathVariable("id") String id) {
-		ModelAndView modelAndView=new ModelAndView("app/accounts/appAccountsUpdate");
+		ModelAndView modelAndView=new ModelAndView("/accounts/appAccountsUpdate");
 		Accounts appAccounts =accountsService.get(id);
 		
 		appAccounts.setRelatedPassword(ReciprocalUtils.decoder(appAccounts.getRelatedPassword()));

+ 2 - 2
maxkey-web-manage/src/main/java/org/maxkey/web/endpoint/CaptchaEndpoint.java

@@ -20,9 +20,9 @@ import com.google.code.kaptcha.Producer;
 /**
  * @author Crystal.Sea
  *
- */
+ */ 
 @Controller
-@RequestMapping(value = "/captcha")
+@RequestMapping(value = "/captcha") 
 public class CaptchaEndpoint {
 	private static final Logger _logger = LoggerFactory.getLogger(CaptchaEndpoint.class);
 	

+ 1 - 1
maxkey-web-manage/src/main/resources/log4j2.xml

@@ -15,8 +15,8 @@
 		          <OnStartupTriggeringPolicy />
 		          <TimeBasedTriggeringPolicy />
 		          <SizeBasedTriggeringPolicy size="128 MB" />
-		          <DefaultRolloverStrategy max="100"/>
 		     </Policies>
+		     <DefaultRolloverStrategy max="100"/>
 		</RollingFile>
 	 </appenders>  
 	 

+ 19 - 0
maxkey-web-manage/src/main/resources/messages/message.properties

@@ -162,7 +162,26 @@ apps.icon=\u56FE\u6807
 apps.name=\u5E94\u7528\u540D\u79F0
 apps.protocol=\u8BBF\u95EE\u534F\u8BAE
 apps.category=\u7C7B\u578B
+apps.protocol.formbased=\u8868\u5355\u8BA4\u8BC1
+apps.protocol.desktop=\u684C\u9762\u8BA4\u8BC1
+apps.protocol.tokenbased=\u4EE4\u724C\u8BA4\u8BC1
+apps.protocol.oauth2.0=OAuth2.0
+apps.protocol.saml2.0=SAML2.0
+apps.protocol.ltpa=\u8F7B\u91CF\u7EA7\u8BA4\u8BC1(LTPA)
+apps.protocol.cas=CAS\u8BA4\u8BC1
+apps.protocol.extendapi=API\u6269\u5C55\u8BA4\u8BC1
+apps.protocol.basic=\u57FA\u672C\u767B\u5F55
+apps.vendor=\u4F9B\u5E94\u5546
 
+group.name=\u7528\u6237\u7EC4
+
+account.username=\u7528\u6237\u540D
+account.displayName=\u7528\u6237\u59D3\u540D
+account.appId=\u5E94\u7528\u7F16\u53F7
+account.appName=\u5E94\u7528\u540D\u79F0
+account.relatedUsername=\u7528\u6237\u8D26\u53F7
+account.relatedPassword=\u8D26\u53F7\u5BC6\u7801
+ 
 button.text.action=\u8BBF\u95EE
 button.text.visit=\u8BBF\u95EE
 button.text.save=\u4FDD\u5B58

+ 125 - 89
maxkey-web-manage/src/main/resources/templates/views/accounts/appAccountsList.ftl

@@ -1,100 +1,136 @@
-<%@ page   contentType="text/html; charset=UTF-8" import="java.util.Map,java.util.LinkedHashMap" %>
-<%@ taglib prefix="spring"		uri="http://www.springframework.org/tags" %>
-<%@ taglib prefix="c"			uri="http://java.sun.com/jsp/jstl/core"%>
-<%@ taglib prefix="s" uri="http://www.connsec.com/tags" %>
-<%@ page 	import="org.maxkey.constants.*"%>
-<style>
-<!--
-	.ui-jqgrid tr.jqgrow td {
-		line-height: 10px;
-	}
--->
-</style>
-<script type="text/javascript">	
-   	
-	$(function () {
-		$("#insertAppAccountBtn").on("click",function(){
-			var settings={
-					url		:	"<s:Base/>/app/accounts/forwardSelect/"+$("#appId").val(),//window url
-					title	:	"New",//title
-					width	:	"700",//width
-					height	:	"500"//height
-				};
-			$.window(settings);//open window
-		});
-		
-		$("#deleteGroupAppsBtn").on("click",function(){
-			var selectIds = $("#list").jqGrid("getGridParam", "selarrrow");
-			if(selectIds == null || selectIds == "") {
-				$.alert({content:$.platform.messages.select.alertText});
-				return false;
-			}
-			$("#appId").val(selectIds);
-			$("#submitBtn").click();
-		});
-		
-		$("#appSearchBtn").on("click",function(){
-			var postData=$("#advanced_search_app_form").serializeObject();
-			$("#list").jqGrid('setGridParam',{postData: postData}).trigger("reloadGrid");
-		});
-	});
-</script>
+<!DOCTYPE HTML>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<#include  "../layout/header.ftl"/>
+	<#include  "../layout/common.cssjs.ftl"/>
+</head>
+<body> 
+<div class="app header-default side-nav-dark">
+<div class="layout">
+	<div class="header navbar">
+		<#include  "../layout/top.ftl"/>
+	</div>
+	
+	<div class="col-md-3 sidebar-nav side-nav" >
+		<#include  "../layout/sidenav.ftl"/>
+	</div>
+	<div class="page-container">
+	
+	<div class="main-content">
+					<div class="container-fluid">
+
+						<div class="breadcrumb-wrapper row">
+							<div class="col-12 col-lg-3 col-md-6">
+								<h4 class="page-title">Dashboard 2</h4>
+							</div>
+							<div class="col-12 col-lg-9 col-md-6">
+								<ol class="breadcrumb float-right">
+									<li><a href="index.html">Dashboard</a></li>
+									<li class="active">/ Dashboard 2</li>
+								</ol>
+							</div>
+						</div>
+
+					</div>
+					<div class="container-fluid">
 
+					<div class="col-12 grid-margin">
+						<div class="card">
+							<div class="card-body">
+							
 	<div id="tool_box">
-	 		<table   class="datatable">
- 				<tr>
-		 			<td width="120px"><s:Locale code="apps.name"/>:</td>
-		 			<td width="374px">
-		 				<form id="basic_search_form">
-				 			<input class="appId" id="appId" name="appId" type="hidden" >
-				 			<input class="appName"   style="width:200px"   id="appName" name="appName" type="text" >
-				 			<s:Dialog text="button.text.select" title="Groups" url="/apps/select"  width="700" height="550"  />
-				 			
-				 			<input class="button primary"  id="searchBtn" type="button" size="50" value="<s:Locale code="button.text.search"/>">
-				 			
-				 		</form>
-		 			</td>
-				 	<td colspan="2"> <div id="tool_box_right">
-				 		<input class="button"  id="advancedSearchExpandBtn" type="button" size="50"  value="<s:Locale code="button.text.expandsearch"/>" expandValue="<s:Locale code="button.text.expandsearch"/>"  collapseValue="<s:Locale code="button.text.collapsesearch"/>">
-						
-						<input class="button"  id="insertAppAccountBtn" type="button" value="<s:Locale code="button.text.add"/>">
-						<input class="button"   id="modifyBtn" type="button" value="<s:Locale code="button.text.edit"/>"  target="window"
-						 			wurl="<s:Base/>/app/accounts/forwardUpdate" wwidth="500px"  wheight="300px">
-						 		    
-						 	<input class="button"   id="deleteBtn" type="button" value="<s:Locale code="button.text.delete"/>"
-						 			wurl="<s:Base/>/app/accounts/delete" />
-				 	</div>
-				 	</td>
-				</tr>
-			
-			</table>
+		<table   class="table table-bordered">
+			<tr>
+				<td  width="120px">
+			 		 <@locale code="account.username"/>:
+				</td>
+				<td  width="375px">
+					<form id="basic_search_form">
+				 			<input  class="form-control"  name="username" type="text" style ="width:150px;float:left;">
+				 			<input  class="button btn btn-primary mr-3"    id="searchBtn" type="button" size="50" value="<@locale code="button.text.search"/>">
+				 			<input  class="button btn btn-secondary"  id="advancedSearchExpandBtn" type="button" size="50"  value="<@locale code="button.text.expandsearch"/>" expandValue="<@locale code="button.text.expandsearch"/>"  collapseValue="<@locale code="button.text.collapsesearch"/>">
+					 	</form>
+				</td>
+				<td colspan="2"> 
+					 <div id="tool_box_right">	    
+						 <input class="button btn btn-success mr-3" id="addBtn" type="button" value="<@locale code="button.text.add"/>" 
+						 		    wurl="<@base/>/users/forwardSelectUserType"
+						 		    wwidth="960"
+						 		    wheight="600"
+					 		    	target="window">	    	
+					 		    	
+					 	<input class="button btn btn-info mr-3 " id="modifyBtn" type="button" value="<@locale code="button.text.edit"/>" 
+					 				wurl="<@base/>/users/forwardUpdate"
+					 				wwidth="960"
+						 		    wheight="600"
+					 		    	target="window"> 
+					 		    	
+					 	<input class="button btn btn-danger mr-3 "  id="deleteBtn" type="button" value="<@locale code="button.text.delete"/>"
+					 				wurl="<@base/>/users/delete" />
+					</div>
+				</td>
+			</tr>
+		</table>
+ 		
+		
  	</div>
  	
-
  	<div id="advanced_search">
  		<form id="advanced_search_form">
-	 		<table   class="datatable">
+ 			<table    class="table table-bordered">
 	 			<tr>
-		 			<td width="120px"><s:Locale code="userinfo.username"/></td>
+	 				<td width="120px"><@locale code="account.displayName"/></td>
 		 			<td width="360px">
-		 				<input type="text" name="username" >
+		 				<input  class="form-control"  name="displayName" type="text" >
 		 			</td>
-		 			<td width="120px"><s:Locale code="userinfo.appaccouts.relatedUsername"/></td>
+		 			<td width="120px"><@locale code="account.relatedUsername"/></td>
 		 			<td width="360px">
-		 				<input type="text" name="relatedUsername" >
-		 			</td>
-	 			</tr>
-	 		</table>
-	 	</form>
+						<input class="form-control"  type="text" id="relatedUsername" name="relatedUsername"  title="" value=""/>
+			 			</td>
+		 			
+			 </tr>
+			</table>
+ 		</form>
  	</div>
-	<div class="mainwrap" id="main">
-			<s:Grid id="list" url="/app/accounts/grid" multiselect="false" resize="true">	
-				<s:Column width="0" field="id" title="id" hidden="true"/>
-				<s:Column width="100" field="uid" title="userinfo.id" hidden="true"/>
-				<s:Column width="100" field="username" title="userinfo.username"/>
-				<s:Column width="100" field="displayName" title="userinfo.displayName"/>
-				<s:Column width="100" field="appId" title="apps.id" hidden="true"/>
-				<s:Column width="100" field="appName" title="apps.name"/>
-				<s:Column width="100" field="relatedUsername" title="userinfo.appaccouts.relatedUsername"/>
-			</s:Grid>
-	</div>
+ 	<table  data-url="<@base/>/app/accounts/grid"
+			id="datagrid"
+			data-toggle="table"
+			data-classes="table table-bordered table-hover table-striped"
+			data-pagination="true"
+			data-total-field="records"
+			data-page-list="[10, 25, 50, 100]"
+			data-search="false"
+			data-locale="zh-CN"
+			data-query-params="dataGridQueryParams"
+			data-query-params-type="pageSize"
+			data-side-pagination="server">
+		<thead>
+			<tr>
+			<th data-sortable="true" data-field="id"   data-visible="false">Id</th>
+			<th data-field="username"><@locale code="account.username"/></th>
+			<th data-field="displayName"><@locale code="account.displayName"/></th>
+			<th data-field="appName"><@locale code="account.appName"/></th>
+			<th data-field="appId"><@locale code="account.appId"/></th>
+			<th data-field="relatedUsername"><@locale code="account.relatedUsername"/></th>
+			</tr>
+		</thead>
+	</table>
+</div>
+	
+</div>
+					</div>
+<footer class="content-footer">
+					<#include  "../layout/footer.ftl"/>
+</footer>
+
+	</div>
+	
+	</div>
+</div>
+
+<div id="preloader">
+<div class="loader" id="loader-1"></div>
+</div>
+
+</body>
+</html>

+ 41 - 75
maxkey-web-manage/src/main/resources/templates/views/apps/appsList.ftl

@@ -1,14 +1,11 @@
-<%@ page   language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
-<%@ taglib prefix="c"       	uri="http://java.sun.com/jsp/jstl/core"  %>
-<%@ taglib prefix="s" 			uri="http://sso.maxkey.org/tags" %> 
 <!DOCTYPE HTML>
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-	<jsp:include page="../../layout/header.jsp"></jsp:include>
-	<jsp:include page="../../layout/common.cssjs.jsp"></jsp:include>
+	<#include  "../layout/header.ftl"/>
+	<#include  "../layout/common.cssjs.ftl"/>
 <script type="text/javascript">				
 	function iconFormatter(value, options, rData){
-  			return "<img width='30' height='30' border='0px' src='<s:Base/>/image/"+rData["id"]+"'/>";
+  			return "<img width='30' height='30' border='0px' src='<@base/>/image/"+rData["id"]+"'/>";
 	};
 	
 	function vendorFormatter(value, options, rData){
@@ -55,7 +52,7 @@
 			}
 			var selData= $("#list").jqGrid("getRowData",selectIds);
 			
-			$.forward({url:"<s:Base/>/apps/"+parserProtocolPath(selData["protocol"])+"/forwardUpdate/"+selData["id"]});
+			$.forward({url:"<@base/>/apps/"+parserProtocolPath(selData["protocol"])+"/forwardUpdate/"+selData["id"]});
 		});
 		
 			//delete and batch delete button
@@ -74,7 +71,7 @@
 			    content		:	$.platform.messages.del.conformText,
 			    callback	: 	function () {
 					//delete action post to url with ids
-					var deleteUrl="<s:Base/>/apps/"+parserProtocolPath(selData["protocol"])+"/delete/"+selData["id"];
+					var deleteUrl="<@base/>/apps/"+parserProtocolPath(selData["protocol"])+"/delete/"+selData["id"];
 					$.post(deleteUrl, {_method:"delete",currTime:(new Date()).getTime()}, function(data) {
 						//alert delete result
 						$.alert({content:data.message,type:$.platform.messages.messageType[data.messageType]});
@@ -114,11 +111,11 @@
 <div class="app header-default side-nav-dark">
 <div class="layout">
 	<div class="header navbar">
-		<jsp:include page="../../layout/top.jsp"></jsp:include>
+		<#include  "../layout/top.ftl"/>
 	</div>
 	
 	<div class="col-md-3 sidebar-nav side-nav" >
- 		<jsp:include page="../../layout/sidenav.jsp"></jsp:include>
+ 		<#include  "../layout/sidenav.ftl"/>
 	</div>
 	<div class="page-container">
 	
@@ -142,40 +139,37 @@
 
 					<div class="col-12 grid-margin">
 						<div class="card">
-							<div class="card-header border-bottom">
-								<h4 class="card-title">Horizontal Two column</h4>
-							</div>
 							<div class="card-body">
 		
-			<table   class="datatable">
+			<table  class="table table-bordered">
  				<tr>
-		 			<td width="120px"><s:Locale code="apps.name"/>:</td>
+		 			<td width="120px"><@locale code="apps.name"/>:</td>
 		 			<td width="375px">
 		 				<form id="basic_search_form">
-			 				<input type="text" name="name" style ="width:150px">
-			 				<input class="button primary"  id="searchBtn" type="button" size="50" value="<s:Locale code="button.text.search"/>">
-		 					<input class="button"  id="advancedSearchExpandBtn" type="button" size="50"  value="<s:Locale code="button.text.expandsearch"/>" expandValue="<s:Locale code="button.text.expandsearch"/>"  collapseValue="<s:Locale code="button.text.collapsesearch"/>">
-		 				 </form>
+			 				<input class="form-control" type="text" name="name"  style ="width:150px;float:left;">
+			 				<input  class="button btn btn-primary mr-3"    id="searchBtn" type="button" size="50" value="<@locale code="button.text.search"/>">
+				 			<input  class="button btn btn-secondary"  id="advancedSearchExpandBtn" type="button" size="50"  value="<@locale code="button.text.expandsearch"/>" expandValue="<@locale code="button.text.expandsearch"/>"  collapseValue="<@locale code="button.text.collapsesearch"/>">
+					 	</form>
 		 			</td>
 		 			<td colspan="2">
 		 				<div id="tool_box_right">
-							<a class="minibutton" id="addApps" style="width: 70px;"><span class="ui-button-icon-secondary ui-icon ui-icon-triangle-1-s" style="margin-top: 10px;float: left;"></span><s:Locale code="button.text.add"/></a>
-								<div id="menu" class="select-menu-modal " style="width: 150px;">
-								     <div class="select-menu-item"><a href="<s:Base/>/apps/formbased/forwardAdd"><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<s:Locale code="apps.protocol.formbased" /></div></a></div>
-								     <div class="select-menu-item"><a href="<s:Base/>/apps/desktop/forwardAdd"><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<s:Locale code="apps.protocol.desktop" /></div></a></div>
-								     <div class="select-menu-item"><a href="<s:Base/>/apps/tokenbased/forwardAdd"><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<s:Locale code="apps.protocol.tokenbased" /></div></a></div>
-								     <div class="select-menu-item"><a href="<s:Base/>/apps/oauth10a/forwardAdd"><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<s:Locale code="apps.protocol.oauth1.0a" /></div></a></div>
-								     <div class="select-menu-item"><a href="<s:Base/>/apps/oauth20/forwardAdd"><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<s:Locale code="apps.protocol.oauth2.0" /></div></a></div>
-								     <div class="select-menu-item"><a href="<s:Base/>/apps/saml11/forwardAdd"><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<s:Locale code="apps.protocol.saml1.1" /></div></a></div>
-								     <div class="select-menu-item"><a href="<s:Base/>/apps/saml20/forwardAdd"><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<s:Locale code="apps.protocol.saml2.0" /></div></a></div>
-								     <div class="select-menu-item"><a href="<s:Base/>/apps/ltpa/forwardAdd"><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<s:Locale code="apps.protocol.ltpa" /></div></a></div>
-								     <div class="select-menu-item"><a href="<s:Base/>/apps/cas/forwardAdd"><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<s:Locale code="apps.protocol.cas" /></div></a></div>
-							 		 <div class="select-menu-item"><a href="<s:Base/>/apps/extendapi/forwardAdd"><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<s:Locale code="apps.protocol.extendapi" /></div></a></div>
-							 		 <div class="select-menu-item"><a href="<s:Base/>/apps/basic/forwardAdd"><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<s:Locale code="apps.protocol.basic" /></div></a></div>
-								</div>
-			
-						 	<input class="button" id="modifyApps" type="button" value="<s:Locale code="button.text.edit"/>" />
-						 	<input class="button"   id="deleteApps" type="button" value="<s:Locale code="button.text.delete"/>" />
+							<a  class="button btn btn-success mr-3" id="addApps" style="width: 70px;">
+								<span class="ui-button-icon-secondary ui-icon ui-icon-triangle-1-s" style="margin-top: 10px;float: left;"></span>
+								<@locale code="button.text.add"/>
+							</a>
+							<div id="menu" class="select-menu-modal " style="width: 150px;">
+							     <div class="select-menu-item"><a href="<@base/>/apps/formbased/forwardAdd"><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<@locale code="apps.protocol.formbased" /></div></a></div>
+							     <div class="select-menu-item"><a href="<@base/>/apps/desktop/forwardAdd"><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<@locale code="apps.protocol.desktop" /></div></a></div>
+							     <div class="select-menu-item"><a href="<@base/>/apps/tokenbased/forwardAdd"><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<@locale code="apps.protocol.tokenbased" /></div></a></div>
+							     <div class="select-menu-item"><a href="<@base/>/apps/oauth20/forwardAdd"><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<@locale code="apps.protocol.oauth2.0" /></div></a></div>
+							     <div class="select-menu-item"><a href="<@base/>/apps/saml20/forwardAdd"><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<@locale code="apps.protocol.saml2.0" /></div></a></div>
+							     <div class="select-menu-item"><a href="<@base/>/apps/ltpa/forwardAdd"><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<@locale code="apps.protocol.ltpa" /></div></a></div>
+							     <div class="select-menu-item"><a href="<@base/>/apps/cas/forwardAdd"><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<@locale code="apps.protocol.cas" /></div></a></div>
+						 		 <div class="select-menu-item"><a href="<@base/>/apps/extendapi/forwardAdd"><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<@locale code="apps.protocol.extendapi" /></div></a></div>
+						 		 <div class="select-menu-item"><a href="<@base/>/apps/basic/forwardAdd"><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<@locale code="apps.protocol.basic" /></div></a></div>
+							</div>
+						 	<input class="button btn btn-info mr-3 " id="modifyApps" type="button" value="<@locale code="button.text.edit"/>" />
+						 	<input class="button btn btn-danger mr-3 "   id="deleteApps" type="button" value="<@locale code="button.text.delete"/>" />
 				 		</div>
 		 			</td>
 		 		</tr>
@@ -188,7 +182,7 @@
  		<form id="advanced_search_form">
 	 		<table  class="datatable">
 	 			<tr>
-		 			<td width="120px"><s:Locale code="apps.protocol"/></td>
+		 			<td width="120px"><@locale code="apps.protocol"/></td>
 		 			<td width="374px">
 		 				<select name="protocol" class="select_protocol">
 		 					<option value=""  selected>Select</option>
@@ -204,33 +198,14 @@
 		 					
 		 				</select>
 		 			</td>
-		 			<td width="120px"><s:Locale code="apps.vendor"/></td>
+		 			<td width="120px"><@locale code="apps.vendor"/></td>
 		 			<td width="374px">
 		 				<input   id="vendor" name="vendor" type="text" size="50" value="">
 	 			</tr>
 	 		</table>
 	 	</form>
  	</div>
- 	
-		<div class="mainwrap" id="main">
-			<s:Grid id="list" url="/apps/grid" multiselect="false" >	
-				<s:Column width="0" field="id" title="id" hidden="true"/>
-				<s:Column width="10" field="icon" title="apps.icon" formatter="iconFormatter"/>
-				<s:Column width="20" field="name" title="apps.name"/>
-				<s:Column width="20" field="protocol" title="apps.protocol"/>
-				<s:Column width="20" field="loginUrl" title="apps.loginUrl"/>
-				<s:Column width="15" field="category" title="apps.category"/>
-				<s:Column width="5" field="sortOrder" title="common.text.sortorder" />
-				<s:Column width="15" field="vendor" title="apps.vendor"  formatter="vendorFormatter"/>
-				<s:Column width="0" field="vendorUrl" title="apps.vendor.url" hidden="true"/>
-				<s:Column width="0" field="createdBy" title="common.text.createdby" hidden="true"/>
-				<s:Column width="0" field="createdDate" title="common.text.createddate" hidden="true"/>
-				<s:Column width="0" field="modifiedBy" title="common.text.modifiedby" hidden="true"/>
-				<s:Column width="0" field="modifiedDate" title="common.text.modifieddate" hidden="true"/>
-			</s:Grid>
-		</div>
-		
-		<table  data-url="<s:Base />/apps/grid"
+		<table  data-url="<@base/>/apps/grid"
 			id="datagrid"
 			data-toggle="table"
 			data-classes="table table-bordered table-hover table-striped"
@@ -244,22 +219,13 @@
 			data-side-pagination="server">
 		<thead>
 			<tr>
-				<th data-sortable="true" data-field="id"   data-visible="false"><s:Locale code="log.loginhistory.id"/></th>
-				<th data-field="sessionId"><s:Locale code="apps.icon"/></th>
-				<th data-field="username"><s:Locale code="apps.name"/></th>
-				<th data-field="displayName"><s:Locale code="log.loginhistory.displayName"/></th>
-				<th data-field="provider"><s:Locale code="log.loginhistory.provider"/></th>
-				<th data-field="message"><s:Locale code="log.loginhistory.message"/></th>
-				<th data-field="loginType"><s:Locale code="log.loginhistory.loginType"/></th>
-				<th data-field="sourceIp"><s:Locale code="log.loginhistory.sourceIp"/></th>
-				<th data-field="browser"><s:Locale code="log.loginhistory.browser"/></th>
-				<th data-field="loginTime"><s:Locale code="log.loginhistory.loginTime"/></th>
-				<th data-field="logoutTime"><s:Locale code="log.loginhistory.logoutTime"/></th>
-				<th data-field="platform"><s:Locale code="log.loginhistory.platform"/></th>
-				<th data-field="application"><s:Locale code="log.loginhistory.application"/></th>
-				<th data-field="loginUrl"><s:Locale code="log.loginhistory.loginUrl"/></th>
-				<th data-field="code"><s:Locale code="log.loginhistory.code"/></th>
-				<th data-field="rpUserInfo"><s:Locale code="log.loginhistory.rpUserInfo"/></th>
+				<th data-sortable="true" data-field="id"   data-visible="false">Id</th>
+				<th data-field="sessionId"><@locale code="apps.icon"/></th>
+				<th data-field="name"><@locale code="apps.name"/></th>
+				<th data-field="protocol"><@locale code="apps.protocol"/></th>
+				<th data-field="category"><@locale code="apps.category"/></th>
+				<th data-field="vendor"><@locale code="apps.vendor"/></th>
+				<th data-field="loginUrl"><@locale code="log.loginhistory.loginUrl"/></th>
 	
 			</tr>
 		</thead>
@@ -269,7 +235,7 @@
 </div>
 					</div>
 					<footer class="content-footer">
-		<jsp:include page="../../layout/footer.jsp"></jsp:include>
+		<#include  "../layout/footer.ftl"/>
 	</footer>
 
 	</div>

+ 7 - 12
maxkey-web-manage/src/main/resources/templates/views/apps/cas/appAdd.ftl

@@ -1,8 +1,3 @@
-<%@ page 	language="java"   import="java.util.*" 	pageEncoding="UTF-8"%>
-<%@ taglib 	prefix="spring"   uri="http://www.springframework.org/tags" %>
-<%@ taglib 	prefix="s" uri="http://www.connsec.com/tags" %>
-<%@ taglib 	prefix="fmt"      uri="http://java.sun.com/jsp/jstl/fmt"%>
-<%@ page 	import="org.maxkey.constants.*"%>
 <script type="text/javascript">
 <!--
 $(function(){	
@@ -18,8 +13,8 @@ $(function(){
 //-->
 </script>
 <form id="actionForm_app"  method="post" type="label" autoclose="true"  
-			action="<s:Base/>/apps/cas/add"  
-			forward="<s:Base/>/apps/list"
+			action="<@base/>/apps/cas/add"  
+			forward="<@base/>/apps/list"
 			enctype="multipart/form-data">		 
   	        <!-- content -->    
   	      	<!--table-->
@@ -33,17 +28,17 @@ $(function(){
 						<table width="960"  class="datatable" >
 						<tbody>
 							<tr>
-								<td colspan=4><s:Locale code="apps.cas.info"/></td>
+								<td colspan=4><@locale code="apps.cas.info"/></td>
 							</tr>
 							<tr>
-								<th style="width:15%;"><s:Locale code="apps.cas.service"/>:</th>
+								<th style="width:15%;"><@locale code="apps.cas.service"/>:</th>
 								<td  colspan=3>
 									<input type="text" id="service" name="service"  title="" value=""/>
 									<b class="orange">*</b><label for="service"></label>
 								</td>
 							</tr>
 							<tr>
-								<th style="width:15%;"><s:Locale code="apps.cas.validation"/>:</th>
+								<th style="width:15%;"><@locale code="apps.cas.validation"/>:</th>
 								<td  colspan=3>
 									<input type="text" id="validation" name="validation"  title="" value=""/>
 									<b class="orange">*</b><label for="validation"></label>
@@ -58,6 +53,6 @@ $(function(){
 			   
 
 			<input class="button"  id="status" type="hidden" name="status"  value="1"/>
-    		<input class="button"  id="submitBtn" type="submit" value="<s:Locale code="button.text.save" />"/>
-			<input class="button"  id="backBtn" type="button" value="<s:Locale code="button.text.cancel" />"/>	  
+    		<input class="button"  id="submitBtn" type="submit" value="<@locale code="button.text.save" />"/>
+			<input class="button"  id="backBtn" type="button" value="<@locale code="button.text.cancel" />"/>	  
 </form>

+ 9 - 14
maxkey-web-manage/src/main/resources/templates/views/apps/cas/appUpdate.ftl

@@ -1,14 +1,9 @@
-<%@ page 	language="java"   import="java.util.*" 	pageEncoding="UTF-8"%>
-<%@ taglib 	prefix="spring"   uri="http://www.springframework.org/tags" %>
-<%@ taglib 	prefix="s" uri="http://www.connsec.com/tags" %>
-<%@ taglib 	prefix="fmt"      uri="http://java.sun.com/jsp/jstl/fmt"%>
-<%@ taglib  prefix="c"       	uri="http://java.sun.com/jsp/jstl/core"  %>
 <script type="text/javascript">
 <!--
 $(function(){	
 
 	$("#algorithm").change(function(){
-		$.post("<s:Base/>/apps/generate/secret/"+$(this).val(), {_method:"post",currTime:(new Date()).getTime()}, function(data) {
+		$.post("<@base/>/apps/generate/secret/"+$(this).val(), {_method:"post",currTime:(new Date()).getTime()}, function(data) {
 			$("#algorithmKey").val(data+"");
 			$("#algorithmKey_text").html(data+"");
 			$("#secret").val(data+"");
@@ -17,7 +12,7 @@ $(function(){
 	}); 
 	
 	$("#generateSecret").on("click",function(){
-		$.post("<s:Base/>/apps/generate/secret/"+$("#algorithm").val(), {_method:"post",currTime:(new Date()).getTime()}, function(data) {
+		$.post("<@base/>/apps/generate/secret/"+$("#algorithm").val(), {_method:"post",currTime:(new Date()).getTime()}, function(data) {
 			$("#algorithmKey").val(data+"");
 			$("#algorithmKey_text").html(data+"");
 			$("#secret").val(data+"");
@@ -28,8 +23,8 @@ $(function(){
 //-->
 </script>
 <form id="actionForm_app"  method="post" type="label" autoclose="true"  
-			action="<s:Base/>/apps/cas/update"  
-			forward="<s:Base/>/apps/list"
+			action="<@base/>/apps/cas/update"  
+			forward="<@base/>/apps/list"
 			enctype="multipart/form-data">		 
   	        <!-- content -->    
   	      	<!--table-->
@@ -44,17 +39,17 @@ $(function(){
 								<tbody>
 								
 								<tr>
-									<th colspan=4><s:Locale code="apps.cas.info"/></th>
+									<th colspan=4><@locale code="apps.cas.info"/></th>
 								</tr>
 								<tr>
-									<th style="width:15%;"><s:Locale code="apps.cas.service"/>:</th>
+									<th style="width:15%;"><@locale code="apps.cas.service"/>:</th>
 									<td  colspan=3>
 										<input type="text" id="service" name="service"  title="" value="${model.service}"/>
 										<b class="orange">*</b><label for="service"></label>
 									</td>
 								</tr>
 								<tr>
-									<th style="width:15%;"><s:Locale code="apps.cas.validation"/>:</th>
+									<th style="width:15%;"><@locale code="apps.cas.validation"/>:</th>
 									<td  colspan=3>
 										<input type="text" id="redirectUri" name="validation"  title="" value="${model.validation}"/>
 										<b class="orange">*</b><label for="validation"></label>
@@ -68,6 +63,6 @@ $(function(){
 				</table>
 			  
   	      
-    		<input class="button" id="submitBtn" type="submit" value="<s:Locale code="button.text.save" />"/>
-			<input class="button" id="backBtn" type="button" value="<s:Locale code="button.text.cancel" />"/>	  
+    		<input class="button" id="submitBtn" type="submit" value="<@locale code="button.text.save" />"/>
+			<input class="button" id="backBtn" type="button" value="<@locale code="button.text.cancel" />"/>	  
 </form>

+ 31 - 36
maxkey-web-manage/src/main/resources/templates/views/apps/desktop/appAdd.ftl

@@ -1,8 +1,3 @@
-<%@ page 	language="java"   import="java.util.*" 	pageEncoding="UTF-8"%>
-<%@ taglib 	prefix="spring"   uri="http://www.springframework.org/tags" %>
-<%@ taglib 	prefix="s" uri="http://www.connsec.com/tags" %>
-<%@ taglib 	prefix="fmt"      uri="http://java.sun.com/jsp/jstl/fmt"%>
-<%@ page 	import="org.maxkey.constants.*"%>
 <script type="text/javascript">
 <!--
 $(function(){	
@@ -60,8 +55,8 @@ $(function(){
 //-->
 </script>
 <form id="actionForm_app"  method="post" type="label" autoclose="true"  
-			action="<s:Base/>/apps/desktop/add"  
-			forward="<s:Base/>/apps/list"
+			action="<@base/>/apps/desktop/add"  
+			forward="<@base/>/apps/list"
 			enctype="multipart/form-data">		 
   	        <!-- content -->    
   	      	<!--table-->
@@ -75,10 +70,10 @@ $(function(){
 			   <table width="960"   class="datatable" >
 				<tbody>
 				<tr>
-					<td colspan=4><s:Locale code="apps.desktop.info" /></td>
+					<td colspan=4><@locale code="apps.desktop.info" /></td>
 				</tr>
 				<tr>
-					<th ><s:Locale code="apps.desktop.programPath" />:</th>
+					<th ><@locale code="apps.desktop.programPath" />:</th>
 					<td colspan="3">
 						<textarea  id="programPath" name="programPath" rows="4" cols="60"></textarea>
 						<b class="orange">*</b><label for="programPath"></label>
@@ -86,7 +81,7 @@ $(function(){
 					
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.desktop.parameter" />:</th>
+					<th><@locale code="apps.desktop.parameter" />:</th>
 					<td colspan="3">
 						<textarea  id="parameter" name="parameter" rows="4" cols="60"></textarea>
 						
@@ -94,7 +89,7 @@ $(function(){
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.desktop.usernameType" />:</th>
+					<th><@locale code="apps.desktop.usernameType" />:</th>
 					<td >
 						<select  id="usernameType" name="usernameType" >
 							<option value="SIMULATION" selected>SIMULATION</option>
@@ -102,13 +97,13 @@ $(function(){
 						</select>
 						<b class="orange">*</b><label for="usernameType"></label>
 					</td>
-					<th class="usernameParameter"  style="display:none"><s:Locale code="apps.desktop.usernameParameter" />:</th>
+					<th class="usernameParameter"  style="display:none"><@locale code="apps.desktop.usernameParameter" />:</th>
 					<td class="usernameParameter"  style="display:none">
 						<input type="text" id="usernameParameter" name="usernameParameter"  title="" value="username"/>
 						<b class="orange">*</b><label for="usernameParameter"></label>
 					</td>
 					
-					<th class="preUsername"><s:Locale code="apps.desktop.preUsername" />:</th>
+					<th class="preUsername"><@locale code="apps.desktop.preUsername" />:</th>
 					<td class="preUsername">
 						<input type="text" id="preUsername" name="preUsername"  title="" value=""/>
 						<b class="orange">*</b><label for="preUsername"></label>
@@ -116,7 +111,7 @@ $(function(){
 					
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.desktop.passwordType" />:</th>
+					<th><@locale code="apps.desktop.passwordType" />:</th>
 					<td >
 						<select  id="passwordType" name="passwordType" >
 							<option value="SIMULATION" selected>SIMULATION</option>
@@ -124,13 +119,13 @@ $(function(){
 						</select>
 						<b class="orange">*</b><label for="passwordType"></label>
 					</td>
-					<th   class="passwordParameter" style="display:none"><s:Locale code="apps.desktop.passwordParameter" />:</th>
+					<th   class="passwordParameter" style="display:none"><@locale code="apps.desktop.passwordParameter" />:</th>
 					<td   class="passwordParameter" style="display:none">
 						<input type="text" id="passwordParameter" name="passwordParameter"  title="" value="password"/>
 						<b class="orange">*</b><label for="passwordParameter"></label>
 					</td>
 					
-					<th  class="prePassword" ><s:Locale code="apps.desktop.prePassword" />:</th>
+					<th  class="prePassword" ><@locale code="apps.desktop.prePassword" />:</th>
 					<td  class="prePassword"  >
 						<input type="text" id="prePassword" name="prePassword"  title="" value=""/>
 						<b class="orange">*</b><label for="prePassword"></label>
@@ -138,7 +133,7 @@ $(function(){
 					
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.desktop.submitType" />:</th>
+					<th><@locale code="apps.desktop.submitType" />:</th>
 					<td >
 						<select  id="submitType" name="submitType" >
 							<option value="Enter" selected>Enter</option>
@@ -148,7 +143,7 @@ $(function(){
 						<input  style="display:none" type="text" id="submitKey" name="submitKey" size="3"  title="" value=""/>
 						<b class="orange">*</b><label for="submitType"></label>
 					</td>
-					<th  class="preSubmit"><s:Locale code="apps.desktop.preSubmit" />:</th>
+					<th  class="preSubmit"><@locale code="apps.desktop.preSubmit" />:</th>
 					<td  class="preSubmit">
 						<input type="text" id="preSubmit" name="preSubmit"  title="" value=""/>
 						<b class="orange">*</b><label for="preSubmit"></label>
@@ -156,50 +151,50 @@ $(function(){
 					
 				</tr>
 				<tr>
-					<th style="width:15%;"><s:Locale code="apps.credential" />:</th>
+					<th style="width:15%;"><@locale code="apps.credential" />:</th>
 					<td style="width:35%;">
 						<input type="radio" id="credential-user-defined" name="credential" class="credential" value="3"  checked />
-						<s:Locale code="apps.credential.user-defined" />
+						<@locale code="apps.credential.user-defined" />
 						<input type="radio" id="credential-shared" name="credential" class="credential"  value="2" />
-						<s:Locale code="apps.credential.shared" />
+						<@locale code="apps.credential.shared" />
 						<input type="radio" id="credential-system" name="credential" class="credential"  value="1"  />
-						<s:Locale code="apps.credential.system" />
+						<@locale code="apps.credential.system" />
 						<b class="orange">*</b><label for="credential"></label>
 					</td>
-					<th style="width:15%;"><s:Locale code="apps.isAdapter" />:</th>
+					<th style="width:15%;"><@locale code="apps.isAdapter" />:</th>
 					<td style="width:35%;" >
 						<select  id="isAdapter" name="isAdapter" >
-							<option value="0"  selected><s:Locale code="apps.isAdapter.no" /></option>
-							<option value="1"><s:Locale code="apps.isAdapter.yes" /></option>
+							<option value="0"  selected><@locale code="apps.isAdapter.no" /></option>
+							<option value="1"><@locale code="apps.isAdapter.yes" /></option>
 						</select>
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.adapter" />:</th>
+					<th><@locale code="apps.adapter" />:</th>
 					<td colspan =3>
 						<input type="text" id="adapter" name="adapter"  title="" value=""/>
 					</td>
 				</tr>
 				<tr id="systemconfigure"  style="display:none">
-					<th><s:Locale code="apps.credential.system" />:</th>
+					<th><@locale code="apps.credential.system" />:</th>
 					<td colspan="3">
 						<select id="systemUserAttr" name="systemUserAttr">
-							<option value="uid"><s:Locale code="userinfo.uid" /></option>
-							<option value="employeeNumber"><s:Locale code="userinfo.employeeNumber" /></option>
-							<option value="username"  selected><s:Locale code="userinfo.username" /></option>
-							<option value="email"><s:Locale code="userinfo.email" /></option>
-							<option value="windowsaccount"><s:Locale code="userinfo.windowsAccount" /></option>
+							<option value="uid"><@locale code="userinfo.uid" /></option>
+							<option value="employeeNumber"><@locale code="userinfo.employeeNumber" /></option>
+							<option value="username"  selected><@locale code="userinfo.username" /></option>
+							<option value="email"><@locale code="userinfo.email" /></option>
+							<option value="windowsaccount"><@locale code="userinfo.windowsAccount" /></option>
 						</select>
 						<b class="orange">*</b><label for="systemUserAttr"></label>
 					</td>
 				</tr>
 				<tr id="sharedconfigure"  style="display:none">
-					<th><s:Locale code="apps.credential.shared.sharedUsername" />:</th>
+					<th><@locale code="apps.credential.shared.sharedUsername" />:</th>
 					<td  >
 						<input type="text" id="sharedUsername" name="sharedUsername" value="" />
 						<b class="orange">*</b><label for="sharedUsername"></label>
 					</td>
-					<th  ><s:Locale code="apps.credential.shared.sharedPassword" />:</th>
+					<th  ><@locale code="apps.credential.shared.sharedPassword" />:</th>
 					<td  >
 						<input type="text" id="sharedPassword" name="sharedPassword" value="" />
 						<b class="orange">*</b><label for="sharedPassword"></label>
@@ -213,6 +208,6 @@ $(function(){
 				</tbody>
 				</table>
 			<input  id="status" type="hidden" name="status"  value="1"/>
-    		<input class="button" id="submitBtn" type="submit" value="<s:Locale code="button.text.save" />"/>
-			<input class="button" id="backBtn" type="button" value="<s:Locale code="button.text.cancel" />"/>	  
+    		<input class="button" id="submitBtn" type="submit" value="<@locale code="button.text.save" />"/>
+			<input class="button" id="backBtn" type="button" value="<@locale code="button.text.cancel" />"/>	  
 </form>

+ 32 - 37
maxkey-web-manage/src/main/resources/templates/views/apps/desktop/appUpdate.ftl

@@ -1,13 +1,8 @@
-<%@ page 	language="java"   import="java.util.*" 	pageEncoding="UTF-8"%>
-<%@ taglib 	prefix="spring"   uri="http://www.springframework.org/tags" %>
-<%@ taglib 	prefix="s" uri="http://www.connsec.com/tags" %>
-<%@ taglib 	prefix="fmt"      uri="http://java.sun.com/jsp/jstl/fmt"%>
-<%@ taglib  prefix="c"       	uri="http://java.sun.com/jsp/jstl/core"  %>
 <script type="text/javascript">
 <!--
 $(function(){	
 	$("#generateSecret").on("click",function(){
-		$.post("<s:Base/>/apps/generate/secret/oauth20", {_method:"post",currTime:(new Date()).getTime()}, function(data) {
+		$.post("<@base/>/apps/generate/secret/oauth20", {_method:"post",currTime:(new Date()).getTime()}, function(data) {
 			$("#secret").val(data+"");
 			$("#secret_text").html(data+"");
 		}); 
@@ -65,8 +60,8 @@ $(function(){
 //-->
 </script>
 <form id="actionForm_app"  method="post" type="label" autoclose="true"  
-			action="<s:Base/>/apps/desktop/update"  
-			forward="<s:Base/>/apps/list"
+			action="<@base/>/apps/desktop/update"  
+			forward="<@base/>/apps/list"
 			enctype="multipart/form-data">		 
   	        <!-- content -->    
   	      	<!--table-->
@@ -80,10 +75,10 @@ $(function(){
 			   <table width="960"   class="datatable" >
 				<tbody>
 				<tr>
-					<td colspan=4><s:Locale code="apps.desktop.info" /></td>
+					<td colspan=4><@locale code="apps.desktop.info" /></td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.desktop.programPath" />:</th>
+					<th><@locale code="apps.desktop.programPath" />:</th>
 					<td colspan="3">
 						<textarea  id="programPath" name="programPath" rows="4" cols="60">${model.programPath}</textarea>
 						<b class="orange">*</b><label for="programPath"></label>
@@ -91,7 +86,7 @@ $(function(){
 					
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.desktop.parameter" />:</th>
+					<th><@locale code="apps.desktop.parameter" />:</th>
 					<td colspan="3">
 						<textarea  id="parameter" name="parameter" rows="4" cols="60">${model.parameter}</textarea>
 						
@@ -99,7 +94,7 @@ $(function(){
 					</td>
 				</tr>
 				<tr>
-					<th ><s:Locale code="apps.desktop.usernameType" />:</th>
+					<th ><@locale code="apps.desktop.usernameType" />:</th>
 					<td >
 						<select  id="usernameType" name="usernameType" >
 							<option value="SIMULATION"  <c:if test="${'SIMULATION'==model.usernameType}">selected</c:if> >SIMULATION</option>
@@ -108,14 +103,14 @@ $(function(){
 						<b class="orange">*</b><label for="usernameType"></label>
 					</td>
 					<th  class="usernameParameter" <c:if test="${'SIMULATION'==model.usernameType}">style="display:none"</c:if> >
-						<s:Locale code="apps.desktop.usernameParameter" />:</th>
+						<@locale code="apps.desktop.usernameParameter" />:</th>
 					<td  class="usernameParameter" <c:if test="${'SIMULATION'==model.usernameType}">style="display:none"</c:if> >
 						<input type="text" id="usernameParameter" name="usernameParameter"  title="" value="${model.usernameParameter}"/>
 						<b class="orange">*</b><label for="usernameParameter"></label>
 					</td>
 					
 					<th class="preUsername" <c:if test="${'PARAMETER'==model.usernameType}">style="display:none"</c:if> >
-						<s:Locale code="apps.desktop.preUsername" />:</th>
+						<@locale code="apps.desktop.preUsername" />:</th>
 					<td class="preUsername" <c:if test="${'PARAMETER'==model.usernameType}">style="display:none"</c:if> >
 						<input type="text" id="preUsername" name="preUsername"  title="" value="${model.preUsername}"/>
 						<b class="orange">*</b><label for="preUsername"></label>
@@ -123,7 +118,7 @@ $(function(){
 					
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.desktop.passwordType" />:</th>
+					<th><@locale code="apps.desktop.passwordType" />:</th>
 					<td >
 						<select  id="passwordType" name="passwordType" >
 							<option value="SIMULATION"   <c:if test="${'SIMULATION'==model.passwordType}">selected</c:if> >SIMULATION</option>
@@ -132,14 +127,14 @@ $(function(){
 						<b class="orange">*</b><label for="passwordType"></label>
 					</td>
 					<th   class="passwordParameter" <c:if test="${'SIMULATION'==model.passwordType}">style="display:none"</c:if>  >
-						<s:Locale code="apps.desktop.passwordParameter" />:</th>
+						<@locale code="apps.desktop.passwordParameter" />:</th>
 					<td   class="passwordParameter" <c:if test="${'SIMULATION'==model.passwordType}">style="display:none"</c:if> >
 						<input type="text" id="passwordParameter" name="passwordParameter"  title="" value="${model.passwordParameter}"/>
 						<b class="orange">*</b><label for="passwordParameter"></label>
 					</td>
 					
 					<th  class="prePassword" <c:if test="${'PARAMETER'==model.passwordType}">style="display:none"</c:if> >
-						<s:Locale code="apps.desktop.prePassword" />:</th>
+						<@locale code="apps.desktop.prePassword" />:</th>
 					<td  class="prePassword" <c:if test="${'PARAMETER'==model.passwordType}">style="display:none"</c:if> >
 						<input type="text" id="prePassword" name="prePassword"  title="" value="${model.prePassword}"/>
 						<b class="orange">*</b><label for="prePassword"></label>
@@ -148,7 +143,7 @@ $(function(){
 				</tr>
 				
 				<tr>
-					<th><s:Locale code="apps.desktop.submitType" />:</th>
+					<th><@locale code="apps.desktop.submitType" />:</th>
 					<td >
 						<select  id="submitType" name="submitType" >
 							<option value="Enter" <c:if test="${'Enter'==model.submitType}">selected</c:if>  >Enter</option>
@@ -159,7 +154,7 @@ $(function(){
 						<b class="orange">*</b><label for="submitType"></label>
 					</td>
 					<th  class="preSubmit"  <c:if test="${'None'==model.submitType}">style="display:none"</c:if> >
-						<s:Locale code="apps.desktop.preSubmit" />:</th>
+						<@locale code="apps.desktop.preSubmit" />:</th>
 					<td  class="preSubmit"  <c:if test="${'None'==model.submitType}">style="display:none"</c:if> >
 						<input type="text" id="preSubmit" name="preSubmit"  title="" value="${model.preSubmit}"/>
 						<b class="orange">*</b><label for="preSubmit"></label>
@@ -167,50 +162,50 @@ $(function(){
 					
 				</tr>
 				<tr>
-					<th style="width:15%;"><s:Locale code="apps.credential" />:</th>
+					<th style="width:15%;"><@locale code="apps.credential" />:</th>
 					<td style="width:35%;">
 						<input type="radio" id="credential-user-defined" name="credential" class="credential" value="3"  <c:if test="${3==model.credential}">checked</c:if> />
-						<s:Locale code="apps.credential.user-defined" />
+						<@locale code="apps.credential.user-defined" />
 						<input type="radio" id="credential-shared" name="credential" class="credential" value="2"  <c:if test="${2==model.credential}">checked</c:if> />
-						<s:Locale code="apps.credential.shared" />
+						<@locale code="apps.credential.shared" />
 						<input type="radio" id="credential-system" name="credential" class="credential" value="1"  <c:if test="${1==model.credential}">checked</c:if> />
-						<s:Locale code="apps.credential.system" />
+						<@locale code="apps.credential.system" />
 						<b class="orange">*</b><label for="credential"></label>
 					</td>
-					<th style="width:15%;"><s:Locale code="apps.isAdapter" />:</th>
+					<th style="width:15%;"><@locale code="apps.isAdapter" />:</th>
 					<td style="width:35%;">
 						<select  id="isAdapter" name="isAdapter" >
-							<option value="0"  <c:if test="${0==model.isAdapter}">selected</c:if> ><s:Locale code="apps.isAdapter.no" /></option>
-							<option value="1"  <c:if test="${1==model.isAdapter}">selected</c:if> ><s:Locale code="apps.isAdapter.yes" /></option>
+							<option value="0"  <c:if test="${0==model.isAdapter}">selected</c:if> ><@locale code="apps.isAdapter.no" /></option>
+							<option value="1"  <c:if test="${1==model.isAdapter}">selected</c:if> ><@locale code="apps.isAdapter.yes" /></option>
 						</select>
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.adapter" />:</th>
+					<th><@locale code="apps.adapter" />:</th>
 					<td colspan =3>
 						<input type="text" id="adapter" name="adapter"  title="" value="${model.adapter}"/>
 					</td>
 				</tr>
 				<tr id="systemconfigure"  <c:if test="${1!=model.credential}"> style="display:none"</c:if> >
-					<th><s:Locale code="apps.credential.system" />:</th>
+					<th><@locale code="apps.credential.system" />:</th>
 					<td colspan="3">
 						<select id="systemUserAttr" name="systemUserAttr">
-							<option value="uid"   <c:if test="${'uid'==model.systemUserAttr}">selected</c:if> ><s:Locale code="userinfo.uid" /></option>
-							<option value="employeeNumber" <c:if test="${'employeeNumber'==model.systemUserAttr}">selected</c:if> ><s:Locale code="userinfo.employeeNumber" /></option>
-							<option value="username" <c:if test="${'username'==model.systemUserAttr}">selected</c:if> ><s:Locale code="userinfo.username" /></option>
-							<option value="email" <c:if test="${'email'==model.systemUserAttr}">selected</c:if> ><s:Locale code="userinfo.email" /></option>
-							<option value="windowsaccount" <c:if test="${'windowsaccount'==model.systemUserAttr}">selected</c:if> ><s:Locale code="userinfo.windowsAccount" /></option>
+							<option value="uid"   <c:if test="${'uid'==model.systemUserAttr}">selected</c:if> ><@locale code="userinfo.uid" /></option>
+							<option value="employeeNumber" <c:if test="${'employeeNumber'==model.systemUserAttr}">selected</c:if> ><@locale code="userinfo.employeeNumber" /></option>
+							<option value="username" <c:if test="${'username'==model.systemUserAttr}">selected</c:if> ><@locale code="userinfo.username" /></option>
+							<option value="email" <c:if test="${'email'==model.systemUserAttr}">selected</c:if> ><@locale code="userinfo.email" /></option>
+							<option value="windowsaccount" <c:if test="${'windowsaccount'==model.systemUserAttr}">selected</c:if> ><@locale code="userinfo.windowsAccount" /></option>
 						</select>
 						<b class="orange">*</b><label for="systemUserAttr"></label>
 					</td>
 				</tr>
 				<tr id="sharedconfigure"  <c:if test="${2!=model.credential}"> style="display:none"</c:if>>
-					<th><s:Locale code="apps.credential.shared.sharedUsername" />:</th>
+					<th><@locale code="apps.credential.shared.sharedUsername" />:</th>
 					<td>
 						<input type="text" id="sharedUsername" name="sharedUsername" value="${model.sharedUsername}" />
 						<b class="orange">*</b><label for="sharedUsername"></label>
 					</td>
-					<th  ><s:Locale code="apps.credential.shared.sharedPassword" />:</th>
+					<th  ><@locale code="apps.credential.shared.sharedPassword" />:</th>
 					<td>
 						<input type="text" id="sharedPassword" name="sharedPassword" value="${model.sharedPassword}" />
 						<b class="orange">*</b><label for="sharedPassword"></label>
@@ -222,6 +217,6 @@ $(function(){
 				</tr>
 				</tbody>
 				</table>
-    		<input class="button" id="submitBtn" type="submit" value="<s:Locale code="button.text.save" />"/>
-			<input class="button" id="backBtn" type="button" value="<s:Locale code="button.text.cancel" />"/>	  
+    		<input class="button" id="submitBtn" type="submit" value="<@locale code="button.text.save" />"/>
+			<input class="button" id="backBtn" type="button" value="<@locale code="button.text.cancel" />"/>	  
 </form>

+ 26 - 31
maxkey-web-manage/src/main/resources/templates/views/apps/extendapi/appAdd.ftl

@@ -1,8 +1,3 @@
-<%@ page 	language="java"   import="java.util.*" 	pageEncoding="UTF-8"%>
-<%@ taglib 	prefix="spring"   uri="http://www.springframework.org/tags" %>
-<%@ taglib 	prefix="s" uri="http://www.connsec.com/tags" %>
-<%@ taglib 	prefix="fmt"      uri="http://java.sun.com/jsp/jstl/fmt"%>
-<%@ page 	import="org.maxkey.constants.*"%>
 <script type="text/javascript">
 <!--
 $(function(){		
@@ -19,11 +14,11 @@ $(function(){
 	var attrIndex = 0;
 		
 	function addExtendAttr(attribute,attributeValue){
-		var html = '<tr  id="extendTr_' + attrIndex + '"><th><s:Locale code="common.text.parameter"/>:';   
-		 html += '<input  class="button delExtendTr"  type="button" name="delExtendTr" attrTrId="extendTr_'+attrIndex+'" value="<s:Locale code="button.text.delete" />"/>';
+		var html = '<tr  id="extendTr_' + attrIndex + '"><th><@locale code="common.text.parameter"/>:';   
+		 html += '<input  class="button delExtendTr"  type="button" name="delExtendTr" attrTrId="extendTr_'+attrIndex+'" value="<@locale code="button.text.delete" />"/>';
 		html += '</th><td>';   
 		html += '<input type="text" id="attribute_' + attrIndex + '" name="attribute" class="int" title="" value="'+attribute+'"/>';   
-        html += '</span></td><th><s:Locale code="common.text.parameter.value"/>:</th>	<td><span class="intspan">';
+        html += '</span></td><th><@locale code="common.text.parameter.value"/>:</th>	<td><span class="intspan">';
         html += '<input type="text" id="attributeValue_' + attrIndex + '" name="attributeValue" class="int" title="" value="'+attributeValue+'"/>';
         html += '</span>';
        
@@ -72,79 +67,79 @@ $(function(){
 			   <table class="datatable" >
 				<tbody>
 				<tr>
-					<th  ><s:Locale code="apps.principal"/>:</th>
+					<th  ><@locale code="apps.principal"/>:</th>
 					<td  >
 						<input type="text" id="principal" name="principal"  title="" value=""/>
 						<b class="orange">*</b><label for="principal"></label>
 					</td>
-					<th  ><s:Locale code="apps.credentials"/>:</th>
+					<th  ><@locale code="apps.credentials"/>:</th>
 					<td  >
 						<input type="text" id="credentials" name="credentials"  title="" value=""/>
 						<b class="orange">*</b><label for="credentials"></label>
 					</td>
 				</tr>
 				<tr>
-					<th  style="width:15%;"><s:Locale code="apps.formbased.credential"/>:</th>
+					<th  style="width:15%;"><@locale code="apps.formbased.credential"/>:</th>
 					<td  style="width:35%;">
 						<input type="radio" id="credential-user-defined" name="credential" class="credential" value="3"  checked />
-						<s:Locale code="apps.formbased.credential.user-defined"/>
+						<@locale code="apps.formbased.credential.user-defined"/>
 						<input type="radio" id="credential-shared" name="credential" class="credential"  value="2" />
-						<s:Locale code="apps.formbased.credential.shared"/>
+						<@locale code="apps.formbased.credential.shared"/>
 						<input type="radio" id="credential-system" name="credential" class="credential"  value="1"  />
-						<s:Locale code="apps.formbased.credential.system"/>
+						<@locale code="apps.formbased.credential.system"/>
 						<b class="orange">*</b><label for="credential"></label>
 					</td>
-					<th  style="width:15%;"><s:Locale code="apps.isAdapter"/>:</th>
+					<th  style="width:15%;"><@locale code="apps.isAdapter"/>:</th>
 					<td  style="width:35%;">
 						<select  id="isAdapter" name="isAdapter" >
-							<option value="0"  selected><s:Locale code="apps.isAdapter.no"/></option>
-							<option value="1"><s:Locale code="apps.isAdapter.yes"/></option>
+							<option value="0"  selected><@locale code="apps.isAdapter.no"/></option>
+							<option value="1"><@locale code="apps.isAdapter.yes"/></option>
 						</select>
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.adapter"/>:</th>
+					<th><@locale code="apps.adapter"/>:</th>
 					<td colspan =3>
 						<input type="text" id="adapter" name="adapter"  title="" value=""/>
 					</td>
 				</tr>
 				<tr id="systemconfigure"  style="display:none">
-					<th><s:Locale code="apps.formbased.systemUserAttr"/>:</th>
+					<th><@locale code="apps.formbased.systemUserAttr"/>:</th>
 					<td colspan="3">
 						<select id="systemUserAttr" name="systemUserAttr">
 							<option value="uid">
-								<s:Locale code="userinfo.uid"/></option>
+								<@locale code="userinfo.uid"/></option>
 							<option value="employeeNumber">
-								<s:Locale code="userinfo.employeeNumber"/></option>
+								<@locale code="userinfo.employeeNumber"/></option>
 							<option value="username"  selected>
-								<s:Locale code="userinfo.username"/></option>
+								<@locale code="userinfo.username"/></option>
 							<option value="email">
-								<s:Locale code="userinfo.email"/></option>
+								<@locale code="userinfo.email"/></option>
 							<option value="windowsaccount">
-								<s:Locale code="userinfo.windowsAccount"/></option>
+								<@locale code="userinfo.windowsAccount"/></option>
 						</select>
 						<b class="orange">*</b><label for="systemUserAttr"></label>
 					</td>
 				</tr>
 				<tr id="sharedconfigure"  style="display:none">
-					<th><s:Locale code="apps.formbased.sharedUsername"/>:</th>
+					<th><@locale code="apps.formbased.sharedUsername"/>:</th>
 					<td>
 						<input type="text" id="sharedUsername" name="sharedUsername" value="" />
 						<b class="orange">*</b><label for="sharedUsername"></label>
 					</td>
-					<th><s:Locale code="apps.formbased.sharedPassword"/>:</th>
+					<th><@locale code="apps.formbased.sharedPassword"/>:</th>
 					<td>
 						<input type="text" id="sharedPassword" name="sharedPassword" value="" />
 						<b class="orange">*</b><label for="sharedPassword"></label>
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.formbased.extendAttr"/>:</th>
+					<th><@locale code="apps.formbased.extendAttr"/>:</th>
 					<td colspan="3">
 						<input type="checkbox" id="isExtendAttr" name="isExtendAttr" value="1"/>
-						<s:Locale code="apps.formbased.isExtendAttr"/>
+						<@locale code="apps.formbased.isExtendAttr"/>
 						<span  id="showExtendAttr" style="display:none">
-							<input  class="button"  type="button"  value='<s:Locale code="button.text.add.parameter"/>' id="addExtendAttr"/>
+							<input  class="button"  type="button"  value='<@locale code="button.text.add.parameter"/>' id="addExtendAttr"/>
 						</span>
 					</td>
 				</tr>
@@ -158,6 +153,6 @@ $(function(){
 				</table>
 
 			<input  id="status" type="hidden" name="status"  value="1"/>
-    		<input class="button" id="submitBtn" type="submit" value="<s:Locale code="button.text.save" />"/>
-			<input class="button" id="backBtn" type="button" value="<s:Locale code="button.text.cancel" />"/>	  
+    		<input class="button" id="submitBtn" type="submit" value="<@locale code="button.text.save" />"/>
+			<input class="button" id="backBtn" type="button" value="<@locale code="button.text.cancel" />"/>	  
 </form>

+ 27 - 32
maxkey-web-manage/src/main/resources/templates/views/apps/extendapi/appUpdate.ftl

@@ -1,13 +1,8 @@
-<%@ page 	language="java"   import="java.util.*" 	pageEncoding="UTF-8"%>
-<%@ taglib 	prefix="spring"   uri="http://www.springframework.org/tags" %>
-<%@ taglib 	prefix="s" uri="http://www.connsec.com/tags" %>
-<%@ taglib 	prefix="fmt"      uri="http://java.sun.com/jsp/jstl/fmt"%>
-<%@ taglib  prefix="c"       	uri="http://java.sun.com/jsp/jstl/core"  %>
 <script type="text/javascript">
 <!--
 $(function(){	
 	$("#generateSecret").on("click",function(){
-		$.post("<s:Base/>/apps/generate/secret/oauth20", {_method:"post",currTime:(new Date()).getTime()}, function(data) {
+		$.post("<@base/>/apps/generate/secret/oauth20", {_method:"post",currTime:(new Date()).getTime()}, function(data) {
 			$("#secret").val(data+"");
 			$("#secret_text").html(data+"");
 		}); 
@@ -26,11 +21,11 @@ $(function(){
 	var attrIndex = 0;
 	
 	function addExtendAttr(attribute,attributeValue){
-		var html = '<tr  id="extendTr_' + attrIndex + '"><th><s:Locale code="common.text.parameter"/>:';   
-		 html += '<input  class="button delExtendTr"  type="button" name="delExtendTr"  attrTrId="extendTr_'+attrIndex+'" value="<s:Locale code="button.text.delete" />"/>';
+		var html = '<tr  id="extendTr_' + attrIndex + '"><th><@locale code="common.text.parameter"/>:';   
+		 html += '<input  class="button delExtendTr"  type="button" name="delExtendTr"  attrTrId="extendTr_'+attrIndex+'" value="<@locale code="button.text.delete" />"/>';
 		html += '</th><td>';   
 		html += '<input type="text" id="attribute_' + attrIndex + '" name="attribute" class="int" title="" value="'+attribute+'"/>';   
-        html += '</span></td><th><s:Locale code="common.text.parameter.value"/>:</th>	<td><span class="intspan">';
+        html += '</span></td><th><@locale code="common.text.parameter.value"/>:</th>	<td><span class="intspan">';
         html += '<input type="text" id="attributeValue_' + attrIndex + '" name="attributeValue" class="int" title="" value="'+attributeValue+'"/>';
         html += '</span>';
        
@@ -84,79 +79,79 @@ $(function(){
 			   <table  class="datatable">
 				<tbody>
 				<tr>
-					<th  ><s:Locale code="apps.principal"/>:</th>
+					<th  ><@locale code="apps.principal"/>:</th>
 					<td  >
 						<input type="text" id="principal" name="principal"  title="" value="${model.principal}"/>
 						<b class="orange">*</b><label for="principal"></label>
 					</td>
-					<th  ><s:Locale code="apps.credentials"/>:</th>
+					<th  ><@locale code="apps.credentials"/>:</th>
 					<td  >
 						<input type="text" id="credentials" name="credentials"  title="" value="${model.credentials}"/>
 						<b class="orange">*</b><label for="credentials"></label>
 					</td>
 				</tr>
 				<tr>
-					<th style="width:15%;"><s:Locale code="apps.formbased.credential"/>:</th>
+					<th style="width:15%;"><@locale code="apps.formbased.credential"/>:</th>
 					<td style="width:35%;">
 							<input type="radio" id="credential1" name="credential" class="credential" value="3"  <c:if test="${3==model.credential}">checked</c:if> />
-							<s:Locale code="apps.formbased.credential.user-defined"/>
+							<@locale code="apps.formbased.credential.user-defined"/>
 							<input type="radio" id="credential3" name="credential" class="credential" value="2"  <c:if test="${2==model.credential}">checked</c:if> />
-							<s:Locale code="apps.formbased.credential.shared"/>
+							<@locale code="apps.formbased.credential.shared"/>
 							<input type="radio" id="credential2" name="credential" class="credential" value="1"  <c:if test="${1==model.credential}">checked</c:if> />
-							<s:Locale code="apps.formbased.credential.system"/>
+							<@locale code="apps.formbased.credential.system"/>
 						<b class="orange">*</b><label for="credential"></label>
 					</td>
-					<th style="width:15%;"><s:Locale code="apps.isAdapter"/>:</th>
+					<th style="width:15%;"><@locale code="apps.isAdapter"/>:</th>
 					<td style="width:35%;" >
 						<select  id="isAdapter" name="isAdapter" >
-							<option value="0"  <c:if test="${0==model.isAdapter}">selected</c:if> ><s:Locale code="apps.isAdapter.no"/></option>
-							<option value="1"  <c:if test="${1==model.isAdapter}">selected</c:if> ><s:Locale code="apps.isAdapter.yes"/></option>
+							<option value="0"  <c:if test="${0==model.isAdapter}">selected</c:if> ><@locale code="apps.isAdapter.no"/></option>
+							<option value="1"  <c:if test="${1==model.isAdapter}">selected</c:if> ><@locale code="apps.isAdapter.yes"/></option>
 						</select>
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.adapter"/>:</th>
+					<th><@locale code="apps.adapter"/>:</th>
 					<td colspan =3>
 						<input type="text" id="adapter" name="adapter"  title="" value="${model.adapter}"/>
 					</td>
 				</tr>
 				<tr id="systemconfigure"  <c:if test="${1!=model.credential}"> style="display:none"</c:if> >
-					<th><s:Locale code="apps.formbased.systemUserAttr"/>:</th>
+					<th><@locale code="apps.formbased.systemUserAttr"/>:</th>
 					<td colspan="3">
 						<select id="systemUserAttr" name="systemUserAttr">
 							<option value="uid"   <c:if test="${'uid'==model.systemUserAttr}">selected</c:if> >
-								<s:Locale code="userinfo.uid"/></option>
+								<@locale code="userinfo.uid"/></option>
 							<option value="employeeNumber" <c:if test="${'employeeNumber'==model.systemUserAttr}">selected</c:if> >
-								<s:Locale code="userinfo.employeeNumber"/></option>
+								<@locale code="userinfo.employeeNumber"/></option>
 							<option value="username" <c:if test="${'username'==model.systemUserAttr}">selected</c:if> >
-								<s:Locale code="userinfo.username"/></option>
+								<@locale code="userinfo.username"/></option>
 							<option value="email" <c:if test="${'email'==model.systemUserAttr}">selected</c:if> >
-								<s:Locale code="userinfo.email"/></option>
+								<@locale code="userinfo.email"/></option>
 							<option value="windowsaccount" <c:if test="${'windowsaccount'==model.systemUserAttr}">selected</c:if> >
-								<s:Locale code="userinfo.windowsAccount"/></option>
+								<@locale code="userinfo.windowsAccount"/></option>
 						</select>
 						<b class="orange">*</b><label for="systemUserAttr"></label>
 					</td>
 				</tr>
 				<tr id="sharedconfigure"  <c:if test="${2!=model.credential}"> style="display:none"</c:if>>
-					<th><s:Locale code="apps.formbased.sharedUsername"/>:</th>
+					<th><@locale code="apps.formbased.sharedUsername"/>:</th>
 					<td>
 						<input type="text" id="sharedUsername" name="sharedUsername" value="${model.sharedUsername}" />
 						<b class="orange">*</b><label for="sharedUsername"></label>
 					</td>
-					<th><s:Locale code="apps.formbased.sharedPassword"/>:</th>
+					<th><@locale code="apps.formbased.sharedPassword"/>:</th>
 					<td>
 						<input type="text" id="sharedPassword" name="sharedPassword" value="${model.sharedPassword}" />
 						<b class="orange">*</b><label for="sharedPassword"></label>
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.formbased.extendAttr"/>:</th>
+					<th><@locale code="apps.formbased.extendAttr"/>:</th>
 					<td colspan="3">
 						<input type="checkbox" id="isExtendAttr" name="isExtendAttr" value="1"  <c:if test="${1==model.isExtendAttr}">checked</c:if>  />
-						<s:Locale code="apps.formbased.isExtendAttr"/>
+						<@locale code="apps.formbased.isExtendAttr"/>
 						<span  id="showExtendAttr"  <c:if test="${0==model.isExtendAttr}">style="display:none"</c:if>>
-							<input class="button" type="button"  value='<s:Locale code="button.text.add.parameter"/>' id="addExtendAttr"/>
+							<input class="button" type="button"  value='<@locale code="button.text.add.parameter"/>' id="addExtendAttr"/>
 						</span>
 					</td>
 				</tr>
@@ -168,6 +163,6 @@ $(function(){
 				</tr>
 				</tbody>
 				</table>
-    		<input class="button" id="submitBtn" type="submit" value="<s:Locale code="button.text.save" />"/>
-			<input class="button" id="backBtn" type="button" value="<s:Locale code="button.text.cancel" />"/>		  
+    		<input class="button" id="submitBtn" type="submit" value="<@locale code="button.text.save" />"/>
+			<input class="button" id="backBtn" type="button" value="<@locale code="button.text.cancel" />"/>		  
 </form>

+ 30 - 34
maxkey-web-manage/src/main/resources/templates/views/apps/formbased/appAdd.ftl

@@ -1,8 +1,4 @@
-<%@ page 	language="java"   import="java.util.*" 	pageEncoding="UTF-8"%>
-<%@ taglib 	prefix="spring"   uri="http://www.springframework.org/tags" %>
-<%@ taglib 	prefix="s" uri="http://www.connsec.com/tags" %>
-<%@ taglib 	prefix="fmt"      uri="http://java.sun.com/jsp/jstl/fmt"%>
-<%@ page 	import="org.maxkey.constants.*"%>
+
 <script type="text/javascript">
 <!--
 $(function(){		
@@ -19,11 +15,11 @@ $(function(){
 	var attrIndex = 0;
 		
 	function addExtendAttr(attribute,attributeValue){
-		var html = '<tr  id="extendTr_' + attrIndex + '"><th><s:Locale code="common.text.parameter"/>:';   
-		 html += '<input  class="button delExtendTr"  type="button" name="delExtendTr" attrTrId="extendTr_'+attrIndex+'" value="<s:Locale code="button.text.delete" />"/>';
+		var html = '<tr  id="extendTr_' + attrIndex + '"><th><@locale code="common.text.parameter"/>:';   
+		 html += '<input  class="button delExtendTr"  type="button" name="delExtendTr" attrTrId="extendTr_'+attrIndex+'" value="<@locale code="button.text.delete" />"/>';
 		html += '</th><td>';   
 		html += '<input type="text" id="attribute_' + attrIndex + '" name="attribute" class="int" title="" value="'+attribute+'"/>';   
-        html += '</span></td><th><s:Locale code="common.text.parameter.value"/>:</th>	<td><span class="intspan">';
+        html += '</span></td><th><@locale code="common.text.parameter.value"/>:</th>	<td><span class="intspan">';
         html += '<input type="text" id="attributeValue_' + attrIndex + '" name="attributeValue" class="int" title="" value="'+attributeValue+'"/>';
         html += '</span>';
        
@@ -73,10 +69,10 @@ $(function(){
 				<tbody>
 				
 				<tr>
-					<td colspan=4><s:Locale code="apps.formbased.info"/></td>
+					<td colspan=4><@locale code="apps.formbased.info"/></td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.formbased.redirectUri"/>:</th>
+					<th><@locale code="apps.formbased.redirectUri"/>:</th>
 					<td colspan="3">
 						<input type="text" id="redirectUri" name="redirectUri"  title="" value=""/>
 						<b class="orange">*</b><label for="redirectUri"></label>
@@ -84,12 +80,12 @@ $(function(){
 					
 				</tr>
 				<tr>
-					<th style="width:15%;"><s:Locale code="apps.formbased.usernameMapping"/>:</th>
+					<th style="width:15%;"><@locale code="apps.formbased.usernameMapping"/>:</th>
 					<td style="width:35%;">
 						<input type="text" id="usernameMapping" name="usernameMapping"  title="" value="username"/>
 						<b class="orange">*</b><label for="usernameMapping"></label>
 					</td>
-					<th style="width:15%;"><s:Locale code="apps.formbased.passwordMapping"/>:</th>
+					<th style="width:15%;"><@locale code="apps.formbased.passwordMapping"/>:</th>
 					<td style="width:35%;">
 						<input type="text" id="passwordMapping" name="passwordMapping"  title="" value="password"/>
 						<b class="orange">*</b><label for="passwordMapping"></label>
@@ -97,73 +93,73 @@ $(function(){
 				</tr>
 				
 				<tr>
-					<th width="140px"><s:Locale code="apps.formbased.credential"/>:</th>
+					<th width="140px"><@locale code="apps.formbased.credential"/>:</th>
 					<td>
 						<input type="radio" id="credential-user-defined" name="credential" class="credential" value="3"  checked />
-						<s:Locale code="apps.formbased.credential.user-defined"/>
+						<@locale code="apps.formbased.credential.user-defined"/>
 						<input type="radio" id="credential-shared" name="credential" class="credential"  value="2" />
-						<s:Locale code="apps.formbased.credential.shared"/>
+						<@locale code="apps.formbased.credential.shared"/>
 						<input type="radio" id="credential-system" name="credential" class="credential"  value="1"  />
-						<s:Locale code="apps.formbased.credential.system"/>
+						<@locale code="apps.formbased.credential.system"/>
 						<b class="orange">*</b><label for="credential"></label>
 					</td>
-					<th><s:Locale code="apps.isAdapter"/>:</th>
+					<th><@locale code="apps.isAdapter"/>:</th>
 					<td>
 						<select  id="isAdapter" name="isAdapter" >
-							<option value="0"  selected><s:Locale code="apps.isAdapter.no"/></option>
-							<option value="1"><s:Locale code="apps.isAdapter.yes"/></option>
+							<option value="0"  selected><@locale code="apps.isAdapter.no"/></option>
+							<option value="1"><@locale code="apps.isAdapter.yes"/></option>
 						</select>
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.adapter"/>:</th>
+					<th><@locale code="apps.adapter"/>:</th>
 					<td colspan =3>
 						<input type="text" id="adapter" name="adapter"  title="" value=""/>
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.formbased.authorizeView"/>:</th>
+					<th><@locale code="apps.formbased.authorizeView"/>:</th>
 					<td colspan =3>
 						<input type="text" id="authorizeView" name="authorizeView"  title="" value=""/>
 					</td>
 				</tr>
 				<tr id="systemconfigure"  style="display:none">
-					<th><s:Locale code="apps.formbased.systemUserAttr"/>:</th>
+					<th><@locale code="apps.formbased.systemUserAttr"/>:</th>
 					<td colspan="3">
 						<select id="systemUserAttr" name="systemUserAttr">
 							<option value="uid">
-								<s:Locale code="userinfo.uid"/></option>
+								<@locale code="userinfo.uid"/></option>
 							<option value="employeeNumber">
-								<s:Locale code="userinfo.employeeNumber"/></option>
+								<@locale code="userinfo.employeeNumber"/></option>
 							<option value="username"  selected>
-								<s:Locale code="userinfo.username"/></option>
+								<@locale code="userinfo.username"/></option>
 							<option value="email">
-								<s:Locale code="userinfo.email"/></option>
+								<@locale code="userinfo.email"/></option>
 							<option value="windowsaccount">
-								<s:Locale code="userinfo.windowsAccount"/></option>
+								<@locale code="userinfo.windowsAccount"/></option>
 						</select>
 						<b class="orange">*</b><label for="systemUserAttr"></label>
 					</td>
 				</tr>
 				<tr id="sharedconfigure"  style="display:none">
-					<th><s:Locale code="apps.formbased.sharedUsername"/>:</th>
+					<th><@locale code="apps.formbased.sharedUsername"/>:</th>
 					<td>
 						<input type="text" id="sharedUsername" name="sharedUsername" value="" />
 						<b class="orange">*</b><label for="sharedUsername"></label>
 					</td>
-					<th><s:Locale code="apps.formbased.sharedPassword"/>:</th>
+					<th><@locale code="apps.formbased.sharedPassword"/>:</th>
 					<td>
 						<input type="text" id="sharedPassword" name="sharedPassword" value="" />
 						<b class="orange">*</b><label for="sharedPassword"></label>
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.formbased.extendAttr"/>:</th>
+					<th><@locale code="apps.formbased.extendAttr"/>:</th>
 					<td colspan="3">
 						<input type="checkbox" id="isExtendAttr" name="isExtendAttr" value="1"/>
-						<s:Locale code="apps.formbased.isExtendAttr"/>
+						<@locale code="apps.formbased.isExtendAttr"/>
 						<span  id="showExtendAttr" style="display:none">
-							<input  class="button"  type="button"  value='<s:Locale code="button.text.add.parameter"/>' id="addExtendAttr"/>
+							<input  class="button"  type="button"  value='<@locale code="button.text.add.parameter"/>' id="addExtendAttr"/>
 						</span>
 					</td>
 				</tr>
@@ -177,6 +173,6 @@ $(function(){
 				</table>
 
 			<input  id="status" type="hidden" name="status"  value="1"/>
-    		<input class="button" id="submitBtn" type="submit" value="<s:Locale code="button.text.save" />"/>
-			<input class="button" id="backBtn" type="button" value="<s:Locale code="button.text.cancel" />"/>	  
+    		<input class="button" id="submitBtn" type="submit" value="<@locale code="button.text.save" />"/>
+			<input class="button" id="backBtn" type="button" value="<@locale code="button.text.cancel" />"/>	  
 </form>

+ 30 - 35
maxkey-web-manage/src/main/resources/templates/views/apps/formbased/appUpdate.ftl

@@ -1,14 +1,9 @@
-<%@ page 	language="java"   import="java.util.*" 	pageEncoding="UTF-8"%>
-<%@ taglib 	prefix="spring"   uri="http://www.springframework.org/tags" %>
-<%@ taglib 	prefix="s" uri="http://www.connsec.com/tags" %>
-<%@ taglib 	prefix="fmt"      uri="http://java.sun.com/jsp/jstl/fmt"%>
-<%@ taglib  prefix="c"       	uri="http://java.sun.com/jsp/jstl/core"  %>
 
 <script type="text/javascript">
 <!--
 $(function(){	
 	$("#generateSecret").on("click",function(){
-		$.post("<s:Base/>/apps/generate/secret/oauth20", {_method:"post",currTime:(new Date()).getTime()}, function(data) {
+		$.post("<@base/>/apps/generate/secret/oauth20", {_method:"post",currTime:(new Date()).getTime()}, function(data) {
 			$("#secret").val(data+"");
 			$("#secret_text").html(data+"");
 		}); 
@@ -27,11 +22,11 @@ $(function(){
 	var attrIndex = 0;
 	
 	function addExtendAttr(attribute,attributeValue){
-		var html = '<tr  id="extendTr_' + attrIndex + '"><th><s:Locale code="common.text.parameter"/>:';   
-		 html += '<input  class="button delExtendTr"  type="button" name="delExtendTr"  attrTrId="extendTr_'+attrIndex+'" value="<s:Locale code="button.text.delete" />"/>';
+		var html = '<tr  id="extendTr_' + attrIndex + '"><th><@locale code="common.text.parameter"/>:';   
+		 html += '<input  class="button delExtendTr"  type="button" name="delExtendTr"  attrTrId="extendTr_'+attrIndex+'" value="<@locale code="button.text.delete" />"/>';
 		html += '</th><td>';   
 		html += '<input type="text" id="attribute_' + attrIndex + '" name="attribute" class="int" title="" value="'+attribute+'"/>';   
-        html += '</span></td><th><s:Locale code="common.text.parameter.value"/>:</th>	<td><span class="intspan">';
+        html += '</span></td><th><@locale code="common.text.parameter.value"/>:</th>	<td><span class="intspan">';
         html += '<input type="text" id="attributeValue_' + attrIndex + '" name="attributeValue" class="int" title="" value="'+attributeValue+'"/>';
         html += '</span>';
        
@@ -86,10 +81,10 @@ $(function(){
 				<tbody>
 				
 				<tr>
-					<td colspan=4><s:Locale code="apps.formbased.info"/></td>
+					<td colspan=4><@locale code="apps.formbased.info"/></td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.formbased.redirectUri"/>:</th>
+					<th><@locale code="apps.formbased.redirectUri"/>:</th>
 					<td colspan="3">
 						<input type="text" id="redirectUri" name="redirectUri"  title="" value="${model.redirectUri}"/>
 						<b class="orange">*</b><label for="redirectUri"></label>
@@ -97,85 +92,85 @@ $(function(){
 					
 				</tr>
 				<tr>
-					<th style="width:15%;"><s:Locale code="apps.formbased.usernameMapping"/>:</th>
+					<th style="width:15%;"><@locale code="apps.formbased.usernameMapping"/>:</th>
 					<td style="width:35%;">
 						<input type="text" id="usernameMapping" name="usernameMapping"  title="" value="${model.usernameMapping}"/>
 						<b class="orange">*</b><label for="submit"></label>
 					</td>
-					<th style="width:15%;"><s:Locale code="apps.formbased.passwordMapping"/>:</th>
+					<th style="width:15%;"><@locale code="apps.formbased.passwordMapping"/>:</th>
 					<td style="width:35%;">
 						<input type="text" id="passwordMapping" name="passwordMapping"  title="" value="${model.passwordMapping}"/>
 						<b class="orange">*</b><label for="algorithmKey"></label>
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.formbased.credential"/>:</th>
+					<th><@locale code="apps.formbased.credential"/>:</th>
 					<td >
 							<input type="radio" id="credential1" name="credential" class="credential" value="3"  <c:if test="${3==model.credential}">checked</c:if> />
-							<s:Locale code="apps.formbased.credential.user-defined"/>
+							<@locale code="apps.formbased.credential.user-defined"/>
 							<input type="radio" id="credential3" name="credential" class="credential" value="2"  <c:if test="${2==model.credential}">checked</c:if> />
-							<s:Locale code="apps.formbased.credential.shared"/>
+							<@locale code="apps.formbased.credential.shared"/>
 							<input type="radio" id="credential2" name="credential" class="credential" value="1"  <c:if test="${1==model.credential}">checked</c:if> />
-							<s:Locale code="apps.formbased.credential.system"/>
+							<@locale code="apps.formbased.credential.system"/>
 						<b class="orange">*</b><label for="credential"></label>
 					</td>
-					<th><s:Locale code="apps.isAdapter"/>:</th>
+					<th><@locale code="apps.isAdapter"/>:</th>
 					<td  >
 						<select  id="isAdapter" name="isAdapter" >
-							<option value="0"  <c:if test="${0==model.isAdapter}">selected</c:if> ><s:Locale code="apps.isAdapter.no"/></option>
-							<option value="1"  <c:if test="${1==model.isAdapter}">selected</c:if> ><s:Locale code="apps.isAdapter.yes"/></option>
+							<option value="0"  <c:if test="${0==model.isAdapter}">selected</c:if> ><@locale code="apps.isAdapter.no"/></option>
+							<option value="1"  <c:if test="${1==model.isAdapter}">selected</c:if> ><@locale code="apps.isAdapter.yes"/></option>
 						</select>
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.adapter"/>:</th>
+					<th><@locale code="apps.adapter"/>:</th>
 					<td colspan =3>
 						<input type="text" id="adapter" name="adapter"  title="" value="${model.adapter}"/>
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.formbased.authorizeView"/>:</th>
+					<th><@locale code="apps.formbased.authorizeView"/>:</th>
 					<td colspan =3>
 						<input type="text" id="authorizeView" name="authorizeView"  title="" value="${model.authorizeView}"/>
 					</td>
 				</tr>
 				<tr id="systemconfigure"  <c:if test="${1!=model.credential}"> style="display:none"</c:if> >
-					<th><s:Locale code="apps.formbased.systemUserAttr"/>:</th>
+					<th><@locale code="apps.formbased.systemUserAttr"/>:</th>
 					<td colspan="3">
 						<select id="systemUserAttr" name="systemUserAttr">
 							<option value="uid"   <c:if test="${'uid'==model.systemUserAttr}">selected</c:if> >
-								<s:Locale code="userinfo.uid"/></option>
+								<@locale code="userinfo.uid"/></option>
 							<option value="employeeNumber" <c:if test="${'employeeNumber'==model.systemUserAttr}">selected</c:if> >
-								<s:Locale code="userinfo.employeeNumber"/></option>
+								<@locale code="userinfo.employeeNumber"/></option>
 							<option value="username" <c:if test="${'username'==model.systemUserAttr}">selected</c:if> >
-								<s:Locale code="userinfo.username"/></option>
+								<@locale code="userinfo.username"/></option>
 							<option value="email" <c:if test="${'email'==model.systemUserAttr}">selected</c:if> >
-								<s:Locale code="userinfo.email"/></option>
+								<@locale code="userinfo.email"/></option>
 							<option value="windowsaccount" <c:if test="${'windowsaccount'==model.systemUserAttr}">selected</c:if> >
-								<s:Locale code="userinfo.windowsAccount"/></option>
+								<@locale code="userinfo.windowsAccount"/></option>
 						</select>
 						<b class="orange">*</b><label for="systemUserAttr"></label>
 					</td>
 				</tr>
 				<tr id="sharedconfigure"  <c:if test="${2!=model.credential}"> style="display:none"</c:if>>
-					<th><s:Locale code="apps.formbased.sharedUsername"/>:</th>
+					<th><@locale code="apps.formbased.sharedUsername"/>:</th>
 					<td>
 						<input type="text" id="sharedUsername" name="sharedUsername" value="${model.sharedUsername}" />
 						<b class="orange">*</b><label for="sharedUsername"></label>
 					</td>
-					<th><s:Locale code="apps.formbased.sharedPassword"/>:</th>
+					<th><@locale code="apps.formbased.sharedPassword"/>:</th>
 					<td>
 						<input type="text" id="sharedPassword" name="sharedPassword" value="${model.sharedPassword}" />
 						<b class="orange">*</b><label for="sharedPassword"></label>
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.formbased.extendAttr"/>:</th>
+					<th><@locale code="apps.formbased.extendAttr"/>:</th>
 					<td colspan="3">
 						<input type="checkbox" id="isExtendAttr" name="isExtendAttr" value="1"  <c:if test="${1==model.isExtendAttr}">checked</c:if>  />
-						<s:Locale code="apps.formbased.isExtendAttr"/>
+						<@locale code="apps.formbased.isExtendAttr"/>
 						<span  id="showExtendAttr"  <c:if test="${0==model.isExtendAttr}">style="display:none"</c:if>>
-							<input class="button" type="button"  value='<s:Locale code="button.text.add.parameter"/>' id="addExtendAttr"/>
+							<input class="button" type="button"  value='<@locale code="button.text.add.parameter"/>' id="addExtendAttr"/>
 						</span>
 					</td>
 				</tr>
@@ -187,6 +182,6 @@ $(function(){
 				</tr>
 				</tbody>
 				</table>
-    		<input class="button" id="submitBtn" type="submit" value="<s:Locale code="button.text.save" />"/>
-			<input class="button" id="backBtn" type="button" value="<s:Locale code="button.text.cancel" />"/>	  
+    		<input class="button" id="submitBtn" type="submit" value="<@locale code="button.text.save" />"/>
+			<input class="button" id="backBtn" type="button" value="<@locale code="button.text.cancel" />"/>	  
 </form>

+ 21 - 26
maxkey-web-manage/src/main/resources/templates/views/apps/ltpa/appAdd.ftl

@@ -1,13 +1,8 @@
-<%@ page 	language="java"   import="java.util.*" 	pageEncoding="UTF-8"%>
-<%@ taglib 	prefix="spring"   uri="http://www.springframework.org/tags" %>
-<%@ taglib 	prefix="s" uri="http://www.connsec.com/tags" %>
-<%@ taglib 	prefix="fmt"      uri="http://java.sun.com/jsp/jstl/fmt"%>
-<%@ page 	import="org.maxkey.constants.*"%>
 <script type="text/javascript">
 <!--
 $(function(){	
 	$("#algorithm").change(function(){
-		$.post("<s:Base/>/apps/generate/secret/"+$(this).val(), {_method:"post",currTime:(new Date()).getTime()}, function(data) {
+		$.post("<@base/>/apps/generate/secret/"+$(this).val(), {_method:"post",currTime:(new Date()).getTime()}, function(data) {
 			$("#algorithmKey").val(data+"");
 			$("#algorithmKey_text").html(data+"");
 			$("#secret").val(data+"");
@@ -35,24 +30,24 @@ $(function(){
 						<table width="960"  class="datatable" >
 						<tbody>
 							<tr>
-								<td colspan=4><s:Locale code="apps.ltpa.info" /></td>
+								<td colspan=4><@locale code="apps.ltpa.info" /></td>
 							</tr>
 							<tr>
-								<th><s:Locale code="apps.ltpa.redirectUri" />:</th>
+								<th><@locale code="apps.ltpa.redirectUri" />:</th>
 								<td  colspan=3>
 									<input type="text" id="redirectUri" name="redirectUri"  title="" value=""/>
 									<b class="orange">*</b><label for="redirectUri"></label>
 								</td>
 							</tr>
 							<tr>
-									<th ><s:Locale code="apps.ltpa.cookieName" />:</th>
+									<th ><@locale code="apps.ltpa.cookieName" />:</th>
 									<td  colspan=3>
 										<input type="text" id="redirectUri" name="cookieName"  title="" value=""/>
 										<b class="orange">*</b><label for="cookieName"></label>
 									</td>
 								</tr>
 							<tr>
-								<th style="width:15%;"><s:Locale code="apps.ltpa.algorithm" />:</th>
+								<th style="width:15%;"><@locale code="apps.ltpa.algorithm" />:</th>
 								<td style="width:35%;" >
 									<select id="algorithm" name="algorithm" >
 										<option value="DES" selected>DES</option>
@@ -62,7 +57,7 @@ $(function(){
 									</select>
 									<b class="orange">*</b><label for="algorithm"></label>
 								</td>
-								<th style="width:15%;"><s:Locale code="apps.ltpa.algorithmKey" />:</th>
+								<th style="width:15%;"><@locale code="apps.ltpa.algorithmKey" />:</th>
 								<td style="width:35%;" >
 									<span id="algorithmKey_text">${model.algorithmKey}</span>
 									<input type="hidden" id="algorithmKey" name="algorithmKey"  title="" value="${model.algorithmKey}"/>
@@ -70,38 +65,38 @@ $(function(){
 								</td>
 							</tr>
 							<tr>
-								<th><s:Locale code="apps.ltpa.token.content" />:</th>
+								<th><@locale code="apps.ltpa.token.content" />:</th>
 								<td colspan=3>
 									<table class="hidetable" style="width:100%;">
 										<tr>
-											<td><s:Locale code="userinfo.id" /><input type="checkbox" id="uid" name="uid" value="1"/></td>
-											<td><s:Locale code="userinfo.username" /><input type="checkbox" id="username" name="username" value="1"/></td>
-											<td><s:Locale code="userinfo.email" /><input type="checkbox" id="email" name="email" value="1"/></td>
-											<td><s:Locale code="userinfo.windowsAccount" /><input type="checkbox" id="windowsAccount" name="windowsAccount" value="1"/></td>
-											<td><s:Locale code="userinfo.employeeNumber" /><input type="checkbox" id="employeeNumber" name="employeeNumber" value="1"/></td>
-											<td><s:Locale code="userinfo.departmentId" /><input type="checkbox" id="departmentId" name="departmentId" value="1"/></td>
-											<td><s:Locale code="userinfo.department" /><input type="checkbox" id="department" name="department" value="1"/></td>
+											<td><@locale code="userinfo.id" /><input type="checkbox" id="uid" name="uid" value="1"/></td>
+											<td><@locale code="userinfo.username" /><input type="checkbox" id="username" name="username" value="1"/></td>
+											<td><@locale code="userinfo.email" /><input type="checkbox" id="email" name="email" value="1"/></td>
+											<td><@locale code="userinfo.windowsAccount" /><input type="checkbox" id="windowsAccount" name="windowsAccount" value="1"/></td>
+											<td><@locale code="userinfo.employeeNumber" /><input type="checkbox" id="employeeNumber" name="employeeNumber" value="1"/></td>
+											<td><@locale code="userinfo.departmentId" /><input type="checkbox" id="departmentId" name="departmentId" value="1"/></td>
+											<td><@locale code="userinfo.department" /><input type="checkbox" id="department" name="department" value="1"/></td>
 										</tr>
 									</table>
 								</td>
 							</tr>
 							<tr>
-								<th><s:Locale code="apps.ltpa.expires" />:</th>
+								<th><@locale code="apps.ltpa.expires" />:</th>
 								<td>
 									<input type="text" id="expires" name="expires"  title="" value="1"/>
 								</td>
-								<th><s:Locale code="apps.isAdapter" />:</th>
+								<th><@locale code="apps.isAdapter" />:</th>
 								<td>
 									<select  id="isAdapter" name="isAdapter" >
 										<option value="0"  selected>
-											<s:Locale code="apps.isAdapter.no" /></option>
+											<@locale code="apps.isAdapter.no" /></option>
 										<option value="1">
-											<s:Locale code="apps.isAdapter.yes" /></option>
+											<@locale code="apps.isAdapter.yes" /></option>
 									</select>
 								</td>
 							</tr>
 							<tr>
-								<th><s:Locale code="apps.adapter" />:</th>
+								<th><@locale code="apps.adapter" />:</th>
 								<td colspan =3>
 									<input type="text" id="adapter" name="adapter"  title="" value=""/>
 								</td>
@@ -115,6 +110,6 @@ $(function(){
 			   
 
 			<input class="button"  id="status" type="hidden" name="status"  value="1"/>
-    		<input class="button"  id="submitBtn" type="submit" value="<s:Locale code="button.text.save" />"/>
-			<input class="button"  id="backBtn" type="button" value="<s:Locale code="button.text.cancel" />"/>	  
+    		<input class="button"  id="submitBtn" type="submit" value="<@locale code="button.text.save" />"/>
+			<input class="button"  id="backBtn" type="button" value="<@locale code="button.text.cancel" />"/>	  
 </form>

+ 24 - 29
maxkey-web-manage/src/main/resources/templates/views/apps/ltpa/appUpdate.ftl

@@ -1,14 +1,9 @@
-<%@ page 	language="java"   import="java.util.*" 	pageEncoding="UTF-8"%>
-<%@ taglib 	prefix="spring"   uri="http://www.springframework.org/tags" %>
-<%@ taglib 	prefix="s" uri="http://www.connsec.com/tags" %>
-<%@ taglib 	prefix="fmt"      uri="http://java.sun.com/jsp/jstl/fmt"%>
-<%@ taglib  prefix="c"       	uri="http://java.sun.com/jsp/jstl/core"  %>
 <script type="text/javascript">
 <!--
 $(function(){	
 
 	$("#algorithm").change(function(){
-		$.post("<s:Base/>/apps/generate/secret/"+$(this).val(), {_method:"post",currTime:(new Date()).getTime()}, function(data) {
+		$.post("<@base/>/apps/generate/secret/"+$(this).val(), {_method:"post",currTime:(new Date()).getTime()}, function(data) {
 			$("#algorithmKey").val(data+"");
 			$("#algorithmKey_text").html(data+"");
 			$("#secret").val(data+"");
@@ -17,7 +12,7 @@ $(function(){
 	}); 
 	
 	$("#generateSecret").on("click",function(){
-		$.post("<s:Base/>/apps/generate/secret/"+$("#algorithm").val(), {_method:"post",currTime:(new Date()).getTime()}, function(data) {
+		$.post("<@base/>/apps/generate/secret/"+$("#algorithm").val(), {_method:"post",currTime:(new Date()).getTime()}, function(data) {
 			$("#algorithmKey").val(data+"");
 			$("#algorithmKey_text").html(data+"");
 			$("#secret").val(data+"");
@@ -28,8 +23,8 @@ $(function(){
 //-->
 </script>
 <form id="actionForm_app"  method="post" type="label" autoclose="true"  
-			action="<s:Base/>/apps/ltpa/update"  
-			forward="<s:Base/>/apps/list"
+			action="<@base/>/apps/ltpa/update"  
+			forward="<@base/>/apps/list"
 			enctype="multipart/form-data">		 
   	        <!-- content -->    
   	      	<!--table-->
@@ -44,24 +39,24 @@ $(function(){
 								<tbody>
 								
 								<tr>
-									<td colspan=4><s:Locale code="apps.ltpa.info" /></td>
+									<td colspan=4><@locale code="apps.ltpa.info" /></td>
 								</tr>
 								<tr>
-									<th><s:Locale code="apps.ltpa.redirectUri" />:</th>
+									<th><@locale code="apps.ltpa.redirectUri" />:</th>
 									<td  colspan=3>
 										<input type="text" id="redirectUri" name="redirectUri"  title="" value="${model.redirectUri}"/>
 										<b class="orange">*</b><label for="redirectUri"></label>
 									</td>
 								</tr>
 								<tr>
-									<th><s:Locale code="apps.ltpa.cookieName" />:</th>
+									<th><@locale code="apps.ltpa.cookieName" />:</th>
 									<td  colspan=3>
 										<input type="text" id="redirectUri" name="cookieName"  title="" value="${model.cookieName}"/>
 										<b class="orange">*</b><label for="cookieName"></label>
 									</td>
 								</tr>
 								<tr>
-									<th style="width:15%;"><s:Locale code="apps.ltpa.algorithm" />:</th>
+									<th style="width:15%;"><@locale code="apps.ltpa.algorithm" />:</th>
 									<td style="width:35%;">
 										<select id="algorithm" name="algorithm"  >
 											<option value="DES"  <c:if test="${'DES'==model.algorithm}">selected</c:if> >DES</option>
@@ -71,7 +66,7 @@ $(function(){
 										</select>
 										<b class="orange">*</b><label for="algorithm"></label>
 									</td>
-									<th style="width:15%;"><s:Locale code="apps.ltpa.algorithmKey" />:</th>
+									<th style="width:15%;"><@locale code="apps.ltpa.algorithmKey" />:</th>
 									<td style="width:35%;">
 										<span id="algorithmKey_text">${model.algorithmKey}</span>
 										<input type="hidden" id="algorithmKey" name="algorithmKey"  title="" value="${model.algorithmKey}"/>
@@ -79,38 +74,38 @@ $(function(){
 									</td>
 								</tr>
 								<tr>
-									<th><s:Locale code="apps.ltpa.token.content" />:</th>
+									<th><@locale code="apps.ltpa.token.content" />:</th>
 									<td colspan=3>
 										<table  class="hidetable"  style="width:100%;">
 											<tr>
-												<td><s:Locale code="userinfo.id" /><input type="checkbox" id="uid" name="uid" value="1" <c:if test="${1==model.uid}">checked</c:if> /></td>
-												<td><s:Locale code="userinfo.username" /><input type="checkbox" id="username" name="username" value="1" <c:if test="${1==model.username}">checked</c:if>/></td>
-												<td><s:Locale code="userinfo.email" /><input type="checkbox" id="email" name="email" value="1" <c:if test="${1==model.email}">checked</c:if>/></td>
-												<td><s:Locale code="userinfo.windowsAccount" /><input type="checkbox" id="windowsAccount" name="windowsAccount" value="1" <c:if test="${1==model.windowsAccount}">checked</c:if>/></td>
-												<td><s:Locale code="userinfo.employeeNumber" /><input type="checkbox" id="employeeNumber" name="employeeNumber" value="1" <c:if test="${1==model.employeeNumber}">checked</c:if>/></td>
-												<td><s:Locale code="userinfo.departmentId" /><input type="checkbox" id="departmentId" name="departmentId" value="1" <c:if test="${1==model.departmentId}">checked</c:if>/></td>
-												<td><s:Locale code="userinfo.department" /><input type="checkbox" id="department" name="department" value="1" <c:if test="${1==model.department}">checked</c:if>/></td>
+												<td><@locale code="userinfo.id" /><input type="checkbox" id="uid" name="uid" value="1" <c:if test="${1==model.uid}">checked</c:if> /></td>
+												<td><@locale code="userinfo.username" /><input type="checkbox" id="username" name="username" value="1" <c:if test="${1==model.username}">checked</c:if>/></td>
+												<td><@locale code="userinfo.email" /><input type="checkbox" id="email" name="email" value="1" <c:if test="${1==model.email}">checked</c:if>/></td>
+												<td><@locale code="userinfo.windowsAccount" /><input type="checkbox" id="windowsAccount" name="windowsAccount" value="1" <c:if test="${1==model.windowsAccount}">checked</c:if>/></td>
+												<td><@locale code="userinfo.employeeNumber" /><input type="checkbox" id="employeeNumber" name="employeeNumber" value="1" <c:if test="${1==model.employeeNumber}">checked</c:if>/></td>
+												<td><@locale code="userinfo.departmentId" /><input type="checkbox" id="departmentId" name="departmentId" value="1" <c:if test="${1==model.departmentId}">checked</c:if>/></td>
+												<td><@locale code="userinfo.department" /><input type="checkbox" id="department" name="department" value="1" <c:if test="${1==model.department}">checked</c:if>/></td>
 											</tr>
 										</table>
 									</td>
 								</tr>
 								<tr>
-									<th><s:Locale code="apps.ltpa.expires" />:</th>
+									<th><@locale code="apps.ltpa.expires" />:</th>
 									<td >
 										<input type="text" id="expires" name="expires"  title="" value="${model.expires}"/>
 									</td>
-									<th><s:Locale code="apps.isAdapter" />:</th>
+									<th><@locale code="apps.isAdapter" />:</th>
 									<td>
 										<select  id="isAdapter" name="isAdapter" >
 											<option value="0"  <c:if test="${0==model.isAdapter}">selected</c:if> >
-												<s:Locale code="apps.isAdapter.no" />
+												<@locale code="apps.isAdapter.no" />
 											<option value="1"  <c:if test="${1==model.isAdapter}">selected</c:if> >
-												<s:Locale code="apps.isAdapter.yes" />
+												<@locale code="apps.isAdapter.yes" />
 										</select>
 									</td>
 								</tr>
 								<tr>
-									<th><s:Locale code="apps.adapter" />:</th>
+									<th><@locale code="apps.adapter" />:</th>
 									<td colspan =3>
 										<input type="text" id="adapter" name="adapter"  title="" value="${model.adapter}"/>
 									</td>
@@ -123,6 +118,6 @@ $(function(){
 				</table>
 			  
   	      
-    		<input class="button" id="submitBtn" type="submit" value="<s:Locale code="button.text.save" />"/>
-			<input class="button" id="backBtn" type="button" value="<s:Locale code="button.text.cancel" />"/>	  
+    		<input class="button" id="submitBtn" type="submit" value="<@locale code="button.text.save" />"/>
+			<input class="button" id="backBtn" type="button" value="<@locale code="button.text.cancel" />"/>	  
 </form>

+ 26 - 31
maxkey-web-manage/src/main/resources/templates/views/apps/oauth20/appAdd.ftl

@@ -1,8 +1,3 @@
-<%@ page 	language="java"   import="java.util.*" 	pageEncoding="UTF-8"%>
-<%@ taglib 	prefix="spring"   uri="http://www.springframework.org/tags" %>
-<%@ taglib 	prefix="s" uri="http://www.connsec.com/tags" %>
-<%@ taglib 	prefix="fmt"      uri="http://java.sun.com/jsp/jstl/fmt"%>
-<%@ page 	import="org.maxkey.constants.*"%>
 <script type="text/javascript">
 <!--
 $(function(){	
@@ -11,8 +6,8 @@ $(function(){
 </script>
 
 <form id="actionForm_app"  method="post" type="label" autoclose="true"  
-			action="<s:Base/>/apps/oauth20/add"
-			forward="<s:Base/>/apps/list"  
+			action="<@base/>/apps/oauth20/add"
+			forward="<@base/>/apps/list"  
 			enctype="multipart/form-data">		 
   	        <!-- content -->    
   	      	<!--table-->
@@ -27,15 +22,15 @@ $(function(){
 				<tbody>
 				
 				<tr>
-					<td colspan=4><s:Locale code="apps.oauth.v2.0.info" /></td>
+					<td colspan=4><@locale code="apps.oauth.v2.0.info" /></td>
 				</tr>
 				<tr>
-					<th style="width:15%;"><s:Locale code="apps.oauth.v2.0.clientId" />:</th>
+					<th style="width:15%;"><@locale code="apps.oauth.v2.0.clientId" />:</th>
 					<td style="width:35%;">${model.clientId}
 						<input type="hidden" id="clientId" name="clientId"  title="" value="${model.clientId}"/>
 						
 					</td>
-					<th style="width:15%;"><s:Locale code="apps.oauth.v2.0.clientSecret" />:</th>
+					<th style="width:15%;"><@locale code="apps.oauth.v2.0.clientSecret" />:</th>
 					<td style="width:35%;">
 						<span id="clientSecret_text">${model.clientSecret}</span>
 						<input type="hidden" id="clientSecret" name="clientSecret"  title="" value="${model.clientSecret}"/>
@@ -43,7 +38,7 @@ $(function(){
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.oauth.scope" />:</th>
+					<th><@locale code="apps.oauth.scope" />:</th>
 					<td  colspan="3">
 						<table class="hidetable"  style="width:100%;">
 							<tr>
@@ -62,7 +57,7 @@ $(function(){
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.oauth.GrantTypes" />:</th>
+					<th><@locale code="apps.oauth.GrantTypes" />:</th>
 					<td  colspan="3">
 						<table  class="hidetable"  style="width:100%;">
 							<tr>
@@ -78,26 +73,26 @@ $(function(){
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.oauth.registeredRedirectUris" />:</th>
+					<th><@locale code="apps.oauth.registeredRedirectUris" />:</th>
 					<td colspan=3>
 						<textarea  id="registeredRedirectUris" name="registeredRedirectUris" rows="4" cols="60"></textarea>
 						<b class="orange">*</b><label for="registeredRedirectUris"></label>
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.oauth.accessTokenValiditySeconds" />:</th>
+					<th><@locale code="apps.oauth.accessTokenValiditySeconds" />:</th>
 					<td >
 						<input type="text" id="accessTokenValiditySeconds" name="accessTokenValiditySeconds"  title="" value="180"/>
 						<b class="orange">*</b><label for="accessTokenValiditySeconds"></label>
 					</td>
-					<th><s:Locale code="apps.oauth.refreshTokenValiditySeconds" />:</th>
+					<th><@locale code="apps.oauth.refreshTokenValiditySeconds" />:</th>
 					<td>
 						<input type="text" id="refreshTokenValiditySeconds" name="refreshTokenValiditySeconds"  title="" value="180"/>
 						<b class="orange">*</b><label for="refreshTokenValiditySeconds"></label>
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.connect.idTokenSigningAlgorithm" />:</th>
+					<th><@locale code="apps.connect.idTokenSigningAlgorithm" />:</th>
 					<td >
 						<select  id="idTokenSigningAlgorithm" name="idTokenSigningAlgorithm" >
 							<option value="none"    selected>No digital signature</option>
@@ -112,7 +107,7 @@ $(function(){
 							<option value="ES512"  >ECDSA using P-512 curve and SHA-512 hash algorithm</option>
 						</select>
 					</td>
-					<th><s:Locale code="apps.connect.userInfoSigningAlgorithm" />:</th>
+					<th><@locale code="apps.connect.userInfoSigningAlgorithm" />:</th>
 					<td >
 						<select  id="userInfoSigningAlgorithm" name="userInfoSigningAlgorithm" >
 							<option value="none"    selected>No digital signature</option>
@@ -129,13 +124,13 @@ $(function(){
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.connect.jwksUri" />:</th>
+					<th><@locale code="apps.connect.jwksUri" />:</th>
 					<td colspan =3>
 						<input type="text" id="jwksUri" name="jwksUri"  title="" value="${model.jwksUri}"/>
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.connect.idTokenEncryptedAlgorithm" />:</th>
+					<th><@locale code="apps.connect.idTokenEncryptedAlgorithm" />:</th>
 					<td >
 						<select  id="idTokenEncryptedAlgorithm" name="idTokenEncryptedAlgorithm" >
 							<option value="none" selected >No encryption</option>
@@ -150,7 +145,7 @@ $(function(){
 						
 						</select>
 					</td>
-					<th><s:Locale code="apps.connect.userInfoEncryptedAlgorithm" />:</th>
+					<th><@locale code="apps.connect.userInfoEncryptedAlgorithm" />:</th>
 					<td >
 						<select  id="userInfoEncryptedAlgorithm" name="userInfoEncryptedAlgorithm" >
 							<option value="none" selected >No encryption</option>
@@ -168,7 +163,7 @@ $(function(){
 				</tr>
 				
 				<tr>
-					<th><s:Locale code="apps.connect.idTokenEncryptionMethod" />:</th>
+					<th><@locale code="apps.connect.idTokenEncryptionMethod" />:</th>
 					<td >
 						<select  id="idTokenEncryptionMethod" name="idTokenEncryptionMethod" >
 							<option value="none" selected>No encryption</option>
@@ -178,7 +173,7 @@ $(function(){
 							<option value="A256GCM" >AES GCM using 256 bit keys</option>
 					</select>
 					</td>
-					<th><s:Locale code="apps.connect.userInfoEncryptionMethod" />:</th>
+					<th><@locale code="apps.connect.userInfoEncryptionMethod" />:</th>
 					<td >
 						<select  id="userInfoEncryptionMethod" name="userInfoEncryptionMethod" >
 							<option value="none" selected>No encryption</option>
@@ -190,27 +185,27 @@ $(function(){
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.oauth.approvalPrompt" />:</th>
+					<th><@locale code="apps.oauth.approvalPrompt" />:</th>
 					<td >
 						<select  id="approvalPrompt" name="approvalPrompt" >
 							<option value="force" selected>
-								<s:Locale code="apps.oauth.approvalPrompt.force" /></option>
+								<@locale code="apps.oauth.approvalPrompt.force" /></option>
 							<option value="auto"  >
-								<s:Locale code="apps.oauth.approvalPrompt.auto" /></option>
+								<@locale code="apps.oauth.approvalPrompt.auto" /></option>
 						</select>
 					</td>
-					<th><s:Locale code="apps.isAdapter" />:</th>
+					<th><@locale code="apps.isAdapter" />:</th>
 					<td >
 						<select  id="isAdapter" name="isAdapter" >
 							<option value="0"  selected>
-								<s:Locale code="apps.isAdapter.no" /></option>
+								<@locale code="apps.isAdapter.no" /></option>
 							<option value="1">
-								<s:Locale code="apps.isAdapter.yes" /></option>
+								<@locale code="apps.isAdapter.yes" /></option>
 						</select>
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.adapter" />:</th>
+					<th><@locale code="apps.adapter" />:</th>
 					<td colspan =3>
 						<input type="text" id="adapter" name="adapter"  title="" value=""/>
 					</td>
@@ -223,6 +218,6 @@ $(function(){
 				</table>
 		    <input id="_method" type="hidden" name="_method"  value="post"/>
 			<input  id="status" type="hidden" name="status"  value="1"/>
-    		<input class="button" id="submitBtn" type="submit" value="<s:Locale code="button.text.save" />"/>
-			<input class="button" id="backBtn" type="button" value="<s:Locale code="button.text.cancel" />"/>	  
+    		<input class="button" id="submitBtn" type="submit" value="<@locale code="button.text.save" />"/>
+			<input class="button" id="backBtn" type="button" value="<@locale code="button.text.cancel" />"/>	  
 </form>

+ 27 - 34
maxkey-web-manage/src/main/resources/templates/views/apps/oauth20/appUpdate.ftl

@@ -1,16 +1,9 @@
-<%@ page 	language="java"   import="java.util.*" 	pageEncoding="UTF-8"%>
-<%@ taglib 	prefix="spring"   uri="http://www.springframework.org/tags" %>
-<%@ taglib 	prefix="s" uri="http://www.connsec.com/tags" %>
-<%@ taglib 	prefix="fmt"      uri="http://java.sun.com/jsp/jstl/fmt"%>
-<%@ taglib  prefix="c"        uri="http://java.sun.com/jsp/jstl/core"  %>
-<%@ taglib  prefix="fn" 	  uri="http://java.sun.com/jsp/jstl/functions" %>
-
 <script type="text/javascript">
 <!--
 $(function(){	
 
 	$("#generateSecret").on("click",function(){
-		$.post("<s:Base/>/apps/generate/secret/oauth20", {_method:"post",currTime:(new Date()).getTime()}, function(data) {
+		$.post("<@base/>/apps/generate/secret/oauth20", {_method:"post",currTime:(new Date()).getTime()}, function(data) {
 			$("#clientSecret").val(data+"");
 			$("#clientSecret_text").html(data+"");
 			$("#secret").val(data+"");
@@ -21,8 +14,8 @@ $(function(){
 //-->
 </script>
 <form id="actionForm_app"  method="post" type="label" autoclose="true"  
-			action="<s:Base/>/apps/oauth20/update"
-			forward="<s:Base/>/apps/list"
+			action="<@base/>/apps/oauth20/update"
+			forward="<@base/>/apps/list"
 			enctype="multipart/form-data">		 
   	        <!-- content -->    
   	      	<!--table-->
@@ -37,16 +30,16 @@ $(function(){
 				<tbody>
 				
 				<tr>
-					<td colspan=4><s:Locale code="apps.oauth.v2.0.info" /></td>
+					<td colspan=4><@locale code="apps.oauth.v2.0.info" /></td>
 				</tr>
 				<tr>
-					<th style="width:15%;"><s:Locale code="apps.oauth.v2.0.clientId" />:</th>
+					<th style="width:15%;"><@locale code="apps.oauth.v2.0.clientId" />:</th>
 					<td style="width:35%;">
 						<span id="clientId_text">${model.clientId}</span>
 						<input type="hidden" id="clientId" name="clientId"  title="" value="${model.clientId}"/>
 						
 					</td>
-					<th style="width:15%;"><s:Locale code="apps.oauth.v2.0.clientSecret" />:</th>
+					<th style="width:15%;"><@locale code="apps.oauth.v2.0.clientSecret" />:</th>
 					<td style="width:35%;">
 						<span id="clientSecret_text">${model.clientSecret}</span>
 						<input type="hidden" id="clientSecret" name="clientSecret"  title="" value="${model.clientSecret}"/>
@@ -54,7 +47,7 @@ $(function(){
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.oauth.scope" />:</th>
+					<th><@locale code="apps.oauth.scope" />:</th>
 					<td  colspan="3">
 						<table  class="hidetable"  style="width:100%;">
 							<tr>
@@ -73,7 +66,7 @@ $(function(){
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.oauth.GrantTypes" />:</th>
+					<th><@locale code="apps.oauth.GrantTypes" />:</th>
 					<td colspan="3">
 						<table  class="hidetable"  style="width:100%;">
 							<tr>
@@ -90,26 +83,26 @@ $(function(){
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.oauth.registeredRedirectUris" />:</th>
+					<th><@locale code="apps.oauth.registeredRedirectUris" />:</th>
 					<td colspan=3>
 						<textarea  id="registeredRedirectUris" name="registeredRedirectUris" rows="4" cols="60">${model.registeredRedirectUris}</textarea>
 						<b class="orange">*</b><label for="registeredRedirectUris"></label>
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.oauth.accessTokenValiditySeconds" />:</th>
+					<th><@locale code="apps.oauth.accessTokenValiditySeconds" />:</th>
 					<td >
 						<input type="text" id="accessTokenValiditySeconds" name="accessTokenValiditySeconds"  title="" value="${model.accessTokenValiditySeconds}"/>
 						<b class="orange">*</b><label for="accessTokenValiditySeconds"></label>
 					</td>
-					<th><s:Locale code="apps.oauth.refreshTokenValiditySeconds" />:</th>
+					<th><@locale code="apps.oauth.refreshTokenValiditySeconds" />:</th>
 					<td>
 						<input type="text" id="refreshTokenValiditySeconds" name="refreshTokenValiditySeconds"  title="" value="${model.refreshTokenValiditySeconds}"/>
 						<b class="orange">*</b><label for="refreshTokenValiditySeconds"></label>
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.connect.idTokenSigningAlgorithm" />:</th>
+					<th><@locale code="apps.connect.idTokenSigningAlgorithm" />:</th>
 					<td >
 						<select  id="idTokenSigningAlgorithm" name="idTokenSigningAlgorithm" >
 							<option value="none"   <c:if test="${'none' ==model.idTokenSigningAlgorithm}">selected</c:if>>No digital signature</option>
@@ -124,7 +117,7 @@ $(function(){
 							<option value="ES512"  <c:if test="${'ES512'==model.idTokenSigningAlgorithm}">selected</c:if>>ECDSA using P-512 curve and SHA-512 hash algorithm</option>
 						</select>
 					</td>
-					<th><s:Locale code="apps.connect.userInfoSigningAlgorithm" />:</th>
+					<th><@locale code="apps.connect.userInfoSigningAlgorithm" />:</th>
 					<td >
 						<select  id="userInfoSigningAlgorithm" name="userInfoSigningAlgorithm" >
 							<option value="none"   <c:if test="${'none' ==model.userInfoSigningAlgorithm}">selected</c:if>>No digital signature</option>
@@ -141,13 +134,13 @@ $(function(){
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.connect.jwksUri" />:</th>
+					<th><@locale code="apps.connect.jwksUri" />:</th>
 					<td colspan =3>
 						<input type="text" id="jwksUri" name="jwksUri"  title="" value="${model.jwksUri}"/>
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.connect.idTokenEncryptedAlgorithm" />:</th>
+					<th><@locale code="apps.connect.idTokenEncryptedAlgorithm" />:</th>
 					<td >
 						<select  id="idTokenEncryptedAlgorithm" name="idTokenEncryptedAlgorithm" >
 							<option value="none" <c:if test="${'none'==model.idTokenEncryptedAlgorithm}">selected</c:if> >No encryption</option>
@@ -162,7 +155,7 @@ $(function(){
 						
 						</select>
 					</td>
-					<th><s:Locale code="apps.connect.userInfoEncryptedAlgorithm" />:</th>
+					<th><@locale code="apps.connect.userInfoEncryptedAlgorithm" />:</th>
 					<td >
 						<select  id="userInfoEncryptedAlgorithm" name="userInfoEncryptedAlgorithm" >
 							<option value="none" <c:if test="${'none'==model.userInfoEncryptedAlgorithm}">selected</c:if> >No encryption</option>
@@ -180,7 +173,7 @@ $(function(){
 				</tr>
 				
 				<tr>
-					<th><s:Locale code="apps.connect.idTokenEncryptionMethod" />:</th>
+					<th><@locale code="apps.connect.idTokenEncryptionMethod" />:</th>
 					<td >
 						<select  id="idTokenEncryptionMethod" name="idTokenEncryptionMethod" >
 							<option value="none" <c:if test="${'none'==model.idTokenEncryptionMethod}">selected</c:if>>No encryption</option>
@@ -190,7 +183,7 @@ $(function(){
 							<option value="A256GCM" <c:if test="${'A256GCM'==model.idTokenEncryptionMethod}">selected</c:if>>AES GCM using 256 bit keys</option>
 					</select>
 					</td>
-					<th><s:Locale code="apps.connect.userInfoEncryptionMethod" />:</th>
+					<th><@locale code="apps.connect.userInfoEncryptionMethod" />:</th>
 					<td >
 						<select  id="userInfoEncryptionMethod" name="userInfoEncryptionMethod" >
 							<option value="none" <c:if test="${'none'==model.userInfoEncryptionMethod}">selected</c:if>>No encryption</option>
@@ -202,27 +195,27 @@ $(function(){
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.oauth.approvalPrompt" />:</th>
+					<th><@locale code="apps.oauth.approvalPrompt" />:</th>
 					<td >
 						<select  id="approvalPrompt" name="approvalPrompt" >
 							<option value="force"  <c:if test="${null==model.approvalPrompt}">selected</c:if>>
-								<s:Locale code="apps.oauth.approvalPrompt.force" /></option>
+								<@locale code="apps.oauth.approvalPrompt.force" /></option>
 							<option value="auto"  <c:if test="${'auto'==model.approvalPrompt}">selected</c:if>>
-								<s:Locale code="apps.oauth.approvalPrompt.auto" /></option>
+								<@locale code="apps.oauth.approvalPrompt.auto" /></option>
 						</select>
 					</td>
-					<th><s:Locale code="apps.isAdapter" />:</th>
+					<th><@locale code="apps.isAdapter" />:</th>
 					<td >
 						<select  id="isAdapter" name="isAdapter" >
 							<option value="0"  <c:if test="${0==model.isAdapter}">selected</c:if> >
-								<s:Locale code="apps.isAdapter.no" /></option>
+								<@locale code="apps.isAdapter.no" /></option>
 							<option value="1"  <c:if test="${1==model.isAdapter}">selected</c:if> >
-								<s:Locale code="apps.isAdapter.yes" /></option>
+								<@locale code="apps.isAdapter.yes" /></option>
 						</select>
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.adapter" />:</th>
+					<th><@locale code="apps.adapter" />:</th>
 					<td colspan =3>
 						<input type="text" id="adapter" name="adapter"  title="" value="${model.adapter}"/>
 					</td>
@@ -233,6 +226,6 @@ $(function(){
 				</tr>
 				</tbody>
 				</table>
-    		<input class="button" id="submitBtn" type="submit" value="<s:Locale code="button.text.save" />"/>
-			<input class="button" id="backBtn" type="button" value="<s:Locale code="button.text.cancel" />"/>	  
+    		<input class="button" id="submitBtn" type="submit" value="<@locale code="button.text.save" />"/>
+			<input class="button" id="backBtn" type="button" value="<@locale code="button.text.cancel" />"/>	  
 </form>

+ 27 - 32
maxkey-web-manage/src/main/resources/templates/views/apps/saml20/appAdd.ftl

@@ -1,8 +1,3 @@
-<%@ page 	language="java"   import="java.util.*" 	pageEncoding="UTF-8"%>
-<%@ taglib 	prefix="spring"   uri="http://www.springframework.org/tags" %>
-<%@ taglib 	prefix="s" uri="http://www.connsec.com/tags" %>
-<%@ taglib 	prefix="fmt"      uri="http://java.sun.com/jsp/jstl/fmt"%>
-<%@ page 	import="org.maxkey.constants.*"%>
 <script type="text/javascript">
 <!--
 $(function(){	
@@ -12,8 +7,8 @@ $(function(){
 //-->
 </script>
 <form id="actionForm_app"  method="post" type="label" autoclose="true"  
-			action="<s:Base/>/apps/saml20/add"
-			forward="<s:Base/>/apps/list"
+			action="<@base/>/apps/saml20/add"
+			forward="<@base/>/apps/list"
 			enctype="multipart/form-data">		 
   	        <!-- content -->    
   	      	<!--table-->
@@ -28,10 +23,10 @@ $(function(){
 				<tbody>
 				
 				<tr>
-					<td colspan=4><s:Locale code="apps.saml.v2.0.info" /></td>
+					<td colspan=4><@locale code="apps.saml.v2.0.info" /></td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.saml.entityId" />:</th>
+					<th><@locale code="apps.saml.entityId" />:</th>
 					<td colspan =3>
 						<input type="text" id="entityId" name="entityId"  title="" value=""/>
 						<b class="orange">*</b><label for="entityId"></label>
@@ -41,7 +36,7 @@ $(function(){
 				</tr>
 				
 				<tr>
-					<th><s:Locale code="apps.saml.issuer" />:</th>
+					<th><@locale code="apps.saml.issuer" />:</th>
 					<td colspan =3>
 						<input type="text" id="issuer" name="issuer"  title="" value=""/>
 						<b class="orange">*</b><label for="issuer"></label>
@@ -49,7 +44,7 @@ $(function(){
 					
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.saml.spAcsUrl" />:</th>
+					<th><@locale code="apps.saml.spAcsUrl" />:</th>
 					<td colspan =3>
 						<input type="text" id="spAcsUrl" name="spAcsUrl"  title="" value=""/>
 						<b class="orange">*</b><label for="spAcsUrl"></label>
@@ -57,14 +52,14 @@ $(function(){
 				</tr>
 				
 				<tr>
-					<th><s:Locale code="apps.saml.audience" />:</th>
+					<th><@locale code="apps.saml.audience" />:</th>
 					<td colspan =3>
 						<input type="text" id="audience" name="audience"  title="" value=""/>
 					</td>
 				</tr>
 				<tr>
 					
-					<th><s:Locale code="apps.saml.nameidFormat" />:</th>
+					<th><@locale code="apps.saml.nameidFormat" />:</th>
 					<td>
 						<select  id="nameidFormat" name="nameidFormat" >
 							<option value="persistent" selected>persistent</option>
@@ -78,22 +73,22 @@ $(function(){
 						</select>
 						<b class="orange">*</b><label for="fileType"></label>
 					</td>
-					<th><s:Locale code="apps.saml.nameIdConvert" />:</th>
+					<th><@locale code="apps.saml.nameIdConvert" />:</th>
 					<td>
 						<select  id="nameIdConvert" name="nameIdConvert" >
 							<option value="0" selected>
-								<s:Locale code="apps.saml.nameIdConvert.original" /></option>
+								<@locale code="apps.saml.nameIdConvert.original" /></option>
 							<option value="1">
-								<s:Locale code="apps.saml.nameIdConvert.upperCase" /></option>
+								<@locale code="apps.saml.nameIdConvert.upperCase" /></option>
 							<option value="2">
-								<s:Locale code="apps.saml.nameIdConvert.lowerCase" /></option>
+								<@locale code="apps.saml.nameIdConvert.lowerCase" /></option>
 						</select>
 						<b class="orange">*</b><label for="issuer"></label>
 					</td>
 					
 				</tr>
 				<tr>
-					<th style="width:15%;"><s:Locale code="apps.saml.binding" />:</th>
+					<th style="width:15%;"><@locale code="apps.saml.binding" />:</th>
 					<td style="width:35%;">
 						<select  id="binding" name="binding" >
 							<option value="Redirect-Post"  selected>Redirect-Post</option>
@@ -105,22 +100,22 @@ $(function(){
 						</select>
 						<b class="orange">*</b><label for="binding"></label>
 					</td>
-					<th style="width:15%;"><s:Locale code="apps.saml.validityInterval" />:</th>
+					<th style="width:15%;"><@locale code="apps.saml.validityInterval" />:</th>
 					<td style="width:35%;">
 						<input type="text" id="validityInterval" name="validityInterval"  title="" value="15"/>
 					</td>
 					
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.saml.fileType" />:</th>
+					<th><@locale code="apps.saml.fileType" />:</th>
 					<td>
 						<select  id="fileType" name="fileType" >
-							<option value="certificate" selected><s:Locale code="apps.saml.fileType.certificate" /></option>
-							<option value="metadata"><s:Locale code="apps.saml.fileType.metadata" /></option>
+							<option value="certificate" selected><@locale code="apps.saml.fileType.certificate" /></option>
+							<option value="metadata"><@locale code="apps.saml.fileType.metadata" /></option>
 						</select>
 						<b class="orange">*</b><label for="fileType"></label>
 					</td>
-					<th><s:Locale code="apps.saml.certMetaFile" />:</th>
+					<th><@locale code="apps.saml.certMetaFile" />:</th>
 					<td>
 						<input id="certMetaFile" type="file" name="certMetaFile" />
 						<b class="orange">*</b><label for="certMetaFile"></label>
@@ -128,25 +123,25 @@ $(function(){
 				</tr>
 				
 				<tr>
-					<th><s:Locale code="apps.saml.encrypted" />:</th>
+					<th><@locale code="apps.saml.encrypted" />:</th>
 					<td >
 						<select  id="encrypted" name="encrypted" >
 							<option value="0"  selected>
-								<s:Locale code="apps.saml.encrypted.no" /></option>
+								<@locale code="apps.saml.encrypted.no" /></option>
 							<option value="1">
-								<s:Locale code="apps.saml.encrypted.yes" /></option>
+								<@locale code="apps.saml.encrypted.yes" /></option>
 						</select>
 					</td>
-					<th><s:Locale code="apps.isAdapter" />:</th>
+					<th><@locale code="apps.isAdapter" />:</th>
 					<td>
 						<select  id="isAdapter" name="isAdapter" >
-							<option value="0"  selected><s:Locale code="apps.isAdapter.no" /></option>
-							<option value="1"><s:Locale code="apps.isAdapter.yes" /></option>
+							<option value="0"  selected><@locale code="apps.isAdapter.no" /></option>
+							<option value="1"><@locale code="apps.isAdapter.yes" /></option>
 						</select>
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.adapter" />:</th>
+					<th><@locale code="apps.adapter" />:</th>
 					<td colspan =3>
 						<input type="text" id="adapter" name="adapter"  title="" value=""/>
 					</td>
@@ -158,6 +153,6 @@ $(function(){
 				</tbody>
 				</table>
 			<input  id="status" type="hidden" name="status"  value="1"/>
-    		<input class="button" id="submitBtn" type="submit" value="<s:Locale code="button.text.save" />"/>
-			<input class="button" id="backBtn" type="button" value="<s:Locale code="button.text.cancel" />"/>	  
+    		<input class="button" id="submitBtn" type="submit" value="<@locale code="button.text.save" />"/>
+			<input class="button" id="backBtn" type="button" value="<@locale code="button.text.cancel" />"/>	  
 </form>

+ 30 - 35
maxkey-web-manage/src/main/resources/templates/views/apps/saml20/appUpdate.ftl

@@ -1,8 +1,3 @@
-<%@ page 	language="java"   import="java.util.*" 	pageEncoding="UTF-8"%>
-<%@ taglib 	prefix="spring"   uri="http://www.springframework.org/tags" %>
-<%@ taglib 	prefix="s" uri="http://www.connsec.com/tags" %>
-<%@ taglib 	prefix="fmt"      uri="http://java.sun.com/jsp/jstl/fmt"%>
-<%@ taglib  prefix="c"       	uri="http://java.sun.com/jsp/jstl/core"  %>
 <script type="text/javascript">
 <!--
 $(function(){	
@@ -24,8 +19,8 @@ $(function(){
 //-->
 </script>
 <form id="actionForm_app"  method="post" type="label" autoclose="true"  
-			action="<s:Base/>/apps/saml20/update"
-			forward="<s:Base/>/apps/list"
+			action="<@base/>/apps/saml20/update"
+			forward="<@base/>/apps/list"
 			enctype="multipart/form-data">		 
   	        <!-- content -->    
   	      	<!--table-->
@@ -40,38 +35,38 @@ $(function(){
 				<tbody>
 				
 				<tr>
-					<td colspan=4><s:Locale code="apps.saml.v2.0.info" /></td>
+					<td colspan=4><@locale code="apps.saml.v2.0.info" /></td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.saml.entityId" />:</th>
+					<th><@locale code="apps.saml.entityId" />:</th>
 					<td  colspan =3>
 						<input type="text" id="entityId" name="entityId"  title="" value="${model.entityId}"/>
 						<b class="orange">*</b><label for="entityId"></label>
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.saml.spAcsUrl" />:</th>
+					<th><@locale code="apps.saml.spAcsUrl" />:</th>
 					<td colspan =3>
 						<input type="text" id="spAcsUrl" name="spAcsUrl"  title="" value="${model.spAcsUrl}"/>
 						<b class="orange">*</b><label for="spAcsUrl"></label>
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.saml.issuer" />:</th>
+					<th><@locale code="apps.saml.issuer" />:</th>
 					<td  colspan =3>
 						<input type="text" id="issuer" name="issuer"  title="" value="${model.issuer}"/>
 						<b class="orange">*</b><label for="issuer"></label>
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.saml.audience" />:</th>
+					<th><@locale code="apps.saml.audience" />:</th>
 					<td  colspan =3>
 						<input type="text" id="audience" name="audience"  title="" value="${model.audience}"/>
 						<b class="orange">*</b><label for="audience"></label>
 					</td>
 				</tr>
 				<tr>
-					<th style="width:15%;"><s:Locale code="apps.saml.nameidFormat" />:</th>
+					<th style="width:15%;"><@locale code="apps.saml.nameidFormat" />:</th>
 					<td style="width:35%;">
 						<select  id="nameidFormat" name="nameidFormat" >
 							<option value="persistent"  <c:if test="${'persistent'==model.nameidFormat}">selected</c:if>>persistent</option>
@@ -85,21 +80,21 @@ $(function(){
 						</select>
 						<b class="orange">*</b><label for="nameidFormat"></label>
 					</td>
-					<th style="width:15%;"><s:Locale code="apps.saml.nameIdConvert" />:</th>
+					<th style="width:15%;"><@locale code="apps.saml.nameIdConvert" />:</th>
 					<td style="width:35%;">
 						<select  id="nameIdConvert" name="nameIdConvert" >
 							<option value="0"  <c:if test="${0==model.nameIdConvert}">selected</c:if>>
-								<s:Locale code="apps.saml.nameIdConvert.original" /></option>
+								<@locale code="apps.saml.nameIdConvert.original" /></option>
 							<option value="1"  <c:if test="${1==model.nameIdConvert}">selected</c:if>>
-								<s:Locale code="apps.saml.nameIdConvert.upperCase" /></option>
+								<@locale code="apps.saml.nameIdConvert.upperCase" /></option>
 							<option value="2"  <c:if test="${2==model.nameIdConvert}">selected</c:if>>
-								<s:Locale code="apps.saml.nameIdConvert.lowerCase" /></option>
+								<@locale code="apps.saml.nameIdConvert.lowerCase" /></option>
 						</select>
 						<b class="orange">*</b><label for="nameIdConvert"></label>
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.saml.binding" />:</th>
+					<th><@locale code="apps.saml.binding" />:</th>
 					<td>
 						<select  id="binding" name="binding" >
 							<option value="Redirect-Post"  <c:if test="${'Redirect-Post'==model.binding}">selected</c:if>>Redirect-Post</option>
@@ -112,22 +107,22 @@ $(function(){
 						<b class="orange">*</b><label for="binding"></label>
 					</td>
 					
-					<th><s:Locale code="apps.saml.validityInterval" />:</th>
+					<th><@locale code="apps.saml.validityInterval" />:</th>
 					<td >
 						<input type="text" id="validityInterval" name="validityInterval"  title="" value="${model.validityInterval}"/>
 					</td>
 					
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.saml.fileType" />:</th>
+					<th><@locale code="apps.saml.fileType" />:</th>
 					<td>
 						<select  id="fileType" name="fileType" >
-							<option value="certificate" selected><s:Locale code="apps.saml.fileType.certificate" /></option>
-							<option value="metadata"><s:Locale code="apps.saml.fileType.metadata" /></option>
+							<option value="certificate" selected><@locale code="apps.saml.fileType.certificate" /></option>
+							<option value="metadata"><@locale code="apps.saml.fileType.metadata" /></option>
 						</select>
 						<b class="orange">*</b><label for="fileType"></label>
 					</td>
-					<th><s:Locale code="apps.saml.certMetaFile" />:</th>
+					<th><@locale code="apps.saml.certMetaFile" />:</th>
 					<td>
 						<img id="certMetaFileImg"  height="32" alt="upload certificate or metadata file" src="<s:Base/>/images/cert.png">
 						<b class="orange">*</b><label for="certMetaFile"></label>
@@ -135,39 +130,39 @@ $(function(){
 				</tr>
 				
 				<tr>
-					<th><s:Locale code="apps.saml.encrypted" />:</th>
+					<th><@locale code="apps.saml.encrypted" />:</th>
 					<td >
 						<select  id="encrypted" name="encrypted" >
 							<option value="0"   <c:if test="${0==model.encrypted}">selected</c:if>>
-								<s:Locale code="apps.saml.encrypted.no" /></option>
+								<@locale code="apps.saml.encrypted.no" /></option>
 							<option value="1"  <c:if test="${1==model.encrypted}">selected</c:if>>
-								<s:Locale code="apps.saml.encrypted.yes" /></option>
+								<@locale code="apps.saml.encrypted.yes" /></option>
 						</select>
 					</td>
-					<th><s:Locale code="apps.isAdapter" />:</th>
+					<th><@locale code="apps.isAdapter" />:</th>
 					<td >
 						<select  id="isAdapter" name="isAdapter" >
-							<option value="0"  <c:if test="${0==model.isAdapter}">selected</c:if> ><s:Locale code="apps.isAdapter.no" /></option>
-							<option value="1"  <c:if test="${1==model.isAdapter}">selected</c:if> ><s:Locale code="apps.isAdapter.yes" /></option>
+							<option value="0"  <c:if test="${0==model.isAdapter}">selected</c:if> ><@locale code="apps.isAdapter.no" /></option>
+							<option value="1"  <c:if test="${1==model.isAdapter}">selected</c:if> ><@locale code="apps.isAdapter.yes" /></option>
 						</select>
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.adapter" />:</th>
+					<th><@locale code="apps.adapter" />:</th>
 					<td colspan =3>
 						<input type="text" id="adapter" name="adapter"  title="" value="${model.adapter}"/>
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.saml.certIssuer" />:</th>
+					<th><@locale code="apps.saml.certIssuer" />:</th>
 					<td>${model.certIssuer}
 					</td>
-					<th><s:Locale code="apps.saml.certExpiration" />:</th>
+					<th><@locale code="apps.saml.certExpiration" />:</th>
 					<td>${model.certExpiration}
 					</td>
 				</tr>
 				<tr>
-					<th><s:Locale code="apps.saml.certSubject" />:</th>
+					<th><@locale code="apps.saml.certSubject" />:</th>
 					<td  colspan =3>${model.certSubject}
 					</td>
 				</tr>
@@ -178,6 +173,6 @@ $(function(){
 				</tbody>
 				</table>
 				
-    		<input class="button" id="submitBtn" type="submit" value="<s:Locale code="button.text.save" />"/>
-			<input class="button" id="backBtn" type="button" value="<s:Locale code="button.text.cancel" />"/>	  
+    		<input class="button" id="submitBtn" type="submit" value="<@locale code="button.text.save" />"/>
+			<input class="button" id="backBtn" type="button" value="<@locale code="button.text.cancel" />"/>	  
 </form>

+ 3 - 9
maxkey-web-manage/src/main/resources/templates/views/apps/tokenbased/appAdd.ftl

@@ -1,14 +1,8 @@
-<%@ page 	language="java"   import="java.util.*" 	pageEncoding="UTF-8"%>
-<%@ taglib 	prefix="spring"   uri="http://www.springframework.org/tags" %>
-<%@ taglib 	prefix="s" uri="http://www.connsec.com/tags" %>
-<%@ taglib 	prefix="fmt"      uri="http://java.sun.com/jsp/jstl/fmt"%>
-<%@ taglib  prefix="c"       	uri="http://java.sun.com/jsp/jstl/core"  %>
-<%@ page 	import="org.maxkey.constants.*"%>
 <script type="text/javascript">
 <!--
 $(function(){	
 	$("#algorithm").change(function(){
-		$.post("<s:Base/>/apps/generate/secret/"+$(this).val(), {_method:"post",currTime:(new Date()).getTime()}, function(data) {
+		$.post("<@base/>/apps/generate/secret/"+$(this).val(), {_method:"post",currTime:(new Date()).getTime()}, function(data) {
 			$("#algorithmKey").val(data+"");
 			$("#algorithmKey_text").html(data+"");
 			$("#secret").val(data+"");
@@ -25,8 +19,8 @@ $(function(){
 //-->
 </script>
 <form id="actionForm_app"  method="post" type="label" autoclose="true"  
-			action="<s:Base/>/apps/tokenbased/add"  
-			forward="<s:Base/>/apps/list"
+			action="<@base/>/apps/tokenbased/add"  
+			forward="<@base/>/apps/list"
 			enctype="multipart/form-data">		 
   	        <!-- content -->    
   	      	<!--table-->

+ 4 - 9
maxkey-web-manage/src/main/resources/templates/views/apps/tokenbased/appUpdate.ftl

@@ -1,14 +1,9 @@
-<%@ page 	language="java"   import="java.util.*" 	pageEncoding="UTF-8"%>
-<%@ taglib 	prefix="spring"   uri="http://www.springframework.org/tags" %>
-<%@ taglib 	prefix="s" uri="http://www.connsec.com/tags" %>
-<%@ taglib 	prefix="fmt"      uri="http://java.sun.com/jsp/jstl/fmt"%>
-<%@ taglib  prefix="c"       	uri="http://java.sun.com/jsp/jstl/core"  %>
 <script type="text/javascript">
 <!--
 $(function(){	
 
 	$("#algorithm").change(function(){
-		$.post("<s:Base/>/apps/generate/secret/"+$(this).val(), {_method:"post",currTime:(new Date()).getTime()}, function(data) {
+		$.post("<@base/>/apps/generate/secret/"+$(this).val(), {_method:"post",currTime:(new Date()).getTime()}, function(data) {
 			$("#algorithmKey").val(data+"");
 			$("#algorithmKey_text").html(data+"");
 			$("#secret").val(data+"");
@@ -21,7 +16,7 @@ $(function(){
 	}); 
 	
 	$("#generateSecret").on("click",function(){
-		$.post("<s:Base/>/apps/generate/secret/"+$("#algorithm").val(), {_method:"post",currTime:(new Date()).getTime()}, function(data) {
+		$.post("<@base/>/apps/generate/secret/"+$("#algorithm").val(), {_method:"post",currTime:(new Date()).getTime()}, function(data) {
 			$("#algorithmKey").val(data+"");
 			$("#algorithmKey_text").html(data+"");
 			$("#secret").val(data+"");
@@ -32,8 +27,8 @@ $(function(){
 //-->
 </script>
 <form id="actionForm_app"  method="post" type="label" autoclose="true"  
-			action="<s:Base/>/apps/tokenbased/update"  
-			forward="<s:Base/>/apps/list"
+			action="<@base/>/apps/tokenbased/update"  
+			forward="<@base/>/apps/list"
 			enctype="multipart/form-data">		 
   	        <!-- content -->    
   	      	<!--table-->

+ 197 - 0
maxkey-web-manage/src/main/resources/templates/views/config/ipaddrfilter/ipaddrfilterList.ftl

@@ -0,0 +1,197 @@
+<!DOCTYPE HTML>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<#include  "../../layout/header.ftl"/>
+	<#include  "../../layout/common.cssjs.ftl"/>
+	<script type="text/javascript">
+			function beforeAction() {
+				$("label[for='maxLength']").html("");
+				$("label[for='specialChar']").html("");
+				var minLength = $("#minLength").val();
+				var maxLength = $("#maxLength").val();
+				var lowerCase = $("#lowerCase").val();
+				var upperCase = $("#upperCase").val();
+				var digits = $("#digits").val();
+				var specialChar = $("#specialChar").val();
+				if(parseInt(minLength) > parseInt(maxLength)) {
+					$("label[for='maxLength']").html("");
+					return false;
+				}
+				if(parseInt(lowerCase)+parseInt(upperCase)+parseInt(digits)+parseInt(specialChar) > parseInt(maxLength)) {
+					$("label[for='specialChar']").html("");
+					return false;
+				}
+				if(parseInt(lowerCase)+parseInt(upperCase)+parseInt(digits)+parseInt(specialChar) < parseInt(minLength)) {
+					$("label[for='specialChar']").html("");
+					return false;
+				}
+				return true;
+			}
+		</script>
+</head>
+<body> 
+<div class="app header-default side-nav-dark">
+<div class="layout">
+	<div class="header navbar">
+		<#include  "../../layout/top.ftl"/>
+	</div>
+	
+	<div class="col-md-3 sidebar-nav side-nav" >
+ 		<#include  "../../layout/sidenav.ftl"/>
+	</div>
+	<div class="page-container">
+	
+	<div class="main-content">
+					<div class="container-fluid">
+
+						<div class="breadcrumb-wrapper row">
+							<div class="col-12 col-lg-3 col-md-6">
+								<h4 class="page-title">Dashboard 2</h4>
+							</div>
+							<div class="col-12 col-lg-9 col-md-6">
+								<ol class="breadcrumb float-right">
+									<li><a href="index.html">Dashboard</a></li>
+									<li class="active">/ Dashboard 2</li>
+								</ol>
+							</div>
+						</div>
+
+					</div>
+
+
+					<div class="col-12 grid-margin">
+						<div class="card">
+							<div class="card-header border-bottom">
+								<h4 class="card-title">Horizontal Two column</h4>
+							</div>
+							<div class="card-body">
+								<form  method="post" type="label" validate="true" action="<s:Base/>/config/passwordpolicy/update" id="actionForm" >
+									<p class="card-description">Personal info</p>
+									<div class="row">
+										<div class="col-md-6">
+											<div class="form-group row">
+												<label class="col-sm-3 col-form-label"><s:Locale code="passwordpolicy.minlength" />:</label>
+												<div class="col-sm-9">
+													<input id="id" name="id" type="hidden" value="${model.id}"/>
+						   							<input  class="form-control" type="text" id="minLength" name="minLength"  value="${model.minLength}" />
+												</div>
+											</div>
+										</div>
+										<div class="col-md-6">
+											<div class="form-group row">
+												<label class="col-sm-3 col-form-label"><s:Locale code="passwordpolicy.maxlength" />:</label>
+												<div class="col-sm-9">
+													<input  class="form-control" type="text" id="maxLength" name="maxLength" value="${model.maxLength}" />
+												</div>
+											</div>
+										</div>
+									</div>
+									<div class="row">
+										<div class="col-md-6">
+											<div class="form-group row">
+												<label class="col-sm-3 col-form-label"><s:Locale code="passwordpolicy.lowercase" />:</label>
+												<div class="col-sm-9">
+													<input  class="form-control" type="text" id="lowerCase" name="lowerCase"  value="${model.lowerCase}" />
+												</div>
+											</div>
+										</div>
+										<div class="col-md-6">
+											<div class="form-group row">
+												<label class="col-sm-3 col-form-label"><s:Locale code="passwordpolicy.uppercase" />:</label>
+												<div class="col-sm-9">
+													<input  class="form-control" type="text" id="upperCase" name="upperCase" value="${model.upperCase}" />
+												</div>
+											</div>
+										</div>
+									</div>
+									<div class="row">
+										<div class="col-md-6">
+											<div class="form-group row">
+												<label class="col-sm-3 col-form-label"><s:Locale code="passwordpolicy.digits" />:</label>
+												<div class="col-sm-9">
+													<input  class="form-control" type="text" id="digits" name="digits" value="${model.digits}"/>
+												</div>
+											</div>
+										</div>
+										<div class="col-md-6">
+											<div class="form-group row">
+												<label class="col-sm-3"><s:Locale code="passwordpolicy.specialchar" />:</label>
+												<div class="col-sm-9">
+													<input   class="form-control" type="text" id="specialChar" name="specialChar"  value="${model.specialChar}" />
+												</div>
+											</div>
+										</div>
+									</div>
+									<div class="row">
+										<div class="col-md-6">
+											<div class="form-group row">
+												<label class="col-sm-3 col-form-label"><s:Locale code="passwordpolicy.attempts" />:</label>
+												<div class="col-sm-9">
+													<input  class="form-control" type="text" id="attempts" name="attempts" value="${model.attempts}" />
+												</div>
+											</div>
+										</div>
+										<div class="col-md-6">
+											<div class="form-group row">
+												<label class="col-sm-3 col-form-label"><s:Locale code="passwordpolicy.duration" />(Unit:Hour):</label>
+												<div class="col-sm-9">
+													<input  class="form-control" type="text" id="duration" name="duration" value="${model.duration}"/>
+												</div>
+											</div>
+										</div>
+									</div>
+									<div class="row">
+										<div class="col-md-6">
+											<div class="form-group row">
+												<label class="col-sm-3 col-form-label"><s:Locale code="passwordpolicy.expiration" />(Unit:Day):</label>
+												<div class="col-sm-9">
+													<input  class="form-control" type="text" id="expiration" name="expiration"  value="${model.expiration}" />
+												</div>
+											</div>
+										</div>
+										<div class="col-md-6">
+											<div class="form-group row">
+												<label class="col-sm-3 col-form-label"><s:Locale code="passwordpolicy.username" />:</label>
+												<div class="col-sm-9">
+													<select  class="form-control"   id="username" name="username"  >
+														<option  <c:if test="${1==model.username}">selected</c:if>  value="1"><s:Locale code="common.text.status.3"/></option>
+														<option  <c:if test="${0==model.username}">selected</c:if>  value="0"><s:Locale code="common.text.status.4"/></option>
+													</select>
+												</div>
+											</div>
+										</div>
+									</div>
+
+									<div class="row">
+										<div class="col-md-12">
+											<div class="form-group m-b-20">
+												<label   style="float: left;" for="simplePasswords"><s:Locale code="passwordpolicy.simplepasswords" />:</label>
+												<textarea id="simplePasswords" name="simplePasswords"  class="form-control" >${model.simplePasswords}</textarea>
+											</div>
+										</div>
+									</div>
+									<div class="row">
+										<div class="col-md-3">
+											<button type="submit" class="button btn-primary btn btn-common btn-block mr-3"    id="submitBtn" ><s:Locale code="button.text.save" /></button>
+										</div>
+									</div>
+									
+								</form>
+							</div>
+						</div>
+					</div>
+					<footer class="content-footer">
+		<#include  "../../layout/footer.ftl"/>
+	</footer>
+
+	</div>
+	
+	</div>
+</div>
+
+<div id="preloader">
+<div class="loader" id="loader-1"></div>
+</div>
+
+</body>
+</html>

+ 0 - 0
maxkey-web-manage/src/main/resources/templates/views/config/ipaddrfilter/ipaddrfilterList.jsp → maxkey-web-manage/src/main/resources/templates/views/config/ipaddrfilter/ipaddrfilterList2.jsp


+ 5 - 8
maxkey-web-manage/src/main/resources/templates/views/config/passwordpolicy/passwordpolicy.ftl

@@ -1,11 +1,8 @@
-<%@ page   language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
-<%@ taglib prefix="c"       	uri="http://java.sun.com/jsp/jstl/core"  %>
-<%@ taglib prefix="s" 			uri="http://sso.maxkey.org/tags" %> 
 <!DOCTYPE HTML>
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-	<jsp:include page="../../layout/header.jsp"></jsp:include>
-	<jsp:include page="../../layout/common.cssjs.jsp"></jsp:include>
+	<#include  "../../layout/header.ftl"/>
+	<#include  "../../layout/common.cssjs.ftl"/>
 	<script type="text/javascript">
 			function beforeAction() {
 				$("label[for='maxLength']").html("");
@@ -36,11 +33,11 @@
 <div class="app header-default side-nav-dark">
 <div class="layout">
 	<div class="header navbar">
-		<jsp:include page="../../layout/top.jsp"></jsp:include>
+		<#include  "../../layout/top.ftl"/>
 	</div>
 	
 	<div class="col-md-3 sidebar-nav side-nav" >
- 		<jsp:include page="../../layout/sidenav.jsp"></jsp:include>
+ 		<#include  "../../layout/sidenav.ftl"/>
 	</div>
 	<div class="page-container">
 	
@@ -184,7 +181,7 @@
 						</div>
 					</div>
 					<footer class="content-footer">
-		<jsp:include page="../../layout/footer.jsp"></jsp:include>
+		<#include  "../../layout/footer.ftl"/>
 	</footer>
 
 	</div>

+ 5 - 0
maxkey-web-manage/src/main/resources/templates/views/exception/error.ftl

@@ -0,0 +1,5 @@
+<html>
+<body>
+<h1>ERROR!</h1>
+</body>
+</html>

+ 0 - 12
maxkey-web-manage/src/main/resources/templates/views/groupapp/addGroupAppsList.jsp

@@ -1,15 +1,3 @@
-<%@ page   contentType="text/html; charset=UTF-8" import="java.util.Map,java.util.LinkedHashMap" %>
-<%@ taglib prefix="spring"		uri="http://www.springframework.org/tags" %>
-<%@ taglib prefix="c"			uri="http://java.sun.com/jsp/jstl/core"%>
-<%@ taglib prefix="s" uri="http://www.connsec.com/tags" %>
-<%@ page 	import="org.maxkey.constants.*"%>
-<style>
-<!--
-	.ui-jqgrid tr.jqgrow td {
-		line-height: 10px;
-	}
--->
-</style>
 		<script type="text/javascript">	
 			function afterSubmit(data){
 				$("#list").trigger('reloadGrid');

+ 1 - 12
maxkey-web-manage/src/main/resources/templates/views/groupapp/groupAppsList.jsp

@@ -1,15 +1,4 @@
-<%@ page   contentType="text/html; charset=UTF-8" import="java.util.Map,java.util.LinkedHashMap" %>
-<%@ taglib prefix="spring"		uri="http://www.springframework.org/tags" %>
-<%@ taglib prefix="c"			uri="http://java.sun.com/jsp/jstl/core"%>
-<%@ taglib prefix="s" uri="http://www.connsec.com/tags" %>
-<%@ page 	import="org.maxkey.constants.*"%>
-<style>
-<!--
-	.ui-jqgrid tr.jqgrow td {
-		line-height: 10px;
-	}
--->
-</style>
+
 <script type="text/javascript">	
 	
 	function iconFormatter(value, options, rData){

+ 1 - 5
maxkey-web-manage/src/main/resources/templates/views/groups/groupAdd.jsp

@@ -1,9 +1,5 @@
-<%@ page 	language="java"   import="java.util.*" 	pageEncoding="UTF-8"%>
-<%@ taglib 	prefix="spring"   uri="http://www.springframework.org/tags" %>
-<%@ taglib 	prefix="s" uri="http://www.connsec.com/tags" %>
-<%@ taglib 	prefix="fmt"      uri="http://java.sun.com/jsp/jstl/fmt"%>
 
-<form id="actionForm"  method="post" type="label" autoclose="true"  action="<s:Base/>/groups/add">
+<form id="actionForm"  method="post" type="label" autoclose="true"  action="<@base/>/groups/add">
 	<table border="0" cellpadding="0" cellspacing="0" class="datatable" >
 		<tbody>
 			<tr>

+ 117 - 41
maxkey-web-manage/src/main/resources/templates/views/groups/groupsList.ftl

@@ -1,50 +1,126 @@
-<%@ page   contentType="text/html; charset=UTF-8" import="java.util.Map,java.util.LinkedHashMap" %>
-<%@ taglib prefix="s"	uri="http://www.connsec.com/tags" %>
-<%@ taglib prefix="spring"		uri="http://www.springframework.org/tags" %>
-<%@ taglib prefix="c"			uri="http://java.sun.com/jsp/jstl/core"%>
+<!DOCTYPE HTML>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<#include  "../layout/header.ftl"/>
+	<#include  "../layout/common.cssjs.ftl"/>
 
-<script type="text/javascript">	
+</head>
+<body> 
+<div class="app header-default side-nav-dark">
+<div class="layout">
+	<div class="header navbar">
+		<#include  "../layout/top.ftl"/>
+	</div>
 	
+	<div class="col-md-3 sidebar-nav side-nav" >
+ 		<#include  "../layout/sidenav.ftl"/>
+	</div>
+	<div class="page-container">
 	
-	$(function () {
-	
-	});
-</script>
+	<div class="main-content">
+					<div class="container-fluid">
+
+						<div class="breadcrumb-wrapper row">
+							<div class="col-12 col-lg-3 col-md-6">
+								<h4 class="page-title">Dashboard 2</h4>
+							</div>
+							<div class="col-12 col-lg-9 col-md-6">
+								<ol class="breadcrumb float-right">
+									<li><a href="index.html">Dashboard</a></li>
+									<li class="active">/ Dashboard 2</li>
+								</ol>
+							</div>
+						</div>
+
+					</div>
+
 
-	<div id="tool_box">
-	 		<table   class="datatable">
+					<div class="col-12 grid-margin">
+						<div class="card">
+							<div class="card-body">
+		
+			<table  class="table table-bordered">
  				<tr>
-		 			<td width="120px"><s:Locale code="group.name"/>:</td>
-		 			<td width="374px">
+		 			<td width="120px"><@locale code="group.name"/>:</td>
+		 			<td width="375px">
 		 				<form id="basic_search_form">
-				 			<input type="text" name="name" style ="width:150px">
-				 			<input class="button primary"  id="searchBtn" type="button" size="50" value="<s:Locale code="button.text.search"/>">
-				 		</form>
+			 				<input class="form-control" type="text" name="name"  style ="width:150px;float:left;">
+			 				<input  class="button btn btn-primary mr-3"    id="searchBtn" type="button" size="50" value="<@locale code="button.text.search"/>">
+				 			<!--<input  class="button btn btn-secondary"  id="advancedSearchExpandBtn" type="button" size="50"  value="<@locale code="button.text.expandsearch"/>" expandValue="<@locale code="button.text.expandsearch"/>"  collapseValue="<@locale code="button.text.collapsesearch"/>">
+					 		-->
+					 	</form>
 		 			</td>
-				 	<td colspan="2"> <div id="tool_box_right">
-						<input class="button"   id="addBtn" type="button" value="<s:Locale code="button.text.add"/>"  target="window"
-				 		   	 	wurl="<s:Base/>/groups/forwardAdd" wheight="150px" >
-					 	<input class="button"   id="modifyBtn" type="button" value="<s:Locale code="button.text.edit"/>"  target="window"
-					 			wurl="<s:Base/>/groups/forwardUpdate" wheight="150px" > 
-					 		    
-					 	<input class="button"   id="deleteBtn" type="button" value="<s:Locale code="button.text.delete"/>"
-					 			wurl="<s:Base/>/groups/delete" />
-				 	</div>
-				 	</td>
-				</tr>
-			
-			</table>
+		 			<td colspan="2">
+		 				<div id="tool_box_right">
+		 					 <input class="button btn btn-success mr-3" id="addBtn" type="button" value="<@locale code="button.text.add"/>" 
+						 		    wurl="<@base/>/users/forwardSelectUserType"
+						 		    wwidth="960"
+						 		    wheight="600"
+					 		    	target="window">	    	
+					 		    	
+					 	<input class="button btn btn-info mr-3 " id="modifyBtn" type="button" value="<@locale code="button.text.edit"/>" 
+					 				wurl="<@base/>/users/forwardUpdate"
+					 				wwidth="960"
+						 		    wheight="600"
+					 		    	target="window"> 
+					 		    	
+					 	<input class="button btn btn-danger mr-3 "  id="deleteBtn" type="button" value="<@locale code="button.text.delete"/>"
+					 				wurl="<@base/>/users/delete" />
+						</div>
+		 			</td>
+		 		</tr>
+		 	</table>
+		
+		 		
  	</div>
  	
-	<div class="mainwrap" id="main">
-		<s:Grid id="list" url="/groups/grid" multiselect="false" resize="true">	
-			<s:Column width="0" field="id" title="id" hidden="true"/>
-			<s:Column width="50" field="name" title="group.name"/>
-			<s:Column width="50" field="description" title="common.text.description"/>
-			<s:Column width="0" field="createdBy" title="common.text.createdby" hidden="true"/>
-			<s:Column width="0" field="createdDate" title="common.text.createddate" hidden="true"/>
-			<s:Column width="0" field="modifiedBy" title="common.text.modifiedby" hidden="true"/>
-			<s:Column width="0" field="modifiedDate" title="common.text.modifieddate" hidden="true"/>
-		</s:Grid>
-			
-	</div>
+ 	<div id="advanced_search">
+ 		<form id="advanced_search_form">
+	 		
+	 	</form>
+ 	</div>
+		<table  data-url="<@base/>/groups/grid"
+			id="datagrid"
+			data-toggle="table"
+			data-classes="table table-bordered table-hover table-striped"
+			data-pagination="true"
+			data-total-field="records"
+			data-page-list="[10, 25, 50, 100]"
+			data-search="false"
+			data-locale="zh-CN"
+			data-query-params="dataGridQueryParams"
+			data-query-params-type="pageSize"
+			data-side-pagination="server">
+		<thead>
+			<tr>
+				<th data-sortable="true" data-field="id"   data-visible="false">Id</th>
+				
+				<th data-field="name"><@locale code="group.name"/></th>
+				<th data-field="description"><@locale code="common.text.description"/></th>
+				<th data-field="createdBy"><@locale code="common.text.createdby"/></th>
+				<th data-field="createdDate"><@locale code="common.text.createddate"/></th>
+				<th data-field="modifiedBy"><@locale code="common.text.modifiedby"/></th>
+				<th data-field="modifiedDate"><@locale code="common.text.modifieddate"/></th>
+	
+			</tr>
+		</thead>
+	</table>
+	
+	
+</div>
+					</div>
+					<footer class="content-footer">
+		<#include  "../layout/footer.ftl"/>
+	</footer>
+
+	</div>
+	
+	</div>
+</div>
+
+<div id="preloader">
+<div class="loader" id="loader-1"></div>
+</div>
+
+</body>
+</html>

+ 119 - 39
maxkey-web-manage/src/main/resources/templates/views/logs/loginAppsHistoryList.ftl

@@ -1,32 +1,73 @@
-<%@ page 	contentType="text/html; charset=UTF-8"%>
-<%@ page 	import="org.maxkey.domain.*"%> 
-<%@ page 	import="java.util.Map,java.util.LinkedHashMap"%>
-<%@ page 	import="org.maxkey.web.*"%>
-<%@ taglib  prefix="s"   uri="http://www.connsec.com/tags" %>
-<%@ taglib  prefix="c"			uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib  prefix="spring"  	uri="http://www.springframework.org/tags" %>
+<!DOCTYPE HTML>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<#include  "../layout/header.ftl"/>
+	<#include  "../layout/common.cssjs.ftl"/>
+	<script type="text/javascript">	
+		function onSelectRow(id){		
+	   		$("#changepwdBtn").attr("wurl","<@base/>/users/forwardChangePassword/"+$.gridRowData("#list",id).id);
+	   	}
+	   	
+	   	function genderFormatter(value, options, rData){
+	   		if(value==1){
+	   			return '<@locale code="userinfo.gender.female" />';
+	   		}else{
+	   			return '<@locale code="userinfo.gender.male" />';
+	   		}
+		};
+	</script>
+</head>
+<body> 
+<div class="app header-default side-nav-dark">
+<div class="layout">
+	<div class="header navbar">
+		<#include  "../layout/top.ftl"/>
+	</div>
+	
+	<div class="col-md-3 sidebar-nav side-nav" >
+		<#include  "../layout/sidenav.ftl"/>
+	</div>
+	<div class="page-container">
+	
+	<div class="main-content">
+					<div class="container-fluid">
 
-<script type="text/javascript" src="<s:Base/>/jquery/jsonformatter.js"></script>
-<script type="text/javascript">
+						<div class="breadcrumb-wrapper row">
+							<div class="col-12 col-lg-3 col-md-6">
+								<h4 class="page-title">Dashboard 2</h4>
+							</div>
+							<div class="col-12 col-lg-9 col-md-6">
+								<ol class="breadcrumb float-right">
+									<li><a href="index.html">Dashboard</a></li>
+									<li class="active">/ Dashboard 2</li>
+								</ol>
+							</div>
+						</div>
 
+					</div>
+					<div class="container-fluid">
 
-</script>
-
+					<div class="col-12 grid-margin">
+						<div class="card">
+							<div class="card-body">
+							
 	<div id="tool_box">
-		<table  class="datatable">
+		<table   class="table table-bordered">
 			<tr>
 				<td  width="120px">
-			 		 <s:Locale code="userinfo.username"/>:
+			 		 <@locale code="userinfo.username"/>:
 				</td>
 				<td  width="375px">
 					<form id="basic_search_form">
-				 			<input name="username" type="text" style ="width:150px">
-				 			<input class="button primary"  id="searchBtn" type="button" size="50" value="<s:Locale code="button.text.search"/>">
-				 			<input class="button"  id="advancedSearchExpandBtn" type="button" size="50"  value="<s:Locale code="button.text.expandsearch"/>" expandValue="<s:Locale code="button.text.expandsearch"/>"  collapseValue="<s:Locale code="button.text.collapsesearch"/>">
+				 			<input  class="form-control"  name="username" type="text" style ="width:150px;float:left;">
+				 			<input  class="button btn btn-primary mr-3"    id="searchBtn" type="button" size="50" value="<@locale code="button.text.search"/>">
+				 			<input  class="button btn btn-secondary"  id="advancedSearchExpandBtn" type="button" size="50"  value="<@locale code="button.text.expandsearch"/>" expandValue="<@locale code="button.text.expandsearch"/>"  collapseValue="<@locale code="button.text.collapsesearch"/>">
 					 	</form>
 				</td>
 				<td colspan="2"> 
-					 
+					 <div id="tool_box_right">
+					 	
+					</div>
 				</td>
 			</tr>
 		</table>
@@ -36,38 +77,77 @@
  	
  	<div id="advanced_search">
  		<form id="advanced_search_form">
- 			<table   class="datatable">
+ 			<table    class="table table-bordered">
 	 			<tr>
-	 				<td width="120px"><s:Locale code="userinfo.displayName"/></td>
+	 				<td width="120px"><@locale code="userinfo.displayName"/></td>
 		 			<td width="360px">
-		 				<input name="displayName" type="text" >
+		 				<input  class="form-control"  name="displayName" type="text" >
 		 			</td>
-		 			<td width="120px"><s:Locale code="apps.name"/></td>
+		 			<td width="120px"><@locale code="userinfo.employeeNumber"/></td>
 		 			<td width="360px">
-						<input style="width:70%"  type="text" id="appName" name="appName"  title="" value=""/>
-			 		</td>
+						<input class="form-control"  type="text" id="employeeNumber" name="employeeNumber"  title="" value=""/>
+			 			</td>
+		 			
 			 </tr>
 			 <tr>
-	 				<td width="120px"><s:Locale code="common.text.startdate"/></td>
+					<td width="120px"><@locale code="userinfo.department"/></td>
 		 			<td width="360px">
-		 				<input id="datepickerstart" name="startDate" type="text" >
-		 			</td>
-		 			<td width="120px"><s:Locale code="common.text.enddate"/></td>
-		 			<td width="360px">
-						<input id="datepickerend" style="width:70%"  type="text" id="endDate" name="endDate"  title="" value=""/>
+			 			<input  class="form-control"  type="text" style="display:none;" id="departmentId" name="departmentId"  title="" value=""/>
+						<input  class="form-control"  style="width:70%;;float:left;"  type="text" id="department" name="department"  title="" value=""/>
+			 			<input class="window button btn btn-secondary mr-3 "  type="button"  size="50" value="<@locale code="button.text.select"/>" title="department" wurl="/orgs/orgsSelect/deptId/department" wwidth="300" wheight="400" />
 			 		</td>
+	 				<td width="120px"><@locale code="userinfo.userType"/></td>
+		 			<td width="360px">
+		 				<input class="form-control"  class="userTypeId" name="userType" type="text" style="display:none;"  >
+		 				<input class="form-control"  class="userTypeName" name="userTypeName" type="text" style="width:70%;;float:left;"  >
+		 				<input class="window button btn btn-secondary mr-3 " type="button"   size="50" value="<@locale code="button.text.select"/>" title="UserType" wurl="/usertype//selectUserTypeList" wwidth="700" wheight="500" />
+		 			</td>
+		 			
 			 </tr>
 			</table>
  		</form>
  	</div>
+ 	<table 	data-url="<@base />/logs/loginAppsHistory/grid"
+				id="datagrid"
+				data-toggle="table"
+				data-classes="table table-bordered table-hover table-striped"
+				data-pagination="true"
+				data-total-field="records"
+				data-page-list="[10, 25, 50, 100]"
+				data-search="false"
+				data-locale="zh-CN"
+				data-query-params="dataGridQueryParams"
+				data-query-params-type="pageSize"
+				data-side-pagination="server">
+			<thead>
+				<tr>
+					<th data-sortable="true" data-field="id"  data-visible="false"><@locale code="log.loginappshistory.id" /></th>
+					<th data-field="sessionId" ><@locale code="log.loginappshistory.sessionId" /></th>
+					<th data-field="uid"   data-visible="false"><@locale	code="log.loginappshistory.uid" /></th>
+					<th data-field="username" ><@locale	code="log.loginappshistory.username" /></th>
+					<th data-field="displayName" ><@locale	code="log.loginappshistory.displayName" /></th>
+					<th data-field="appId"   data-visible="false"><@locale	code="log.loginappshistory.appId" /></th>
+					<th data-field="appName" ><@locale	code="log.loginappshistory.appName" /></th>
+					<th data-field="loginTime" ><@locale  code="log.loginappshistory.loginTime" /></th>
+				</tr>
+			</thead>
+		</table>
+</div>
+	
+</div>
+					</div>
+<footer class="content-footer">
+					<#include  "../layout/footer.ftl"/>
+</footer>
+
+	</div>
+	
+	</div>
+</div>
+
+<div id="preloader">
+<div class="loader" id="loader-1"></div>
+</div>
 
-<div class="mainwrap" id="main">
-	<s:Grid id="list" url="/logs/loginAppsHistory/grid" multiselect="false">	
-		<s:Column width="0" field="id" title="id" hidden="true"/>
-		<s:Column width="20" field="sessionId" title="loginhistory.sessionId" />
-		<s:Column width="15" field="loginTime" title="loginhistory.logintime" />
-		<s:Column width="15" field="username" title="userinfo.username"/>
-		<s:Column width="10" field="displayName" title="userinfo.displayName"/>
-		<s:Column width="15" field="appName" title="apps.name"/>
-	</s:Grid>
-</div>
+</body>
+</html>

+ 85 - 0
maxkey-web-manage/src/main/resources/templates/views/logs/loginAppsHistoryList2.ftl

@@ -0,0 +1,85 @@
+<!DOCTYPE HTML >
+<html>
+<head>
+	<#include  "../layout/header.ftl"/>
+	<#include  "../layout/common.cssjs.ftl"/>
+	<script type="text/javascript" src="<@base/>/static/jquery/jsonformatter.js"></script>
+</head>
+<body>
+<#include  "../layout/top.ftl"/>
+<#include  "../layout/nav_primary.ftl"/>
+
+<div class="container">
+	<div id="tool_box">
+		<table  class="datatable">
+			<tr>
+				<td  width="120px">
+			 		 <@locale code="apps.name"/>:
+				</td>
+				<td  width="375px">
+					<form id="basic_search_form">
+				 			<input  class="form-control"  name="appName" type="text" style ="width:150px;float:left;">
+				 			<input class="button btn btn-primary mr-3"  id="searchBtn" type="button" size="50" value="<@locale code="button.text.search"/>">
+				 			<input class="button btn btn-secondary"  id="advancedSearchExpandBtn" type="button" size="50"  value="<@locale code="button.text.expandsearch"/>" expandValue="<@locale code="button.text.expandsearch"/>"  collapseValue="<@locale code="button.text.collapsesearch"/>">
+					 	</form>
+				</td>
+				<td colspan="2"> 
+					 
+				</td>
+			</tr>
+		</table>
+ 		
+		
+ 	</div>
+ 	
+ 	<div id="advanced_search">
+ 		<form id="advanced_search_form">
+ 			<table   class="datatable">
+			 <tr>
+	 				<td width="120px"><@locale code="common.text.startdate"/></td>
+		 			<td width="360px">
+		 				<input  class="form-control datetimepicker"  name="startDate" type="text" >
+		 			</td>
+		 			<td width="120px"><@locale code="common.text.enddate"/></td>
+		 			<td width="360px">
+						<input  class="form-control datetimepicker"  style="width:70%" type="text" id="endDate" name="endDate"  title="" value=""/>
+			 		</td>
+			 </tr>
+			</table>
+ 		</form>
+ 	</div>
+
+<div  class="mainwrap" id="main">
+		<table 	data-url="<@base />/logs/loginAppsHistory/grid"
+				id="datagrid"
+				data-toggle="table"
+				data-classes="table table-bordered table-hover table-striped"
+				data-pagination="true"
+				data-total-field="records"
+				data-page-list="[10, 25, 50, 100]"
+				data-search="false"
+				data-locale="zh-CN"
+				data-query-params="dataGridQueryParams"
+				data-query-params-type="pageSize"
+				data-side-pagination="server">
+			<thead>
+				<tr>
+					<th data-sortable="true" data-field="id"  data-visible="false"><@locale code="log.loginappshistory.id" /></th>
+					<th data-field="sessionId" ><@locale code="log.loginappshistory.sessionId" /></th>
+					<th data-field="uid"   data-visible="false"><@locale	code="log.loginappshistory.uid" /></th>
+					<th data-field="username" ><@locale	code="log.loginappshistory.username" /></th>
+					<th data-field="displayName" ><@locale	code="log.loginappshistory.displayName" /></th>
+					<th data-field="appId"   data-visible="false"><@locale	code="log.loginappshistory.appId" /></th>
+					<th data-field="appName" ><@locale	code="log.loginappshistory.appName" /></th>
+					<th data-field="loginTime" ><@locale  code="log.loginappshistory.loginTime" /></th>
+				</tr>
+			</thead>
+		</table>
+	</div>
+	
+</div>
+<div id="footer">
+	<#include   "../layout/footer.ftl"/>
+</div>
+</body>
+</html>

+ 162 - 0
maxkey-web-manage/src/main/resources/templates/views/logs/loginHistoryList.ftl

@@ -0,0 +1,162 @@
+<!DOCTYPE HTML>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<#include  "../layout/header.ftl"/>
+	<#include  "../layout/common.cssjs.ftl"/>
+	<script type="text/javascript">	
+		function onSelectRow(id){		
+	   		$("#changepwdBtn").attr("wurl","<@base/>/users/forwardChangePassword/"+$.gridRowData("#list",id).id);
+	   	}
+	   	
+	   	function genderFormatter(value, options, rData){
+	   		if(value==1){
+	   			return '<@locale code="userinfo.gender.female" />';
+	   		}else{
+	   			return '<@locale code="userinfo.gender.male" />';
+	   		}
+		};
+	</script>
+</head>
+<body> 
+<div class="app header-default side-nav-dark">
+<div class="layout">
+	<div class="header navbar">
+		<#include  "../layout/top.ftl"/>
+	</div>
+	
+	<div class="col-md-3 sidebar-nav side-nav" >
+		<#include  "../layout/sidenav.ftl"/>
+	</div>
+	<div class="page-container">
+	
+	<div class="main-content">
+					<div class="container-fluid">
+
+						<div class="breadcrumb-wrapper row">
+							<div class="col-12 col-lg-3 col-md-6">
+								<h4 class="page-title">Dashboard 2</h4>
+							</div>
+							<div class="col-12 col-lg-9 col-md-6">
+								<ol class="breadcrumb float-right">
+									<li><a href="index.html">Dashboard</a></li>
+									<li class="active">/ Dashboard 2</li>
+								</ol>
+							</div>
+						</div>
+
+					</div>
+					<div class="container-fluid">
+
+					<div class="col-12 grid-margin">
+						<div class="card">
+							<div class="card-body">
+							
+	<div id="tool_box">
+		<table   class="table table-bordered">
+			<tr>
+				<td  width="120px">
+			 		 <@locale code="userinfo.username"/>:
+				</td>
+				<td  width="375px">
+					<form id="basic_search_form">
+				 			<input  class="form-control"  name="username" type="text" style ="width:150px;float:left;">
+				 			<input  class="button btn btn-primary mr-3"    id="searchBtn" type="button" size="50" value="<@locale code="button.text.search"/>">
+				 			<input  class="button btn btn-secondary"  id="advancedSearchExpandBtn" type="button" size="50"  value="<@locale code="button.text.expandsearch"/>" expandValue="<@locale code="button.text.expandsearch"/>"  collapseValue="<@locale code="button.text.collapsesearch"/>">
+					 	</form>
+				</td>
+				<td colspan="2"> 
+					 <div id="tool_box_right">
+					 	
+					</div>
+				</td>
+			</tr>
+		</table>
+ 		
+		
+ 	</div>
+ 	
+ 	<div id="advanced_search">
+ 		<form id="advanced_search_form">
+ 			<table    class="table table-bordered">
+	 			<tr>
+	 				<td width="120px"><@locale code="userinfo.displayName"/></td>
+		 			<td width="360px">
+		 				<input  class="form-control"  name="displayName" type="text" >
+		 			</td>
+		 			<td width="120px"><@locale code="userinfo.employeeNumber"/></td>
+		 			<td width="360px">
+						<input class="form-control"  type="text" id="employeeNumber" name="employeeNumber"  title="" value=""/>
+			 			</td>
+		 			
+			 </tr>
+			 <tr>
+					<td width="120px"><@locale code="userinfo.department"/></td>
+		 			<td width="360px">
+			 			<input  class="form-control"  type="text" style="display:none;" id="departmentId" name="departmentId"  title="" value=""/>
+						<input  class="form-control"  style="width:70%;;float:left;"  type="text" id="department" name="department"  title="" value=""/>
+			 			<input class="window button btn btn-secondary mr-3 "  type="button"  size="50" value="<@locale code="button.text.select"/>" title="department" wurl="/orgs/orgsSelect/deptId/department" wwidth="300" wheight="400" />
+			 		</td>
+	 				<td width="120px"><@locale code="userinfo.userType"/></td>
+		 			<td width="360px">
+		 				<input class="form-control"  class="userTypeId" name="userType" type="text" style="display:none;"  >
+		 				<input class="form-control"  class="userTypeName" name="userTypeName" type="text" style="width:70%;;float:left;"  >
+		 				<input class="window button btn btn-secondary mr-3 " type="button"   size="50" value="<@locale code="button.text.select"/>" title="UserType" wurl="/usertype//selectUserTypeList" wwidth="700" wheight="500" />
+		 			</td>
+		 			
+			 </tr>
+			</table>
+ 		</form>
+ 	</div>
+ 	<table  data-url="<@base />/logs/loginHistory/grid"
+			id="datagrid"
+			data-toggle="table"
+			data-classes="table table-bordered table-hover table-striped"
+			data-pagination="true"
+			data-total-field="records"
+			data-page-list="[10, 25, 50, 100]"
+			data-search="false"
+			data-locale="zh-CN"
+			data-query-params="dataGridQueryParams"
+			data-query-params-type="pageSize"
+			data-side-pagination="server">
+		<thead>
+			<tr>
+				<th data-sortable="true" data-field="id"   data-visible="false"><@locale code="log.loginhistory.id"/></th>
+				<th data-field="sessionId"><@locale code="log.loginhistory.sessionId"/></th>
+				<th data-field="username"><@locale code="log.loginhistory.username"/></th>
+				<th data-field="displayName"><@locale code="log.loginhistory.displayName"/></th>
+				<th data-field="provider"><@locale code="log.loginhistory.provider"/></th>
+				<th data-field="message"><@locale code="log.loginhistory.message"/></th>
+				<th data-field="loginType"><@locale code="log.loginhistory.loginType"/></th>
+				<th data-field="sourceIp"><@locale code="log.loginhistory.sourceIp"/></th>
+				<th data-field="browser"><@locale code="log.loginhistory.browser"/></th>
+				<th data-field="loginTime"><@locale code="log.loginhistory.loginTime"/></th>
+				<th data-field="logoutTime"><@locale code="log.loginhistory.logoutTime"/></th>
+				<th data-field="platform"><@locale code="log.loginhistory.platform"/></th>
+				<th data-field="application"><@locale code="log.loginhistory.application"/></th>
+				<th data-field="loginUrl"><@locale code="log.loginhistory.loginUrl"/></th>
+				<th data-field="code"><@locale code="log.loginhistory.code"/></th>
+				<th data-field="rpUserInfo"><@locale code="log.loginhistory.rpUserInfo"/></th>
+	
+			</tr>
+		</thead>
+	</table>
+</div>
+	
+</div>
+					</div>
+<footer class="content-footer">
+					<#include  "../layout/footer.ftl"/>
+</footer>
+
+	</div>
+	
+	</div>
+</div>
+
+<div id="preloader">
+<div class="loader" id="loader-1"></div>
+</div>
+
+</body>
+</html>

+ 0 - 79
maxkey-web-manage/src/main/resources/templates/views/logs/loginHistoryList.jsp

@@ -1,79 +0,0 @@
-<%@ page 	contentType="text/html; charset=UTF-8"%>
-<%@ page 	import="org.maxkey.domain.*"%> 
-<%@ page 	import="java.util.Map,java.util.LinkedHashMap"%>
-<%@ page 	import="org.maxkey.web.*"%>
-<%@ taglib  prefix="s"   uri="http://www.connsec.com/tags" %>
-<%@ taglib  prefix="c"			uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib  prefix="spring"  	uri="http://www.springframework.org/tags" %>
-
-	<div id="tool_box">
-		<table  class="datatable">
-			<tr>
-				<td  width="120px">
-			 		 <s:Locale code="userinfo.username"/>:
-				</td>
-				<td  width="375px">
-					<form id="basic_search_form">
-				 			<input name="username" type="text" style ="width:150px">
-				 			<input class="button primary"  id="searchBtn" type="button" size="50" value="<s:Locale code="button.text.search"/>">
-				 			<input class="button"  id="advancedSearchExpandBtn" type="button" size="50"  value="<s:Locale code="button.text.expandsearch"/>" expandValue="<s:Locale code="button.text.expandsearch"/>"  collapseValue="<s:Locale code="button.text.collapsesearch"/>">
-					 	</form>
-				</td>
-				<td colspan="2"> 
-					 
-				</td>
-			</tr>
-		</table>
- 		
-		
- 	</div>
- 	
- 	<div id="advanced_search">
- 		<form id="advanced_search_form">
- 			<table   class="datatable">
-	 			<tr>
-	 				<td width="120px"><s:Locale code="userinfo.displayName"/></td>
-		 			<td width="360px">
-		 				<input name="displayName" type="text" >
-		 			</td>
-		 			<td width="120px"><s:Locale code="loginhistory.sourceip"/></td>
-		 			<td width="360px">
-						<input style="width:70%"  type="text" id="sourceIp" name="sourceIp"  title="" value=""/>
-			 		</td>
-			 </tr>
-			 <tr>
-	 				<td width="120px"><s:Locale code="common.text.startdate"/></td>
-		 			<td width="360px">
-		 				<input id="datepickerstart" name="startDate" type="text" >
-		 			</td>
-		 			<td width="120px"><s:Locale code="common.text.enddate"/></td>
-		 			<td width="360px">
-						<input id="datepickerend"  style="width:70%"  type="text" id="endDate" name="endDate"  title="" value=""/>
-			 		</td>
-			 </tr>
-			</table>
- 		</form>
- 	</div>
-
-
-<div class="mainwrap" id="main">
-	<s:Grid id="list" url="/logs/loginHistory/grid" multiselect="false">	
-		<s:Column width="0" field="id" title="id" hidden="true"/>
-		<s:Column width="20" field="sessionId" title="sessionId"  hidden="true"/>
-		<s:Column width="15" field="username" title="userinfo.username"/>
-		<s:Column width="15" field="displayName" title="userinfo.displayName"/>
-		<s:Column width="10" field="provider" title="loginhistory.provider"/>
-		<s:Column width="10" field="message" title="loginhistory.message"/>				
-		<s:Column width="10" field="loginType" title="loginhistory.logintype" />
-		<s:Column width="10" field="sourceIp" title="loginhistory.sourceip" />
-		<s:Column width="15" field="browser" title="loginhistory.browser"/>
-		<s:Column width="15" field="loginTime" title="loginhistory.logintime" />
-		<s:Column width="15" field="logoutTime" title="loginhistory.logouttime" />
-		
-		<s:Column width="50" field="platform" title="loginhistory.platform"  hidden="true"/>
-		<s:Column width="100" field="application" title="loginhistory.application"  hidden="true"/>
-		<s:Column width="100" field="loginUrl" title="loginhistory.loginurl"  hidden="true"/>
-		<s:Column width="100" field="code" title="code" hidden="true"/>
-		<s:Column width="100" field="rpUserInfo" title="rpUserInfo"  hidden="true"/>
-	</s:Grid>
-</div>

+ 93 - 0
maxkey-web-manage/src/main/resources/templates/views/logs/loginHistoryList2.ftl

@@ -0,0 +1,93 @@
+<!DOCTYPE HTML >
+<html>
+<head>
+	<#include  "../layout/header.ftl"/>
+	<#include  "../layout/common.cssjs.ftl"/>
+	<script type="text/javascript" src="<@base/>/static/jquery/jsonformatter.js"></script>
+</head>
+<body>
+<#include  "../layout/top.ftl"/>
+<#include  "../layout/nav_primary.ftl"/>
+<div class="container">
+	<div id="tool_box">
+		<table  class="table table-bordered">
+			<tr>
+				<td  width="120px">
+				<@locale code="log.loginhistory.sourceIp"/>
+				</td>
+				<td  width="375px">
+					<form id="basic_search_form">
+				 			<input class="form-control" name="sourceIp" type="text" style ="width:150px;float:left;">
+				 			<input class="button btn btn-primary mr-3"  id="searchBtn" type="button" size="50" value="<@locale code="button.text.search"/>">
+				 			<input class="button btn btn-secondary"  id="advancedSearchExpandBtn" type="button" size="50"  value="<@locale code="button.text.expandsearch"/>" expandValue="<@locale code="button.text.expandsearch"/>"  collapseValue="<@locale code="button.text.collapsesearch"/>">
+					 	</form>
+				</td>
+				<td colspan="2"> 
+					 
+				</td>
+			</tr>
+		</table>
+ 		
+		
+ 	</div>
+ 	
+ 	<div id="advanced_search">
+ 		<form id="advanced_search_form">
+ 			<table   class="table table-bordered">
+			 <tr>
+	 				<td width="120px"><@locale code="common.text.startdate"/></td>
+		 			<td width="360px">
+		 				<input class="datetimepicker form-control" name="startDate" type="text" >
+		 			</td>
+		 			<td width="120px"><@locale code="common.text.enddate"/></td>
+		 			<td width="360px">
+						<input style="width:70%"  class="datetimepicker form-control"  type="text" id="endDate" name="endDate"  title="" value=""/>
+			 		</td>
+			 </tr>
+			</table>
+ 		</form>
+ 	</div>
+ 	
+<div class="mainwrap" id="main">
+
+	<table  data-url="<@base />/logs/loginHistory/grid"
+			id="datagrid"
+			data-toggle="table"
+			data-classes="table table-bordered table-hover table-striped"
+			data-pagination="true"
+			data-total-field="records"
+			data-page-list="[10, 25, 50, 100]"
+			data-search="false"
+			data-locale="zh-CN"
+			data-query-params="dataGridQueryParams"
+			data-query-params-type="pageSize"
+			data-side-pagination="server">
+		<thead>
+			<tr>
+				<th data-sortable="true" data-field="id"   data-visible="false"><@locale code="log.loginhistory.id"/></th>
+				<th data-field="sessionId"><@locale code="log.loginhistory.sessionId"/></th>
+				<th data-field="username"><@locale code="log.loginhistory.username"/></th>
+				<th data-field="displayName"><@locale code="log.loginhistory.displayName"/></th>
+				<th data-field="provider"><@locale code="log.loginhistory.provider"/></th>
+				<th data-field="message"><@locale code="log.loginhistory.message"/></th>
+				<th data-field="loginType"><@locale code="log.loginhistory.loginType"/></th>
+				<th data-field="sourceIp"><@locale code="log.loginhistory.sourceIp"/></th>
+				<th data-field="browser"><@locale code="log.loginhistory.browser"/></th>
+				<th data-field="loginTime"><@locale code="log.loginhistory.loginTime"/></th>
+				<th data-field="logoutTime"><@locale code="log.loginhistory.logoutTime"/></th>
+				<th data-field="platform"><@locale code="log.loginhistory.platform"/></th>
+				<th data-field="application"><@locale code="log.loginhistory.application"/></th>
+				<th data-field="loginUrl"><@locale code="log.loginhistory.loginUrl"/></th>
+				<th data-field="code"><@locale code="log.loginhistory.code"/></th>
+				<th data-field="rpUserInfo"><@locale code="log.loginhistory.rpUserInfo"/></th>
+	
+			</tr>
+		</thead>
+	</table>
+</div>
+</div>
+<div id="footer">
+	<#include   "../layout/footer.ftl"/>
+</div>
+</body>
+</html>

+ 150 - 0
maxkey-web-manage/src/main/resources/templates/views/logs/logsList.ftl

@@ -0,0 +1,150 @@
+<!DOCTYPE HTML>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<#include  "../layout/header.ftl"/>
+	<#include  "../layout/common.cssjs.ftl"/>
+	<script type="text/javascript">	
+		function onSelectRow(id){		
+	   		$("#changepwdBtn").attr("wurl","<@base/>/users/forwardChangePassword/"+$.gridRowData("#list",id).id);
+	   	}
+	   	
+	   	function genderFormatter(value, options, rData){
+	   		if(value==1){
+	   			return '<@locale code="userinfo.gender.female" />';
+	   		}else{
+	   			return '<@locale code="userinfo.gender.male" />';
+	   		}
+		};
+	</script>
+</head>
+<body> 
+<div class="app header-default side-nav-dark">
+<div class="layout">
+	<div class="header navbar">
+		<#include  "../layout/top.ftl"/>
+	</div>
+	
+	<div class="col-md-3 sidebar-nav side-nav" >
+		<#include  "../layout/sidenav.ftl"/>
+	</div>
+	<div class="page-container">
+	
+	<div class="main-content">
+					<div class="container-fluid">
+
+						<div class="breadcrumb-wrapper row">
+							<div class="col-12 col-lg-3 col-md-6">
+								<h4 class="page-title">Dashboard 2</h4>
+							</div>
+							<div class="col-12 col-lg-9 col-md-6">
+								<ol class="breadcrumb float-right">
+									<li><a href="index.html">Dashboard</a></li>
+									<li class="active">/ Dashboard 2</li>
+								</ol>
+							</div>
+						</div>
+
+					</div>
+					<div class="container-fluid">
+
+					<div class="col-12 grid-margin">
+						<div class="card">
+							<div class="card-body">
+							
+	<div id="tool_box">
+		<table   class="table table-bordered">
+			<tr>
+				<td  width="120px">
+			 		 <@locale code="userinfo.username"/>:
+				</td>
+				<td  width="375px">
+					<form id="basic_search_form">
+				 			<input  class="form-control"  name="username" type="text" style ="width:150px;float:left;">
+				 			<input  class="button btn btn-primary mr-3"    id="searchBtn" type="button" size="50" value="<@locale code="button.text.search"/>">
+				 			<input  class="button btn btn-secondary"  id="advancedSearchExpandBtn" type="button" size="50"  value="<@locale code="button.text.expandsearch"/>" expandValue="<@locale code="button.text.expandsearch"/>"  collapseValue="<@locale code="button.text.collapsesearch"/>">
+					 	</form>
+				</td>
+				<td colspan="2"> 
+					 <div id="tool_box_right">
+					 	
+					</div>
+				</td>
+			</tr>
+		</table>
+ 		
+		
+ 	</div>
+ 	
+ 	<div id="advanced_search">
+ 		<form id="advanced_search_form">
+ 			<table    class="table table-bordered">
+	 			<tr>
+	 				<td width="120px"><@locale code="userinfo.displayName"/></td>
+		 			<td width="360px">
+		 				<input  class="form-control"  name="displayName" type="text" >
+		 			</td>
+		 			<td width="120px"><@locale code="userinfo.employeeNumber"/></td>
+		 			<td width="360px">
+						<input class="form-control"  type="text" id="employeeNumber" name="employeeNumber"  title="" value=""/>
+			 			</td>
+		 			
+			 </tr>
+			 <tr>
+					<td width="120px"><@locale code="userinfo.department"/></td>
+		 			<td width="360px">
+			 		</td>
+	 				<td width="120px"><@locale code="userinfo.userType"/></td>
+		 			<td width="360px">
+		 			</td>
+		 			
+			 </tr>
+			</table>
+ 		</form>
+ 	</div>
+ 	<table  data-url="<@base />/logs/grid"
+			id="datagrid"
+			data-toggle="table"
+			data-classes="table table-bordered table-hover table-striped"
+			data-pagination="true"
+			data-total-field="records"
+			data-page-list="[10, 25, 50, 100]"
+			data-search="false"
+			data-locale="zh-CN"
+			data-query-params="dataGridQueryParams"
+			data-query-params-type="pageSize"
+			data-side-pagination="server">
+		<thead>
+			<tr>
+				<th data-sortable="true" data-field="id"   data-visible="false">id</th>
+				<th data-field="serviceName"><@locale code="log.operate.servicename"/></th>
+				<th data-field="message"><@locale code="log.operate.message"/></th>
+				<th data-field="view"><@locale code="log.operate.content"/></th>
+				<th data-field="messageType"><@locale code="log.operate.messageType"/></th>
+				<th data-field="operateType"><@locale code="log.operate.operateType"/></th>
+				<th data-field="username"><@locale code="log.operate.username"/></th>
+				<th data-field="createdBy"><@locale code="common.text.createdby"/></th>
+				<th data-field="createdDate"><@locale code="common.text.createddate"/></th>
+				<th data-field="modifiedBy"><@locale code="common.text.modifiedby"/></th>
+				<th data-field="modifiedDate"><@locale code="common.text.modifieddate"/></th>
+			</tr>
+		</thead>
+	</table>
+</div>
+	
+</div>
+					</div>
+<footer class="content-footer">
+					<#include  "../layout/footer.ftl"/>
+</footer>
+
+	</div>
+	
+	</div>
+</div>
+
+<div id="preloader">
+<div class="loader" id="loader-1"></div>
+</div>
+
+</body>
+</html>

+ 0 - 99
maxkey-web-manage/src/main/resources/templates/views/logs/logsList.jsp

@@ -1,99 +0,0 @@
-<%@ page 	contentType="text/html; charset=UTF-8"%>
-<%@ page 	import="org.maxkey.domain.*"%> 
-<%@ page 	import="java.util.Map,java.util.LinkedHashMap"%>
-<%@ taglib  prefix="s"   uri="http://www.connsec.com/tags" %>
-<%@ taglib  prefix="c"			uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib prefix="spring"  	uri="http://www.springframework.org/tags" %>
-
-<script type="text/javascript">
-	function viewformatter (value, options, rData){
-		return "<a href='javascript:void(0);' selid='"+rData["id"]+"' class='viewJsonObject' title='view more' >view more</a>";
-	}
-				
-	$(".viewJsonObject").on("click",function(){
-			var content=$("#list").getRowData($(this).attr("selid")+"")["content"]; 
-			var jsonHtml='<textarea name="jsondata" id="formatteddata" rows="20" cols="70">';
-				jsonHtml+=FormatJSON(eval("("+content+")"));
-				jsonHtml+='</textarea>';
-			$.alert({
-				title		: 	"JSON Data View",
-				type		:	null,
-			    content		: 	jsonHtml,
-			    okVal		:	null,
-			    cancelVal	:	$.platform.messages.alert.no,
-			    ok			: 	null,
-			    cancel		: 	function (){}
-			});
-		});
-
-</script>
-	<div id="tool_box">
-		<table  class="datatable">
-			<tr>
-				<td width="120px"><s:Locale code="logs.servicename"/>:</td>
-				<td  width="375px">
-					<form id="basic_search_form">
-				 			<input  style="width:200px"   id="serviceName" name="serviceName" type="text" value="" >
-				 			
-				 			<input class="button primary"  id="searchBtn" type="button" size="50" value="<s:Locale code="button.text.search"/>"/>
-				 			
-					 	</form>
-				</td>
-				<td colspan="2"> 
-					 <input class="button"  id="advancedSearchExpandBtn" type="button" size="50"  value="<s:Locale code="button.text.expandsearch"/>" expandValue="<s:Locale code="button.text.expandsearch"/>"  collapseValue="<s:Locale code="button.text.collapsesearch"/>">
-					 	
-				</td>
-			</tr>
-		</table>
- 		
-		
- 	</div>
- 	
- 	<div id="advanced_search">
- 		<form id="advanced_search_form">
- 			<table   class="datatable">
-	 			<tr>
-	 				<td width="120px"><s:Locale code="logs.message"/></td>
-		 			<td width="360px">
-		 				<input name="message" type="text" >
-		 			</td>
-		 			<td width="120px"><s:Locale code="logs.operatetype"/></td>
-		 			<td width="360px">
-		 				<select id="operateType" name="operateType"  >
-		 					<option value=""  selected>All</option>
-							<option value="add"     >Add</option>
-							<option value="update"  >Update</option>
-							<option value="delete"  >Delete</option>
-						</select>
-			 		</td>
-			 </tr>
-			 <tr>
-	 				<td width="120px"><s:Locale code="common.text.startdate"/></td>
-		 			<td width="360px">
-		 				<input id="datepickerstart" name="startDate" type="text" >
-		 			</td>
-		 			<td width="120px"><s:Locale code="common.text.enddate"/></td>
-		 			<td width="360px">
-						<input id="datepickerend"  type="text" id="endDate" name="endDate"  title="" value=""/>
-			 		</td>
-			 </tr>
-			</table>
- 		</form>
- 	</div>
-<div class="mainwrap" id="main">
-	
-	<s:Grid id="list" url="/logs/grid" multiselect="false">	
-		<s:Column width="0" field="id" title="id" hidden="true"/>
-		<s:Column width="100" field="serviceName" title="logs.servicename"/>
-		<s:Column width="100" field="message" title="logs.message"/>
-		<s:Column width="100" field="view" title="logs.content" formatter="viewformatter"/>
-		<s:Column width="100" field="messageType" title="logs.messagetype"/>				
-		<s:Column width="100" field="operateType" title="logs.operatetype" />
-		<s:Column width="100" field="username" title="userinfo.username" />
-		<s:Column width="0" field="createdBy" title="common.text.createdby" hidden="true"/>
-		<s:Column width="100" field="createdDate" title="common.text.createddate" hidden="false"/>
-		<s:Column width="0" field="modifiedBy" title="common.text.modifiedby" hidden="true"/>
-		<s:Column width="0" field="modifiedDate" title="common.text.modifieddate" hidden="true"/>
-	</s:Grid>
-	
-</div>

+ 73 - 0
maxkey-web-manage/src/main/resources/templates/views/logs/logsList2.ftl

@@ -0,0 +1,73 @@
+<!DOCTYPE HTML >
+<html>
+<head>
+	<#include  "../layout/header.ftl"/>
+	<#include  "../layout/common.cssjs.ftl"/>
+	<script type="text/javascript" src="<@base/>/static/jquery/jsonformatter.js"></script>
+	<script type="text/javascript">
+		function viewformatter (value, options, rData){
+			return "<a href='javascript:void(0);' selid='"+rData["id"]+"' class='viewJsonObject' title='view more' >view more</a>";
+		}
+					
+		$(".viewJsonObject").on("click",function(){
+				var content=$("#list").getRowData($(this).attr("selid")+"")["content"]; 
+				var jsonHtml='<textarea name="jsondata" id="formatteddata" rows="20" cols="70">';
+					jsonHtml+=FormatJSON(eval("("+content+")"));
+					jsonHtml+='</textarea>';
+				$.alert({
+					title		: 	"JSON Data View",
+					type		:	null,
+				    content		: 	jsonHtml,
+				    okVal		:	null,
+				    cancelVal	:	$.platform.messages.alert.no,
+				    ok			: 	null,
+				    cancel		: 	function (){}
+				});
+			});
+	
+	</script>
+</head>
+<body>
+<#include  "../layout/top.ftl"/>
+<#include  "../layout/nav_primary.ftl"/>
+
+<div class="container">
+
+<div class="mainwrap" id="main">
+	
+	<table  data-url="<@base />/logs/grid"
+			id="datagrid"
+			data-toggle="table"
+			data-classes="table table-bordered table-hover table-striped"
+			data-pagination="true"
+			data-total-field="records"
+			data-page-list="[10, 25, 50, 100]"
+			data-search="false"
+			data-locale="zh-CN"
+			data-query-params="dataGridQueryParams"
+			data-query-params-type="pageSize"
+			data-side-pagination="server">
+		<thead>
+			<tr>
+				<th data-sortable="true" data-field="id"   data-visible="false">id</th>
+				<th data-field="serviceName"><@locale code="log.operate.servicename"/></th>
+				<th data-field="message"><@locale code="log.operate.message"/></th>
+				<th data-field="view"><@locale code="log.operate.content"/></th>
+				<th data-field="messageType"><@locale code="log.operate.messageType"/></th>
+				<th data-field="operateType"><@locale code="log.operate.operateType"/></th>
+				<th data-field="username"><@locale code="log.operate.username"/></th>
+				<th data-field="createdBy"><@locale code="common.text.createdby"/></th>
+				<th data-field="createdDate"><@locale code="common.text.createddate"/></th>
+				<th data-field="modifiedBy"><@locale code="common.text.modifiedby"/></th>
+				<th data-field="modifiedDate"><@locale code="common.text.modifieddate"/></th>
+			</tr>
+		</thead>
+	</table>
+	
+</div>
+</div>
+<div id="footer">
+	<#include   "../layout/footer.ftl"/>
+</div>
+</body>
+</html>

+ 5 - 8
maxkey-web-manage/src/main/resources/templates/views/main.ftl

@@ -1,22 +1,19 @@
-<%@ page   language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
-<%@ taglib prefix="c"       	uri="http://java.sun.com/jsp/jstl/core"  %>
-<%@ taglib prefix="s" 			uri="http://sso.maxkey.org/tags" %> 
 <!DOCTYPE HTML>
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-	<jsp:include page="layout/header.jsp"></jsp:include>
-	<jsp:include page="layout/common.cssjs.jsp"></jsp:include>
+	<#include  "layout/header.ftl"/>
+	<#include  "layout/common.cssjs.ftl"/>
 	
 </head>
 <body> 
 <div class="app header-default side-nav-dark">
 <div class="layout">
 	<div class="header navbar">
-		<jsp:include page="layout/top.jsp"></jsp:include>
+		<#include  "layout/top.ftl"/>
 	</div>
 	
 	<div class="col-md-3 sidebar-nav side-nav" >
- 		<jsp:include page="layout/sidenav.jsp"></jsp:include>
+		<#include  "layout/sidenav.ftl"/>
 	</div>
  <div class="swlink">Collect from <a href="http://www.scnoob.com/" title="网站模板">网站模板</a></div>
 
@@ -379,7 +376,7 @@ Request Inquiry
 
 
 	<footer class="content-footer">
-		<jsp:include page="layout/footer.jsp"></jsp:include>
+		<#include  "layout/footer.ftl"/>
 	</footer>
 
 </div>

+ 1 - 1
maxkey-web-manage/src/main/resources/templates/views/orgs/orgsList.ftl

@@ -62,7 +62,7 @@ $(function () {
 		
 		
 	$("#deleteBtn").click(function(){
-		$.post('<s:Base/>/orgs/delete',{ id:$("#id").val(),_method:"delete"}, function(data) {
+		$.post('<@base/>/orgs/delete',{ id:$("#id").val(),_method:"delete"}, function(data) {
 			$.fn.zTree.getZTreeObj("orgsTree").removeNode($.fn.zTree.getZTreeObj("orgsTree").getSelectedNodes()[0]);
  				$.alert({content:data.message});
 		});

+ 206 - 0
maxkey-web-manage/src/main/resources/templates/views/orgs/orgsList2.jsp

@@ -0,0 +1,206 @@
+<%@ page   contentType="text/html; charset=UTF-8" import="java.util.Map,java.util.LinkedHashMap" %>
+<%@ page   import="org.maxkey.web.*"%>
+<%@ taglib prefix="c"		uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="spring"	uri="http://www.springframework.org/tags" %>
+<%@ taglib prefix="s" 	uri="http://www.connsec.com/tags" %>
+
+
+<script type="text/javascript">
+
+function onClick (event, treeId, treeNode) {
+	  $("#actionForm").clearForm();
+	  $("#actionForm").json2form({data:treeNode.data});
+	  $("#_method").val("put");
+	  $("#status").val("1");
+	 
+}
+	
+$(function () {
+	$("#addChildBtn").click(function(){
+		var nodes = $.fn.zTree.getZTreeObj("orgsTree").getSelectedNodes();
+		if (nodes.length == 0) {
+			$.alert({content:"<s:Locale code="system.menus.alert.select.pmenu" />"});
+			return;
+		}
+		$("#actionForm").clearForm();
+		$("#pId").val(nodes[0].data.id);
+	  	$("#pName").val(nodes[0].data.name);
+	  	$("#sortOrder").val(1);
+	  	$("#status").val("1");
+	    $("#_method").val("post");
+	});	
+	
+	
+	$("#saveBtn").click(function(){
+		if($("#_method").val()=="put"){
+			$("#actionForm").attr("action",'<s:Base/>/orgs/update');
+		}else{
+			$("#actionForm").attr("action",'<s:Base/>/orgs/add');
+			var nodedata =	$.fn.zTree.getZTreeObj("orgsTree").getSelectedNodes()[0].data;
+			$("#xNamePath").val(nodedata.xNamePath+"/"+$("#name").val());
+			$("#xPath").val(nodedata.xPath+"/"+$("#id").val());
+		}
+		
+		if($("#fullName").val()==""){
+			$("#fullName").val($("#name").val());
+		}
+		if($("#_method").val()=="post"){
+			var node=$("#actionForm").serializeObject();
+			node.data=$("#actionForm").serializeObject();
+			delete node['url'];
+			$.fn.zTree.getZTreeObj("orgsTree").addNodes(
+				$.fn.zTree.getZTreeObj("orgsTree").getSelectedNodes()[0],node);
+		}else{
+			var node=$("#actionForm").serializeObject();
+			node.data=$("#actionForm").serializeObject();
+			node=$.extend( $.fn.zTree.getZTreeObj("orgsTree").getSelectedNodes()[0],node);
+			delete node['url'];
+			$.fn.zTree.getZTreeObj("orgsTree").updateNode(node);
+		}
+		$('#actionForm').submit(); 
+	});	
+		
+		
+	$("#deleteBtn").click(function(){
+		$.post('<s:Base/>/orgs/delete',{ id:$("#id").val(),_method:"delete"}, function(data) {
+			$.fn.zTree.getZTreeObj("orgsTree").removeNode($.fn.zTree.getZTreeObj("orgsTree").getSelectedNodes()[0]);
+ 				$.alert({content:data.message});
+		});
+	});
+});
+</script>
+	 
+	     <!-- content -->  
+ <table class="datatable"   width="100%" >
+   <tr>
+      <td valign="top"  class="td_1" style="vertical-align: top;">
+          <s:Tree rootId="1" url="/orgs/tree" id="orgsTree" onClick="onClick"/>
+      </td>
+      <td  valign="top"  class="td_1" style="vertical-align: top;">
+         <div id="orgsTable" style="PADDING:0;MARGIN: 0;width:650px"></div>
+         <form  id="actionForm" action='<s:Base/>/orgs/add' method="post">
+         	<table>
+         		<tr>
+         			<td>
+						<ul class="switch_tab"  style="width:100%" >
+							<li id="switch_common" value="table_switch_common" style="width:49%" class="switch_tab_class switch_tab_current"><a href="javascript:void(0);"><s:Locale code="org.tab.basic" /></a></li>
+							<li id="switch_extra"  value="table_switch_extra" style="width:49%" class="switch_tab_class"><a href="javascript:void(0);"><s:Locale code="org.tab.extra" /></a></li>
+						</ul>
+					</td>
+         		</tr>
+         		<tr><td>
+         	<table id="table_switch_common"  class="datatable"  width="600px">
+               <tr style="display:none">
+                  <th ><input type="text" id="status" type="hidden" name="status"  value="1"/>
+                  <input type="text" id="_method" type="hidden" name="_method"  value="put"/></th>
+                  <td></td>
+               </tr>
+               <tr >
+                  <th ><s:Locale code="org.pid" />:</th>
+                  <td><span class="intspan"><input type="text" readonly id="pId" name="pId" size="80" class="int"/></span></td>
+               </tr>
+               <tr>
+                  <th  width="200px"><s:Locale code="org.pname" />:</th>
+                  <td><span class="intspan"><input type="text" readonly  id="pName" name="pName" size="80"   class="int"/></span></td>
+               </tr>
+               <tr >
+                  <th ><s:Locale code="org.id" />:</th>
+                  <td><span class="intspan"><input type="text" id="id" name="id" size="80"   class="int"/></span></td>
+               </tr>
+               <tr>
+                  <th ><s:Locale code="org.name" />:</th>
+                  <td><span class="intspan"><input type="text"  id="name" name="name"  size="80"  class="int"/></span></td>
+               </tr>
+               <tr>
+                  <th ><s:Locale code="org.fullname" />:</th>
+                  <td><span class="intspan"><input type="text"  id="fullName" name="fullName"  size="80"  class="int"/></span></td>
+               </tr>
+                <tr >
+                  <th ><s:Locale code="org.xpath" /> :
+                  </th>
+                  <td><span class="intspan"><input type="text"  id="xPath" name="xPath" size="80"   class="int"/></span></td>
+               </tr>
+               
+                <tr >
+                  <th ><s:Locale code="org.xnamepath" /> :
+                  </th>
+                  <td><span class="intspan"><input type="text"  id="xNamePath" name="xNamePath" size="80"   class="int"/></span></td>
+               </tr>
+               
+               <tr>
+                  <th ><s:Locale code="org.type" />:</th>
+                  <td><input type="text"  id="type" name="type"  size="80"  class="int"/></td>
+               </tr>
+               <tr>
+                  <th ><s:Locale code="org.division" />:</th>
+                  <td><span class="intspan"><input type="text"  id="division" name="division"  size="80"  class="int"/></span></td>
+               </tr>
+               <tr>
+                  <th >
+                     <s:Locale code="common.text.sortorder" /> :
+                  </th>
+                  <td><span class="intspan"><input type="text"  id="sortOrder" name="sortOrder"  size="80"  class="int"/></span></td>
+               </tr>
+              
+               <tr>
+                  <th ><s:Locale code="common.text.description" />:</th>
+                  <td><span class="intspan"><input type="text"  id="description" name="description"  size="80"  class="int"/></span></td>
+               </tr>
+            </table>
+            <table id="table_switch_extra"  class="datatable"  width="600px" style="display:none">
+            	<tr>
+                  <th ><s:Locale code="org.contact" />:</th>
+                  <td><span class="intspan"><input type="text"  id="contact" name="contact"  size="80"  class="int"/></span></td>
+               </tr>
+               <tr>
+                  <th  width="200px"><s:Locale code="org.phone" />:</th>
+                  <td><span class="intspan"><input type="text"  id="phone" name="phone"  size="80"  class="int"/></span></td>
+               </tr>
+                <tr>
+                  <th ><s:Locale code="org.email" />:</th>
+                  <td><span class="intspan"><input type="text"  id="email" name="email"  size="80"  class="int"/></span></td>
+               </tr>
+               <tr>
+                  <th ><s:Locale code="org.fax" />:</th>
+                  <td><span class="intspan"><input type="text"  id="fax" name="fax"  size="80"  class="int"/></span></td>
+               </tr>
+               <tr>
+                  <th ><s:Locale code="org.country" />:</th>
+                  <td><span class="intspan"><input type="text"  id="country" name="country"  size="80"  class="int"/></span></td>
+               </tr>
+               <tr>
+                  <th ><s:Locale code="org.region" />:</th>
+                  <td><span class="intspan"><input type="text"  id="region" name="region"  size="80"  class="int"/></span></td>
+               </tr>
+               <tr>
+                  <th ><s:Locale code="org.locality" />:</th>
+                  <td><span class="intspan"><input type="text"  id="locality" name="locality"  size="80"  class="int"/></span></td>
+               </tr>
+               <tr>
+                  <th ><s:Locale code="org.street" />:</th>
+                  <td><span class="intspan"><input type="text"  id="street" name="street"  size="80"  class="int"/></span></td>
+               </tr>
+               <tr>
+                  <th ><s:Locale code="org.address" />:</th>
+                  <td><span class="intspan"><input type="text"  id="address" name="address"  size="80"  class="int"/></span></td>
+               </tr>
+               <tr>
+                  <th ><s:Locale code="org.postalcode" />:</th>
+                  <td><span class="intspan"><input type="text"  id="postalCode" name="postalCode"  size="80"  class="int"/></span></td>
+               </tr>
+            </table>
+         		</td></tr>
+         		<tr><td nowrap class="center">
+                              <input id="addChildBtn" class="button"   type="button" style="width:120px"  value="<s:Locale code="button.text.add" />"/>
+                          
+                              <input id="saveBtn" class="button"      type="button"   style="width:100px"  value="<s:Locale code="button.text.save" />"/>
+                           
+                              <input id="deleteBtn"  class="button"   type="button"   style="width:100px"  value="<s:Locale code="button.text.delete" />"/>
+                           
+         		</td></tr>
+         	</table>
+
+         </form>
+      </td>
+   </tr>
+</table>

+ 5 - 9
maxkey-web-manage/src/main/resources/templates/views/report/loginApp.ftl

@@ -1,9 +1,5 @@
-<%@ page   contentType="text/html; charset=UTF-8" import="java.util.Map,java.util.LinkedHashMap" %>
-<%@ taglib prefix="s"	uri="http://www.connsec.com/tags" %>
-<%@ taglib prefix="spring"		uri="http://www.springframework.org/tags" %>
-<%@ taglib prefix="c"			uri="http://java.sun.com/jsp/jstl/core"%>
 
-<script type="text/javascript" src="<s:Base/>/jquery/echarts-2.2.1/echarts-all.js"></script>
+<script type="text/javascript" src="<@base/>/jquery/echarts-2.2.1/echarts-all.js"></script>
 
 <script type="text/javascript">	
 	$(function () {
@@ -12,12 +8,12 @@
 </script>
 
 <div>
-<form id="report_search_form" action="<s:Base/>/report/login/app">
+<form id="report_search_form" action="<@base/>/report/login/app">
 	<div id="tool_box">
 		<table  class="datatable">
 			<tr>
 				<td  width="120px">
-			 		 <s:Locale code="common.text.startdate"/>
+			 		 <@locale code="common.text.startdate"/>
 				</td>
 				<td  width="375px">
 					
@@ -25,9 +21,9 @@
 							
 				</td>
 				<td colspan="2"> 
-					 <s:Locale code="common.text.enddate"/>
+					 <@locale code="common.text.enddate"/>
 					 <input  id="datepickerend"  name="endDate" type="text"  style ="width:150px" value="${endDate}" >
-				 	 <input class="button primary"  id="reportSearchBtn" type="submit" size="50" value="<s:Locale code="button.text.search"/>">
+				 	 <input class="button primary"  id="reportSearchBtn" type="submit" size="50" value="<@locale code="button.text.search"/>">
 				 	
 				</td>
 			</tr>

+ 5 - 9
maxkey-web-manage/src/main/resources/templates/views/report/loginBrowser.ftl

@@ -1,9 +1,5 @@
-<%@ page   contentType="text/html; charset=UTF-8" import="java.util.Map,java.util.LinkedHashMap" %>
-<%@ taglib prefix="s"	uri="http://www.connsec.com/tags" %>
-<%@ taglib prefix="spring"		uri="http://www.springframework.org/tags" %>
-<%@ taglib prefix="c"			uri="http://java.sun.com/jsp/jstl/core"%>
 
-<script type="text/javascript" src="<s:Base/>/jquery/echarts-2.2.1/echarts-all.js"></script>
+<script type="text/javascript" src="<@base/>/jquery/echarts-2.2.1/echarts-all.js"></script>
 
 <script type="text/javascript">	
 	$(function () {
@@ -12,12 +8,12 @@
 </script>
 
 <div>
-<form id="report_search_form" action="<s:Base/>/report/login/browser">
+<form id="report_search_form" action="<@base/>/report/login/browser">
 	<div id="tool_box">
 		<table  class="datatable">
 			<tr>
 				<td  width="120px">
-			 		 <s:Locale code="common.text.startdate"/>:
+			 		 <@locale code="common.text.startdate"/>:
 				</td>
 				<td  width="375px">
 					
@@ -25,9 +21,9 @@
 							
 				</td>
 				<td colspan="2"> 
-					<s:Locale code="common.text.enddate"/>:
+					<@locale code="common.text.enddate"/>:
 					 <input  id="datepickerend"  name="endDate" type="text"  style ="width:150px" value="${endDate}" >
-				 	 <input class="button primary"  id="reportSearchBtn" type="submit" size="50" value="<s:Locale code="button.text.search"/>">
+				 	 <input class="button primary"  id="reportSearchBtn" type="submit" size="50" value="<@locale code="button.text.search"/>">
 				 	
 				</td>
 			</tr>

+ 4 - 8
maxkey-web-manage/src/main/resources/templates/views/report/loginDay.ftl

@@ -1,9 +1,5 @@
-<%@ page   contentType="text/html; charset=UTF-8" import="java.util.Map,java.util.LinkedHashMap" %>
-<%@ taglib prefix="s"	uri="http://www.connsec.com/tags" %>
-<%@ taglib prefix="spring"		uri="http://www.springframework.org/tags" %>
-<%@ taglib prefix="c"			uri="http://java.sun.com/jsp/jstl/core"%>
 
-<script type="text/javascript" src="<s:Base/>/jquery/echarts-2.2.1/echarts-all.js"></script>
+<script type="text/javascript" src="<@base/>/jquery/echarts-2.2.1/echarts-all.js"></script>
 
 <script type="text/javascript">	
 	$(function () {
@@ -17,12 +13,12 @@
 		<table  class="datatable">
 			<tr>
 				<td  width="120px">
-			 		 <s:Locale code="common.text.date"/>:
+			 		 <@locale code="common.text.date"/>:
 				</td>
 				<td  width="375px">
-					<form id="report_search_form" action="<s:Base/>/report/login/day">
+					<form id="report_search_form" action="<@base/>/report/login/day">
 							<input class="datepicker" name="reportDate" type="text"  style ="width:150px" value="${reportDate}" >
-				 			<input class="button primary"  id="reportSearchBtn" type="submit" size="50" value="<s:Locale code="button.text.search"/>">
+				 			<input class="button primary"  id="reportSearchBtn" type="submit" size="50" value="<@locale code="button.text.search"/>">
 				 	</form>
 				</td>
 				<td colspan="2"> 

+ 4 - 8
maxkey-web-manage/src/main/resources/templates/views/report/loginMonth.ftl

@@ -1,9 +1,5 @@
-<%@ page   contentType="text/html; charset=UTF-8" import="java.util.Map,java.util.LinkedHashMap" %>
-<%@ taglib prefix="s"	uri="http://www.connsec.com/tags" %>
-<%@ taglib prefix="spring"		uri="http://www.springframework.org/tags" %>
-<%@ taglib prefix="c"			uri="http://java.sun.com/jsp/jstl/core"%>
 
-<script type="text/javascript" src="<s:Base/>/jquery/echarts-2.2.1/echarts-all.js"></script>
+<script type="text/javascript" src="<@base/>/jquery/echarts-2.2.1/echarts-all.js"></script>
 
 <script type="text/javascript">	
 	$(function () {
@@ -17,12 +13,12 @@
 		<table  class="datatable">
 			<tr>
 				<td  width="120px">
-			 		 <s:Locale code="common.text.date"/>:
+			 		 <@locale code="common.text.date"/>:
 				</td>
 				<td  width="375px">
-					<form id="report_search_form" action="<s:Base/>/report/login/month">
+					<form id="report_search_form" action="<@base/>/report/login/month">
 							<input class="datepicker" name="reportDate" type="text"  style ="width:150px" value="${reportDate}" >
-				 			<input class="button primary"  id="reportSearchBtn" type="submit" size="50" value="<s:Locale code="button.text.search"/>">
+				 			<input class="button primary"  id="reportSearchBtn" type="submit" size="50" value="<@locale code="button.text.search"/>">
 				 	</form>
 				</td>
 				<td colspan="2"> 

+ 4 - 8
maxkey-web-manage/src/main/resources/templates/views/report/loginYear.ftl

@@ -1,9 +1,5 @@
-<%@ page   contentType="text/html; charset=UTF-8" import="java.util.Map,java.util.LinkedHashMap" %>
-<%@ taglib prefix="s"	uri="http://www.connsec.com/tags" %>
-<%@ taglib prefix="spring"		uri="http://www.springframework.org/tags" %>
-<%@ taglib prefix="c"			uri="http://java.sun.com/jsp/jstl/core"%>
 
-<script type="text/javascript" src="<s:Base/>/jquery/echarts-2.2.1/echarts-all.js"></script>
+<script type="text/javascript" src="<@base/>/jquery/echarts-2.2.1/echarts-all.js"></script>
 
 <script type="text/javascript">	
 	$(function () {
@@ -17,12 +13,12 @@
 		<table  class="datatable">
 			<tr>
 				<td  width="120px">
-			 		 <s:Locale code="common.text.year"/>:
+			 		 <@locale code="common.text.year"/>:
 				</td>
 				<td  width="375px">
-					<form id="report_search_form" action="<s:Base/>/report/login/year">
+					<form id="report_search_form" action="<@base/>/report/login/year">
 							<input  name="reportDate" type="text"  style ="width:150px" value="${reportDate}" >
-				 			<input class="button primary"  id="reportSearchBtn" type="submit" size="50" value="<s:Locale code="button.text.search"/>">
+				 			<input class="button primary"  id="reportSearchBtn" type="submit" size="50" value="<@locale code="button.text.search"/>">
 				 	</form>
 				</td>
 				<td colspan="2"> 

+ 6 - 6
maxkey-web-manage/src/main/resources/templates/views/userinfo/changePassword.ftl

@@ -7,12 +7,12 @@
   <tr>
     <td>
 
-<form id="actionForm"  method="post" type="label" autoclose="true"  action="<s:Base/>/users/changePassword"> 
+<form id="actionForm"  method="post" type="label" autoclose="true"  action="<@base/>/users/changePassword"> 
 
 	  <table   class="datatable" >
 			<tbody>
 			<tr>
-				<th><s:Locale code="userinfo.displayName" /> :</th>
+				<th><@locale code="userinfo.displayName" /> :</th>
 				<td>
 					<input readonly type="hidden" id="id" name="id" class="required" title="" value="${model.id}"/>
 					<input readonly type="text" id="displayName" name="displayName" class="required" title="" value="${model.displayName}"/>
@@ -20,14 +20,14 @@
 				</td>
 			</tr>
 			<tr>
-				<th><s:Locale code="userinfo.username" /> :</th>
+				<th><@locale code="userinfo.username" /> :</th>
 				<td>
 					<input readonly type="text" id="username" name="username" class="required" title="" value="${model.username}"/>
 					
 				</td>
 			</tr>
 			<tr>
-				<th><s:Locale code="access.security.newPassword" />:</th>
+				<th><@locale code="login.password.newPassword" />:</th>
 				<td>
 					<input type="password" id="password" name="password" class="required" title="" value=""/>
 					<b class="orange">*</b>
@@ -35,7 +35,7 @@
 				</td>
 			</tr>
 			<tr>
-				<th><s:Locale code="access.security.confirmPassword" />:</th>
+				<th><@locale code="login.password.confirmPassword" />:</th>
 				<td nowrap>
 					<input type="password" id="confirmPassword" name="confirmPassword" class="{ required: true, equalTo: '#newPassword' }" title="" value=""/>
 					<b class="orange">*</b>
@@ -45,7 +45,7 @@
 			<tr>
 				<td colspan="2"  class="center">
 					<input id="_method" type="hidden" name="_method"  value="post"/>
-		    		<input class="button" style="width:100px"  type="button"    id="submitBtn" value="<s:Locale code="button.text.save" />"/>
+		    		<input class="button" style="width:100px"  type="button"    id="submitBtn" value="<@locale code="button.text.save" />"/>
 					
 				</td>
 			</tr>

+ 0 - 64
maxkey-web-manage/src/main/resources/templates/views/userinfo/selectUserTypeList.jsp

@@ -1,64 +0,0 @@
-<%@ page   contentType="text/html; charset=UTF-8" import="java.util.Map,java.util.LinkedHashMap" %>
-<%@ taglib prefix="s"	uri="http://www.connsec.com/tags" %>
-<%@ taglib prefix="spring"		uri="http://www.springframework.org/tags" %>
-<%@ taglib prefix="c"			uri="http://java.sun.com/jsp/jstl/core"%>
-
-<script type="text/javascript">	
-	function statusFormatter(value, options, rData){
-		if(value==3){
-			return '<s:Locale code="common.text.status.3" />';
-		}else{
-			return '<s:Locale code="common.text.status.4" />';
-		}
-	};
-	
-	$(function () {
-		$("#selectBtn").on("click",function(){
-			var selectIds = $.gridSel("#list");
-			var rowData = $("#list").jqGrid("getRowData", selectIds);
-			selectIds=rowData.id;
-			if(selectIds == null || selectIds == "") {
-				$.alert({content:$.platform.messages.select.alertText});
-				return false;
-			}
-		 	$.forward("<s:Base/>/users/forwardAdd/"+selectIds);	
-		});
-	});
-</script>
-
-<div>
-
-</div>
-
-	<div id="tool_box">
-	 		<table   class="datatable">
- 				<tr>
-		 			<td width="120px"><s:Locale code="userinfo.userType.name"/>:</td>
-		 			<td width="374px">
-		 				<form id="basic_search_form">
-				 			<input type="text" name="name" style ="width:150px">
-				 			<input class="button primary"  id="searchBtn" type="button" size="50" value="<s:Locale code="button.text.search"/>">
-				 		</form>
-		 			</td>
-				 	<td colspan="2"> <div id="tool_box_right"  style="width: auto;">
-							<input class="button"   id="selectBtn" type="button" value="<s:Locale code="button.text.select"/>" >
-				 	</div>
-				 	</td>
-				</tr>
-			
-			</table>
- 	</div>
-
-	<div class="mainwrap" id="main">
-		<s:Grid id="list" url="/usertype/grid" multiselect="false" resize="true" >	
-			<s:Column width="0" field="id" title="id" hidden="true"/>
-			<s:Column width="300" field="name" title="userinfo.userType.name"/>
-			<s:Column width="300" field="description" title="common.text.description"/>
-			<s:Column width="50" field="status" title="common.text.status"  formatter="statusFormatter"/>
-			<s:Column width="0" field="createdBy" title="common.text.createdby" hidden="true"/>
-			<s:Column width="0" field="createdDate" title="common.text.createddate" hidden="true"/>
-			<s:Column width="0" field="modifiedBy" title="common.text.modifiedby" hidden="true"/>
-			<s:Column width="0" field="modifiedDate" title="common.text.modifieddate" hidden="true"/>
-		</s:Grid>
-			
-	</div>

+ 26 - 1
maxkey-web-maxkey/src/main/java/org/maxkey/MaxKeyApplication.java

@@ -1,15 +1,40 @@
 package org.maxkey;
 
+import java.util.Date;
+
+import javax.servlet.ServletException;
+
+import org.maxkey.web.InitApplicationContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.builder.SpringApplicationBuilder;
 import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.annotation.Bean;
 
 @SpringBootApplication
 public class MaxKeyApplication extends SpringBootServletInitializer {
+	private static final Logger _logger = LoggerFactory.getLogger(MaxKeyApplication.class);
 
+	@Bean
+	MaxKeyConfig MaxKeyConfig() {
+		return new MaxKeyConfig();
+	}
+	
 	public static void main(String[] args) {
-		SpringApplication.run(MaxKeyApplication.class, args);
+		ConfigurableApplicationContext  applicationContext =SpringApplication.run(MaxKeyApplication.class, args);
+		InitApplicationContext initWebContext=new InitApplicationContext(applicationContext);
+		try {
+			initWebContext.init(null);
+		} catch (ServletException e) {
+			e.printStackTrace();
+			_logger.error("",e);
+		}
+		_logger.info("MaxKey at "+new Date(applicationContext.getStartupDate()));
+		_logger.info("MaxKey Server Port "+applicationContext.getBean(MaxKeyConfig.class).getPort());
+		_logger.info("MaxKey started.");
 	}
 
 	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {

+ 13 - 0
maxkey-web-maxkey/src/main/java/org/maxkey/MaxKeyConfig.java

@@ -1,10 +1,23 @@
 package org.maxkey;
 
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.ImportResource;
+import org.springframework.context.annotation.PropertySource;
 
 @Configuration
 @ImportResource(locations={"classpath:spring/maxkey.xml"})
+@PropertySource("classpath:/application.properties")
 public class MaxKeyConfig {
+	@Value("${server.port:8080}")
+    private int port;
 
+	public int getPort() {
+		return port;
+	}
+
+	public void setPort(int port) {
+		this.port = port;
+	}
+	
 }

+ 1 - 1
maxkey-web-maxkey/src/main/resources/log4j2.xml

@@ -15,8 +15,8 @@
 		          <OnStartupTriggeringPolicy />
 		          <TimeBasedTriggeringPolicy />
 		          <SizeBasedTriggeringPolicy size="128 MB" />
-		          <DefaultRolloverStrategy max="100"/>
 		     </Policies>
+		     <DefaultRolloverStrategy max="100"/>
 		</RollingFile>
 	 </appenders>