I`m tring to make a program to.....

Results 1 to 3 of 3
  1. #1
    Banned Adriana is offline
    BannedRank
    Apr 2011 Join Date
    127Posts

    I`m tring to make a program to.....

    i`m trying to make a program using this source code:


    Code:
    <%@page import="java.io.*"%>
    <%@page import="java.util.*"%>
    <%@page import="protocol.*"%>
    <%@page import="org.apache.axis.encoding.Base64"%>
    
    
    <html>
    
    <head>
    	<meta http-equiv="refresh" content="5">
    
    </head>
    
    <%
    
    	Vector<String> lines = new Vector<String>();
    	String line;
    	String time;
    	String sender;
    	String recipient;
    	String message;
    	String debug;
    	String color;
    
    	BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream("/PWServer/authd.old/world2.chat")));
    
    	while((line = br.readLine()) != null)
    	{
    		lines.add(line);
    	}
    
    	br.close();
    
    	int i = lines.size()-1;
    
    	while(i>lines.size()-show_lines && i>=0)
    
    	{
    		line = lines.get(i);
    
    		color = "<font color=\"#aaaaaa\">";
    		time = line.substring(0, 19);
    		line = line.substring(line.indexOf(": chat :")+9);
    		sender = "*****";
    		recipient = "*****";
    		message = new String("*****");
    		byte[] temp = Base64.decode(line.substring(line.indexOf("msg=")+4));
    
    		if(line.startsWith("Chat"))
    		{
    			// World
    			if(show_world && line.indexOf("chl=1") != -1)
    			{
    				message = new String(temp, "UTF-16LE");
    				sender = line.substring(line.indexOf("src=")+4);
    				sender = "Player(" + sender.substring(0, sender.indexOf(" ")) + ")";
    				recipient = "World";
    				color = "<font color=\"#ffee00\">";
    			}
    		}
    		
    
    
    
    		out.print("<td style=\"border-bottom: 1px solid #cccccc;\"><b>" + color + sender + "</font></b></td>");
    		out.print("<td align=\"center\" style=\"border-bottom: 1px solid #cccccc;\"> to: </td>");
    		out.print("<td style=\"border-bottom: 1px solid #cccccc;\"><b>" + color + recipient + "</font></b></td>");
    		out.print("<td align=\"center\" style=\"border-bottom: 1px solid #cccccc;\"> msg: </td>");
    		out.print("<td style=\"border-bottom: 1px solid #cccccc;\"><b>" + color + message + "</font></b></td>");
    		out.println("</tr>");
    
    
    
    
    
    i--;
    	      }
    
    
    %>
    </table>
    </body>
    </html>
    The problem is that it dos not work for older java or older jakarta and i need to work with it.

    anyone dose know how to fix this;

    Vector<String> lines = new Vector<String>();

    here is what error i get.

    Code:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    
    An error occurred at line: 14 in the jsp file: /program/index.jsp
    Generated servlet error:
    Syntax error on token "<", invalid AssignmentOperator
    
    An error occurred at line: 14 in the jsp file: /program/index.jsp
    Generated servlet error:
    Syntax error on token "=", != expected
    
    An error occurred at line: 14 in the jsp file: /program/index.jsp
    Generated servlet error:
    Syntax error on token "<", ( expected
    
    An error occurred at line: 14 in the jsp file: /program/index.jsp
    Generated servlet error:
    Syntax error on token "(", invalid Expression
    i`m using jakarta-tomcat-5.5.9 needed
    i`m using java 1.5 needed
    Last edited by Adriana; 10-06-11 at 06:28 AM.


  2. #2
    [B]aSH nofxpunkerbrian is offline
    MemberRank
    Apr 2009 Join Date
    1,151Posts

    Re: I`m tring to make a program to.....

    Try

    Code:
    Vector lines = new Vector();

  3. #3
    Banned Adriana is offline
    BannedRank
    Apr 2011 Join Date
    127Posts

    Re: I`m tring to make a program to.....

    Quote Originally Posted by nofxpunkerbrian View Post
    Try

    Code:
    Vector lines = new Vector();
    i try ed that before and it dos not know Vector at all.

    and i found other solution thanks for replay.

    i will share the trivia for perfect world later on.



Advertisement