File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

difference between env-entry and context init parameter

 
ajse ruku
Ranch Hand
Posts: 196
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I want to know the difference between env-entry tag and context init parameter tag
mentioned in the web.xml.As both the tags are used to pass the variables to the servlet.

with regards,
ajse
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The env-entry element is used to get some resource via JNDI.
From the spec:
The name is a JNDI name relative to the java:comp/env context.
The name must be unique within a web application.

On the other hand, the value you define in context init can be used directly to retrieve a defined value.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic