File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes env-entry tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "env-entry tag" Watch "env-entry tag" New topic
Author

env-entry tag

aakash bhatt
Ranch Hand

Joined: Jan 09, 2003
Posts: 182
What is the use of env-entry tag in deployment descriptor. Can i have an example

Thanks,
aakash
Jason Hunt
Ranch Hand

Joined: Sep 09, 2002
Posts: 51
with env-entry tag, the bean providers don't need to hard code some value in their bean code. for example if they want to get the tax rate of current year, they can creat a env-entry in the DD and in the bean code, they just do a jndi lookup to get the value.



SCJP, SCWCD, SCBCD, SCDJWS, OCA9i,<br />IBM Certified WAS5.0 Admin<br />IBM Certified Solution Developer - WebSphere Studio 5.0<br />IBM Certified Solution Developer - XML and related Technologies
aakash bhatt
Ranch Hand

Joined: Jan 09, 2003
Posts: 182
Hi Jason,

Thanks for the reply.
Could you pl elaborate more, or give a code example on this.

Thanks,
aakash
Ryan P. Kane
Greenhorn

Joined: Jun 18, 2004
Posts: 16
Here's an example from an assignment I had to do for class last week. I used the env-entry to provide JDBC info, so I didn't have to hard code it.


In my java code, I did the following:



Hope that helps,
Ryan
[ August 05, 2004: Message edited by: Ryan P. Kane ]
 
wood burning stoves
 
subject: env-entry tag
 
Similar Threads
ordering of env-entry sub elements
urgent pls : common information for ejbs
foreach tag in ANT
env-entry> tag
env-entry tag in web.xml file