This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes JSP and the fly likes Web.xml  context-param Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Web.xml  context-param" Watch "Web.xml  context-param" New topic

Web.xml context-param

Lisa Zapson
Ranch Hand

Joined: Nov 22, 2004
Posts: 50
I am trying to setup parameter values in my web.xml file I tried adding the following to my web.xml file.

I create .war file and try to open a .jsp page and I get a HTTP ERROR: 404
.jsp not found.

I haven't even tried to access the parameter.
Is this the correct way to setup and access a parameter in a .jsp page? Do you have any suggestions?

Thanks so much for any help,

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63548

First things first. You need to get the JSP page to display. Then you can explore exposing the context params.

If you are using JSP 2.0, the easiest way is via the initParam built-in scoped variable of the EL.

[Asking smart questions] [About Bear] [Books by Bear]
Lisa Zapson
Ranch Hand

Joined: Nov 22, 2004
Posts: 50
Thank you, I figured it out. Lisa
I agree. Here's the link:
subject: Web.xml context-param
It's not a secret anymore!