Re: Best practice for running Tomcat on port 80

2010-09-07 Thread Ognjen Blagojevic
On 7.9.2010 9:51, Pid wrote: 3. Iptables Actually, remarkably simple to implement. Should be properly documented within your organisation because it might be hard to discover for less familiar users. If you are talking about NAT, like in this example: = *nat :OUTPUT ACCEPT [93:16135] :PO

Re: URL Rewrite

2010-09-03 Thread Ognjen Blagojevic
On 3.9.2010 12:02, michel wrote: I have been using the tuckey urlrewrite with some results, in that if I want to have an incoming URL coming in as gallery/pic20 gets changed to gallery.jsp?pic=20 But the tool bar URL gets displayed as gallery.jsp?pic=20 and I want to display gallery/pic20 J

Re: Best practice to upgrade (redeploy) .war files

2010-09-03 Thread Ognjen Blagojevic
Hi, I just use Tomcat Manager webapp: undeploy and deploy without restarting Tomcat. It brings no downtime to other webapps/hosts on the same Tomcat, and downtime of the webapp itself is few seconds per deploy. This is acceptable for me, since the server load is really low. If a webapp clean

Re: iCal4j and ThreadLocal

2010-08-31 Thread Ognjen Blagojevic
Is there no way for me to kill these? Not easily. Most uses of ThreadLocal seem to be blissfully (sometimes arrogantly) unaware of thread-pooling mechanisms and app servers. Ideally, these ThreadLocal instances would instead be created in a pool for the webapp to use, rather than being tied

Re: tomcat mutual authentication doesn't work

2010-08-20 Thread Ognjen Blagojevic
On 20.8.2010 0:44, aravidu wrote: I don't have a client.keystore. Commands I used for creating a truststore& adding keys to it: keytool" -export -alias clientcert -file client-cert.cer -keystore tomcat.truststore keytool" -import -file client-cert.cer -alias clientcert -keystore tomcat.truststo

Re: tomcat mutual authentication doesn't work

2010-08-19 Thread Ognjen Blagojevic
On 19.8.2010 22:35, aravidu wrote: I created the keystore and truststore too. keystore has a PrivateKeyEntry and truststore has a trustedCertEntry. Are those self-signed certificates? Could you provide exact commands you used to create them? I believe you must have one key pair for server, an

[offtopic] Server dies suddenly

2010-07-04 Thread Ognjen Blagojevic
Whenever you have a hard time debugging your server crash, read this blog post from James Gosling: "We'd get core dumps and spend hours pouring over them. Some were just crazy, showing values in registers that were simply impossible given the preceeding instructions. We tried everything. Repla

Re: How to configure a web app

2010-06-09 Thread Ognjen Blagojevic
On 9.6.2010 16:19, Thomas Kloeber wrote: * the IP address of the backing database is one of the parameters that needs to be configured (in context.xml), so I can't get any data from the db unless it is configured... * the other confgurables (SPNEGO and kerberos stuff) are in w

Re: tomcat administration

2010-05-07 Thread Ognjen Blagojevic
testwreq wreq wrote: http://localhost:8080 brings up the tomcat page & one of the option is "Administration". I would like to use this web interface and even give some of the test webapp users ability to restart tomcat. What is the URL of the administration application? Is it something that en

Re: Debugging PermGen problems

2010-04-29 Thread Ognjen Blagojevic
Caldarale, Charles R wrote: From: Ognjen Blagojevic [mailto:ogn...@etf.bg.ac.rs] Subject: Debugging PermGen problems Environment: Tomcat 6.0.14, Windows XP SP2. Before doing *anything* else, move up to the current level (6.0.26). Besides having numerous stability and security fixes beyond

Debugging PermGen problems

2010-04-28 Thread Ognjen Blagojevic
Hi, My co-worker and I decided to try to debug PermGen problems after detailed reading of mailing list archives and Tomcat wiki. We followed the procedure described at the wiki [1], and got one inactive WebappClassLoader (started = false), with 18 GC root paths. They are attached to the mess

Re: Tomcat app. can no longer connect to MySQL

2010-03-29 Thread Ognjen Blagojevic
Konstantin Kolinko wrote: 2010/3/28 fred basset : Caused by: org.hibernate.HibernateException: Hibernate Dialect must be explicitly set at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:57) at org.hibernate.dialect.DialectFactory.buildDialect(DialectFac

[OT] Re: jvm exits without trace

2010-03-16 Thread Ognjen Blagojevic
Hi, "Tomcat dies suddenly" thread was exciting almost as "Prison Break" TV series. I couldn't wait to find out what would be solution to the problem, and I must admit that just downgrading to lower sub-sub-sub version JVM left me a bit disappointed. :) Regards, Ognjen Carl wrote: Taylan,

Re: [OT] Tomcat dies suddenly

2010-02-17 Thread Ognjen Blagojevic
André Warnier wrote: Now I am very curious, because I happen to have supplied the media archive management software used by a very large broadcasting organisation, where a similar story happened to the server running ditto software (this was a few years ago). Right after that incident, the or

Re: [OT] Tomcat dies suddenly

2010-02-14 Thread Ognjen Blagojevic
George Sexton wrote: There's a story in a book I once read where a computer system crashed every morning around the same time. No one could figure it out. Finally, the head of IS goes down to the computer room at the expected time. In walks a maintenance man who comes in, opens the cabinet for

Re: tomcat https

2009-11-04 Thread Ognjen Blagojevic
ards, Ognjen Thanks again for all help!! Torleif Wed Nov 04 2009 10:28:22 CET from "Ognjen Blagojevic" Subject: Re: tomcat https Torleif wrote: I am trying to set up tomcat to use https. I used "keytool -genkey -alias tomcat -keyalg RSA" If I use &

Re: webapps question

2009-11-04 Thread Ognjen Blagojevic
Michele Mase' wrote: I've 100 webapps on one single tomcat instance. Every webapps has in his WEB-INF/lib the same jars I've some permgen memory problems too Moving all the shared libs in tomcat's root/common/lib should help me reducing the perm gen memory usage? Should it be a good pratics? No

Re: Reading and writing files outside tomcat directory

2009-11-04 Thread Ognjen Blagojevic
noobie45 wrote: Thank you so much. I am absolutely new to Tomcat on Linux. I need to figure out what you mean by "user-id under which Tomcat runs". Every process on Linux is ran by a certain user. With command "ps -ef", you can list all the processes and users that run them (first column fr

Re: Tocat webapp listening on different port

2009-11-04 Thread Ognjen Blagojevic
Tobias Crefeld wrote: schrieb Sergio Arrighi : Is it possible to have a tomcat webapp listening on a port different from the port which is in use by the server itself?? AFAIK it is not possible to setup 2 http-connectors for one tomcat, but you can install another tomcat in its own JVM with ot

Re: tomcat https

2009-11-04 Thread Ognjen Blagojevic
Torleif wrote: I am trying to set up tomcat to use https. I used "keytool -genkey -alias tomcat -keyalg RSA" If I use "changeit" as password for keystore everything works ok. If I use a different password it does not work. I have modified "server.xml" with keystorePass="newpassword" My .keystore

Re: Restarting Tomcat 6

2009-10-26 Thread Ognjen Blagojevic
André Warnier wrote: Potri Raaja wrote: I need to restart tomcat at the specified time using crontab. Please let me know how to do that. Only if you tell us at least under which platform, and the version of Tomcat this applies to. Potri, First, you must know the shell command to restart

Re: Using multiple DataSource's for fail-over.

2009-09-02 Thread Ognjen Blagojevic
This is interesting topic. IANA-failover-expert, but one question comes to my mind. What happens when the first server is recovered? Some cached connections will still point to second server, while newly created connections will go to the first one? Is that acceptable? Regards, Ognjen Bill

Re: Tomcat not starting - No error messages seen

2009-08-20 Thread Ognjen Blagojevic
Anisha Parveen -X (anparvee - Infosys at Cisco) wrote: Please find attached the catalina.out logs file and debug logs. I don't see any attachment. Paste your logs into the message. Not the whole files, just last 30 lines. You didn't try "ps -ef | grep java"? In our case tomcat is started

Re: autodeploying/unpacking ROOT.war

2009-08-20 Thread Ognjen Blagojevic
Christoph Kukulies wrote: Nothing got unpacked. I was used that whenever I put a fresh ROOT.war (which hen contained something different than the tomcat ROOT app) it got unpacked into a ROOT directory in webapps. (I helped myself now in unzipping the war file). This is typical behavior when t

Re: "Exception Initializing Page Context"

2009-08-20 Thread Ognjen Blagojevic
Gwen Way wrote: Hmmm... I will check with the developers then, although the three people on my team are theoretically the only ones with access to make changes to the app. Thank you again, Mark. If you worry how come that application previously worked but now it doesn't, I can think of at le

Re: autodeploying/unpacking ROOT.war

2009-08-20 Thread Ognjen Blagojevic
Christoph Kukulies wrote: What again are the bits to auto-unpack/deploy a file in the webapps directory, e.g. ROOT.war? I looked into server.xml and there is unpackWars="true" and autoDeploy="true" and still a ROOT.war file I put into /usr/share/tomcat5.5/webapps remains untouched when I start

Re: tomcat 5.5.x and sun java 1.6

2009-08-19 Thread Ognjen Blagojevic
Nikolay Diulgerov wrote: My question is, does tomcat 5.5.x work OK with sun java 1.6.x. Yes, it does. -Ognjen - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.ap

Re: Tomcat Logs and console .

2009-08-19 Thread Ognjen Blagojevic
Mohamed Shah wrote: Console Displays the actual errors, But the screen size is small so that we cannot know about the errors. Scroll back, Mohamed! Scroll back! :) -Ognjen - To unsubscribe, e-mail: users-unsubscr...@tomcat.a

Re: Request Help

2009-08-19 Thread Ognjen Blagojevic
R.Sriram wrote: I am trying to find out from Network Solution what JDK version they are using to compile. All they are telling me is they use JServ 1.1.2 and JDK compatible to that. That software is 9 years old, and it is not developed anymore. Tomcat supports Servlet spec 2.5, and Jserv 2.0

Re: Tomcat Logs and console .

2009-08-18 Thread Ognjen Blagojevic
Log file looks ok. It is dirty with duplicate listeners errors. Can you try to solve that first? Regards, Ognjen Mohamed Shah wrote: Aug 18, 2009 4:44:44 AM org.apache.catalina.core.StandardContext addApplicationListener INFO: The listener "com.liferay.portal.spring.context.PortalContextLo

Re: Tomcat Logs and console .

2009-08-18 Thread Ognjen Blagojevic
- From: Ognjen Blagojevic [mailto:ogn...@etf.bg.ac.rs] Sent: Tuesday, August 18, 2009 5:57 PM To: Tomcat Users List Subject: Re: Tomcat Logs and console . Mohamed Shah wrote: Sorry If this is not interesting. I couldn't find all of the console contents in log files. If not available in log

Re: Tomcat Logs and console .

2009-08-18 Thread Ognjen Blagojevic
Mohamed Shah wrote: Sorry If this is not interesting. I couldn't find all of the console contents in log files. If not available in log files can I manage the console to read the full contents somehow?. FYI I use old tomcat bundled with liferay tomcat(5.0) and I cannot upgrade due to some tea

Re: Request Help

2009-08-18 Thread Ognjen Blagojevic
R.Sriram wrote: I am trying to host my servlet based solution in Network Solutions shared hosting service. In order test if I can use it, I downloaded Hello.java from their environment and compiled in my environment as MyHello.class. I tested their Hello.class (Hello.class compiled in their envi

Re: Any way to make tomcat send the "disable caching" headers on all responses?

2009-08-18 Thread Ognjen Blagojevic
Epithemeus wrote: What is happening in practice is that: the xml file is indeed updated but the graph being displayed is an older version (corresponding to the older .xml file which has now been over-written). I gather that this means tomcat is caching the xml files. I have tried including "cach

Re: Multi-Level Context Paths

2009-08-18 Thread Ognjen Blagojevic
Andy Ee wrote: Other 2 questions: 1) Can I exclude the META-INF/context.xml file in the war file? This context.xml that will be copied to conf/Catalina/localhost after deployment, so that I can be sure this is not the problem to the setup of multi-level context path? Yes, you can. 2) When we

Re: Multi-Level Context Paths

2009-08-17 Thread Ognjen Blagojevic
Try here: http://www.opensymphony.com/sitemesh/userForums.action Regards, Ognjen Andy Ee wrote: Hi Ognjen, Are you able to advice the mailing list for sitemesh? Is it under Tomcat as well? Best Regards, Andy Ee -Original Message- From: Ognjen Blagojevic [mailto:ogn

Re: Multi-Level Context Paths

2009-08-17 Thread Ognjen Blagojevic
Factory.(DefaultFactor y.java:57) ... 25 more Aug 17, 2009 6:57:44 PM org.apache.catalina.core.ApplicationContext log INFO: Closing Spring root WebApplicationContext Any idea? Thanks. Best Regards, Andy Ee -Original Message- From: Ognjen Blagojevic [mailto:ogn..

Re: Multi-Level Context Paths

2009-08-17 Thread Ognjen Blagojevic
Hi Andy, Try to undeploy the old application. Rename the test.war to sg#server#test.war, and deploy it. Regards, Ognjen Andy Ee wrote: Dear All, I need an urgent help, and I hope you will shed some light to it. I have recently installed Apache Tomcat version 6.0.20. I copied my

Re: SSL Using IP Addresses

2009-08-14 Thread Ognjen Blagojevic
t can not be used to validate a call by IP address, then why does importing it with an alias of the IP address not work for us? Thank you, my understanding of this is still weak. On Thu, Aug 13, 2009 at 8:47 AM, Ognjen Blagojevic wrote: Jeff Sexton wrote: We have a situation where we need to call

Re: SSL Using IP Addresses

2009-08-13 Thread Ognjen Blagojevic
Jeff Sexton wrote: We have a situation where we need to call a SOAP service in a Glassfish server via HTTPS from a servlet in Tomcat. We extract a self-signed certificate from Glassfish and imported it on the Tomcat server. It all works in situations where we can use the fully-qualified host na

Re: Tomcat not starting - No error messages seen

2009-08-12 Thread Ognjen Blagojevic
Anisha Parveen -X (anparvee - Infosys at Cisco) wrote: From the log messages it seems Tomcat is not loading the contexts provided in server.xml. Out of the contexts provided in server.xml , only one of it getting loaded and no log messages for the rest. Could you post the log messgages? Say,

Re: TR: pb redeploy with Tomcat 5.5.24

2009-08-11 Thread Ognjen Blagojevic
Hi, 1. What is the exact error being thrown? (copy paste the stack trace, if any) 2. Are you using Tomcat 5.5.23? Can you switch to fresh version of tomcat (6.0.20)? It is probably more stable and with less bugs. If you can't reproduce the problem on the latest version, that probably means

Sanity check: Multiple SSL virtual hosts

2009-05-09 Thread Ognjen Blagojevic
Hi all, I just configured Tomcat 6.0.18 (over CentOS 5.3 and Java 1.6.0u13) to work with two virtual hosts over https, and wanted to check is this the proper configuration: two https connectors (bounded to the IPs) with two keystores, two Host elements, all inside one Service element. Here i

Re: Tomcat Configuration in Eclipse

2009-05-08 Thread Ognjen Blagojevic
This is normal. When you start Tomcat manually, it uses YOUR-TOMCAT-HOME/webapps as default webapp directory. This directory contains "ROOT" webapp (visible on context "/"), and that is the welcome page you see. On the other side, when you start Tomcat inside Eclipse, it uses some other weba

Re: Tomcat error while starting related to java

2009-03-10 Thread Ognjen Blagojevic
Hi Selvajava, Read the stack trace carefully. It seems that the class com.headstrong.tablecomponent.util.ConfigFileParser is digesting an XML file (probably TableProperties.xml), and during that process the exception is thrown - probably due to malformed XML. It seems that it doesn't have an

Re: Exception while configuring JDBC realm

2009-03-10 Thread Ognjen Blagojevic
Ramya Raghukumar wrote: I am trying to configure jdbc realm on Tomcat 6, by connecting to Oracle 11g that runs on Ubuntu.I tried doing it with inside but got the exception "Network adapter unable to establish connection". However when I tried to connect to the database through a JNDI resourc

Re: how

2009-02-26 Thread Ognjen Blagojevic
nicumarius wrote: what should I do to not use port number when writting the address of a page on the Apache server? Do you want to use: http://server.com/app instead of http://server.com:8080/app ? If this is the case than you need to have a web server (either Apache HTTPD or Apache To

Re: PostgreSQL vs MySQL with Tomcat

2009-01-19 Thread Ognjen Blagojevic
In our company we used MySQL and Postgres for several projects. Both DBMSs are mature and stable, and they are used worldwide for large-scale projects. Performance-wise we measured some differences, but they were not so big to notice them in the real-life loads. In other words, having some expe

Re: [OT] RE: HTTPS and Virtual Hosts

2008-09-22 Thread Ognjen Blagojevic
Peter Crowther wrote: Or configure multiple IP addresses on one card - almost all operating systems these days allow multiple IP addresses on one adapter. Cheaper, and you don't run out of card slots so fast :-). Didn't know that. That's definitely better. -Ognjen -

Re: HTTPS and Virtual Hosts

2008-09-22 Thread Ognjen Blagojevic
André Warnier wrote: Is the above, very roughly and approximatively still a valid explanation of what happens, or is it totally wrong, or has something changed in-between that I am unaware of ? Yes, that's about it. Here is the official explanation: http://httpd.apache.org/docs/2.0/ssl/ssl_

Re: Browser Limited web application

2008-09-17 Thread Ognjen Blagojevic
Peter Crowther wrote: From: karthikn [mailto:[EMAIL PROTECTED] Question 2: How to fetch the MAC address (Physical address) of the clients using web application ? You can not do this at the server. Some clients may not even have one - a computer with no network card using a

Re: How do you have your dev environment setup?

2008-09-17 Thread Ognjen Blagojevic
Bai Shen wrote: I've been doing a lot of webapp development on tomcat, but currently my process is all manual. I write the code in Eclipse, and then copy the appropriate files over to tomcat. I'd like to automate and standardize my process. So would y'all mind explaining how your dev environme

Re: Regarding Error 404-please help!

2008-09-12 Thread Ognjen Blagojevic
It is really hard to pinpoint your problem whit such a huge web.xml. But, let's try. First, for servlet "HelloWorld" you stated the class name "/servlet/HelloWorld". That is wrong. Class name should be fully qualified Java class name like: "com.something.servlet.HelloWorld". Second, in your

Re: Regarding Error 404-please help!

2008-09-10 Thread Ognjen Blagojevic
laura fu wrote: Hi Tomcat, How are you? I am new to using Apache Tomcat and am in the process of learning it. I came across this problem while i was setting it up, please kindly take a look, i just need a little push in the right direction. I saved my work HelloWorld.java in the folder in "C:\

Logging and debugging j_security_check problems

2007-11-27 Thread Ognjen Blagojevic
Hi all, I have problems using j_security_check, and I'm not sure is it DB access problem or something else. I would like to make Tomcat log all the messages regarding this, but I don't know how to configure it. I read /tomcat-6.0-doc/logging.html, but I can't rebuild tomcat extras, since I'm

Re: Java file name is displayed when the JSP file is accessed.

2007-11-27 Thread Ognjen Blagojevic
Pavan Singaraju wrote: i have a web application which is deployed on Tomcat 5.0.18. Sometimes when i am navigating to a page using menu of my application, it is displaying a java file name with full package name. The java file is a business logic processing location on the application. Why is

Re: UTF-8 charset encoding

2007-11-19 Thread Ognjen Blagojevic
Tremal Naik wrote: Oh, yes, you're right. I'm using version 1.1, that's why probably I don't have that option available. Unfortunately I'm not allowed to upgrade to a newer version... I suppose you are using ActionForms. Try to extend ActionForm overriding your reset method which will set the

Re: UTF-8 charset encoding

2007-11-19 Thread Ognjen Blagojevic
Tremal Naik wrote: 2007/11/16, Ognjen Blagojevic <[EMAIL PROTECTED]>: Did you try to put acceptCharset="UTF-8" in the form tag? well, I'm using Struts and it looks the html:form tag doesn't allow any acceptCharset attribute. I tried to set the enctype attribute, b

Re: UTF-8 charset encoding

2007-11-16 Thread Ognjen Blagojevic
Hi Tremal, Tremal Naik wrote: all characters are displayed well in both browsers, the page encoding appears correctly set to UTF-8. The problems arises when I try to submit "strange" characters as currency symbols (euro, pound, yen, ...) in a form text box. Did you try to put acceptCharset="UT

Re: SV: FORM login, would like error page same as login page

2007-11-16 Thread Ognjen Blagojevic
Hi Christopher, Christopher Schultz wrote: Please post the code that checks for this parameter. Here is the code: function getUrlParameter(name) { name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); var regexS = "[\\?&]" + name + "=([^&#]*)"; var regex = new RegExp(regexS

Re: FORM login, would like error page same as login page

2007-11-15 Thread Ognjen Blagojevic
Wilhelmsen Tor Iver wrote: to see what the real URL is when you expect it to use the error page; most likely that will be the URL of the resource that triggered the authentication in the first place. Yes, the url returned is http://localhost:8080/myapp/j_security_check So the parameters wer

Re: SV: FORM login, would like error page same as login page

2007-11-15 Thread Ognjen Blagojevic
Wilhelmsen Tor Iver wrote: So, I created login.html, with username and password fields, and if parameter err=1 is passed, then the error message is displayed. How do you pick up the parameter in the HTML? Using JavaScript? Remember *.html resources are usually not parsed server-side in any way.

FORM login, would like error page same as login page

2007-11-15 Thread Ognjen Blagojevic
Hi all, I'm using FORM login, and I'm trying to make error page looks the same as login page, with one extra error message. So, I created login.html, with username and password fields, and if parameter err=1 is passed, then the error message is displayed. My web.xml configuration follows:

Re: Hidden form fields not found in request

2007-10-26 Thread Ognjen Blagojevic
Hi Ashok, Ashok Venkat wrote: In the below code, i am submitting a form to itself in the onload method and changing some hidden form field values. After the form is submitted, the hidden values are not available in the request object.As a result, the page gets into an endless loop. Interestin

Re: tomcat and jdbc connector

2007-10-01 Thread Ognjen Blagojevic
Hi, loredana loredana wrote: "javax.servlet.ServletException: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]The requested instance is either invalid or not running." Can you try to do the same outside Tomcat, in a main method of a test Java class? It doesn't look like a T

Re: Tomcat status

2007-09-19 Thread Ognjen Blagojevic
Hi Andrew, For Tomcat you can use: http://localhost:8080/manager/status Be sure to confugure conf/tomcat-users.xml. Regards, Ognjen Andrew Hole wrote: Could you tell me wich page? On 9/18/07, Bj <[EMAIL PROTECTED]> wrote: if you're using apache httpd and mod_jk in front of your tomcats,

Bad README.html

2007-08-29 Thread Ognjen Blagojevic
Hi all, README link on http://tomcat.apache.org/download-60.cgi#6.0.14 seems to open an empty blank page. Try: http://www.mirrorgeek.com/apache.org/tomcat/tomcat-6/v6.0.14/README.html http://www.mirrorgeek.com/apache.org/tomcat/tomcat-6/v6.0.13/README.html ... Regards, Ognjen -

<    1   2   3