I am using XDoclet to create my deployment descriptor (web.xml) for a
servlet. I'd like to add <security-constraint>, <login-config>, and
<security-role> sections to web.xml, without having them overwritten each time
I regenerate the XDoclet. In the web.xml that gets created, there are several
commeted sections that say (for example):
"To set up security settings for your web app, create a file named
web-security.xml, put it in your project's mergedir. Organize
web-security.xml following this DTD slice:"
[...]
The problem is, I need <security-constraint>, <login-config>, *and*
<security-role> tags. Each of them is at the same level (inside web.xml).
Inside this merge file, there is no root element. So even though the XDoclet
merge works the way I want it to, Eclipse complains that there is a fatal
error in my web-security.xml file (and hence propogated all the way up to the
project level) because I have malformed XML (no root element).
Is there a way to solve this problem?
- tell Eclipse to ignore the XML error on that file (how?)
- create more than one merge file (what are they named?)
thanks
Scott
Jan Peter Stotz - 19 May 2006 16:46 GMT
Scott Harper schrieb:
> I am using XDoclet to create my deployment descriptor (web.xml) for a
> servlet. I'd like to add <security-constraint>, <login-config>, and
[quoted text clipped - 16 lines]
>
> Is there a way to solve this problem?
My approach would be to rename "web-security.xml" to "web-security.txt" and
set the filename in the xDoclet options to the same value.
Jan
Scott Harper - 19 May 2006 17:31 GMT
>My approach would be to rename "web-security.xml" to "web-security.txt" and
>set the filename in the xDoclet options to the same value.
This sounds like a great idea. Do you happen to know which setting it is in
the XDoclet configuration? I'm fairly new to this, and while Eclipse provides
a rather extensive set of configuration options, they don't document exactly
what each setting does...
Thanks
Scott
Jan Peter Stotz - 19 May 2006 18:13 GMT
Scott Harper schrieb:
>>My approach would be to rename "web-security.xml" to "web-security.txt" and
>>set the filename in the xDoclet options to the same value.
[quoted text clipped - 3 lines]
> a rather extensive set of configuration options, they don't document exactly
> what each setting does...
I am sorry, that does not work, because XDoclet only allows to specify the
merge-directory, not the filename.
BTW: AFAIK XML syntax checking isn't available by the basic plugins that
come with an Eclipse installation. So it have to be an additional plugin
which causes your problems.
Jan