2 Replies Latest reply on Mar 15, 2006 11:57 AM by jmix2006

    Problem with Jbpm 3.1 and struts

      I am trying to develop a web application with jbpm (i am using struts) .
      My probleme :
      i have 3 jsp page : login.jsp---->task.jsp
      ---->error.jsp

      i have made in a method exexute of Loginaction a simple code :
      _____________________________________________________
      FormBean userbean =(FormBean) form;
      String userName=userbean.getUsername();
      JbpmContext.getCurrentJbpmContext().setActorId(userName);
      return (mapping.findForward("succes");
      _____________________________________________________

      the error is in 3 line .

      did my code is correct???
      i wait for your response...
      Thanks

        • 1. Re: Problem with Jbpm 3.1 and struts
          akakunin

          Seems you have no current jbpm context - it should be initially created.

          In web-application example (you can find it in jbpm sources) this is done by org.jbpm.web.JbpmContextFilter - just configure your web-application to use it in your web.xml:

          <filter>
           <filter-name>JbpmContextFilter</filter-name>
           <filter-class>org.jbpm.web.JbpmContextFilter</filter-class>
           </filter>
           <filter-mapping>
           <filter-name>AuthenticationFilter</filter-name>
           <url-pattern>/*</url-pattern>
           </filter-mapping>
          


          Hope it helps!

          • 2. Re: Problem with Jbpm 3.1 and struts

            Thanks for your help .