Eclipse + XDoclet

S

Scott Harper

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
 
J

Jan Peter Stotz

Scott said:
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?

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
 
S

Scott Harper

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
 
J

Jan Peter Stotz

Scott said:
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...

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top