• Post Reply Bookmark Topic Watch Topic
  • New Topic

reading init params in JSP  RSS feed

Man Pan
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a jsp page which needs to read some initial values (only once - at servlet startup) and change its behavior accordingly.

The problem is I am not able to read the init param successfully.

Here is what I have:

* My application context is "TEST"
* It is runing on Tomacat 5.0

router.jsp (under the /webapps/TEST/COMMON/ directory)
<%! String myValue;
public void jspInit()
myValue = getServletConfig().getInitParameter("param1");

Value of variable myValue is : <%=myValue%>

web.xml (under the /webapps/TEST/WEB-INF/ directory)

Any pointers about what's wrong will be appreciated.
[ November 17, 2004: Message edited by: Bear Bibeault ]
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!