4 Replies Latest reply on Nov 8, 2006 9:46 AM by Pete Muir

    Seam and tomahawk-sandbox graphicimagedynamic

    Fredrik Newbie

      Hi!

      I am trying to use the graphicimagedynamic component of sandbox togheter with Seam. the graphicimagedynamic uses a ImageRenderer where the FacesContext is set using:

      public void setContext(FacesContext facesContext, ResourceContext imageContext) throws IOException

      The problem is that when facesContext.getApplication() is called it is null.
      IF I then try with the Seam context Contexts.getApplicationContext() or Contexts.getSessionContext() it is also null in the renderer.

      Has anybody a solution for this problem. Or any other working method of diplaying a dynamic image in a web page using seam and jsf.?

      /F

        • 1. Re: Seam and tomahawk-sandbox graphicimagedynamic
          Pete Muir Master

          http://jroller.com/page/pmuir?entry=dynamicimagecomponent_for_jsf

          And, as pointed out, A4J has a component as well. I would steer clear of tomahawk where possible and especially sandbox.

          • 2. Re: Seam and tomahawk-sandbox graphicimagedynamic
            Fredrik Newbie

             

            "petemuir" wrote:
            http://jroller.com/page/pmuir?entry=dynamicimagecomponent_for_jsf

            And, as pointed out, A4J has a component as well. I would steer clear of tomahawk where possible and especially sandbox.



            Thanks for your reply!
            I have tried the A4J component, but I always get an Application context not available when using it with seam.

            I have also tried your component, but I am not using faclets so I did a taglib to work with jsp/jsf (seam) but I get exceptions about missing metohds, and more.. I will try to post the stacktrace..

            /F

            • 3. Re: Seam and tomahawk-sandbox graphicimagedynamic
              Fredrik Newbie

               

              "frehan" wrote:
              "petemuir" wrote:
              http://jroller.com/page/pmuir?entry=dynamicimagecomponent_for_jsf

              And, as pointed out, A4J has a component as well. I would steer clear of tomahawk where possible and especially sandbox.



              Thanks for your reply!
              I have tried the A4J component, but I always get an Application context not available when using it with seam.

              I have also tried your component, but I am not using faclets so I did a taglib to work with jsp/jsf (seam) but I get exceptions about missing metohds, and more.. I will try to post the stacktrace..

              /F





              Stacktrace:


              2006-11-08 14:47:35,406 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/camitzadmin].[jsp]] Servlet.service() for servlet jsp threw exception
              org.apache.jasper.JasperException: Unable to compile class for JSP

              An error occurred at line: 99 in the jsp file: /app/imageUpload.jsp
              Generated servlet error:
              The method setPageContext(PageContext) is undefined for the type DynamicImageComponent

              An error occurred at line: 99 in the jsp file: /app/imageUpload.jsp
              Generated servlet error:
              The method setParent(UIComponent) in the type UIComponentBase is not applicable for the arguments (Tag)

              An error occurred at line: 99 in the jsp file: /app/imageUpload.jsp
              Generated servlet error:
              The method doStartTag() is undefined for the type DynamicImageComponent

              Generated servlet error:
              The method doEndTag() is undefined for the type DynamicImageComponent

              Generated servlet error:
              The method reuse(Tag) in the type TagHandlerPool is not applicable for the arguments (DynamicImageComponent)

              Generated servlet error:
              The method reuse(Tag) in the type TagHandlerPool is not applicable for the arguments (DynamicImageComponent)


              at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
              at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
              at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:414)
              at org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
              at org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
              at org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
              at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
              at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
              at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
              at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
              at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
              at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
              at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
              at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:416)
              at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
              at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:59)
              at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:59)
              at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:101)
              at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:197)
              at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
              at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
              at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
              at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
              at java.lang.Thread.run(Thread.java:595)

              • 4. Re: Seam and tomahawk-sandbox graphicimagedynamic
                Pete Muir Master

                I believe you would need to write a Tag file for it as well but I've never developed tags for JSP.