something wrong in deploying Web Application aRchive file

Discussion in 'Java' started by cong, Jul 23, 2007.

  1. cong

    cong Guest

    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?
     
    cong, Jul 23, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?VG9tIE4=?=

    deploying and re-deploying ASP.Net applications

    =?Utf-8?B?VG9tIE4=?=, Feb 4, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    411
    =?Utf-8?B?VG9tIE4=?=
    Feb 4, 2004
  2. Dominic Feron
    Replies:
    1
    Views:
    299
    Scott Allen
    Nov 5, 2004
  3. Paul_FFX
    Replies:
    1
    Views:
    548
    John Rivers
    Sep 2, 2005
  4. cong
    Replies:
    2
    Views:
    397
  5. Jan Obrestad
    Replies:
    0
    Views:
    468
    Jan Obrestad
    Dec 5, 2007
Loading...

Share This Page