[opencms-dev] wierd error on public function declaration

Arian Abrahantes Quintana Arian.Abrahantes.Quintana at cern.ch
Tue May 29 16:04:34 CEST 2007


Dear all:

Any help is appreciatted. The following code gave me the error: 

(14,30) equal symbol expected. 

I am working over opencms 6.2.3 tomcat 4.1 mysql 5

<%@ page session="true" %>
<%@ page import="java.lang.*,java.util.*,java.io.*,java.sql.*,java.util.regex.*,
                 org.opencms.main.*,org.opencms.jsp.*,org.opencms.file.*, org.opencms.site.*,org.opencms.i18n.CmsMessageContainer,
                 com.opencms.defaults.*, org.opencms.mail.CmsHtmlMail,org.opencms.mail.CmsSimpleMail, javax.mail.MessagingException ,
                 org.opencms.util.CmsRequestUtil,org.apache.commons.fileupload.*%>

<%!

String errorMsg = null;

//----------------------------------------------------------------------------

public void appendToFile( String logtext, String filename )
{
   // Append the text "logtext" to the end of "filename"
 
   BufferedWriter bw = null;

   try {
      bw = new BufferedWriter( new FileWriter( filename, true) );
      bw.write(logtext);
      bw.newLine();
      bw.flush();
   } catch (IOException e) {
      errorMsg += e.getMessage();
   } finally {                       // always close the file
      if (bw != null){ 
         try {
            bw.close();
         } catch (IOException ioe2) {
         // just ignore it
         }
      }// end if
    } // end try/catch/finally
}

TIA, Arian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 3103 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20070529/85f16894/attachment.bin>


More information about the opencms-dev mailing list