This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes JSP init parameters. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "JSP init parameters." Watch "JSP init parameters." New topic

JSP init parameters.

Philip Kurian

Joined: Jan 17, 2007
Posts: 14

I've been trying to init parameters to my jsp file by modifying web.xml and by overriding the jspInit() method.

Unfortunately tomcat seems to be playing up in that it only recognises the 2nd init parameter.

See code:


The output is as follows:

The value of the first parameter is null
The value of the second parameter is 2nd

When I try to examine the init parameters in tomcats log files all I get are the following:


The parameter first is missing.

Does anyone have any ideas on how I can declare more than one init parameter?
Christophe Verré

Joined: Nov 24, 2005
Posts: 14687

init-param accepts only one value.



[My Blog]
All roads lead to JavaRanch
Philip Kurian

Joined: Jan 17, 2007
Posts: 14
thanks mate. that's really helpful.
Niranjan Deshpande
Ranch Hand

Joined: Oct 16, 2005
Posts: 1277
that was a good catch !!

SCJP 1.4 - 95% [ My Story ] - SCWCD 1.4 - 91% [ My Story ]
Performance is a compulsion, not a option, if my existence is to be justified.
I agree. Here's the link:
subject: JSP init parameters.
Similar Threads
Getting Junk Values While overridding jspInit()
JSP init parameters.
Passing web.xml info to servlets
Retriving Init Param of a JSP
JSP Init Param