Bookmark Topic Watch Topic
  • New Topic

EL - application init parameters  RSS feed

 
subathra sangameswaran
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi,
How can I using EL, get a servlet context init Parameter
I tried,
${pageContext.APPLICATION.initParameter("foodRegion")}
But does'nt work...
Getting some
org.apache.jasper.JasperException: /form.jsp(8,2) The function initParameter must be used with a prefix when a default namespace is not specified
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)

What does this mean?

Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66260
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
There is no intrinsic mechanism in the EL to access general instance methods that accept parameters.

There is also no mechanism for accessing servlet init parameters.

You can access context parameters via the implicit initParam scoped variable.

Since this is closely related to your similar question here, I'm going to close this topic and we can continue any discussion in the original topic.
 
It is sorta covered in the JavaRanch Style Guide.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!