| Author |
config implicit object
|
subathra sangameswaran
Greenhorn
Joined: Nov 19, 2005
Posts: 27
|
|
Hallo Everyone, I am trying to learn jsp. why does not this scriptlet in my form.jsp work? <%= config.getInitParameter("email") %> My web.xml has the following <servlet> <servlet-name>MyJSPServlet</servlet-name> <jsp-file>/form.jsp</jsp-file> <init-param> <param-name>email</param-name> <param-value>subansuba@yahoo.co.in</param-value> </init-param> </servlet> I simply get My Contact: null when i get to this page Thanks and regards
|
suba
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
Are you hitting the JSP directly? If so, init params won't show up. You'll need to create a servlet mapping and point your browser to the url-pattern from your mapping.
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
subathra sangameswaran
Greenhorn
Joined: Nov 19, 2005
Posts: 27
|
|
Thanks. I works. I am just a beginner. Sorry for making too silly questions... This topic may be closed
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
It wasn't a silly question. There is no need to close the thread. It will sink into the abyss as newer ones show up and push it down. Glad it's working and Welcome to Javaranch.
|
 |
 |
|
|
subject: config implicit object
|
|
|