• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Regarding jspInit() overriding

 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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







 
Ranch Hand
Posts: 170
Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot Jonathan

it works.
 
Amateurs built google. Professionals built the titanic. We can't find the guy that built this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic