- This topic has 10 replies, 3 voices, and was last updated 21 years, 4 months ago by
Riyad Kalla.
-
AuthorPosts
-
jsmyth1969Memberhi,
I have tried to incorporate my existing web project into a workbench project but I have this issue:
1. web.xml is marked ‘in error’ but there is no indication what is wrong with it. apart from a marker at the last line (</web-app>).
Hovering the mouse over the error marker does not cause any error to be displayed) If I use ‘validate’ against the web.xml, I see a validate popup box but it is very fast and no error seems to be reported.
any ideas you may have appreciated..
thanks
jimFebruary 26, 2004 at 3:53 am #203907
jsmyth1969Member-oops – sorry for the misleading subject – I did have an issue with tlds when I started writing the original post – but that was fixed by rebuilding the entire project….
February 26, 2004 at 7:58 pm #203977
jsmyth1969MemberThis question was closed – my own fault I guess. I had originally planned to ask questions on 2 issues but managed to find an answer for the one that was mentioned in the subject of the original post…
The issues were:
1. tlds not found
2. invalid xmlRebuilding the project fixed the tld issue. However the workbench still reports that web.xml is wrong.
Your thoughts appreciated.
rgds
jimFebruary 26, 2004 at 8:50 pm #203981
Riyad KallaMemberJim, are quick way to double check this, can you poste your web.xml for us to look at (And copy-paste into our editor to double check).
February 29, 2004 at 8:10 pm #204096
Riyad KallaMemberSeems I closed this prematurely. Jim can you paste your web.xml into a message here so we can have a look at it? If the error is something like “contents of web.xml need to match (web-app (servlet*) blah blah”, then the problem is an ordering one… more specifically, the elements in your web.xml file are out of order according to the dtd that the XML file is referencing. (web.xml is particularly picky about order)
February 29, 2004 at 9:35 pm #204097
jsmyth1969MemberRiyad, thanks for the reply.
I have found that any servlet defintion would cause the error as long as the web.xml xml encoding was defined as encoding=”ISO-8859-1″. When I change this to ‘encoding=”UTF-8″‘, then the error disappears.
I guess this was conflicting with some eclipse project settings (though not sure which ones)
thanks again for your time.
rgds
jimFebruary 29, 2004 at 9:41 pm #204098
Riyad KallaMemberJim,
You can double check your workbench default encoding (Window>Preferences>Workbench>Editor).Is this problem sovled for you? (I don’t want to close this prematurely again 😉
March 1, 2004 at 9:17 pm #204126
jsmyth1969MemberRiyad,
The default in the workbench was cp1252 aka DOS. I changed it to utf-8 and then I can reset my web.xml encoding to ISO-8859-1. I dont follow too well the reason for this, but it does work!
thanks again
jimMarch 1, 2004 at 9:23 pm #204127
Riyad KallaMemberJim I’m wondering if you have some non ascii character in your web.xml file, maybe even something that LOOKS normal (like a strange period character, or invisible character)… do you see any weird characters in this file when you open it with Notepad? (don’t use a ‘better’ editor, as it might support unicode). I basically want to see if anything pops up looking like strange characters.
March 2, 2004 at 8:34 am #204141
Scott AndersonParticipantI’ll just chime in here and point out that XML file encoding was completely rewritten for the upcoming 2.7 GA release due to several problems with the RC2 implementation. As a result, I’d suggest you simply find something that “works for now”, rather than try to understand the behavior as it might be a bit inscrutable and possibly bug induced. A workaround is probably the best you can do for now. With the 2.7 GA release, it will become highly predictable.
March 2, 2004 at 8:41 am #204143
Riyad KallaMemberJim, I’m going to close this thread but please let us know when 2.7 GA comes out if the problem persists.
-
AuthorPosts