--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!DOCTYPE tiles-definitions PUBLIC
+ "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
+ "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
+
+<tiles-definitions>
+
+<definition name="baseLayout" template="/WEB-INF/layout/baseLayout.jsp">
+ <put-attribute name="title" value="" type="string"/>
+ <put-attribute name="menu_bar" value="/jsp/menubar.jsp"/>
+ <put-attribute name="title_bar" value="/jsp/titlebar.jsp"/>
+ <put-attribute name="tool_bar" value="/jsp/toolbar.jsp"/>
+ <put-attribute name="left_menus" value="/jsp/menuitem.jsp"/>
+ <put-attribute name="presentation_pane" value="/jsp/presentationpane.jsp"/>
+</definition>
+
+<definition name="page.login" template="/WEB-INF/layout/layoutLogin.jsp">
+ <put-attribute name="title" value="Login" type="string"/>
+ <put-attribute name="menu_bar" value="/jsp/menubar.jsp"/>
+ <put-attribute name="presentation_pane" value="/jsp/login.jsp"/>
+</definition>
+
+</tiles-definitions>
\ No newline at end of file
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
+
+ <!-- ======================================================== -->
+ <!-- Struts2 and Tiles interaction -->
+ <!-- ======================================================== -->
+
+ <context-param>
+ <param-name>
+ org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
+ </param-name>
+ <param-value>
+ /WEB-INF/tiles/tiles-defs.xml
+ </param-value>
+ </context-param>
+
+ <listener>
+ <listener-class>
+ org.apache.struts2.tiles.StrutsTilesListener
+ </listener-class>
+ </listener>
</web-app>
--- /dev/null
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
+ pageEncoding="ISO-8859-1"
+%><%@
+ taglib prefix="s" uri="/struts-tags"
+%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <link href=<s:url value="/skin/default.css"/> rel="stylesheet" type="text/css">
+ </head>
+ <body>
+ <p>Simple body text</p>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
+<%@ taglib prefix="s" uri="/struts-tags"%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <title>
+ <tiles:insertAttribute name="title" ignore="true" />
+ </title>
+ <link href=<s:url value="/skin/default.css"/> rel="stylesheet" type="text/css">
+</head>
+
+<body> <!-- onLoad="document.login.username.focus();" -->
+
+ <!-- Menu-bar -->
+
+ <tiles:insertAttribute name="menu_bar" />
+ <div id=top-spacer>
+ </div>
+
+ <!-- Login dialog -->
+ <div id=right-pane>
+ <tiles:insertAttribute name="presentation_pane" ignore="true" />
+ </div>
+
+</body>
+</html>
\ No newline at end of file
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"
-%><%@
- taglib prefix="s" uri="/struts-tags"
-%>
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
+<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<% String menu = request.getParameter("backMenu"); // Last active menu
-%>
-<s:set var="menu"><%=menu%></s:set>
-<html>
-
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Login</title>
- <link href=<s:url value="/skin/default.css"/> rel="stylesheet" type="text/css">
- </head>
-
- <body onLoad="document.login.username.focus();">
-
-<!-- Menu-bar
- -->
- <jsp:include page="/jsp/menubar.jsp">
- <jsp:param name="login" value="disabled" />
- <jsp:param name="menu" value="none" />
- </jsp:include>
- <div id=top-spacer></div>
-
-<!-- Login dialog
- -->
- <div id=right-pane>
- <div id=article-box>
- <div id=section><s:text name="title.login"/></div>
- <table width=100% border="0" cellpadding="0" cellspacing="0">
- <tr height=10><td></td></tr>
- <tr>
- <td align=center>
- <s:form action="login" namespace="/">
- <tr class="error">
- <td colspan=2><s:text name="%{errorCode}"/></td>
- </tr>
- <s:set var="valid"><s:text name="menu.login"/></s:set>
- <s:textfield name="username" key="field.username" required="true" />
- <s:password name="password" key="field.password" />
- <s:hidden name="backMenu" value="%{menu}" />
- <s:submit type="button" value="%{valid}" />
- </s:form>
- </td>
- </tr>
- <tr height=10><td></td></tr>
- </table>
- </div>
- </div>
-
- </body>
-
-</html>
\ No newline at end of file
+<div id=article-box>
+ <div id=section>
+ <s:text name="title.login" />
+ </div>
+ <table width=100% border="0" cellpadding="0" cellspacing="0">
+ <tr height=10>
+ <td></td>
+ </tr>
+ <tr>
+ <td align=center><s:form action="login" namespace="/">
+ <tr class="error">
+ <td colspan=2><s:text name="%{errorCode}" /></td>
+ </tr>
+ <s:set var="valid">
+ <s:text name="menu.login" />
+ </s:set>
+ <s:textfield name="username" key="field.username" required="true" />
+ <s:password name="password" key="field.password" />
+ <!--s:hidden name="backMenu" value="%{menu}" /-->
+ <s:submit type="button" value="%{valid}" />
+ </s:form></td>
+ </tr>
+ <tr height=10>
+ <td></td>
+ </tr>
+ </table>
+</div>
\ No newline at end of file
</package>
<package name="default" namespace="/" extends="simer-default">
+
+ <result-types>
+ <result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult" />
+ </result-types>
<default-action-ref name="index" />
<result name="open" type="redirectAction">select?menu=search</result>
<result name="study" type="redirectAction">study/step-study</result>
<result name="knowledge" type="redirectAction">study/step-knowledge</result>
- <result name="input">/login.jsp</result>
+ <!--result name="input">/login.jsp</result-->
+ <result name="input" type="tiles">page.login</result>
<result name="error">/home.jsp?error=login</result>
</action>
<action name="logout" class="connectionAction" method="logout">