DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33971>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33971





------- Additional Comments From [EMAIL PROTECTED]  2005-03-12 00:47 -------
This is what i have in httpd.conf

<VirtualHost *>
ServerName susnet.se
ServerAlias www.susnet.se
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /usr/tomcat-5/webapps/susnet
ErrorLog /usr/tomcat-5/logs/susnet.se-errorlog
CustomLog /usr/tomcat-5/logs/susnet.se-customlog combined
jkMount /* ajp13
</VirtualHost>

In the code for my application i have 

boolean insertOk = stat.insertLogs(id, request.getRemoteAddr(),
                                             request.getRemoteHost(),
                                             referer);

 public boolean insertLogs(int counterId, String ip, String hostname,
                         String referer) {

    try {
      PreparedStatement pstmt = connection.prepareStatement(
          "INSERT INTO service.logs VALUES(?, NOW(), ?, ?, ?)");
      synchronized (pstmt) {
        pstmt.clearParameters();
        pstmt.setInt(1, counterId);
        pstmt.setString(2, ip);
        pstmt.setString(3, hostname);
        pstmt.setString(4, referer);
        pstmt.executeUpdate();
      }
    }
    catch (Exception e) {
      System.out.println(
          "Error i susnet.se/tjanster statistics.java insertLogs.");
          return false;
    }
    return true;
  }

this is executed in a standard Struts executeLogic. There is no problem with 
anything else and it worked fine when I used Tomcat 5.0.49 and JK2.

Tell me if you want some more input!



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to