- This topic has 6 replies, 4 voices, and was last updated 18 years ago by glote.
-
AuthorPosts
-
jvanceMemberFirst, please see these old, unresolved threads:
http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-7126-highlight-dtd+strutsconfig.html
https://www.genuitec.com/forums/topic/problem-to-add-struts-capability/&start=0&postdays=0&postorder=asc&highlight=dtd+strutsconfigWhen attempting to add struts capabilities to an existing project, MyEclipse fails to parse a properly formed struts-config.xml 1.2 file. The given file validates against the reference DTD at apache.org.
Steps to reproduce:
Create a new web project.
Add struts capabilities to it. Be sure to select Struts 1.2 project.
Remove webProject capabilities
Re-add webProject capabilities
attempt to add struts capabilities again
A popup appears stating that one message resource was found. Fine. Then the struts capabilities dialog box appears and Struts 1.1 project is selected.
Select Struts 1.2 project. An error message pops up: “Invalid Struts 1.2 config file found:
org.jdom.input.JDOMParseException: Error on Line 6: element type “struts-config” must be declared.”Click on the Struts 1.1 project radio button and again a message appears stating that one message resource has been found. Click on the 1.0 button, and this message appears: “Invalid Struts 1.0 config file found:
org.jdom.input.JDOMParseException: Error on Line 9: element type “global-exceptions” must be declared.”What’s going on? When you select a struts 1.0 project, MyEclipse attempts to validate the system-generated struts-config file against a struts-config 1.0 DTD. When you select a 1.1 project, it validates successfully against a 1.1 DTD (unless you add a 1.2 specific tag like “<description>”, in which case parsing fails). When you select 1.2, it attempts to validate against a BROKEN OR MISSING 1.2 DTD.
Where are the DTDs that MyEclipse is using for validation, and when can it be fixed? It’s obviously not using the one specified in the DOCTYPE for the file, because running xml validation against the system generated struts-config.xml file generates no errors. If I can’t get this resolved pretty quickly, I will have to recommend to our development team against purchasing licenses. This is a showstopper.
System:
Windows XP with Service Pack 2
Jdk 1.4.2.09
Eclipse 3.1.1
MyEclipse 4.0.2GA EvaluationThe Struts Config file in question:
<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE struts-config PUBLIC “-//Apache Software Foundation//DTD Struts Configuration 1.2//EN” “http://struts.apache.org/dtds/struts-config_1_2.dtd”><struts-config>
<data-sources />
<form-beans />
<global-exceptions />
<global-forwards />
<action-mappings />
<message-resources parameter=”com.yourcompany.struts.ApplicationResources” />
</struts-config>
Riyad KallaMemberjvance,
We appologize you ran into this we will look into it ASAP.
VincentVegaMemberHi:
I am having the exact same problem. In order to be able to add the Struts capabilities, I had to change the doctype declaration to v1.1. Once I did that no validation errors occured. However, the Struts Flow Overview is not working.
Has there been a resolution to this problem?
Riyad KallaMemberOur appologies this was not addressed yet, I will try and bump the priority.
Riyad KallaMemberJust a quick update after asking for this bug to be evaluated, one of the developers on the team just went in and fixed it right up instead, so this will be available in 4.1.1, sorry for the delay.
gloteMemberI have the same problem with myeclipse 5.0 GA and a struts 1.1 config file.
In XMLspy struts-config.xml is valid according to the struts-config_1_1.dtdThe start of my struts-config.xml:
<?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”>
<struts-config>
gloteMemberI have the same problem with myeclipse 5.0 GA and a struts 1.1 config file.
In XMLspy struts-config.xml is valid according to the struts-config_1_1.dtdThe start of my struts-config.xml:
<?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”>
<struts-config> -
AuthorPosts