Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2006

Tip: Looking for answers? Try searching our database.

Eclipse + XDoclet

Thread view: 
Scott Harper - 17 May 2006 22:30 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.