ServletException I do not understand



[quote]
500 Servlet Exception
/~ppowell/includes/chat_messages.jsp:153: cannot find symbol
symbol : constructor
MessageProcessor(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,boolean)
location: class ppowell.MessageProcessor
MessageProcessor mp = new MessageProcessor(request, response, true);
// THIRD PARAMETER MEANS YOU WILL GET HTML
^
/~ppowell/includes/chat_messages.jsp:155: cannot find symbol
symbol : method getHTML()
location: class ppowell.MessageProcessor
content = mp.getHTML();
^
Note:
/usr/local/resin2/work/__27eppowell/_includes/_chat_0messages__jsp.java
uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors

[/quote]

I am getting ServletException errors on a successfully-compiled class
MessageProcessor
(http://www.myjavaserver.com/~ppowell/docs/MessageProcessor.java ). I
do not understand why I'm getting these errors, it's perfectly good
syntax, I thought!

[code]
package ppowell;

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


/**
* Serializable class to send message from applet or JSP received from
ChatServlet to go to
* the flat file referenced in ChatGlobals class. Will immediately
also receive all messages
* from the flat file to return to the applet exclusively. Will handle
all commands using
* MessageCenter class instance.
*
* @version JSDK 1.4
* @author Phil Powell
* @package ppowell
*/
public class MessageProcessor implements Retriever, Serializable {

//------------------------- --* PROPERTIES *--
-------------------------------

public String message = "", origMessage = "", nickname = "";

private NicknameBin nickBin;
private HTMLEntities htmlEntities;
private HTMLParser htmlParser;
private URLParser urlParser;
private MessageBinHashBundler bundler;
private MessageConverter converter;
private MessageCenter msgCenter;
private MessageBin msgBin;
private Pattern yourMessagePattern;
private Matcher matcher;
private String cookie = "", html = "", messageFromCommandResponse =
"";
private boolean isFoundNickname = false, isLastToLeave = false,
isFromApplet = false, isOKPostMessage = true;
private boolean isOKReceiveMessages = false, isOKReceiveNicks = false,
isFromHTTP = false, willRetrieveHTML = false;
private String[] convertedMsgArray, commandArray;
private static final String redirectHTML = "";
private Hashtable cookieHash = null;
private HttpServletRequest request;
private HttpServletResponse response;

//------------------------- --* END OF PROPERTIES *--
-------------------------------

/**
* Constructor
*
* @access public
*/
public MessageProcessor() {} // CONSTRUCTOR

/**
* Constructor
*
* @access public
* @param HttpServletRequest request
* @param HttpServletResponse response
*/
public MessageProcessor(HttpServletRequest request,
HttpServletResponse response) { // CONSTRUCTOR
this.request = request;
this.response = response;
}

/**
* Constructor
*
* @access public
* @param HttpServletRequest request
* @param HttpServletResponse response
* @param boolean willRetrieveHTML
*/
public MessageProcessor(HttpServletRequest request,
HttpServletResponse response, boolean willRetrieveHTML) {
this.request = request;
this.response = response;
this.willRetrieveHTML = willRetrieveHTML;
}

}
[/code]

Ok, overloaded constructor, all is cool, so here are the offending
scripts in chat_messages.jsp:

[code]
MessageProcessor mp = new MessageProcessor(request, response, true);
// THIRD PARAMETER MEANS YOU WILL GET HTML
mp.process();
content = mp.getHTML();
[/code]

And here is the offending scripts in chat_nicknames.jsp:

[code]
RequestParameterResetter request2 = new
RequestParameterResetter(request);
request2.setParameter("message", "/n");
MessageProcessor mp = new MessageProcessor(request2, response,
true); // THIRD PARAMETER MEANS YOU WILL GET HTML
mp.process();
content = mp.getHTML();
[/code]

I am not understanding what is going on here and would love for some
insight. Thanx
Phil

.



Relevant Pages

  • Surprising threading issue
    ... connect to it about 100 times per request and so i use threads to ... private static DateTime lastHttpCallTime = DateTime.MinValue; ... lock (weeklyProcessorLocker) ... WebResponse response = null; ...
    (microsoft.public.dotnet.framework)
  • Re: problem with HttpWebRequest/HttpWebResponse...
    ... Following is the code we are using to get the response object from the request: ... Cache-Control: private ... Immediately after the above response, the next response it shows in Packet Sniffer is: ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Aprile Millo Recital
    ... way he has so far without a response. ... But I think she was a young singer with a ... good voice, a variable technique, a certain laziness (for lack of ... always be kept private. ...
    (rec.music.opera)
  • Re: Error: Name cannot begin with the 0 character, hexadecimal v
    ... Private Shared Function ParsePropfindResponse(ByVal response As String) As XmlReader ... Dim response1 As String ...
    (microsoft.public.exchange.applications)
  • Re: Alcatel Router and Remote Desktop...totally stuck.
    ... Copy of my response to your prior posting.... ... If they are private IP addresses, ... etc and either configure the router to forward ... need to reconfigure the listening ports on each machine). ...
    (microsoft.public.windowsxp.work_remotely)