Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: How to configure context.xml in netbeans IDE?

  1. #1
    Join Date
    Jul 2011
    Thanked 0 Times in 0 Posts

    Default How to configure context.xml in netbeans IDE?

    Dear forum members,

    I've been trying to configure context.xml but no matter what I do, I still get the below error:

    cvc-elt.1: Cannot find the declaration of element 'Context' .[2]

    Here's what appeared in my context.xml.

    <?xml version="1.0" encoding="UTF-8?>
    <Context antiJARLOCKing= "true" path="Web" reloadable="true">
    <Resource name="jdbc/Web auth="Container" type="javax.sql.DataSource" username="root" password="xxx" driverClassName="com.mysql.jdbc.Driver" url="jdbc://localhost:3306/pract1"></Reource>

    I'm using Heidi mysql as my database. The J-connector driver jar file is added in the library.

    I hope someone can advise me where I had gone wrong.

    Many thanks.

  2. #2
    Join Date
    Dec 2011
    Thanked 4 Times in 4 Posts

    Default Re: How to configure context.xml in netbeans IDE?

    it should be <context>, not <Context>

Similar Threads

  1. Replies: 2
    Last Post: December 5th, 2011, 08:17 AM
  2. What's wrong with my context.xml ?
    By tangara in forum What's Wrong With My Code?
    Replies: 0
    Last Post: October 16th, 2011, 12:41 AM
  3. not able to get the context attribute set in ServletContextListener
    By jkoder70014 in forum JavaServer Pages: JSP & JSTL
    Replies: 1
    Last Post: August 17th, 2011, 11:47 AM
  4. static context
    By mydoom in forum What's Wrong With My Code?
    Replies: 1
    Last Post: July 25th, 2011, 03:37 PM
    By jugalrockz in forum Java Servlet
    Replies: 1
    Last Post: January 5th, 2011, 07:09 PM