Did you see Antonio's post about how it's probably a bug in Tiles?!

Seems like it would be quite a bit easier to try his idea than all this.

--- Martin Gainty <[EMAIL PROTECTED]> wrote:

> Good Afternoon Michael
> 
> I just ran thru the scenario you described on a 'healthy' jsp page and see
> this debug output:
> 03-07 12:58:52,718 DEBUG
>
(org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor:1
> 34) - Validating /tags/non-ui/actionTag/form with method execute.
> 2000-03-07 12:58:52,734 DEBUG
> (org.apache.struts2.dispatcher.ServletDispatcherResult:113) - Forwarding to
> location /tags/non-ui/iteratorTag/done.jsp
> [GC [DefNew: 3968K->0K(4032K), 0.0108816 secs] 49623K->47040K(68568K),
> 0.0109704 secs]
> [GC [DefNew: 3968K->0K(4032K), 0.0168407 secs] 51008K->48964K(68568K),
> 0.0169301 secs]
> 2000-03-07 12:58:52,906 DEBUG (org.apache.struts2.components.UIBean:526) -
> Rendering template /template/xhtml/a
> 2000-03-07 12:58:52,921 DEBUG
> (org.apache.struts2.components.template.FreemarkerTemplateEngine:135) -
> Rendering template /template/simple/a.ftl
> [GC [DefNew: 3968K->0K(4032K), 0.0051196 secs] 52932K->49117K(68568K),
> 0.0052029 secs]
> 2000-03-07 12:58:52,937 DEBUG (org.apache.struts2.components.UIBean:526) -
> Rendering template /template/xhtml/a-close
> 2000-03-07 12:58:52,953 DEBUG
> (org.apache.struts2.components.template.FreemarkerTemplateEngine:135) -
> Rendering template /template/simple/a-close.ftl
> 2000-03-07 12:58:52,953 DEBUG
> (org.apache.struts2.dispatcher.ActionContextCleanUp:122) - skipping cleanup
> counter=1
> [GC [DefNew: 3966K->0K(4032K), 0.0038605 secs] 53083K->49280K(68568K),
> 0.0039430 secs]
> [GC [DefNew: 3968K->0K(4032K), 0.0232088 secs] 53248K->52251K(68568K),
> 0.0232965 secs]
> [GC [1 CMS-initial-mark: 52251K(64536K)] 52251K(68568K), 0.0012270 secs]
> [CMS-concurrent-mark: 0.361/0.361 secs]
> 
> to repeat the scenario-
> deploy struts2-showcase-2.0.11 to TC (its a monster so this will take a
> while..)
> vi /tags/non-ui/actionTag/showActionTagDemo.jsp
> add these lines to showActionTagDemo.jsp
> 
> <!-- This is a quick test for Michael to see if flush="false" causes close
> of socket -->
> <div style="margin: 5px; margin: 5px; border: solid 1px; ">
> <tiles:insertAttribute name="body" flush="false"/>
> <s:action name="form" executeResult="true" flush="false"
> ignoreContextParams="true"/>
> </div>
> <!-- end quick test for Michael-->
> 
> add these configuration lines to /WEB-INF/classes/struts-tags-non-ui.xml to
> configure in a 'healthy' action class and a result
>          <action name="form" class="tmjee.testing.ActionTagAction">
>           <result name="done">/tags/non-ui/iteratorTag/done.jsp</result>
>          </action>
> 
> insert the following jsp to /tags/non-ui/iteratorTag/date.jsp
> <[EMAIL PROTECTED] prefix="s" uri="/struts-tags" %>
> <html>
> <head>
> <title>This is done.jsp</title>
> </head>
> <body>
> <p>This is done.jsp</p>
> </body>
> </html>
> 
> in a scratch folder create the necessary ActionTagDemo folder
> use the following build.xml for building with
> ant compile
> 
> <?xml version="1.0"?>
> <project name="struts2-core" default="default">
> 
>   <!-- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -->
>   <!--                   directories                     -->
>   <!-- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -->
>   <property name="src.dir" value="src/core/src/main/java"/>
>   <property name="build.dir" value="build"/>
>   <property name="build.classes.dir" value="${build.dir}/classes"/>
>   <property name="dist.dir" value="dist"/>
>   <property name="lib.dir" value="F:\struts\struts-2.0.11\lib"/>
> 
>   <!-- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -->
>   <!--                    paths                          -->
>   <!-- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -->
>   <path id="compile.classpath">
>     <pathelement
> location="/struts/struts-2.0.11/lib/struts2-core-2.0.11.jar"/>
>     <pathelement location="/struts/struts-2.0.11/lib/xwork-2.0.4.jar"/>
>     <pathelement location="${build.classes.dir}"/>
>     <pathelement location="/xwork/xwork-2.0.4/build/classes"/>
>     <pathelement location="/struts/struts-2.0.11/src/core/src/main/java"/>
>     <pathelement location="/APT"/>
>     <pathelement location="/dwr"/>
>     <pathelement
> location=":/SPRING/spring-framework-2.0.6/target/mock-classes"/>
>     <pathelement location="/commons-fileupload/commons-fileupload-1.1.1"/>
>     <pathelement location="/Velocity/classes"/>
>     <pathelement location="/JSF-Portlet/jsf-portlet/WEB-INF/classes" />
>     <pathelement location="/testng/testng-5.7/build/jdk15"/>
>     <pathelement location="/Junit/junit3.8.1/junit.jar"/>
>     <!-- pathelement
>
location="/struts/struts2-showcase-2.0.11/apps/struts2-showcase-2.11/WEB-INF
> /lib/struts-core-2.0.5.jar"/ -->
>     <!-- pathelement
> location="/struts/struts-2.0.11/lib/struts2-tiles-plugin-2.0.11.jar"/ -->
>     <pathelement location="/J2EE142/lib/j2ee.jar"/>
>     <pathelement location="/Log4J/LOGGIN~1.10/dist/lib/log4j-1.2.10.jar"/>
>     <pathelement
> location="/SPRING/SPRING~1.5/SPRING~1.5-W/SPRING~1.5/dist/spring.jar"/>
>     <fileset dir="${lib.dir}">
>       <!-- include name="**/*.jar" / -->
>     </fileset>
>   </path>
> 
>   <!-- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -->
>   <!--                  targets                          -->
>   <!-- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -->
>   <target name="default"
>           depends="dist"
>           description="default: build everything"
>   />
> 
>   <target name="clean" description="remove all built files">
>     <delete dir="${build.dir}" />
>     <delete dir="${dist.dir}" />
>   </target>
> 
>   <target name="dist"
>           depends="compile"
>           description="create distributables (jars etc)">
>     <mkdir dir="${dist.dir}" />
>     <jar jarfile="${dist.dir}/struts2-core.jar">
>       <fileset dir="${build.classes.dir}"/>
>     </jar>
>   </target>
>   <target name="compile" description="compile java">
>     <mkdir dir="classes" />
>     <javac srcdir="${build.dir}/struts/struts-2.0.11/ActionTagAction"
>            destdir="classes"
>            classpathref="compile.classpath"
>            debug="on"
>            deprecation="on"/>
>   </target>
> </project>
> 
> then edit in the following Action java file
> /tmjee/testing/ActionTagAction.java
> 
> package tmjee.testing;
> import com.opensymphony.xwork2.ActionSupport;
> import org.apache.struts2.ServletActionContext;
> import java.lang.*;
> public class ActionTagAction extends ActionSupport
> {
>  public String execute() throws Exception {
>      return "done";
>  }
>  public String doDefault() throws Exception {
>      ServletActionContext.getRequest().setAttribute("stringByAction", "This
> is a String put in by the action's doDefault()");
>      return "done";
>  }
> }
> 
> ant compile
> copy the compiled classes to Tomcat struts2-showcase-2.0.11
> copy /tmjee/testing*.class
> $TOMCAT_HOME/webapps/struts2-showcase-2.0.11/WEB-INF/classes/tmjee/testing
> 
> go to TC Manager
> reload the web application so TC container will re-read the configuration
> for struts2-showcase-2.0.11
> http://localhost:8080/manager/html/reload?path=/struts2-showcase-2.0.11
> 
> now reference the affected jsp
>
http://localhost:8080/struts2-showcase-2.0.11/tags/non-ui/actionTag/showActi
> onTagDemo.action
> 
> please verify that you see
> 
> This is done.jsp
> 
> at the bottom of page
> 
> Caveat: This is a base test to see if
> <tiles:insertAttribute name="body" flush="false"/>
> <s:action name="form" executeResult="true" flush="false"
> ignoreContextParams="true"/>
> to determine if tiles:insertAttribute and s:action work without closing the
> socket streams..
> 
> I did'nt test out different freemarker templates or combinations
> If possible could you provide any or details for
> The action class you are implementing
> The full jsp you are using for view
> *Any/all* freemarker templates (*.ftl) you are implementing
> configuration files
> (web.xml,struts.xml,struts-validation.xml,struts-tags-non-ui.xml...)
> 
=== message truncated ===


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to