• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet init parameters

 
Vladimir Kositsky
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,
i am trying to work over an example http://novocode.de/doc/servlet-essentials/chapter2b.html
(UnavailableException constructor and init(ServletConfig)(?) is
deprecated, but it not cousing the problem)
Finally i have compiled this code, but i got
"The "addressfile" property must be set to a file name" that throws from
filename = config.getInitParameter("addressfile");
whether that mean that i should set paramater addressfile in web.xml
(Tomcat)?
If yes, how to set value of addressfile as file name?
Thanks,
Vladimir
 
Marilyn de Queiroz
Sheriff
Posts: 9067
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems to me that in this line
filename = config.getInitParameter("addressfile");
you should substitute the name of the file (i.e. "address.txt") as a String for "addressfile".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic