6 Replies Latest reply: Mar 2, 2012 9:19 AM by 919013 RSS

    Blank Page Displayed on Struts Action Call

      I am new to JDeveloper and Struts, and I am currently haveing an issue with my Java EE Web Application. The application is in JDeveloper 11g with a web component, an EJB component, uses Struts 1.1., and is deployed to a stand-alone Weblogic Server.

      When I deploy the application to WebLogic using an EAR made up of the application JAR with miscellaneous libraries and files, and the exploded Web directory, I can logon to the application just fine using the URL http://localhost:7001/login.do?username=<userid>

      If I deploy the EAR with just the application JAR, and create & deploy the WAR separately, it also works fine.

      When I bundle the WAR in the EAR along with the JAR, then deploy it to WebLogic the same URL displays a blank page. There are no errors during deployment, no errors logged trying to go to the URL or anything. It looks like the Struts action login.do just doesn't exist. I have the Struts runtime included in my libraries. I have the following files in the W:\application\WebApp\public_html\WEB-INF (displayed as WebApp\Web Content\WEB-INF inside JDeveloper)

      The WebLogic.xml contains the following:
      <?xml version = '1.0' encoding = 'windows-1252'?>
      <weblogic-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.1/weblogic-web-app.xsd"
      <cookie-comment>WebLogic Server Session Tracking Cookie</cookie-comment>

      The web.xml contains the following:
      <?xml version = '1.0' encoding = 'windows-1252'?>
      <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"

      The struts.config contains the following:
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
      <form-bean name="beanName" type="beanType" />
      <action-mappings type="CommonActionMapping">
      <action path="/login" scope="request" type="package.LoginAction" validate="false">
      <set-property property="requiredRight" value="none" />
      <message-resources null="false" parameter="ApplicationResources" />

      package package.common;

      import org.apache.struts.action.ActionMapping;

      public class CommonActionMapping extends ActionMapping
      private String requiredRight;

      * Constructor for the CommonActionMapping object
      public CommonActionMapping ()

      * Gets the requiredRight attribute of the CommonActionMapping object
      *@return The requiredRight value
      public String getRequiredRight()
      return requiredRight;

      * Sets the requiredRight attribute of the CommonActionMapping object
      *@param requiredRight The new requiredRight value
      public void setRequiredRight(String requiredRight)
      this.requiredRight = requiredRight;

      I have been trying to figure this out for a few days now, with no luck. Any help will be appreciated.


      Edited by: 916010 on Feb 28, 2012 1:41 PM
        • 1. Re: Blank Page Displayed on Struts Action Call
          Andreas Koop
          Are you really bound to Struts? IF not try ADF Faces Rich Client as the View side....;)
          • 2. Re: Blank Page Displayed on Struts Action Call
            Unfortunately, at this time we are bound to Struts.
            • 3. Re: Blank Page Displayed on Struts Action Call
              Timo Hahn
              I have some working struts application under jdev to jdev which use struts 1.2.9 provided by jdev.
              If you like I can make an test work space available to you which is based on the HR schema and uses the old bc4j jbo-tags. This test case is working under and can be deployed on an stand alone WLS too and runs OK.
              You can then look at this sample and might find your problem, which I'm suspect are your descriptors.
              If you are interested in this test case, drop me a note in this thread and I set it up for you on my blog.

              • 4. Re: Blank Page Displayed on Struts Action Call
                If you have a sample that is working, I would definitely like to looks at it. Although I am using Struts 1.1, it might give me some insight.
                • 5. Re: Blank Page Displayed on Struts Action Call
                  Timo Hahn
                  You can download the sample code from here: http://tompeez.files.wordpress.com/2012/02/test2_11-zip.doc
                  after download you need to rename the file to test2_11.zip (as the blog donÄt allow zip files). Unzip the file. The project uses the HR schema, one thing to note is a library STRUTS_APP_LIB.library which holds all needed adf libs needed to run the application. The definition (which real jars are needed) you find root of the work space.


                  Edited by: Timo Hahn on 29.02.2012 21:14
                  Originally the app was developed with struts 1.1
                  • 6. Re: Blank Page Displayed on Struts Action Call
                    Thanks for all of the help, and I have found the solution to my issue.

                    The short answer was to make sure that we used an old version of the Struts Library.

                    The long answer:
                    We upgraded from WebLogic 8.1/JBuilderX to JDeveloper/WebLogic 11G, but due to time constraints, had to keep our application at Struts 1.1. We used the Struts Runtime Library provided with JDeveloper/WebLogic 11G in the EJB project, but still had the old Struts JARS in the WEB_INF\classes\lib directory of the Web project.

                    When the WAR was deployed separately, or the active directory deployed, everything worked, but when the WAR was packaged in the EAR the blank page was displayed.

                    After many Web searches, we thought that it might a classLoader issue, even though there were no errors in the log.

                    I went through the application, making sure we had the latest libraries in the EJB and Web projects, and when I changed the Web project to use the latest Struts libraries the issue of the blank page appeared for all scenarios of deployment. Once I changed the EJB and Web projects to use the older version of the Struts JARS, all deployment scenarios worked.