Error in connecting the database with context.xml resource

Dear everyone,

i am trying to connect the application with database...

i have a table with employee id, name...

i have given context xml and established connection..

but i am getting error as

* " Element type "Resource" must be followed by either attribute specifications, ">" or "/>"."

* "The context.xml file seems to be broken. Check whether it is well-formed and valid."

anyone please give ur suggestions....

[467 byte] By [senthil_yogaa] at [2007-11-27 9:51:37]
# 1

the error that i received now was...

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 34 in the jsp file: /index.jsp

Context cannot be resolved to a type

31:int i=0;

32:

33:

34:Context ctx = new InitialContext();

35:DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/employee");

36:

37:try

An error occurred at line: 34 in the jsp file: /index.jsp

InitialContext cannot be resolved to a type

31:int i=0;

32:

33:

34:Context ctx = new InitialContext();

35:DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/employee");

36:

37:try

An error occurred at line: 35 in the jsp file: /index.jsp

DataSource cannot be resolved to a type

32:

33:

34:Context ctx = new InitialContext();

35:DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/employee");

36:

37:try

38: {

An error occurred at line: 35 in the jsp file: /index.jsp

DataSource cannot be resolved to a type

32:

33:

34:Context ctx = new InitialContext();

35:DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/employee");

36:

37:try

38: {

Stacktrace:

org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)

org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:299)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)

javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

note The full stack trace of the root cause is available in the Apache Tomcat/5.5.23 logs.

senthil_yogaa at 2007-7-13 0:20:45 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...