• Post Reply Bookmark Topic Watch Topic
  • New Topic

Using initParameters  RSS feed

 
Daniel Walker
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • 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).]
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • 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
  • 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...***
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!