0 Replies Latest reply on Apr 9, 2009 1:32 AM by cold_start

    Struts 2 Integration problem witn Coldfusion in CF 8 MX server


      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\js p" 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(ServletDispatcherResult.j ava:139)
          at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:178)
          at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.jav a:348)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)
      .
      .

       

      I tried extracting the 'struts-tags.tld' and placing it in 'wwwroot/web-inf/lib' and defining in web.xml, but in vain. Please help me out with this issue.

       

      Thanks in advance