diff --git a/pom.xml b/pom.xml index 940b7b19..de685914 100644 --- a/pom.xml +++ b/pom.xml @@ -1,162 +1,173 @@ - - UTF-8 - 3.0.5.RELEASE - C:\Program Files (x86)\Java\jdk1.6 - - - - default-tools.jar - - - java.vendor - Sun Microsystems Inc. - - - - - com.sun - tools - 1.5.0 - system - ${java.home}/lib/tools.jar - - - - - 4.0.0 - bench4q-web - bench4q-web - war - 0.0.1-SNAPSHOT - bench4q-web Maven Webapp - http://maven.apache.org - - - junit - junit - 3.8.1 - test - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + UTF-8 + 3.0.5.RELEASE + C:\Program Files (x86)\Java\jdk1.6 + + + + default-tools.jar + + + java.vendor + Sun Microsystems Inc. + + + + + com.sun + tools + 1.5.0 + system + ${java.home}/lib/tools.jar + + + + + 4.0.0 + bench4q-web + bench4q-web + war + 0.0.1-SNAPSHOT + bench4q-web Maven Webapp + http://maven.apache.org + + + junit + junit + 3.8.1 + test + - - javassist - javassist - 3.11.0.GA - - - org.apache.struts.xwork - xwork-core - 2.3.15.1 - - - org.springframework - spring-core - 3.2.3.RELEASE - - - org.springframework - spring-web - 3.2.3.RELEASE - - - org.springframework - spring-webmvc - 3.2.3.RELEASE - - - org.eclipse.jetty - jetty-server - 8.1.11.v20130520 - - - org.eclipse.jetty - jetty-servlet - 8.1.11.v20130520 - - - commons-fileupload - commons-fileupload - 1.3 - - - asm - asm - 3.3 - - - org.springframework - spring-context - 3.2.3.RELEASE - - - org.apache.struts - struts2-core - 2.3.15.1 - - - struts - struts - 1.2.8 - - - javax.persistence - persistence-api - 1.0.2 - - - org.springframework - spring-context-support - 3.2.3.RELEASE - - - org.springframework - spring-beans - 3.2.3.RELEASE - - - net.sf.json-lib - json-lib - 2.3 - jdk15 - + + javassist + javassist + 3.11.0.GA + + + org.apache.struts.xwork + xwork-core + 2.3.15.1 + + + org.springframework + spring-core + 3.2.3.RELEASE + + + org.springframework + spring-web + 3.2.3.RELEASE + + + org.springframework + spring-webmvc + 3.2.3.RELEASE + + + org.eclipse.jetty + jetty-server + 8.1.11.v20130520 + + + org.eclipse.jetty + jetty-servlet + 8.1.11.v20130520 + + + commons-fileupload + commons-fileupload + 1.3 + + + asm + asm + 3.3 + + + org.springframework + spring-context + 3.2.3.RELEASE + + + org.apache.struts + struts2-core + 2.3.15.1 + + + struts + struts + 1.2.8 + + + javax.persistence + persistence-api + 1.0.2 + + + org.springframework + spring-context-support + 3.2.3.RELEASE + + + org.springframework + spring-beans + 3.2.3.RELEASE + + + net.sf.json-lib + json-lib + 2.3 + jdk15 + - - commons-beanutils - commons-beanutils - 1.7.0 - - - commons-lang - commons-lang - 2.5 - - - commons-logging - commons-logging - 1.1.1 - - - net.sf.ezmorph - ezmorph - 1.0.6 - - - commons-collections - commons-collections - 3.2.1 - - + + commons-beanutils + commons-beanutils + 1.7.0 + + + commons-lang + commons-lang + 2.5 + + + commons-logging + commons-logging + 1.1.1 + + + net.sf.ezmorph + ezmorph + 1.0.6 + + + commons-collections + commons-collections + 3.2.1 + + + jstl + jstl + 1.2 + + + taglibs + standard + 1.1.2 + runtime + + - - - - - bench4q-web - + + + + + bench4q-web + diff --git a/src/main/java/org/bench4q/web/controller/AuthorizeActionController.java b/src/main/java/org/bench4q/web/controller/AuthorizeActionController.java index 2dadb8da..04140806 100644 --- a/src/main/java/org/bench4q/web/controller/AuthorizeActionController.java +++ b/src/main/java/org/bench4q/web/controller/AuthorizeActionController.java @@ -17,6 +17,7 @@ import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.SessionAttributes; +import org.springframework.web.servlet.ModelAndView; @Controller @SessionAttributes({ "rtmsg", "accessToken", "username" }) @@ -68,21 +69,21 @@ public class AuthorizeActionController extends BaseActionController { } @RequestMapping("adminlogin.do") - public String adminlogin(UserModel user, ModelMap model) + public ModelAndView adminlogin(UserModel user, ModelMap model) throws IOException, JAXBException { System.out.println("enter admin authorize"); AuthorizeResponseModel authorizeResponseModel = authorize(user); if (authorizeResponseModel.isSuccess()) { System.out.println("success"); - model.addAttribute("accessToken", - authorizeResponseModel.getAccessToken()); - return "admin"; + Map attrMap = new HashMap(); + attrMap.put("userName", user.getUsername()); + attrMap.put("accessTocken", authorizeResponseModel.getAccessToken()); + return new ModelAndView("admin", attrMap); } else { model.addAttribute("rtmsg", "somthing is wrong with the password, please try again."); - return "adminlogin"; + return new ModelAndView("adminlogin", null); } } - } diff --git a/src/main/webapp/WEB-INF/bench4qweb-servlet.xml b/src/main/webapp/WEB-INF/bench4qweb-servlet.xml index 1f0bb24b..d28dab1a 100644 --- a/src/main/webapp/WEB-INF/bench4qweb-servlet.xml +++ b/src/main/webapp/WEB-INF/bench4qweb-servlet.xml @@ -1,21 +1,21 @@ - - - - - - - - - - - + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 663923ea..26f5e29c 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -1,26 +1,25 @@ - - - bench4qweb - - - contextConfigLocation - /WEB-INF/bench4qweb-servlet.xml - - - org.springframework.web.context.ContextLoaderListener - - - bench4qweb - org.springframework.web.servlet.DispatcherServlet - - 1 - - - - bench4qweb - *.do - + + + bench4qweb + + + contextConfigLocation + /WEB-INF/bench4qweb-servlet.xml + + + org.springframework.web.context.ContextLoaderListener + + + bench4qweb + org.springframework.web.servlet.DispatcherServlet + + 1 + + + + bench4qweb + *.do + \ No newline at end of file diff --git a/src/main/webapp/admin.html b/src/main/webapp/admin.html deleted file mode 100644 index 422163c1..00000000 --- a/src/main/webapp/admin.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/main/webapp/admin.jsp b/src/main/webapp/admin.jsp index 769e10dc..53aa5f7e 100644 --- a/src/main/webapp/admin.jsp +++ b/src/main/webapp/admin.jsp @@ -1,168 +1,200 @@ -<%@page language="java" contentType="text/html; charset=GBK" pageEncoding="GBK"%> -<%@taglib prefix="s" uri="/struts-tags"%> - - - - - - -Bench4Q - - - - - - - - - - - - - - -
- - -
-
-
-
-

Bench4Q is a new methodology for QoS benchmarking

-
-
-
-
- -
-
-
-
-
-
- Load generator pool management -
-
-
-

-

-

-

-
-
- -
-
- - -
-
- -
-
-
-
-
-
-
-
-
- Script ports management -
-
-
- -
- -
- -
-
- -
-
- -
- -
-
-
-
-
- - - - - -
- -
- - - +<%@page contentType="text/html"%> +<%@ page isELIgnored="false"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> + + + + +Admin Page + + + + + + + + + + + + +
+
+ + + + + + + + +
+ + + +
+ +
+ +
+
+
+

+ Agents +

+
+ + +
+
+
+ + + + + + + + + + + + +
HostNameIDPortStatusMaxLoad
+
+
+ + +
+ + +
+ +
+ + + +
+ + + +
+

© Bench4Q 2013

+

Powered by: Bench4Q

+
+ +
+ + + + + \ No newline at end of file diff --git a/src/main/webapp/adminlogin.html b/src/main/webapp/adminlogin.jsp similarity index 100% rename from src/main/webapp/adminlogin.html rename to src/main/webapp/adminlogin.jsp