This week's book giveaway is in the Spring forum.
We're giving away four copies of Modern frontends with htmx and have Wim Deblauwe on-line!
See this thread for details.
Win a copy of Modern frontends with htmx this week in the Spring forum!
  • 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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.
reply
    Bookmark Topic Watch Topic
  • New Topic