[
https://issues.apache.org/struts/browse/WW-3078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45873#action_45873
]
Struts Integrator commented on WW-3078:
---------------------------------------
sounds complicated now .. will there be any solution for this? i'm not sure if
i should contact adobe on this ... i thought at least a workaround in terms of
replacing existing libs with latest jars was on the cards... seems like even
this is out of question now .. so does it mean to say that s2 will not run on
jrun4/cf mx 8?
> Struts 2 Tags not working in Coldfusion MX 8 (jrun base)server
> --------------------------------------------------------------
>
> Key: WW-3078
> URL: https://issues.apache.org/struts/browse/WW-3078
> Project: Struts 2
> Issue Type: Improvement
> Affects Versions: 2.0.11.2
> Environment: Coldfusion MX 8 on windows xp with struts 2
> Reporter: Struts Integrator
> Attachments: response.jsp, response3.jsp
>
>
> I have successfully integrated struts 2 with existing coldfusion mx 8 server.
> The
> action classes are invoked and executed. However the struts tags are not
> getting
> instantiated in my jsps.
> Steps i tried:
> - configuring wwwroot/web-inf/web.xml in coldfusion 8
> - adding relevant jars.
> - packaging struts 2 actions under '/extended' context since wwwroot is not
> supporting
> context.
> - placing 'struts.xml' under '../runtime/lib' since the struts.xml is not
> being
> recognized under '/wwwroot/web-inf/classes'
> All the jsps render and action executes my code. However, when i try using
> struts-tags
> like <s:form>,
> it throws an exception which looks like:
> 04/08 21:42:05 error Translator.CompilationFailedExceptionCompiler errors:
> Found 12 semantic errors compiling
> "C:/ColdFusion8/wwwroot/WEB-INF/jsp/jrun__pages__response32ejsp14.java":
> 64. org.apache.struts2.views.jsp.ui.FormTag _tag0 =
> (org.apache.struts2.views.jsp.ui.FormTag)
> pageContext.getTagHandlerInstance(0,org.apache.struts2.views.jsp.ui.FormTag.class);
> ^-----^
> *** Semantic Error: The class file "StrutsBodyTagSupport.class" in
> "C:\ColdFusion8\wwwroot\WEB-INF\lib\struts2-core-2.0.11.1.jar\org\apache\struts2\views
> \jsp" has an invalid format (bad string annotation constant).
> 64. org.apache.struts2.views.jsp.ui.FormTag _tag0 =
> (org.apache.struts2.views.jsp.ui.FormTag)
> pageContext.getTagHandlerInstance(0,org.apache.struts2.views.jsp.ui.FormTag.class);
>
> ^-------------------------------------^
> *** Semantic Error: Type "FormTag" was not found.
> .
> .
> 134. org.apache.struts2.views.jsp.ui.SubmitTag _tag3 =
> (org.apache.struts2.views.jsp.ui.SubmitTag)
> pageContext.getTagHandlerInstance(3,org.apache.struts2.views.jsp.ui.SubmitTag.class);
>
>
>
> ^---------------------------------------^
> *** Semantic Error: Type "SubmitTag" was not found.
> at jrunx.compiler.JavaCompiler.compile(JavaCompiler.java:135)
> at jrunx.compiler.JavaCompiler.compile(JavaCompiler.java:94)
> at jrun.jsp.Translator.compilePage(Translator.java:176)
> at jrun.jsp.Translator.translate(Translator.java:254)
> at jrun.jsp.Translator.translate(Translator.java:101)
> at jrun.jsp.JSPEngine.translateJSP(JSPEngine.java:707)
> at jrun.jsp.JSPServlet.translate(JSPServlet.java:125)
> at jrun.jsp.JSPServlet.service(JSPServlet.java:113)
> at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
> at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
> at
> jrun.servlet.JRunRequestDispatcher.invokeNext(JRunRequestDispatcher.java:584)
> at
> jrun.servlet.JRunRequestDispatcher.forwardInvoke(JRunRequestDispatcher.java:553)
> at jrun.servlet.JRunNamedDispatcher.forward(JRunNamedDispatcher.java:64)
> at coldfusion.license.JspLicenseServlet.service(Unknown Source)
> at
> coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
> at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
> at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
> at
> jrun.servlet.JRunRequestDispatcher.invokeNext(JRunRequestDispatcher.java:584)
> at
> jrun.servlet.JRunRequestDispatcher.forwardInvoke(JRunRequestDispatcher.java:553)
> at
> jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:201)
> at
> org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResul
> t.java:139)
> at
> org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:178
> )
> at
> com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.
> java:348)
> at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:25
> 3)
> .
> .
> I tried extracting the 'struts-tags.tld' and placing it in
> 'wwwroot/web-inf/lib' and defining in web.xml, but in vain. I also tried
> using the backported set of libraries but could not fix this problem.
> I believe this should go as a bug since creating a taglib directive does not
> throw error but the error is thrown when we use any of the struts tags.
> Thanks in advance
> Update:
> Here's my web.xml directive:
> <filter>
> <filter-name>struts2</filter-name>
>
> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
> </filter>
> <filter-mapping>
> <filter-name>struts2</filter-name>
> <!-- <url-pattern>*.action</url-pattern> -->
> <url-pattern>/*</url-pattern>
> </filter-mapping>
> <!-- tried using taglib explicitly by extracting struts core jar and placing
> the tld in the WEB-INF lib. Doesn't work either way -->
> <taglib>
> <taglib-uri>/WEB-INF/lib/struts-tags</taglib-uri>
> <taglib-location>/WEB-INF/lib/struts-tags.tld</taglib-location>
> </taglib>
> As said before, there are two lib folders one for JRUN to initialize
> coldfusion service which sits on top of it, i.e.,
> $CF_HOME/runtime/lib
> The actual coldfusion files could be placed anywhere outside or in
> $CF_HOME/wwwroot
> The above folder in turn contains WEB-INF folder and inside it would reside
> cfclasses, classes, lib et al
> Somehow placing the Struts.xml file along with the compiled classes in
> 'wwwroot/classes' folder wouldn't work. Neither it responds if we keep it in
> 'wwwroot/lib'
> However, the server recognizes Struts.xml placed inside
> '$CF_HOME/runtime/lib' and initializes it.
> My struts.xml directive looks like this:
> <struts>
> <include file="struts-default.xml"/>
> <constant name="struts.enable.DynamicMethodInvocation"
> value="false" />
> <constant name="struts.devMode" value="false" />
> <!--<package name="" namespace="/strutsTest" extends="struts-default">-->
> <package name="extnd" namespace="/extended" extends="struts-default">
> <action name="ACHAction" class="ach.action.ACHAction">
> <result>/achPages/achHome.jsp</result>
> </action>
> <action name="strutsTest" class="ach.action.ACHAction">
> <result>/pages/response3.jsp</result>
> </action>
> <action name="selfEmail" class="ach.action.ACHAction">
> <result>/pages/response.jsp</result>
> </action>
> </package>
> </struts>
> Apart from this, having a taglib directive of struts wouldn't affect the
> working of the action instances (as shown in response.jsp attached) but using
> the directive/tags simply wouldn't work (as shown in response3.jsp)
> This is a benchmark initiative for me as i'm assigned the task of seamlessly
> integrating struts 2 and coldfusion, since our complete previous code is done
> in cfm and we're now moving towards java across the organization. I could
> make struts 1.2 work seamlessly with coldfusion including the html, logic etc
> tags work, even in coldfusion pages. But i'm not sure whats different this
> time around.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.