| Author |
Eclipse web.xml formatting errors
|
Dilshan Edirisuriya
Ranch Hand
Joined: Apr 22, 2006
Posts: 299
|
|
I have a sample web.xml like this. But when I add that in eclipse sometime I get "The content of element type web-app must match icon? display-name ? etc." error message. When I create a new xml file and paste above text there it works. Once I restart the workbench it appears again. I do not see a problem with this web.xml file. What would be the reason? I am using eclipse ganymede. Thank you [ October 29, 2008: Message edited by: Dilshan Edirisuriya ] [edited XML] [ October 29, 2008: Message edited by: Jeanne Boyarsky ]
|
Dilshan Edirisuriya SCJP1.4, SCWCD1.4, SCBCD 5
|
 |
Dilshan Edirisuriya
Ranch Hand
Joined: Apr 22, 2006
Posts: 299
|
|
Ohhhhh The XML tags are missing in the above post. What is going on here. I cannot copy a xml document here. Look what has happened. Some of the xml data I pasted are missing and some of them are formatted incorrectly. When I click on edit button again I see the correct pasted data there. [ October 29, 2008: Message edited by: Dilshan Edirisuriya ]
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26192
|
|
Dilshan, You need to escape the < as <. I've edited your post to see the XML. Your file seems ok. One thing to try is to add a space to the file and save. That might clear Eclipse's cache and get it to acknowledge the file is ok. This helped me with a different XML problem in the past.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Dilshan Edirisuriya
Ranch Hand
Joined: Apr 22, 2006
Posts: 299
|
|
Thanks Jeanne. I think it is better to have some sort of a editor component here. Like WYSIWYG. Otherwise we will be having a bad time typing here. So about the issue, yes I think its something to do with the Eclipse cache. When I edit the file It works fine as you said. So any suggestion cos every time it is hard to edit like this. Thank you
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26192
|
|
Eric posted a tool to escape the HTML/XML for you: http://faq.javaranch.com/java/EscapeHtml I don't know what to say - report it to Eclipse as a bug?
|
 |
 |
|
|
subject: Eclipse web.xml formatting errors
|
|
|