Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Everything i need to know about "init-param"?

 
mocca az
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings,
Can someone, in plain english, explain to me everythin one would need to know about <init-param>. How to use it, why advantages, disadvantages etc.
Thank you
<servlet>
<servlet-name>ServletName</servlet-name>
<servlet-class>full classpath</servlet-class>

<init-param>
<param-name>file</param-name>
<param-value>employee.jds</param-value>
</init-param>
<init-param>
<param-name>readonly</param-name>
<param-value>false</param-value>
</init-param>
</servlet>
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13056
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
init params are the preferred way of communicating setup information to a servlet. They are more flexible than hard coding things like file locations into your servlet code. Thats about all there is to say about that.
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic