Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
- <display-name>ezviewocean</display-name>
- <description>EZ-View Ocean</description>
- <context-param>
- <param-name> org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>
- <param-value>/WEB-INF/tiles.xml</param-value>
- </context-param>
- <listener>
- <listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
- </listener>
- <filter>
- <filter-name>struts-prepare</filter-name>
- <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
- </filter>
- <filter-mapping>
- <filter-name>struts-prepare</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
- <welcome-file-list>
- <welcome-file>login.jsp</welcome-file>
- </welcome-file-list>
- </web-app>
- <?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="/baseLayout.jsp">
- <put-attribute name="title" value="Template"/>
- <put-attribute name="header" value="/header.jsp"/>
- <put-attribute name="leftmenu" value="/leftmenu.jsp"/>
- <put-attribute name="body" value="/body.jsp"/>
- <put-attribute name="footer" value="/footer.jsp"/>
- </definition>
- <definition name="view" extends="baseLayout">
- <put-attribute name="title" value="View"/>
- <put-attribute name="body" value="/viewBody.jsp"/>
- </definition>
- <definition name="assign" extends="baseLayout">
- <put-attribute name="title" value="Assign"/>
- <put-attribute name="body" value="/assignBody.jsp"/>
- </definition>
- </tiles-definitions>
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE struts PUBLIC
- "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
- "http://struts.apache.org/dtds/struts-2.3.dtd">
- <struts>
- <constant name="struts.enable.DynamicMethodInvocation" value="false" />
- <constant name="struts.devMode" value="true"/>
- <constant name="struts.custom.i18n.resources" value="ApplicationResources"/>
- <package name="default" extends="struts-default" namespace="/">
- <result-types>
- <result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult"/>
- </result-types>
- <action name="login" method="execute"
- class="com.schenker.ocean.actions.LoginAction">
- <result name="success" type="tiles">baseLayout</result>
- <result name="input">/login.jsp</result>
- <result name="fail">/login.jsp</result>
- </action>
- </package>
- </struts>
- <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
- <!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=UTF-8">
- <title><tiles:insertAttribute name="title" ignore="true" />
- </title>
- </head>
- <body>
- <tiles:insertAttribute name="header" /><br/>
- <hr/>
- <tiles:insertAttribute name="leftMenu" /><br/>
- <hr/>
- <tiles:insertAttribute name="body" /><br/>
- <hr/>
- <tiles:insertAttribute name="footer" /><br/>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement