RE: Logging with tomcat
Yoav == Yoav Shapira Shapira writes: Yoav Howdy, Where are your commons-logging, commons-logging-api Yoav jars, and logging configuration file? jakarta-tomcat-4.0.6-src/lib/commons-logging.jar also jakarta-tomcat-4.1.27/common/lib/commons-logging-api.jar jakarta-tomcat-4.1.27/server/lib/commons-logging.jar (I'm testing both versions) I guess the problem can be the configuration file. I don't know where it is or where should be. Thank you! Yoav Yoav Shapira Millennium ChemInformatics -Original Message- From: Francisco Vides Fernandez [mailto:[EMAIL PROTECTED] Sent: Monday, September 15, 2003 5:37 PM To: [EMAIL PROTECTED] Subject: Logging with tomcat Hello I'm trying to do some loging using tomcat and commons-logging, but I don't know how to make it work properly. I'm using org.apache.commons.Log, and if I do something like log.error (something); It works properly, and I can see the output in tomcat log files, but if I do log.debug (something); or log.trace (something); can't see any output. I've RTFM from tomcat and commons-logging, and tried with values of debug in Context, Logger and such. Also search the mail archives, but couldn't find anything on how to configure this. Could someone help me or point me in the right direction? Thanks in advance -- +- | Francisco Vides Fernández [EMAIL PROTECTED] | Director técnico. | Teléfono fijo: 952 60 29 59 | Teléfono móvil: 661 67 32 73 | Fax: 952 60 29 59 | Dédalo Ingenieros http://www.dedaloingenieros.com/ | PGP: http://pgp.rediris.es:11371/pks/lookup?op=indexsearch=0x5AAE6285 +-- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Yoav This e-mail, including any attachments, is a confidential Yoav business communication, and may contain information that is Yoav confidential, proprietary and/or privileged. This e-mail is Yoav intended only for the individual(s) to whom it is addressed, Yoav and may not be saved, copied, printed, disclosed or used by Yoav anyone else. If you are not the(an) intended recipient, please Yoav immediately delete this e-mail from your computer system and Yoav notify the sender. Thank you. Yoav - Yoav To unsubscribe, e-mail: Yoav [EMAIL PROTECTED] For additional Yoav commands, e-mail: [EMAIL PROTECTED] -- +- | Francisco Vides Fernández [EMAIL PROTECTED] | Director técnico. | Teléfono fijo: 952 60 29 59 | Teléfono móvil: 661 67 32 73 | Fax: 952 60 29 59 | Dédalo Ingenieros http://www.dedaloingenieros.com/ | PGP: http://pgp.rediris.es:11371/pks/lookup?op=indexsearch=0x5AAE6285 +-- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Logging with tomcat
Hello I'm trying to do some loging using tomcat and commons-logging, but I don't know how to make it work properly. I'm using org.apache.commons.Log, and if I do something like log.error (something); It works properly, and I can see the output in tomcat log files, but if I do log.debug (something); or log.trace (something); can't see any output. I've RTFM from tomcat and commons-logging, and tried with values of debug in Context, Logger and such. Also search the mail archives, but couldn't find anything on how to configure this. Could someone help me or point me in the right direction? Thanks in advance -- +- | Francisco Vides Fernández [EMAIL PROTECTED] | Director técnico. | Teléfono fijo: 952 60 29 59 | Teléfono móvil: 661 67 32 73 | Fax: 952 60 29 59 | Dédalo Ingenieros http://www.dedaloingenieros.com/ | PGP: http://pgp.rediris.es:11371/pks/lookup?op=indexsearch=0x5AAE6285 +-- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SSL Apache/Tomcat encrypting a subdirectory
Kai == Kai Schliemann [EMAIL PROTECTED] writes: I did something similar. I have an Apache serving static content, and Tomcat for Jsp and servlets. Tomcat is hidden behind a firewall, the webapp can only be seen through apache. So, to protect a directory with, you only have to configure a location inside an apache ssl virtual host, and deny access to this directory through non-ssl. Apache and tomcat will interact through mod_jk2 as usual. Hope this helps. Saludos Kai Hello list, I have the following problem: Kai I'm running Apache 1.3.27 on Suse Linux 8.2 (Server 1) and Kai Tomcat 4.1.24 on Suse Linux 8.2 (Server 2). I'm using mod_jk as Kai connector for Apache/Tomcat which works fine without Kai SSL-configuration. Kai My JAVA-Webapp is running on Tomcat (Server 2). I can connect Kai to my JAVA-Webapp through the URL http://www.foo.com/. Now I Kai want a subdirectory (online) of this webapp to run in ssl-mode Kai (e.g. https://www.foo.com/online/). I just want the directory Kai online (and all of its subdirectories) to be ssl-encrypted not Kai the complete domain www.foo.com. Kai How can I do that? Kai Thanks in advance. Kai Kai Kai - Kai To unsubscribe, e-mail: Kai [EMAIL PROTECTED] For additional Kai commands, e-mail: [EMAIL PROTECTED] -- +- | Francisco Vides Fernández [EMAIL PROTECTED] | Director técnico. | Teléfono fijo: 952 60 29 59 | Teléfono móvil: 661 67 32 73 | Fax: 952 60 29 59 | Dédalo Ingenieros http://www.dedaloingenieros.com/ | PGP: http://pgp.rediris.es:11371/pks/lookup?op=indexsearch=0x5AAE6285 +-- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jdbc servlets and jsp
Is the postgres jar locate somewhere the app have access to? Good places are: commons/lib in $CATALINA_BASE or WEB-INF/lib in the application directory. Saludos Luke == Luke Vanderfluit [EMAIL PROTECTED] writes: Luke Hi, I'm having a few probs (fun) getting jdbc to work in Luke servlets and jsp, tomcat in other words. Luke I've successfully got jdbc working with postgresql in a regular Luke java class. Luke I have tried using the same code adapted to a servlet and jsp Luke to get a database connection happening from there, however no Luke luck, Luke Is there anything I need to set up in server.xml or web.xml Luke before it can work? Luke here is my jsp and servlet code: Luke jsp file -=-=-=-= html Luke head /head %@ page language=java import=java.sql.* % Luke body % Luke Class.forName(org.postgresql.Driver); Connection Luke myConn=DriverManager.getConnection(jdbc:postgresql:mboard, Luke luke, ); Luke % /body /html =-=-=-=-=-=-=-=-=-=-=-=-=-= servlet code Luke =-=-=-=-=-=-=-=-=-=-=-=-=-= import javax.servlet.*; import Luke javax.servlet.http.*; import java.io.*; import java.sql.*; Luke import java.text.DateFormat; Luke /** * ShowEmployees creates an HTML table containing a list of Luke all * employees (sorted by last name) and the departments to Luke which * they belong. */ public class ShowEmployees extends Luke HttpServlet { Connection dbConn = null; Luke /** * Establishes a connection to the database. */ public Luke void init() throws ServletException { String jdbcDriver = Luke org.postgresql.Driver; String dbURL = Luke \jdbc:postgresql:mboard\, \luke\, \\; Luke try { Class.forName(org.postgresql.Driver).newInstance(); Luke //load driver dbConn = Luke DriverManager.getConnection(jdbc:postgresql:megaboard, Luke luke, ); //connect } catch (ClassNotFoundException e) { Luke throw new UnavailableException(JDBC driver not found: + Luke jdbcDriver); } catch (SQLException e) { throw new Luke UnavailableException(Unable to connect to: + dbURL); } catch Luke (Exception e) { throw new UnavailableException(Error: + e); Luke } } Luke /** * Displays the employees table. */ public void Luke service(HttpServletRequest request, HttpServletResponse Luke response) throws ServletException, IOException { Luke response.setContentType(text/html); Luke PrintWriter out = response.getWriter(); Luke try { //join EMPLOYEE and DEPARTMENT tables to get all data Luke String sql = select * from message;; Luke Statement stmt = dbConn.createStatement(); ResultSet rs = Luke stmt.executeQuery(sql); Luke out.println(HTML); out.println(HEADTITLEShow Luke Employees/TITLE/HEAD); out.println(BODY); Luke out.println(TABLE BORDER=\1\ CELLPADDING=\3\); Luke out.println(TR); out.println(THName/TH); Luke out.println(THDepartment/TH); Luke out.println(THPhone/TH); out.println(THEmail/TH); Luke out.println(THHire Date/TH); out.println(/TR); Luke while (rs.next()) { out.println(TR); Luke out.println(TD + rs.getString(resusername) + Luke /td); Luke out.println(/TR); } Luke out.println(/TABLE); out.println(/BODY/HTML); Luke rs.close(); stmt.close(); } catch (SQLException e) { Luke out.println(H2Database currently unavailable./H2); } Luke out.close(); } } Luke any help would be greatly appreciated. thanks, kind regards Luke Luke Luke -- Luke when my computer smiles, Luke I'm happy ===.~ ~, Luke Luke Vanderfluit |'/'] Mobile: 0421 276 282 \~/` Luke - Luke To unsubscribe, e-mail: Luke [EMAIL PROTECTED] For additional Luke commands, e-mail: [EMAIL PROTECTED] -- +- | Francisco Vides Fernández [EMAIL PROTECTED] | Director técnico. | Teléfono fijo: 952 60 29 59 | Teléfono móvil: 661 67 32 73 | Fax: 952 60 29 59 | Dédalo Ingenieros http://www.dedaloingenieros.com/ | PGP: http://pgp.rediris.es:11371/pks/lookup?op=indexsearch=0x5AAE6285 +-- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re[3]: Charset encoding issue
I had a similar problem with RH9.0. Form data enconded with application/x-www-form-urlencoded worked just fine with iso8859-1 special characters, but multipart/form-data made strange things appear. If I declared the page encoding to be UTF-8, the data was correctly sent, but the browser was unable to show it properly later. I tested this with every browser I have access to: Mozilla, Galeon, Firebird, Konqueror, IE 6.0, and the behavihour was similar in every case. If I declared the page encoding to be iso8859-1, data was corrupted. The root of the problem seemed to be in my LOCALE settings. I had es_ES.UTF-8, and when I changed this to es_ES (without UTF) everything worked fine again. This is the same in Tomcat 4.0.6 and 4.1.27. I've found the solution, but I also like to understand better what is happening here. Saludos! -- +- | Francisco Vides Fernández [EMAIL PROTECTED] | Director técnico. | Teléfono fijo: 952 60 29 59 | Teléfono móvil: 661 67 32 73 | Fax: 952 60 29 59 | Dédalo Ingenieros http://www.dedaloingenieros.com/ | PGP: http://pgp.rediris.es:11371/pks/lookup?op=indexsearch=0x5AAE6285 +-- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Charset encoding issue
I've recently have a similar problem with spanish language. What OS are you running Tomcat on? What are your LOCALE settings? lima == lima [EMAIL PROTECTED] writes: lima Hi, guys. How are you ? I have a jsp page with some form lima fields. I don't know how is the right way to set the charset lima (because we're using portuguese characters). This is the only lima configuration that have worked for me : lima %@ page contentType=html/text; charset=UTF-8% lima (...) lima form (...) enctype=multipart/form-data lima Is it right ? Is there other way ? lima Thanks in advance. lima - lima To unsubscribe, e-mail: lima [EMAIL PROTECTED] For additional lima commands, e-mail: [EMAIL PROTECTED] -- +- | Francisco Vides Fernández [EMAIL PROTECTED] | Director técnico. | Teléfono fijo: 952 60 29 59 | Teléfono móvil: 661 67 32 73 | Fax: 952 60 29 59 | Dédalo Ingenieros http://www.dedaloingenieros.com/ | PGP: http://pgp.rediris.es:11371/pks/lookup?op=indexsearch=0x5AAE6285 +-- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]