struts-config.xml: JDeveloper Automatically Adds Extra Tags During JSP Edit (Doc ID 2130095.1)

Last updated on MAY 02, 2016

Applies to:

Oracle JDeveloper - Version 11.1.1.9.0 to 12.1.3.0.0 [Release Oracle11g to 12c]
Information in this document applies to any platform.

Symptoms

While using JDeveloper Studio 11.1.1.9.0 on Windows 7 Professional, with Java 1.6.0_29, the following issue was observed:

When a JSP is edited in an app using the editor "Source" tab (even before saving the changes), JDeveloper adds one or more tags to struts-config.xml for the application.  Usually this prevents successful deployment of the application in the embedded WebLogic Server, and as a result a 404 error is generated when it launches in the browser and tries to access the application’s start page (the server console gives ClassNotFoundException for DataActionMapping).

The tags it adds to struts-config.xml are:

- <form-bean>, with name DataForm (this happens sometimes)
- <action>, with class DataActionMapping (this seems to happen always, and it usually adds the action to the end of the list)


Steps to replicate issue
1.  Start JDeveloper 11.1.1.9.0.
2.  Open app - himktindustry.jws --> struts-config.xml (WEB-INF\)
3.  Switch to "source" tab.
4.  Notice that filename is not italicized in "editor" tab.

5.  Open jsp\maintainAgentProfile.jsp
6.  Make no changes.
7.  Notice that struts-config.xml filename changes to italics font in editor tab.
8.  It can be seen that the following was automatically added to the end of action list in file:
          type="oracle.adf.controller.v2.struts.actions.DataForwardAction"
          className="oracle.adf.controller.v2.struts.actions.DataActionMapping"
          parameter="/jsp/maintainAgentProfile.jsp"/>
9.  Press Ctrl+Z four times.  This reverts the changes and the filename is no longer italicized.

10.  Again open jsp\maintainAgentProfile.jsp.
11.  Make a cosmetic change (add a space to a blank line), but do not save the changes yet.
12.  Notice that the filename struts-config.xml changes to italics in the "editor" tab.
13.  It can be seen that the following was automatically added to the end of action list in file:
           type="oracle.adf.controller.v2.struts.actions.DataForwardAction"
           className="oracle.adf.controller.v2.struts.actions.DataActionMapping"
           parameter="/jsp/maintainAgentProfile.jsp"/>
14.  Press Ctrl+Z four times.  This reverts the changes and the filename is no longer italicized.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms