struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ss2644@cornell.edu"<ss2...@cornell.edu>
Subject How to share tiles while using both struts 1 and struts 2 during migration?
Date Tue, 03 Oct 2017 18:31:49 GMT
Hello,

I have a struts app which uses both struts 1 and struts 2. While we are migrating slowly and
trying to remove all struts 1 stuff, we want to share tiles during the migration process across
both s1 and s2. While there is enough documentation demonstrating how to use various versions
of plug-ins and tiles library with either s1 or s2, I couldn't find an example that explains
how to configure and use various plug-ins simultaneously during migration.

 Currently I have the following tiles related config in the web.xml. I use both the struts
1 filter and struts 2 listener. I always get 404 errors when I use the same tile def from
struts 2.

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
                      http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
  version="3.0">

<context-param>
   <param-name>
      org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
   </param-name>
   <param-value>
      /WEB-INF/tiles-defs-.xml
   </param-value>
   </context-param>
   
  <filter>
    <filter-name>Tiles Filter</filter-name>
    <filter-class>org.apache.tiles.web.startup.TilesFilter</filter-class>
    <async-supported>true</async-supported>
  </filter>

  <filter-mapping>
    <filter-name>Tiles Filter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST,FORWARD,ASYNC</dispatcher>
  </filter-mapping>

   <listener>
   <listener-class>
      org.apache.struts2.tiles.StrutsTilesListener
   </listener-class>
   </listener>

Please let me know how to configure correctly so that I can use both s1 and s2 during migration
so that we can test functionality as we migrate each module.

Thanks,
Sai. 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message