Advertisement
Guest User

Untitled

a guest
Oct 1st, 2014
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.59 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <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">
  3. <display-name>ezviewocean</display-name>
  4. <description>EZ-View Ocean</description>
  5. <context-param>
  6. <param-name> org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>
  7. <param-value>/WEB-INF/tiles.xml</param-value>
  8. </context-param>
  9. <listener>
  10. <listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
  11. </listener>
  12. <filter>
  13. <filter-name>struts-prepare</filter-name>
  14. <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
  15. </filter>
  16. <filter-mapping>
  17. <filter-name>struts-prepare</filter-name>
  18. <url-pattern>/*</url-pattern>
  19. </filter-mapping>
  20.  
  21. <welcome-file-list>
  22. <welcome-file>login.jsp</welcome-file>
  23. </welcome-file-list>
  24. </web-app>
  25.  
  26. <?xml version="1.0" encoding="UTF-8" ?>
  27.  
  28. <!DOCTYPE tiles-definitions PUBLIC
  29. "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
  30. "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
  31.  
  32. <tiles-definitions>
  33.  
  34. <definition name="baseLayout" template="/baseLayout.jsp">
  35. <put-attribute name="title" value="Template"/>
  36. <put-attribute name="header" value="/header.jsp"/>
  37. <put-attribute name="leftmenu" value="/leftmenu.jsp"/>
  38. <put-attribute name="body" value="/body.jsp"/>
  39. <put-attribute name="footer" value="/footer.jsp"/>
  40. </definition>
  41.  
  42. <definition name="view" extends="baseLayout">
  43. <put-attribute name="title" value="View"/>
  44. <put-attribute name="body" value="/viewBody.jsp"/>
  45. </definition>
  46.  
  47. <definition name="assign" extends="baseLayout">
  48. <put-attribute name="title" value="Assign"/>
  49. <put-attribute name="body" value="/assignBody.jsp"/>
  50. </definition>
  51.  
  52. </tiles-definitions>
  53.  
  54. <?xml version="1.0" encoding="UTF-8" ?>
  55.  
  56. <!DOCTYPE struts PUBLIC
  57. "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
  58. "http://struts.apache.org/dtds/struts-2.3.dtd">
  59.  
  60. <struts>
  61. <constant name="struts.enable.DynamicMethodInvocation" value="false" />
  62. <constant name="struts.devMode" value="true"/>
  63. <constant name="struts.custom.i18n.resources" value="ApplicationResources"/>
  64.  
  65.  
  66. <package name="default" extends="struts-default" namespace="/">
  67. <result-types>
  68. <result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult"/>
  69. </result-types>
  70. <action name="login" method="execute"
  71. class="com.schenker.ocean.actions.LoginAction">
  72. <result name="success" type="tiles">baseLayout</result>
  73. <result name="input">/login.jsp</result>
  74. <result name="fail">/login.jsp</result>
  75. </action>
  76. </package>
  77. </struts>
  78.  
  79. <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
  80. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  81. "http://www.w3.org/TR/html4/loose.dtd">
  82. <html>
  83.  
  84. <head>
  85. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  86. <title><tiles:insertAttribute name="title" ignore="true" />
  87. </title>
  88. </head>
  89.  
  90. <body>
  91. <tiles:insertAttribute name="header" /><br/>
  92. <hr/>
  93. <tiles:insertAttribute name="leftMenu" /><br/>
  94. <hr/>
  95. <tiles:insertAttribute name="body" /><br/>
  96. <hr/>
  97. <tiles:insertAttribute name="footer" /><br/>
  98. </body>
  99. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement