Shadab Ansari

Greenhorn
+ Follow
since Sep 02, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Shadab Ansari

I have the same problem

The web.xml is :

<servlet>
<servlet-name>TestJspPage</servlet-name>
<jsp-file>/hello.jsp</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name>TestJspPage</servlet-name>
<url-pattern>/hello.do</url-pattern>
</servlet-mapping>
<context-param>
<param-name>city</param-name>
<param-value> New Delhi</param-value>
</context-param>

And I'm trying to use this parameter in my hello.jsp in this way

<%= application.getInitParameter("city") %>

When I'm accessing hello.do
it is giving me null

Can anybody help me out??

Thanks
13 years ago
JSP