ServletException I do not understand
- From: "phillip.s.powell@xxxxxxxxx" <phillip.s.powell@xxxxxxxxx>
- Date: 9 Feb 2006 02:01:52 -0800
[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
.
- Follow-Ups:
- Re: ServletException I do not understand
- From: trippy
- Re: ServletException I do not understand
- Prev by Date: Re: Writting to file from Database-Files are empty
- Next by Date: Re: Eclipse setup?
- Previous by thread: JBOSS problem
- Next by thread: Re: ServletException I do not understand
- Index(es):
Relevant Pages
|