>Is there any reason why you couldn't store your *.xml file in WEB-INF/

No.  There is no problem with doing this and it's probably the method
I'll use.  Thanks everyone for all the comments.


Robert Segal
Tools Developer
CryptoLogic Inc.
55 St. Clair Ave W., 3rd Floor
Toronto, Ontario
Canada  M4V 2Y7
tel.  + 1.416.545.1455 x5896
fax. + 1.416.545.1454

This message, including any attachments, is confidential and/or
privileged and contains information intended only for the person(s)
named above. Any other distribution, copying or disclosure is strictly
prohibited. If you are not the intended recipient or have received this
message in error, please notify us immediately by reply email and
permanently delete the original transmission from all of your systems
and hard drives, including any attachments, without making a copy.
-----Original Message-----
From: Brian Munroe [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 16, 2007 5:52 PM
To: Tomcat Users List
Subject: Re: Embedding XML documents as children of the context-param
element

On 8/16/07, Robert Segal <[EMAIL PROTECTED]> wrote:

> So as an alternative I know the second method will work but was
curious
> if anyone has tried the first method.
>

I doubt the 1st method is valid, since you are basically inventing new
deployment descriptor elements, and I know for sure that Eclipse would
go crazy with error messages.

In the 2nd method you are basically serializing the XML into a
string.. I suppose that is Ok, but I think you have to have also have
an <env-entry-type>java.lang.String</env-entry-type> element to
consider web.xml well formed.

Is there any reason why you couldn't store your *.xml file in WEB-INF/
and call it with something like:

ServletContext sc = getServletConfig().getServletContext();
String myXMLFIlePath = sc.getRealPath("/WEB-INF/myXMLFIle.xml");
...

Document document = parser.parse(new File(myXMLFilePath));

-- brian

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to