Compiled servlet throws "try w/o catch" and "catch w/o try" error - HELP

Compiled servlet throws "try w/o catch" and "catch w/o try" error - HELP

Post by phillip.s. » Mon, 16 Jan 2006 05:27:29


RL: http://www.myjavaserver.com/~ppowell/room.php

CODE:

[CODE]
<%@ page import="ppowell.*, javax.servlet.http.*" %>

<%

/*---------------------------------------------------------------------------------------------------
File: ROOM.JSP
Created By: Phil Powell
Creation Date: 3/13/2004
Modified Date: 1/13/2006
Purpose: Display HTML framed content within chatroom window
created by
included JSP script chat_open_room.jsp
Dependencies: NONE
Cookies: Name of cookie generated from ChatGlobals static final
String value CHAT_COOKIE_NAME
Sessions: NONE
Structure: Standalone script to be placed in main directory

--------------------------------------------------------------------------------------------------*/
%>
<html>
<%

Cookie[] cookieArray = request.getCookies();

for (int i = 0; i < cookieArray.length; i++) {
if
(cookieArray[i].getName().trim().toLowerCase().equals(ChatGlobals.CHAT_COOKIE_NAME.trim().toLowerCase())
&&
cookieArray[i].getValue.length() > 0
) {

%>
<head>
<title>Snacka Här/Chat Here!</title>
</head>
<frameset border="0" rows="75%, *" framespacing="0" border="0"
frameborder="0">
<frameset border="0" cols="70%, *" framespacing="0" border="0"
frameborder="0">
<frame name="msgReceive" src="<%= "ChatGlobals.SELF + "/" +
ChatGlobals.PATH" %>/chat_messages.php#view" scrolling="auto" noresize>
<frame name="nickReceive" src="<%= "ChatGlobals.SELF + "/" +
ChatGlobals.PATH" %>/chat_nicknames.php" scrolling="auto" noresize>
</frameset>
<frame name="messageFrame" src="<%= "ChatGlobals.SELF + "/" +
ChatGlobals.PATH" %>/chat_submit_message.php" scrolling="no" noresize>
</frameset>
<noframes>
Sorry for the inconvience, however in order to view the chatroom your
browser must support frames
</noframes>

<%
break; // SHOULD ONLY LOOP ONCE COOKIE IS FOUND IN COOKIE ARRAY
GENERATED FROM HttpServletRequest request
}
%>

</html>

[/CODE]

This is the error upon running this JSP script:

[ERROR]
/~ppowell/room.jsp:47: 'catch' without 'try'
} catch (java.lang.Throwable _jsp_e) {
^
/~ppowell/room.jsp:27: 'try' without 'catch' or 'finally'
try {
^
/~ppowell/room.jsp:54: illegal start of expression
private com.caucho.java.LineMap _caucho_line_map;
^
/~ppowell/room.jsp:55: illegal start of expression
private java.util.ArrayList _caucho_depends = new
java.util.ArrayList();
^
/~ppowell/room.jsp:57: illegal start of expression
public boolean _caucho_isModified()
^
/~ppowell/room.jsp:110: illegal start of expression
private static byte []_jsp_string4;
^
/~ppowell/room.jsp:111: illegal start of expression
private static byte []_jsp_string5;
^
/~ppowell/room.jsp:112: illegal start of expression
private static byte []_jsp_string1;
^
/~ppowell/room.jsp:113: illegal start of expression
private static byte []_jsp_string2;
^
/~ppowell/room.jsp:114: illegal start of expression
private static byte []_jsp_string3;
^
/~ppowell/room.jsp:115: illegal start of expression
private static byte []_jsp_string6;
^
/~ppowell/room.jsp:116: illegal start of expression
static {
^
/~ppowell/room.jsp:125: ';' expected
}
^
/~ppowell/room.jsp:126: '}' expected
^
14 errors