• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Eclipse web.xml formatting errors

 
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dilshan,
You need to escape the < as &lt;. 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.
 
Dilshan Edirisuriya
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
reply
    Bookmark Topic Watch Topic
  • New Topic