-
Sep 29th, 2010, 04:49 PM
#1
How to access environment entries in SURF?
I have an entry in web.xml as
<env-entry>
<description>welcome message</description>
<env-entry-name>message</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>Welcome to My Site</env-entry-value>
</env-entry>
and i access this in my .jsp page as -
<%
javax.naming.Context context = new javax.naming.InitialContext();
javax.naming.Context msg = (javax.naming.Context)context.lookup("java:comp/env");
java.lang.String mesg = (java.lang.Boolean)msg.lookup("message");
out.println("The message is : "+ mesg);
%>
How can this be done in SURF?
Thanks,
Sujay Pillai
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules