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

Regarding jspInit() overriding

 
Deepak Bobal
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am trying to override jspInit()

but it's giving some sort of problem

I am using Tomcat 5.5


At C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps

I have my project with the name OverRideJspInit

In OverRideJspInit i have WEB-INF and a jsp file with the name of Over.jsp


Over.jsp




then in WEB-INF there is web.xml

web.xml





Now if i try to access value of Email set in web.xml shows Null at browser.

How it can b rectified.

Thank You







 
Jonathan Elkharrat
Ranch Hand
Posts: 170
Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
add this jsp file a servlet name and mapping.


<servlet>
<servlet-name>myJspFile</servlet-name>
<jsp-file>/Over.jsp</jsp-file>
<init-param>
<param-name>Email</param-name>
<param-value>Deepak</param-value>
</init-param>
(<load-on-startup>1</load-on-startup>) <-- not sure if necessary
</servlet>


<servlet-mapping>
<servlet-name>myJspFile</servlet-name>
<url-pattern>/Over.jsp</url-pattern>
</servlet-mapping>
 
Deepak Bobal
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Jonathan

it works.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic