Bookmark Topic Watch Topic
  • New Topic

the . character in context-param names

 
Jacob Fenwick
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Report post to moderator
Someone created a context-param in the web.xml file with a param-name with a name of app.version. When I try to use ${initParam.app.version}, it won't let me access it, but if I go in and change the . to and _, it works. Is there a way around needing to change the variable name?

Is there a specific for web.xml somewhere that specifies that you can't use . in param-name's that I could point to so I can enforce this standard?
 
Carol Enderlin
drifter
Ranch Hand
Posts: 1364
  • Mark post as helpful
  • send pies
  • Report post to moderator
Have you tried

${initParam["app.version"]}

instead of:

${initParam.app.version}

It works for me with parameter name = x.check
doesn't work: ${param.x.check}
works: ${param["x.check"]}
 
Deepan Devadasan
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Report post to moderator
Carol, you are correct..

This is a simple trick in using, EL
[ February 03, 2007: Message edited by: Bear Bibeault ]
 
    Bookmark Topic Watch Topic
  • New Topic