IanWood
asked on
How do i store paramaters in my web.xml file and then access from a jsp application?
Hi
I'm trying to store some paramters in my web.xml file to be accessed by a jsp app, but am having problems.
I've been trying what i've come accross omn the web, but not getting far.
I've added an env-entry to my application web.xml file (from in app-root/WEB-INF), but tomcat compalins about it and I've no idea why.
web.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app id="WebApp_1"/>
<env-entry>
<env-entry-name>envEntrySt ring</env- entry-name >
<env-entry-value>
This is a string from the env-entry
</env-entry-value>
<env-entry-type>java.lang. String</en v-entry-ty pe>
</env-entry>
</web-app>
Error:-
PARSE error at lin 4, column -1
SAX parse exception
illegal character at end of document.
Any ideas?
Any really good step by step examples would be good. I'm struggled to find much. Well that doesn't confuse me anyway!!
Thanks.
I'm trying to store some paramters in my web.xml file to be accessed by a jsp app, but am having problems.
I've been trying what i've come accross omn the web, but not getting far.
I've added an env-entry to my application web.xml file (from in app-root/WEB-INF), but tomcat compalins about it and I've no idea why.
web.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app id="WebApp_1"/>
<env-entry>
<env-entry-name>envEntrySt
<env-entry-value>
This is a string from the env-entry
</env-entry-value>
<env-entry-type>java.lang.
</env-entry>
</web-app>
Error:-
PARSE error at lin 4, column -1
SAX parse exception
illegal character at end of document.
Any ideas?
Any really good step by step examples would be good. I'm struggled to find much. Well that doesn't confuse me anyway!!
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
thanks
ASKER
Cheers.