Tomcat and web.xml

G

genkuro

Alright. Here's a definitive newbie question.

Tomcat parses the web.xml file. Where does it whisk the resulting
dataset to? Is it part of the Servlet class?

I've already tried getServletContext() and getServletConfig(). Both
seemingly did not relate to web.xml at all. Or maybe I'm looking at
nested data.

Ultimately, I want to get at the <context-param> tags.

Thanks!
 
M

Manish Pandit

Alright. Here's a definitive newbie question.

Tomcat parses the web.xml file. Where does it whisk the resulting
dataset to? Is it part of the Servlet class?

I've already tried getServletContext() and getServletConfig(). Both
seemingly did not relate to web.xml at all. Or maybe I'm looking at
nested data.

Ultimately, I want to get at the <context-param> tags.

Thanks!

Try context.getInitParameter(paramName);

where context is the servlet context.

I know this is very counter-intuitive, but I guess having it
getContextParameter() would just be too easy for Sun.

-cheers,
Manish
 
G

genkuro

Try context.getInitParameter(paramName);

where context is the servlet context.

I know this is very counter-intuitive, but I guess having it
getContextParameter() would just be too easy for Sun.

-cheers,
Manish

Hi Manish -

Worked great. Thanks for the help.
 

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
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top