Struts framework with Weblogic.


EJB programming & troubleshooting: Struts framework with Weblogic.

  1. Struts framework with Weblogic. (2 messages)

    I now need to use the Struts framework with Weblogic 6.0 , 7.0. I guess Struts 1.0.3 is a stable version which I should use(->comments?).

    Could anyone guide me with the steps to setup struts with WL 6.0, 7.0 and test the setup.

    I require to call the EJBs also.. how do these fit in the struts framework.

  2. Its another Web Application, Nothing specific.

    1) download struts jar files into your WEB-INF/lib directory
    2) Create struts-config.xml and add your directives
    3) Create web.xml and weblogic.xml as required for your web application
    4) Make sure .tld files are in the right place
    5) Develop/Deploy your EJB files to the container ( you can use console )
    6) Look at for Developer docs and FAQs
    7) on how to deploy your web application
  3. Hi!!!
    I am trying to invoke an EJB from the Action class. However, the perform method is not called - the println's do not show up on the server console nor is any error thrown.

    ---------<<!-- ========== Form Bean Definitions ================= -->

        <form-bean name="submitForm"


      <!-- ========== Action Mapping Definitions ============ -->

        <action path="/submit"
        <forward name="success" path="/submit.jsp"/>
        <forward name="failure" path="/submit.jsp"/>



    -------< public ActionForward perform(ActionMapping mapping,
          ActionForm form,
          HttpServletRequest request,
          HttpServletResponse response)throws IOException, ServletException {
    System.out.println("perform called !!!");
        SubmitForm f = (SubmitForm) form; // get the form bean
        // and take the last name value
        String lastName = f.getLastName();
        // Translate the name to upper case
        //and save it in the request object
        request.setAttribute("lastName", lastName.toUpperCase());
    /***** Calling EJB ***************************/

    String op="";
      try {
    System.out.println("getting initial context");
        Context ctx = getInitialContext();
    System.out.println("initial context got !!");
        DemoHome home = (DemoHome) ctx.lookup("Demo");
    System.out.println("home got !!");
    Demo ac = null;
        try {
          ac = (Demo) home.create();
    System.out.println("create called!!");
    if (ac==null)
    System.out.println("ac is null!");
        catch (Exception ee) {
    System.out.print("exception 1");
    System.out.println("going to call method!");
    if (ac!= null)
    op = ac.demoSelect();
    System.out.println("ac is null->error!!");
    //out.println("string got!!");
        catch (Exception e) {
    System.out.println("error 2");
        // Forward control to the specified success target
        return (mapping.findForward("success"));

    What is wrong???