• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get Servlet Init parameters in EL.

 
Praveen Kumar
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

We have implicit object initParam in EL to get Context parameters.

Here my doubt is how to get servlet init parameters in EL ?

Please help me ..

Thanks
Praveen
Preparing for SCWCD.
 
Rufus Addis
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the following help:

http://faq.javaranch.com/java/InitParamsThruExpressionLanguage

Rufus.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Note that servlet init parameters are something different than context parameters.
[ October 14, 2008: Message edited by: Ulf Dittmer ]
 
nisha chidella
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so, does it mean that if the request directly comes to a jsp(not through a servlet) we cannot get servlet init parameter using EL ?
 
Poonam Agarwal
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can't we get servlet config parameter from JSP file, using a config implicit object??

somthing like:-

config.getInitParameter OR config.getIntiParameterNames, and then we can store the return value as an attribute in any of the four specified scope.
EL then access that attribute to get the required parameter.

I am not sure, just assumed it, that it may happen.


Thanks
 
ankit kumar
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ya I think poonam you are right . I did so and got the value
 
Ankit Garg
Sheriff
Posts: 9519
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nisha the original question is 4 months old. This is like WakingTheZombies. If you have any question, than it is better that you start a new topic for it ...
 
nisha chidella
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Can't we get servlet config parameter from JSP file, using a config implicit object??



then you have to use scripting, the whole point of EL is to avoid scripting. isn't it ?



Nisha the original question is 4 months old. This is like WakingTheZombies.



Ankit, i wasn't trying to answer the question here which was asked few months back.i had similar question, and when i did a search this thread popped up and the answer wasn't clear to me so i continued in this same thread. Anyway, thanks, i didn't knew this rule. .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic