• 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

Using initParameters

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there....
I hope someone is able to help me. I am attempting to pass an init parameter to my servlet (a simple form-processing excersise) using web.xml, and am experiencing difficulties. Here are the necessary details:

When the servlet is called, I get the following error message:

Agrhhhh!!! I have been following this thread, which set me on the right path, and I have had no problems getting the included example working, but my servlet is still being troublesome!!
Any and all help greatly appreciated...

daniel.walker@ukgateway.net
***i fear that i am ordinary...
...just like everyone...***

[This message has been edited by Daniel Walker (edited August 09, 2001).]
 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
getInitParameter() is a method in ServletConfig and needs to be executed on the config object passed to the init method so, chage the line to:
fullPath = config.getInitParameter("absPath");
------------------
Hope This Helps
Carl Trusiak, SCJP2
 
Daniel Walker
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah, that got it :-)!
Thanks ever so for the quick response - I can now get on with the meat of the work
------------------
__________
daniel.walker@ukgateway.net
***i fear that i am ordinary...
...just like everyone...***
 
Morning came much too soon and it brought along a friend named Margarita Hangover, and a tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic