Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > make mistake in using XML to deploy web application archive file

Reply
Thread Tools

make mistake in using XML to deploy web application archive file

 
 
cong
Guest
Posts: n/a
 
      07-23-2007
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?

 
Reply With Quote
 
 
 
 
Joe Kesselman
Guest
Posts: n/a
 
      07-23-2007
> error information following:
> org.xml.SAXparseException
> the processing instruction target match "[xX][mM][lL]" is not allowed
>
> how can I fix it?


The XML declaration MUST be the very first thing in the file, except for
the optional byte-order mark. Remove the whitespace preceding it.

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
 
Reply With Quote
 
 
 
 
cong
Guest
Posts: n/a
 
      07-24-2007
On 7 23 , 8 04 , Joe Kesselman <(E-Mail Removed)> wrote:
> > error information following:
> > org.xml.SAXparseException
> > the processing instruction target match "[xX][mM][lL]" is not allowed

>
> > how can I fix it?

>
> The XML declaration MUST be the very first thing in the file, except for
> the optional byte-order mark. Remove the whitespace preceding it.
>
> --
> () ASCII Ribbon Campaign | Joe Kesselman
> /\ Stamp out HTML e-mail! | System architexture and kinetic poetry


thank you

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deploy won't deploy Masterpage.master GaryDean ASP .Net 1 04-14-2009 01:50 AM
something wrong in deploying Web Application aRchive file cong Java 0 07-23-2007 10:03 AM
Dictionaries again - where do I make a mistake? Lad Python 2 10-19-2006 03:54 PM
How to make Installer for web projects to deploy Amit Maheshwari ASP .Net 0 12-21-2005 04:35 AM
Don't make this mistake... ColumbiaHouseDVD club- pre-orders. Randy DVD Video 5 10-23-2003 01:01 PM



Advertisments