Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP init parameters.

 
Philip Kurian
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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:



web.xml


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:

fork
xpoweredBy
second

The parameter first is missing.

Does anyone have any ideas on how I can declare more than one init parameter?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
init-param accepts only one value.

replace

by
 
Philip Kurian
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks mate. that's really helpful.
 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that was a good catch !!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic