How to interpret ( parse / read ) the Servlet Response contents ...

I want to parse the response content before it is displayed in the browser. I wrote a Servlet Filter to parse the request / response.
Since there are no public API s available to get the content of response, I am not sure , how to read the response.
Any idea ??

Implement HttpServletResponseWrapper, override the writing methods to let them write to some reuseable/accessible buffer and access it afterwards.

Similar Messages

  • How can I know whether the Servlet is sending a response!!!

    Hello,
    My question is this :
    How do I know whether that server outputstream is sending me a response or not?
    I have opened the Client InputStream to recieve a response from a servlet,but how
    can i be sure that i will receive a response from the servlet?
    I cud be waiting for an 15 expecting a response but havent received one..
    Is there any way to check whether the servlet is sending me a response?
    The reason I am asking is this.
    I have written a Java Client that connects to a servlet.It has to wait for a
    response from the servlet.It will wait for 5 seconds and if this doesnt recieve
    a response,it will return back else it will display the response.
    I have set a timer on my client for 5 seconds and a timer on the servlet for 15 seconds.
    Essentially,when the client connects,the servlet response is held for 15 seconds
    and the client tries for 5 seconds.
    But the client is unable to exit without a response.The response comes back in 15 seconds.
    The client shud have the message 'Connection Timed Out' after 5 seconds.
    This means there is an error somewhere.
    As the response takes 15 seconds,the client shudnt recieve one.
    So,is there a way I can block the servlet response?
    I am using threads and Inner classes for the timer purposes..
    Please can any one help me?
    ajay
    Client code:
    public class HttpHandler {
    private static String sURL="localhost";
    static String sMessage="Hello Server..Client sending Data";
    static DataInputStream dis = null;
    static HttpURLConnection hpCon=null;
    public static void main(String[] args)
    sendData(sMessage);
    public void TimerTest() {
    NewThread nt = new NewThread();
    public static void sendData(String sMess)
    String response=null;
    try{
    // Invoke Timer
    new HttpHandler.TimerTest();
    URL url=null;
    String uri = "http://" + sURL + ":8080/servlet/threads.Recieve_Http_Data1";
    url = new URL(uri);
    hpCon=null;
    hpCon = (HttpURLConnection)url.openConnection();
    hpCon.setDoOutput(true);
    hpCon.setDoInput(true);
    // Transfer Data over http
    DataOutputStream dos = new DataOutputStream(hpCon.getOutputStream());
    dos.writeUTF(sMess);
    }catch(IOException e)
    {System.out.println("Error in Client " + e); e.printStackTrace();}
    } // End of Method sendData
    // Inner Class
    class NewThread extends Thread
    String response;
    int i=0;
    NewThread()
    start();
    public void run()
    try {
    while(i < 5)
    System.out.println(i);
    Thread.sleep(1000);
    try {
    dis = new DataInputStream(hpCon.getInputStream());
    response = dis.readUTF();
    // If response recieved, break off else Loop back.
    if(dis !=null)
    System.out.println("SERVER RESPONSE : " + response);
    dis.close();
    break;
    }catch(IOException e){System.out.println("Here : " + e);}
    i++;
    } // End of While.
    }catch(InterruptedException e){}
    The Servlet
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    import java.io.*;
    import java.sql.*;
    import java.math.*;
    public class Recieve_Http_Data1 extends HttpServlet {
    private static final String CONTENT_TYPE = "text/html";
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException
    doPost(request,response);
    public void doPost(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException
    System.out.println("Server Ready to receive Message from application :");
    System.out.println();
    BufferedReader br=null;
    // Data Read by the Servlet
    String sMess="";
    DataInputStream dis = new DataInputStream(request.getInputStream());
    sMess = dis.readUTF();
    System.out.println("Received from Client: " + sMess);
    // Send response back after 15 seconds Only.
    try {
    for(int i=0;i<15;i++)
    System.out.println(i);
    DataOutputStream dos = new DataOutputStream(response.getOutputStream());
    String sResponse = "Hello Client...This is server sending response";
    dos.writeUTF(sResponse);
    Thread.sleep(1000);
    }catch(InterruptedException e){}

    I don't know whether you solve your problem or not! Anyway, I have the same problem. The program hangs when getInputStream is called.
    DataInputStream dis = new DataInputStream(request.getInputStream());
    If you have the answer, please let me know. Thanks!!

  • Concurrent processing of POST requests and automatic flushing of the servlet response buffer in WLS6.1.

              Hi all,
              I encountered the following 2 servlet problems in WLS 6.0/ 6.1:
              1. Processing concurrent POST requests
              WLS seems to disallow concurrent executions of any servlet's doPost servlet method.
              When two clients attempt to send a request to a servlet using POST, the socond
              one
              is blocked until the first customer is served. In essence, the servlet ends up
              operating in
              1-user mode. I just learned from Jervis Liu that the problem is solved in WLS6.0
              if you disable http-keepalive.
              For WLS 6.1 a partial workaround is to make the servlet work in a single-thread
              mode (by implementing the javax.servlet.SingleThreadModel interface). In this
              case,
              WLS dispatches concurrent requests to different instances of the servlet.
              This doesn't completely eliminate the problem - still only one customer can be
              connected at a time. The improvement is that once the first customer is disconnects,
              the second can be served even if the doPost method for the first has not finished
              yet.
              2. Flushing the response buffer in WLS 6.1
              The servlet response buffer is not flushed automatically until doPost ends, unless
              you
              explicitly call response.flushBuffer(). Closing the output stream doesn't flush
              the
              buffer as per the documentation.
              I see that other people are experiencing the same problems.
              Has anyone found any solutions/workarounds or at least an explanation.
              Any input would be highly appreciated.
              Thanks in advance.
              Samuel Kounev
              

    Thanks for replying. Here my answers:
              > Did you mark your doPost as synchronized?
              No.
              > Also, try testing w/ native i/o vs not ... is there a difference?
              With native I/O turned off I get a little lower performance, but the
              difference is not too big.
              Best,
              Samuel Kounev
              > Peace,
              >
              > --
              > Cameron Purdy
              > Tangosol Inc.
              > << Tangosol Server: How Weblogic applications are customized >>
              > << Download now from http://www.tangosol.com/download.jsp >>
              >
              > "Samuel Kounev" <[email protected]> wrote in message
              > news:[email protected]...
              > >
              > > Hi all,
              > >
              > > I encountered the following 2 servlet problems in WLS 6.0/ 6.1:
              > >
              > > 1. Processing concurrent POST requests
              > >
              > > WLS seems to disallow concurrent executions of any servlet's doPost
              > servlet method.
              > >
              > > When two clients attempt to send a request to a servlet using POST, the
              > socond
              > > one
              > > is blocked until the first customer is served. In essence, the servlet
              > ends up
              > > operating in
              > > 1-user mode. I just learned from Jervis Liu that the problem is solved in
              > WLS6.0
              > >
              > > if you disable http-keepalive.
              > >
              > > For WLS 6.1 a partial workaround is to make the servlet work in a
              > single-thread
              > >
              > > mode (by implementing the javax.servlet.SingleThreadModel interface). In
              > this
              > > case,
              > > WLS dispatches concurrent requests to different instances of the servlet.
              > > This doesn't completely eliminate the problem - still only one customer
              > can be
              > >
              > > connected at a time. The improvement is that once the first customer is
              > disconnects,
              > > the second can be served even if the doPost method for the first has not
              > finished
              > > yet.
              > >
              > > 2. Flushing the response buffer in WLS 6.1
              > > The servlet response buffer is not flushed automatically until doPost
              > ends, unless
              > > you
              > > explicitly call response.flushBuffer(). Closing the output stream doesn't
              > flush
              > > the
              > > buffer as per the documentation.
              > >
              > > I see that other people are experiencing the same problems.
              > >
              > > Has anyone found any solutions/workarounds or at least an explanation.
              > > Any input would be highly appreciated.
              > >
              > > Thanks in advance.
              > >
              > > Samuel Kounev
              =====================================================
              Samuel D. Kounev
              Darmstadt University of Technology
              Department of Computer Science
              DVS1 - Databases & Distributed Systems Group
              Tel: +49 (6151) 16-6231
              Fax: +49 (6151) 16-6229
              E-mail: mailto:[email protected]
              http://www.dvs1.informatik.tu-darmstadt.de
              http://skounev.cjb.net
              =====================================================
              [att1.html]
              

  • How to make iTunes read the song's name/singer from the file's name itself?

    Hi everyone,
    So I have this file with songs from everywhere. I spent quite some time now to make sure that the structure of each file's name is as such : "Singer - Song name", hoping that everything would be read by iTunes accordingly. However, either iTunes read it well, or it didn't read it at all ("Singer - Song name" appearing in Title alone), or iTunes read the "media" of the file (ie. what the guy I downloaded it from wrote for it in the Preferences, which usually is in capital letters or with a bunch of weird underscores). As I'm OCD and need everything to be neat, I'm highly tensed right now. I really want everything to be neat and clear!
    So, how do I make sure that iTunes reads the files' names such that it knows the structure is "Singer - Song name"? Thanks.

    iTunes doesn't use file names to determine how music appears in your library,  Rather, it uses metadata that is split between:
    data elements that are embedded within the media files
    data elements that are included in the entries in the iTunes database
    No amount of reorganization, renaming or other manipulation at the file level will make any difference to how songs will appear in iTunes.  Using your example:
    the value of the track number element is 1
    the value of the artist element is "Elvis Presley"
    the value of the song name element is "Blue Suede Shoes"
    Depending on how you configure iTunes then the file name is either:
    completely independent of iTunes (i.,e., the file containing this song could be xyz.mp3)
    dependent on the metadata managed by iTunes, (i.e., when you have these two options set:
    then iTunes will set the file name to be 1-01 Blue Suede Shoes.mp3 where:
    the file is in a folder called "Elvis Presley" (the name of the album)
    that folder is in one called "Elvis Presley" (the name of the artist) which is in iTunes Media\Music
    Going back to your question "How to make iTunes read the song's name/singer from the file's name" the answer is simple - you can't, as this is not how iTunes works.  There are some third-party utilities that you can use to set some metadata element values based on parsing of file names which might be a useful first step.  However, to use iTunes effectively you should really forget about / ignore file names - manage your media using appropriate metadata and allow iTunes to look after file names behind the scenes.

  • How to Modify Data in a Servlet Response

    Hi..
    I have a servlet that upon receving an http request from client sends some data to the client browser, but i want to modify the data that is being sent to the client and resend it somehow (like its a kind of bypassing...without sending the original data..i want to modify the data and send the response ON THE FLY.
    Any ideas of suggestions how to do it, if some one of you has already done it then pls do send some code snippet.
    Thanx in advance
    mark.

    Aha... now the truth comes out. You asked how to do it, but your secret question was that you were already doing it and you were having some problems. It's generally just better to come out and ask the question, even though it may be embarrassing that what you did isn't working.
    To me, what you did sounds like a perfectly good method, except that writing the data to a temp file is going to run you into problems as soon as you get two requests at about the same time. I would do that in memory instead (write to a ByteArrayOutputStream, get the resulting array of bytes, modify it, and write the end result out to the servet response's output stream).
    The problem you describe, though, is probably caused because the browsers are caching requests to your servlet. Do you have something like this code in your servlet that tells the browsers not to cache it?response.setHeader("Cache-Control", "no-cache");
    response.setHeader("Pragma", "no-cache");

  • Error in getting the servlet response

    Below is my ErrorPage Servlet. Whenever a 404 page not found error is encountered, the error page servlet reads the 404.html, and writes the content to the response. But I am not able to see the content in IE, but works fine in mozilla.
    public class ErrorPageServlet extends HttpServlet {
        protected void doGet(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
            String errorPath = request.getAttribute("javax.servlet.error.request_uri").toString();
            int statusCode = Integer.parseInt(request.getAttribute("javax.servlet.error.status_code")
                    .toString());
            String[] errorPathSegment = errorPath.split("/");
            String site = errorPathSegment[2];
            switch (statusCode) {
            case HttpServletResponse.SC_NOT_FOUND:
                writeOutFile(request, response, "/" + site + "/error/404.html");
                break;
            case HttpServletResponse.SC_INTERNAL_SERVER_ERROR:
            case HttpServletResponse.SC_NOT_IMPLEMENTED:
            case HttpServletResponse.SC_BAD_GATEWAY:
            case HttpServletResponse.SC_SERVICE_UNAVAILABLE:
            case HttpServletResponse.SC_GATEWAY_TIMEOUT:
            case HttpServletResponse.SC_HTTP_VERSION_NOT_SUPPORTED:
                writeOutFile(request, response, "/" + site + "/error/500.html");
                break;
        public void writeOutFile(HttpServletRequest request, HttpServletResponse response,
                String fileName) throws IOException {
            ServletContext context = request.getSession().getServletContext();
            response.setContentType("text/html");
            PrintWriter writer = response.getWriter();
            InputStream resourceStream = context.getResourceAsStream(fileName);
            if (resourceStream != null) {
                InputStreamReader streamReader = new InputStreamReader(resourceStream);
                BufferedReader reader = new BufferedReader(streamReader);
                StringBuilder builder = new StringBuilder();
                for (String line = reader.readLine(); line != null; line = reader.readLine()) {
                    builder.append(line);
                    builder.append('\n');
                writer.write(builder.toString());
                writer.flush();
            } else {
                log.info("Problem occurred with " + fileName);
                response.sendRedirect("/");
        }Also attached is my 404.html
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd]">
    <html xmlns="[http://www.w3.org/1999/xhtml]">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="refresh" content="10;URL=/" >
    </head>
    <body>
    <h1>Error</h1>
    <p>A technical error has occurred. You will redirected in 10 seconds</p>
    </body>
    </html>

    Hi..
    Thanks for the comment.
    Below is how my web.xml entry looks like.
    The requirement is to send a 404 error response and that will be handled by a servlet which inturn writes the output to the response object.
         <servlet>
              <servlet-name>ErrorPageServlet</servlet-name>
              <servlet-class>com.test.ErrorPageServlet</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>ErrorPageServlet</servlet-name>
              <url-pattern>/error</url-pattern>
         </servlet-mapping>
         <error-page>
              <error-code>404</error-code>
              <location>/error</location>
         </error-page>>>
    the first option to turn off the "show friendly html error pages" works fine.
    It would be better if I can get a different solution

  • Error in reading the  servlet

    Hello everyone,
    I have a question about the servlet
    My question is when i give the username and password in the login.jsp and then i am not able to get the target file
    the code is
    1) This is my jsp code
    <html>
    <head>
    <title>OnJava Demo</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body bgcolor="#FFFFFF" onLoad="document.loginForm.username.focus()">
    <table width="500" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td> </td>
    </tr>
    <tr>
    <td>
    <img src="/onjava/images/monitor2.gif"></td>
    </tr>
    <tr>
    <td> </td>
    </tr>
    </table>
    <table width="500" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td>
    <table width="500" border="0" cellspacing="0" cellpadding="0">
    <form name="loginForm" method="post" action="servlet/com.onjava.login">
    <tr>
    <td width="401"><div align="right">User Name: </div></td>
    <td width="399"><input type="text" name="username"></td>
    </tr>
    <tr>
    <td width="401"><div align="right">Password: </div></td>
    <td width="399"><input type="password" name="password"></td>
    </tr>
    <tr>
    <td width="401"> </td>
    <td width="399"><br><input type="Submit" name="Submit"></td>
    </tr>
    </form>
    </table>
    </td>
    </tr>
    </table>
    </body>
    </html>
    2) This is my java servlet code
    package com.onjava;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    public class login extends HttpServlet {
    private String target = "/welcome.jsp";
    private String getUser(String username, String password) {
    // Just return a static name
    // If this was reality, we would perform a SQL lookup
    return "Bob";
    public void init(ServletConfig config)
    throws ServletException {
    super.init(config);
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    // If it is a get request forward to doPost()
    doPost(request, response);
    public void doPost(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    // Get the username from the request
    String username = request.getParameter("username");
    // Get the password from the request
    String password = request.getParameter("password");
    String user = getUser(username, password);
    // Add the fake user to the request
    request.setAttribute("USER", user);
    // Forward the request to the target named
    ServletContext context = getServletContext();
    RequestDispatcher dispatcher =
    context.getRequestDispatcher(target);
    dispatcher.forward(request, response);
    public void destroy() {
    3) This is my welcome jsp code
    <html>
    <head>
    <title>OnJava Demo</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <table width="500" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td> </td>
    </tr>
    <tr>
    <td>
    <img src="/onjava/images/monitor2.gif"></td>
    <td>
    <b>Welcome : <%= request.getAttribute("USER")
    %></b>
    </td>
    </tr>
    <tr>
    <td> </td>
    </tr>
    </table>
    </body>
    </html>
    4) This is my xml code
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app PUBLIC
    '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN'
    'http://java.sun.com/j2ee/dtds/web-app_2_3.dtd'>
    <web-app>
    <servlet>
    <servlet-name>login</servlet-name>
    <servlet-class>com.onjava.login</servlet-class>
    </servlet>
    <taglib>
    <taglib-uri>/onjava</taglib-uri>
    <taglib-location>/WEB-INF/lib/taglib.tld</taglib-location>
    </taglib>
    </web-app>
    i am doing this from this website
    http://www.onjava.com/pub/a/onjava/2001/04/19/tomcat.html?page=1
    please any one can help me

    Hi actually i am not able to read the simple helloworld servlet i dont where did it went previously it was running good but i dont know what is the error
    this is where i placed my class file
    --------C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\onjava
         -----WEB-INF
              -----classes
                   ------HelloWorld.class
              -----web.xml
    this is my servlet code
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class HelloWorld extends HttpServlet{
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException,IOException{
    response.setContentType("text/html");
    PrintWriter pw = response.getWriter();
    pw.println("<html>");
    pw.println("<head><title>Hello World</title></title>");
    pw.println("<body>");
    pw.println("<h1>Hello World</h1>");
    pw.println("</body></html>");
    this is my web.xml code
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!--<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd"> -->
    <web-app>
    <servlet>
    <servlet-name>Hello</servlet-name>
    <servlet-class>HelloWorld</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Hello</servlet-name>
    <url-pattern>/HelloWorld</url-pattern>
    </servlet-mapping>
    </web-app>
    this is my log file
    Oct 8, 2008 8:06:47 PM org.apache.catalina.core.AprLifecycleListener init
    INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:\app\UK-Dasari\product\11.1.0\db_1\bin;D:\oracle\product\10.2.0\client_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Program Files\Java\jdk1.6.0_05\bin
    Oct 8, 2008 8:06:48 PM org.apache.coyote.http11.Http11Protocol init
    INFO: Initializing Coyote HTTP/1.1 on http-1122
    Oct 8, 2008 8:06:48 PM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 428 ms
    Oct 8, 2008 8:06:48 PM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    Oct 8, 2008 8:06:48 PM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/6.0.10
    Oct 8, 2008 8:06:48 PM org.apache.tomcat.util.digester.Digester fatalError
    SEVERE: Parse Fatal Error at line 2 column 6: The processing instruction target matching "[xX][mM][lL]" is not allowed.
    org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPIData(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanPIData(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPI(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
         at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1562)
         at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:369)
         at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1062)
         at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4238)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
         at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
         at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1023)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
         at org.apache.catalina.core.StandardService.start(StandardService.java:448)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Oct 8, 2008 8:06:48 PM org.apache.catalina.startup.ContextConfig applicationWebConfig
    SEVERE: Parse error in application web.xml file at jndi:/localhost/onjava/WEB-INF/web.xml
    org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
         at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1562)
         at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:369)
         at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1062)
         at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4238)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
         at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
         at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1023)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
         at org.apache.catalina.core.StandardService.start(StandardService.java:448)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Oct 8, 2008 8:06:48 PM org.apache.catalina.startup.ContextConfig applicationWebConfig
    SEVERE: Occurred at line 2 column 6
    Oct 8, 2008 8:06:48 PM org.apache.catalina.startup.ContextConfig start
    SEVERE: Marking this application unavailable due to previous error(s)
    Oct 8, 2008 8:06:48 PM org.apache.catalina.core.StandardContext start
    SEVERE: Error getConfigured
    Oct 8, 2008 8:06:48 PM org.apache.catalina.core.StandardContext start
    SEVERE: Context [onjava] startup failed due to previous errors
    Oct 8, 2008 8:06:48 PM org.apache.coyote.http11.Http11Protocol start
    INFO: Starting Coyote HTTP/1.1 on http-1122
    Oct 8, 2008 8:06:48 PM org.apache.jk.common.ChannelSocket init
    INFO: JK: ajp13 listening on /0.0.0.0:8009
    Oct 8, 2008 8:06:48 PM org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/20 config=null
    Oct 8, 2008 8:06:48 PM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 547 ms

  • How do I set up the servlet listener in IIS 4.0?

    I'm installing Reports Server 6i (part of Forms 6i) on a Windows NT 4 (SP6) box with IIS 4.0 and JRun 2.3.3 as a servlet engine.
    I want to install the Servlet listener, but Oracle Installer does not list this option. I have found the Java files that I appear to need under my Oracle_Home/java dir, but I'm not sure where to put them or how to configure IIS to know that I want to use them.
    The configuration steps at the end of Oracle Installer assume I want to set up a CGI listener under IIS instead. I assume I need to set up a virtual web directory of some sort (I've already done so for the HTML file).
    Any help in would be greatly appreciated.
    null

    Hey johncali,
    All you have to do is click on the RSS button for the feed or go to the link directly. Firefox will figure out that it's an RSS feed and ask you if you want to subscribe. Nice and easy!

  • HOW TO MAKE  ACROBAT READER THE DEFAULT VALUE ON AN IPAD?

    I use Acrobat Pro XI  to create forms, no problem on a laptop but on an iPad Acrobat Reader is not the default app, and the form cannot be filled in, how can I make AR the default app?

    Actually, according to this page How to Use Dropbox With Adobe Reader - Snapguide you can go straight from DropBox to Adobe Reader without involving Apple's reader.

  • How can I include, in the table of content, a title that I have put on a shape?

    Hello all,
    1. I have a table of content
    2. I have added shapes
    3. I wrote text (titles. subtitles) on the shapes
    4. They do not appear in the table of content.
    5. They only appear in the table of content if they are not on a shape.
    Pages 5.5.2
    Can you help?
    Law

    Hi Law,
    Text in a shape or a text box will not feature in the table of contents.
    To get a colour behind your titles, type them into your document (not a shape). Format as Heading or some other paragraph style the TOC will recognise.
    Select the title text and Format Panel > Text > Font > Gearwheel > Advanced Options.
    Choose Character Fill Color and choose a colour from the palette (left) or colour circle (right).
    Example Titles (all on the same page for a smaller screen shot).
    Chapter 3 (in a coloured Text Box or Shape) does not appear in the TOC:
    Hint for cheats :
    To give the titles a wider Character Fill Colour, add some Tab characters before and after.
    Regards,
    Ian.

  • Reading the Excel from Content Server...

    Hello Experts
    I have a requirement to read the contents of the excel from DMS content server to Internal Table.
    I tried using the function module "SCMS_DOC_READ", but it is reading only the part of the contents and remaining contents are missing in the Internal Table.
    Is there any other way to read the content of excel file stored in content server.
    Many Thanks in advance!!!
    Regards,
    Benu

    Hi Christoph,
    Many thanks for your reply...
    Now I am using the same report for downloading the document from content server but my requirement is to read the contents directly from content server without downloading it to presentation server..
    The function module mentioned in the above post is not reading the complete contents of the excel sheet.
    Regards,
    Benu

  • How to hide title of the list on Content Query Web Part?

    I am trying to display the description on content query web part from a list. Even when I leave the Title field blank on "Presentation" section (editing the web part), the title shows up with the link along with the description. Is there any way
    to hide the title or leave it as blank? Any help is highly appreciated.
    Thanks,
    Evilar

    Hi Evilar,
    Thanks for posting your issue, Kindly use the below mentioned CSS Style in ID of table tag to fix this issue
    #hide-title .ms-viewheadertr {
    display: none;
    }OR
    For Content Query Web part (WebPartWPQX) Note; X is a number of your web part.#WebPartWPQX .ms-viewheadertr
      display: none;
      }So only titles of the webpart within the WebPartWPQX will be hided.
    Also, browse below mentioned URL for more details
    http://www.balestra.be/2013/08/hide-column-titles-from-sharepoint-lists-libraries.html
    I hope this is helpful to you, mark it as Helpful.
    If this works, Please mark it as Answered.
    Regards,
    Dharmendra Singh (MCPD-EA | MCTS)
    Blog : http://sharepoint-community.net/profile/DharmendraSingh

  • How come I cannot see the meeting response tab at the bottom in Calendar

    Hi, my company uses Microsoft Exchange 2007. Let say someone invited me to an event. I accepted the event either on the phone or Outlook. In Outlook, it clearly showed that I had accepted the event, and also provided me with the options to change my response (like tentative or deny). When I clicked on the same event on my iPhone, it didn't give me those options (accept, deny, tentative). It gave me the option to delete the event, as if I was the event organizer. I checked the same event on my iPad 2 running iOS 5.0.1 and the same thing happened.
    On my Android device, I was able to change my response to the meeting just like how it was supposed to be. Could this be a bug with the iOS Mail application?
    I think it might have something to do with changing the initial event date or time and sending updates. Somewhere along the way, it's not syncing up correctly.

    Hi There,
    Can you please check Windows>Effects
    Select any Caption and at the bottom left you have Efftects. Check the screenshot.
    Thanks
    PRiyank

  • How do you print just the table of contents in Reader?

    I'm using Reader11, but many of my colleagues are still on Reader 9 and 10.  I'm using Adobe RoboHelp, and I'm generating a PDF document for review for files I have changed at various date ranges.   I don't need the content on the pages of the PDF.  I just need to capture the TOC so my reviewers know which documents from which time span to review, and the TOC in Reader is perfect for helping reviewers find the documents within the generated RoboHelp they need.
    How do I just the TOC to print?
    Thanks!

    Do you mean the bookmarks? If so, you can't (Except with screen captures)

  • How do I parse for the 2nd CN in a line?

    Hi,
    Via Powershell, I list all my NTDS Settings Objects with some properties, but out of the Distinguished Name I just want the 2nd CN which contains the Server Name.  I just do a Get-Adobject on the Objectclass of nTDSDSA to get this data, so how would
    I read this via the pipeline and just grab the 2nd CN or server name?
    DistinguishedName
    CN=NTDS Settings,CN=Srv01,CN=Servers,CN=SA,CN=Sites,CN=Configuration,DC=mydomain,DC=com
    CN=NTDS Settings,CN=SrvName01,CN=Servers,CN=SB,CN=Sites,CN=Configuration,DC=mydomain,DC=com
    CN=NTDS Settings,CN=SrvSomething01,CN=Servers,CN=SC,CN=Sites,CN=Configuration,DC=mydomain,DC=com
    CN=NTDS Settings,CN=WhoKnows001,CN=Servers,CN=SC,CN=Sites,CN=Configuration,DC=mydomain,DC=com
    Thanks for your help! SdeDot

    Hi,
    Via Powershell, I list all my NTDS Settings Objects with some properties, but out of the Distinguished Name I just want the 2nd CN which contains the Server Name.  I just do a Get-Adobject on the Objectclass of nTDSDSA to get this data, so how would
    I read this via the pipeline and just grab the 2nd CN or server name?
    DistinguishedName
    CN=NTDS Settings,CN=Srv01,CN=Servers,CN=SA,CN=Sites,CN=Configuration,DC=mydomain,DC=com
    CN=NTDS Settings,CN=SrvName01,CN=Servers,CN=SB,CN=Sites,CN=Configuration,DC=mydomain,DC=com
    CN=NTDS Settings,CN=SrvSomething01,CN=Servers,CN=SC,CN=Sites,CN=Configuration,DC=mydomain,DC=com
    CN=NTDS Settings,CN=WhoKnows001,CN=Servers,CN=SC,CN=Sites,CN=Configuration,DC=mydomain,DC=com
    Thanks for your help! SdeDot
    I think Leif-Arne Helland's solution would work, I would do it differently.
    $DN = "CN=NTDS Settings,CN=Srv01,CN=Servers,CN=SA,CN=Sites,CN=Configuration,DC=mydomain,DC=com"
    $servername = ($dn.split(","))[1].replace("CN=","")
    $servername
    What you essentially are doing $dn.split(",") is splitting it by commas, you then select [1] which is the second result in the split, "cn=srv01", then you leverage the Replace command to search for "cn=" and replace it with "nothing"
    or "".
    Entrepreneur, Strategic Technical Advisor, and Sr. Consulting Engineer - Strategic Services and Solutions Check out my book - Powershell 3.0 - WMI: http://amzn.to/1BnjOmo | Mastering PowerShell Coming in April 2015! This posting is provided AS IS with no
    warranties or guarantees, and grants no rights.

Maybe you are looking for

  • Hide login page on Home hub 3.0B

    I run a very small business from home and take card payments using an online application. I use a Home hub 3.0B Unfortunately my service provider's security scan detects "that the following webpage  uses  basic authentication over an unencrypted chan

  • How to create YTD reports in Query Designer (year over year comparison)

    Dear BW Reporting gurus, I am trying to create a dynamic YTD report. The cube contains data from 2010, 2011, 2012. Let's say today's date is Feb 12, 2012. When the user runs the report, the report should contain: A column of cumulative sales quantity

  • Call a function in a where clause of a select

    hello, is it possible to call a function in a where clause of a select???? ex: select col1, col2 from my_table where my_package.my_function(32199, 2008, col3, 'P'); and i have error message "ORA-00920: invalid relational operator" FUNCTION my_functio

  • Urgent info needed... help!

    Hi, I am looking for a java based component whose methods can be called by my java program (servlet) to convert a Word (MS) document to PDF. The server is windos based and the component could be commercial or free. Any help would be highly appreciate

  • Does the null event work in 9.0.5?

    <handlers> <event name="null"> </event> </handlers>I have a null event and am calling a onNull event in the dataAction. The framework doesn't seem to call the onNull event. Thanks in advance.