Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Config params for servlets: reading in JSP

 
amarkirt saroay
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my jsp I am trying to print servlet config parameters and context params from a forwared jsp page using :

Init params for context :

<cut value="${initParam.contextname}" />



Config params for servlets:
<%=config.getInitParameter("name1")%>
<cut value="${pageContext.config.name1}" />

The context params are being displayed correctly but the servlet config params cannot get printed and there is an ELException as:

javax.servlet.jsp.el.ELException: Unable to find a value for "config" in object of class "org.apache.jasper.runtime.PageContextImpl" using operator "."


Please suggest what is going wrong here?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check this FAQ.
 
amarkirt saroay
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic