something wrong in deploying Web Application aRchive file

C

cong

web.xml:

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app>
<display-name>ShowLifecycles</display-name>
<description>An example of how to use lifecycle events</
description>

<listener>
<listener-class>
examples.MyAppListener
</listener-class>
</listener>
</web-app>

ShowLifecycles.jsp:
<html>
<body>

<%!
public void jspInit()
{
log("***ShowLifecycles.jsp - Invoked jspInit()");
}
%>
<%!
public void jspDestroy()
{
log("***ShowLifecycles.jsp - Invoked jspDestroy()");
}
%>

log("***ShowLifecycles.jsp - Invoked jspService()");
%>

The current date is: <%= new java.util.Date() %>
</body>
</html>

MyAppListener:java
package examples;

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class MyAppListener
implements ServletContextListener {

public void contextInitialized(ServletContextEvent event) {
ServletContext context = event.getServletContext();
context.log("***ShowLifecycles - Created the servlet
context");
}

public void contextDestroyed(ServletContextEvent event) {
ServletContext context = event.getServletContext();
context.log("***ShowLifecycles - Destroyed the servlet
context");
}
}


error information following:
org.xml.SAXparseException
the processing instruction target match "[xX][mM][lL]" is not allowed

how can I fix it?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top