Suggestions for a servlet XML parameter file

S

Sergio

Hello there,
I've been moving the first steps in servlet programming since a few
weeks and I'd like to submit you a questions about how to store
servlet's parameters (I'm currently using Tomcat 4.1.x).

I know that:
- parameters can be passed within the invoking URL
- can be stored in the web.xml file

But I'm considering the case for storing parameters in a file that
could be easily modified by the end user and read by the servlet each
time it's executed so that there's no need to restart the server after
every change.

Even though I know that a simple solution could be using a file
structure like:
PARAMETER1_NAME = PARAMETER1_VALUE
PARAMETER2_NAME = PARAMETER2_VALUE
....
but I would experiment with XML, so I'd like to know whether is there
a preferred way to parse XML file within a servlet (I'm oriented to
use a DOM approach).

I've read about Xerces, IBM's XML4j, JAXP but still wondering which
one to choose.

Do you have suggestions and can you direct me to examples/tutorials?
Thanks a lot in advance.
Bye

Sergio
 
J

Jason

What kind of parameters are we talking about here?

A) Something along the lines of a customer number, or search criterion
value?
B) Operations parameter that the servlet would use to "configure"
itsself?

How much data are we talking about here?

The thing to remember about Java and XML is that the DOM (or other
method) is actually going to deal with the XML as a string. If you
don't have a lot of information being passed, I'd resist doing it with
something as potentially complicated as XML.

"Don't build more than you have to to get the results you must have."

Why spend time and effort building a complicated XML processing system
for two parameters ??? Doesn't make sense and just takes up time
you'll need for something else.
 

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

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top