Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How do i store paramaters in my web.xml file and then access from a jsp application?

Posted on 2006-11-17
4
Medium Priority
?
238 Views
Last Modified: 2008-03-06
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>envEntryString</env-entry-name>
    <env-entry-value>
      This is a string from the env-entry
    </env-entry-value>
    <env-entry-type>java.lang.String</env-entry-type>
  </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.
0
Comment
Question by:IanWood
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
jsev1995 earned 800 total points
ID: 17972258
you never closed the xml tag.
0
 

Author Comment

by:IanWood
ID: 17986058
The problem was I had a / at the end of the web-app line, but you made me check my closing tags, so the points are yours.

Cheers.
0
 
LVL 3

Expert Comment

by:jsev1995
ID: 17986684
thanks
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Suggested Courses

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question