• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

init parameter from jsp

 
sangeeta kapoor
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to access the servlet init parameter from with a JSP.

I have the following in my DD

<servet>
<servlet-name>NT</servlet-name>
<jsp-file>/NameTest.jsp</jsp-file>
<init-param>
<param-name>email</param-name>
<param-value>abc@abc.com</param-value>
</init-param>
</servet>


In the JSP page I want to get the init parameter

<html>
<body>

Email is : <%= getServletConfig().getInitParameter("email") %>

</body>
</html>

But this gives me null
 
Deepa Korecherla
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
u've got spelling mistakes..check them
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic