• Post Reply Bookmark Topic Watch Topic
  • New Topic

Easy way to get env-entry in jsp page

 
Tom Blough
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there an easy way (EL or JSTL) to get an environment entry defined in web.xml from inside a jsp page?

I'm currently using:


But, as you can see, it's not pretty.

TIA,
[ August 16, 2005: Message edited by: Tom Blough ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65516
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The EL has no builtin visibility to JNDI. I'd either handle this within the controller and pass a scoped variable to be used on page (if it's really needed on the page in the first place), or handle it with a custom tag.
 
Tom Blough
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's what I though. I added code to my controller to extract it from JNDI and export it as a session variable.

Thanks, Bear.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!