Re: TCNative installation failed

2010-01-21 Thread Konstantin Kolinko
Fixed issues are listed in the changelog file,

http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?view=markup

http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml?view=markup

Best regards,
Konstantin Kolinko

2010/1/22 Mark Eggers its_toas...@yahoo.com:
 Bingo and thanks.

 Note to the impatient (me) - Bugzilla is your friend..

 Thanks again,

 /mde/

 --- On Thu, 1/21/10, Konstantin Kolinko knst.koli...@gmail.com wrote:

 From: Konstantin Kolinko knst.koli...@gmail.com
 Subject: Re: TCNative installation failed
 To: Tomcat Users List users@tomcat.apache.org
 Date: Thursday, January 21, 2010, 7:12 PM
 2010/1/22 Mark Eggers its_toas...@yahoo.com:
 (...)
  In all four cases, the tcnative library failed to
 load. In the first two cases, the INFO message indicated
 that the library was not found in
 /home/mdeggers/Apache/apache-tomcat-5.5.28/bin. In the last
 two cases, the INFO message listed all directories in
 java.library.path
 
  The same steps were used to build and deploy the
 tcnative libraries on Tomcat 6.0.24. Configurations 1 and 3
 from above were tried.
 
  Both worked for Tomcat 6.0.24 as indicated by the INFO
 message:

 Ah, 5.5.28.  There is
 https://issues.apache.org/bugzilla/show_bug.cgi?id=47712

 Best regards,
 Konstantin Kolinko

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org







 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: (tomcat 6) percent encoding problem

2010-01-22 Thread Konstantin Kolinko
2010/1/22 François Duvalier m.francois.duval...@gmail.com:
 Hi,

 When I execute this command:

 curl -XGET -i http://localhost:8080/app/rs/system/EN/foo%2Fbar

 I receive a 400 BAD REQUEST.

 However if I deploy the app to Jetty, the command will work fine.

 Question: Is there a way to configure tomcat to behave like jetty with
 regards to percent-encodings in the URI ?


It is disabled by default, probably for the sake of security. See
ALLOW_ENCODED_SLASH property here:

http://tomcat.apache.org/tomcat-6.0-doc/config/systemprops.html

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: 6.0.24

2010-01-22 Thread Konstantin Kolinko
2010/1/22 Pid p...@pidster.com:
 Just a quick FYI

 Looks like there's some errors on the mirrors at the moment.
 I got a couple of 404s and a 500 from different servers.


It might happen,
though according to the mirror status monitor page,
most mirrors are up-to-date and running.

http://www.apache.org/mirrors/

You can choose any other mirror from the above list.
The download folder for 6.0.24 is
tomcat/tomcat-6/v6.0.24/

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: question for deploystartup forROOT.war on tomcat cluster

2010-01-23 Thread Konstantin Kolinko
2010/1/23 Okubo, Yasushi (TSD) yasushi.ok...@takedasd.com:

1. What attributes are set on the Host element of your server.xml

http://tomcat.apache.org/tomcat-6.0-doc/config/host.html

2. Are there any Context elements inside Host in your server.xml?
Remove them, if there are any.

3. When ROOT fails to deploy at startup, does Tomcat Manager at that
host shows any webapplication mapped to the same path? (E.g. present,
but not started).

4. Any relevant messages in the log files?


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Files in Subdirectories not being served.

2010-01-25 Thread Konstantin Kolinko
2010/1/25 Matt Eustace meust...@attevo.com:

 127.0.0.1 - - [22/Jan/2010:15:50:50 +] GET
 /img/brava/LogoBall_DK.gif HTTP/1.1 404 1030


Note, that HTTP is case-sensitive. If you request does not match
casing of the actual folders and file, Tomcat won't serve them.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: question for deploystartup forROOT.war on tomcat cluster

2010-01-25 Thread Konstantin Kolinko
2010/1/25 Okubo, Yasushi (TSD) yasushi.ok...@takedasd.com:
 OK - Listed applications for virtual host localhost

This:

 /manager:running:1:manager
 /:running:0:/
 /host-manager:running:0:host-manager


and this:

 HTTP Status 404 - /
 
 type Status report
 message /
 description The requested resource (/) is not available.

means that the web application is deployed and running.

When there is no ROOT application deployed, Tomcat will respond with
an empty zero-length response (it looks like a blank page in a
browser).


It looks like a web application that does not have a welcome page.
Please check that your ROOT.war was properly expanded into
/webapps/ROOT folder, and that those files (especially
WEB-INF/web.xml) are readable by the user that runs that Tomcat
instance.



Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Deploy WAR on ROOT without losing Manager application

2008-12-28 Thread Konstantin Kolinko
2008/12/29 nodje nodje...@gmail.com:

 We need tp have our application accessed from the Root context /.
 So we usually delete the ROOT.war and rename our application to ROOT.war.
 This works well of course but we lose the benefit of using the Tomcat
 manager.


No, you are not loosing it. The ROOT application contains only the welcome
page. The manager is a separate web application and it is still there.

Also, do not forget to mention your Tomcat version when asking questions
here.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: java.lang.ClassNotFoundException with small jsp file

2008-12-31 Thread Konstantin Kolinko
2008/12/31 John Byrne jbyrne...@yahoo.com:
 All,

 Thank you for your previous suggestions.  I have stopped the server running
 in Eclipse and started it from the services window (under control
 panel/Administration).  Now it works fine.  So, the problem was with Eclipse
 and Eclipse not being able to find where the files were being created.  Now
 I just need to learn how to configure Eclipse to find the class file.  Any
 ideas?


1. Help  Help Contents  Web Tools Platform User Guide
2. http://wiki.eclipse.org/WTP_Tomcat_FAQ

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: “java.lang.NullPointerException” with JDBC connection from InitialContext

2008-12-31 Thread Konstantin Kolinko
2008/12/31 Robert Blackburn rwblackb...@gmail.com:
 (..)

 Any help or suggestions would be appreciated


Just some suggestions that come to mind:

Have you considered googling for StringUtils indexOfIgnoreCaseRespectQuotes?
E.g. it may be Connector/J bug #25047 fixed in v. 5.0.5
Check, what version of MySQL Connector/J you are using.

 com.mysql.jdbc.Connection.parseCallableStatement(Connection.java:4422)

The name suggests that the operation being performed is preparing some
sql Statement. Are you sure that it is getConnection() call that is
failing? Looks
like that succeeded, but some other call few lines later is failing.


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: How can the login page see parameters in the original request?

2008-12-31 Thread Konstantin Kolinko
2008/12/30  removeps-gro...@yahoo.com:
 To hide the existence of the page from robots.

 --- On Tue, 12/30/08, Pid p...@pidster.com wrote:

 From: Pid p...@pidster.com
 Subject: Re: How can the login page see parameters in the original request?
 To: Tomcat Users List users@tomcat.apache.org
 Date: Tuesday, December 30, 2008, 6:26 AM
 removeps-gro...@yahoo.com wrote:

  Only if certain secret fields and values are present,
 do I want to generate the login page.

 They're not really secret if you're passing them as
 parameters.
 It sounds like you're trying to over-engineer
 something, which often
 results in no security improvements and sometimes
 introduces flaws.

 What is your real goal?



How about passing them with the Session?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] Basic int/char conversion question

2009-01-01 Thread Konstantin Kolinko
2009/1/1 André Warnier a...@ice-sa.com:
 Hi.

 This has nothing specific to Tomcat, it's just a problem I'm having as a
 non-java expert in modifying an exiting webapp.
 I hope someone on this list can answer quickly, or send me to the
 appropriate place to find out.  I have tried to find, but get somewhat lost
 in the Java docs.

 Problem :
 an existing webapp reads from a socket connected to an external program.
 The input stream is created as follows :
 fromApp = socket.getInputStream();
 The read is as follows :
 StringBuffer buf = new StringBuffer(2000);
 int ic;
 while((ic = fromApp.read()) != 26  ic != -1) // hex 1A (SUB)
   buf.append((char)ic);

 This is wrong, because it assumes that the input stream is always in an
 8-bit default platform encoding, which it isn't.

 How do I do this correctly, assuming that I do know that the incoming stream
 is an 8-bit stream (like iso-8859-x), and I do know which 8-bit encoding is
 being used (such as iso-8859-1 or iso-8859-2) ?
 I cannot change the InputStream into something else, because there are a
 zillion other places where this webapp tests on the read byte's value,
 numerically.

 I mean, to append correctly to buf what was read in the int, knowing
 that the proper encoding (charset) of fromApp is X, how do I write this
 ?


1. Using iso-8859-1 does not loose any information. That is, you can later
print this out to iso-8859-1 stream, you will get exactly those 8-bit bytes
of iso-8859-2 as were in input.

If you need correctly Unicode, though, you can convert them by calling
String.getBytes(encoding) and new String(bytes, encoding).

new String(str.getBytes(ISO-8859-1), ISO-8859-2)

2. Well, the above, and all the others' tips I have read in this thread so far
are the right ones. Those are what you should do when you are engineering
and writing a well-made application. That is, you have to go with
InputStreamReader, String, CharsetDecoder APIs and that will take care of
various encodings, including multi-byte ones.

In you case, when you are tailoring some oddly (bad) written specific
application
to your specific environment, and do not expect much, there is a
simple approach:
implement this conversion by using a lookup table.

You will just need some static table of 256 chars and you are done.

For example,

package mypackage;
import java.io.UnsupportedEncodingException;

public class TranslationTable {
  private static char[] table;

  static {
 // static initialization block

 byte[] bytes = new byte[256];
 for (int i=0; ibytes.length; i++){
bytes[i] = (byte) i;
 }

 try {
table = new String(bytes, ISO-8859-2).toCharArray();
 } catch (UnsupportedEncodingException ex) {
ex.printStackTrace();
//System.exit(1);
throw new Error(Class initialization failed, ex);
 }
  }

  public static char lookup(int i) {
 // will throw ArrayIndexOutOfBoundsException if i is -1, but that
should be OK
 return table[i];
  }
}

and replace

   buf.append((char)ic);

with

  buf.append(TranslationTable.lookup(ic));

Also, I would replace StringBuffer with StringBuilder, if you are
running in Java 5 or
later, but that is another story.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: How can the login page see parameters in the original request?

2009-01-01 Thread Konstantin Kolinko
2009/1/1  removeps-gro...@yahoo.com:
 Do you mean set session attributes?  How do you do that from the client side?



a) You can set them in another page (an unprotected one) that is
accessed before,
or that redirects to this one.

b) You can pass your secrets as a cookie, or as a request header. Cookies
can be created on the client side.

c) You can use RemoteAddrValve and block those clients that should not
know about your service.

d) You can throw away all the security constraints from web.xml and use
alternative approaches, e.g. those that implement a Filter, e.g.

securityfilter ([1]), that is ofter mentioned on this list and should be easy
to adopt, or some others

[1] http://securityfilter.sourceforge.net/

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] Basic int/char conversion question

2009-01-01 Thread Konstantin Kolinko
2009/1/2 Caldarale, Charles R chuck.caldar...@unisys.com:
 From: Len Popp [mailto:len.p...@gmail.com]
 Subject: Re: [OT] Basic int/char conversion question

 If there's an easy way to convert a single character,
 someone please point it out.

 Not particularly easy, but this should work:

 (...)
isr = new InputStreamReader(new ByteArrayInputStream(ba), 
 Charset.forName(csName));
 (...)
  isr.reset();


reset() is not implemented in InputStreamReader, as of Sun JDK 6u07 that
I have installed, thus you have to make a direct call to
ByteArrayInputStream.reset().

Well, it serves the same purpose as TranslationTable class that I have
provided earlier.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Jar wars - Conflicting classes

2009-01-03 Thread Konstantin Kolinko
2009/1/3 David.Meldrum david.meld...@verizon.net:
 Windows XP SP 3  Tomcat 6.0.1  JVM 1.6.0

 Must all conflicting classes be sorted out on one instance of Tomcat?
 I have learned not to put application jars (classes) in the jre lib, since
 they then become common to all applications and if there is a duplicate, but
 not exact duplicate, then things crash.  What I am wondering is, are all the
 classes loaded into the _same_ JVM?  Here is the problem I ran into.
  Application #1 uses some Quartz scheduling classes.  Application #2 also
 uses Quartz, but apparently a different version.  Can these applications
 live on the same Tomcat instance?  In other words if each of the
 applications has it's own  lib, can the classes overlap?  I get the feeling
 the applications will have to be sorted out to use the same Quart library.
  I read the  documentation regarding Class Loader and understand the order
 in which libraries are searched, but do the classes end up in one single
 aggregated JVM memory?


You can put them in WEB-INF/lib folders of your applications and they
will happily coexist separately.

The problem will occur is some of them are put into the common lib folder
of Tomcat, or, even worse, into JRE lib folder, as you mentioned.

Well, the problem do not occur always.
It depends. It depends on how the library is used, what are its dependencies,
but when it occurs, the easiest answer is to remove the library either from
the application or from commons.

I may add that a) classloader delegation rules in web applications are
different from those of core Java. You may read [1] and try to figure what
implications that impose. b) web applications may be unloaded, reloaded
and thus the classes may have gone away. Thus classloader issues are
more observable here than in a standalone application.


For reference,
[1] http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Classpath problem

2009-01-03 Thread Konstantin Kolinko
2009/1/4  fhserkl...@aol.com:
 Hello.  I am using Tomcat 6.0.18, my Java version is 1.6.0_11 and I  have a
 servlet called TestingServlet.java.  My classpath reads like  this:

 .;C:\Sun\SDK\bin; C:\Sun\SDK\jdk\bin; C:\Tomcat\lib\servlet-api.jar

 I cannot compile in DOS without typing:

 javac -classpath C:\Tomcat\lib\servlet-api.jar TestingServlet.java

 I cannot understand why I am being required to specify the servlet api when
 I have it in my classpath.

I guess that is because spaces are not allowed in the value.

Try:
set CLASSPATH=.;C:\Sun\SDK\bin;C:\Sun\SDK\jdk\bin;C:\Tomcat\lib\servlet-api.jar

or better
set CLASSPATH=.;C:\Tomcat\lib\servlet-api.jar

I do not know why you are adding those bin folders to the classpath.
There are no class files there.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat not responding to https

2009-01-08 Thread Konstantin Kolinko
2009/1/8 Binu Mohan binu.mo...@indecommglobal.com:
 Hi,

I have an Apache Tomcat installation on a Windows Server 2003 machine. I 
 have configured Tomcat to work with SSL by following the instructions given 
 in the documentation (using the java ketytool utility).

However, the configuration works fine on my development machine (XP 
 desktop), but it is not working on the server. When try and access the Tomcat 
 homepage from the server using https://localhost:8443/ it waits for a long 
 time and times out. If I try and access the site using 
 http://localhost:8443/, the Tomcat server displays the home page where it 
 should have displayed some unprintable characters (as I have accessed using 
 http).

The same keystore and server configuration file are working fine on my 
 development machine. Any idea what could be causing the https requests to 
 time out and the http requests to the secure port 8443 to display the actual 
 page and not the encrypted response?

Everything works as expected on the development machine

 Thanks  Regards,
 Binu

 This e-mail and any files transmitted with it are for the sole use of the 
 intended recipient(s) and may contain confidential and privileged 
 information. If you are not the intended recipient, please contact the sender 
 by reply e-mail and destroy all copies of the original message.  Any 
 unauthorised review, use, disclosure, dissemination, forwarding, printing or 
 copying of this email or any action taken in reliance on this e-mail is 
 strictly prohibited and may be unlawful.


1. What, exactly, Tomcat and Java version are you running on the
server and on dev. PC?
2. Aren't there any clues in the log files? Some are explained in the
Troubleshooting section of the guide:
http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Failed to Deploy

2009-01-09 Thread Konstantin Kolinko
2009/1/9 Zaki Akhmad zakiakh...@gmail.com:

 Here's the log I found on /var/log/syslog


 gnu.java.util.jar.JarUtils

http://www.google.com/search?q=%22install+a+real+tomcat%22+site%3Awww.nabble.com

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Memory Leak(?) causing tomcat to store 57610801 tomcat objects in ONE request

2009-01-10 Thread Konstantin Kolinko
2009/1/10 Caldarale, Charles R chuck.caldar...@unisys.com:
 From: Leon Rosenberg [mailto:rosenberg.l...@googlemail.com]
 Subject: Memory Leak(?) causing tomcat to store 57610801
 tomcat objects in ONE request

 HOW can it actually happen that a response object
 contains 8.000.000 mime headers?

 Must be a very productive servlet...

 Sounds like you've got a rather ugly (and probably infinite) loop in your 
 webapp.  Might want to put a trap in org.apache.tomcat.util.http.MimeHeaders 
 to catch generation of an excessive number of header fields.


I agree with Charles.
But, to note: the count of MimeHeaderField instances mentioned in the
message is of the same range as the count of Cookie instances. Thus I
think that all those header fields are derivatives of the enormous
count of cookies that your application created.

I remembered about the following incident from two months ago, when
programming error caused a session to be reestablished many times in a
row:
http://www.nabble.com/multiple-Set-Cookie-headers-in-initial-http-response-td20437761.html
(multiple Set-Cookie headers in initial http response).


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Upgrading Tomcat from 6.0.14 to 6.0.18 - classpath issue

2009-01-19 Thread Konstantin Kolinko
2009/1/19 matyg ma...@expand.com:

 set
 CLASSPATH=%CLASSPATH%;.;%CATALINA_HOME%\lib;%CATALINA_HOME%\lib\servlet-api.jar;%CATALINA_HOME%\lib\jsp-api.jar;%CATALINA_HOME%\lib\el-api.jar;%CATALINA_HOME%\webapps\webAppName;%CATALINA_HOME%\webapps\webAppName\WEB_INF\classes;%CATALINA_HOME%\webapps\webAppName\WEB_INF\lib;%CATALINA_HOME%\bin\bootstrap.jar;%CATALINA_HOME%\bin\commons-daemon.jar;


Do not mess with the CLASSPATH variable. That is not supported and you
are severely breaking the classloader hierarchy. Thus are your
problems.

See
http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Servlet silently dropped

2009-01-19 Thread Konstantin Kolinko
2009/1/19 D. Barnhoorn d.barnho...@tfe.nl:

 Hi,

 We have a strange problem at one of our clients in that Tomcat seems to drop
 a specific servlet while running. This happens very sporadically and is
 possibly connected with a high load.

 The server is a Sun sparc running Tomcat 5 in java 1.4.2_02

 The application is based around one servlet that takes almost all the
 requests and several small ones with various specific tasks (29 servlets in
 all, all except for the main ones with a very specific mapping). One of
 those servlets stops handling or maybe even getting requests that it has a
 mapping for.

 What is odd is that:
 - it's always the same one
 - tomcat serves a page for the url, but one from the main servlet
 - destroy() doesn't get called, so it either escapes the gc or gets dropped
 without any fuss
 - creating a second mapping for the servlet returns the same page, so while
 it's running the right one and once the original mapping doesn't work
 anymore the extra mapping doesn't work either
 - absolutely no logging of anything that might give me a clue; I did think
 of out of memory, threads, sockets stuff, but you'd expect tomcat to at
 least log something like that

 Anyone seen something like this before? Or some pointers where I might be
 able to trace this to the root?

 It only happens on the live server of course - and only sporadically at
 that, so having a debugger open is kind of out of the question :(

 Any ideas will be welcome :)

 Thanks in advance,

 danny

I understand that it is one of those 28 auxiliary servlets.

Does its init() complete cleanly?

If it does not, the container must drop the servlet instance, and the destroy()
method is not called. See the chapter SRV.2.3.2.1 from the servlet spec 2.4.


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Resource Mixup when using AJP proxy (strange one)

2009-01-19 Thread Konstantin Kolinko
2009/1/18 Yuval Perlov yu...@r-u-on.com:
 Setup:
 For one of our projects we are using httpd in front of tomcat.
 At the moment everything is routed via tomcat, static and dynamic content
 alike (except for one directory of images that resides outside the
 application).
 We are using AJP proxy.

 Symptoms:
 After running for a while (day or two depending how much traffic we have)
 the web pages render funny. It seems as if the wrong resources are being
 sent - when I go over the DOM I see that objects that have the right URL for
 background images etc. are dealt the wrong pictures. It seems as though the
 connection is not thread safe (this is just how it seems - I don't know if
 it is the actual problem).
 This happens only on the https channel and does not affect the :80 virtual
 host!

 Versions (latest versions):
 Redhat Fedora 10
 Server version: Apache/2.2.10 (Unix)
 Tomcat: 6.0.16

 Config file:
 VirtualHost 216.139.214.167:443
ServerAdmin sea...@patentest.co.il  DocumentRoot
  /home/apache/www/html/patentest.co.il
ServerName www.patentest.co.il

SSLEngine on
SSLCipherSuite
 ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile certs/www.patentest.co.il.crt
SSLCertificateKeyFile certs/www.patentest.co.il.key
SSLCACertificateFile certs/gd_bundle.crt

ErrorLog logs/patentest.co.il_ssl_error_log
CustomLog logs/patentest.co.il_ssl_log common
SetEnvIf User-Agent .*MSIE.* nokeepalive ssl-unclean-shutdown

Alias /ptimg/ home/images/images/
ProxyPass /ipmaster !
ProxyPass /ptimg !
ProxyPass / ajp://localhost:8009/
 /VirtualHost


 If anyone has seen this or has some ideas how to troubleshoot and isolate,
 I'd be most grateful.


It reminds me of the thread entitled
Apache/mod_jk serves random files from tomcat

You can read it here:
http://marc.info/?t=12157048026r=1w=2
http://marc.info/?t=12157048026r=2w=2
or here:
http://www.nabble.com/Apache-mod_jk-serves-random-files-from-tomcat-td18385568.html


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: enable-access-log-in-tomcat

2009-01-20 Thread Konstantin Kolinko
2009/1/20 Kaushal Shriyan kaushalshri...@gmail.com:

 I am using tomcat-5.5.26, sun-jdk-1.5.0.15 on gentoo linux, I have enabled
 the below in server.xml

 Valve className=org.apache.catalina.valves.FastCommonAccessLogValve
 directory=logs  prefix=localhost_access_log.
 suffix=.txt
 pattern=%h %l %u %t %r %s %b %D %T resolveHosts=false/

 The issue is that i don't see time parameter value in the
 /var/log/tomcat-5.5/localhost_access_log.2009-01-20.txt file
 Below is the snippet of the local access log

 172.20.2.111 - - [20/Jan/2009:04:08:40 -0800] GET
 /Trunk/login?sessionExpired=true HTTP/1.1 200 40005

 Any clue


In TC 5.5 the only allowed values for the pattern attribute of
FastCommonAccessLogValve are common, combined or their exact
expansions. You cannot use an arbitrary pattern. Use AccessLogValve
class for that.

Note, as I see AccessLogValve in 5.5 has optimized support for
common and combined patterns, thus maybe the gain from using the
FastCommon* one is not that much.

In TC 6.0 both fast and arbitrary patterns are implemented by
AccessLogValve class and FastCommonAccessLogValve class is deprecated.


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: encodeRedirectURL URL rewrite not working

2009-01-21 Thread Konstantin Kolinko
2009/1/20 Greg Burrow gregbur...@gmail.com:
 Hello,
 I have two web applications in different context, one servlet will forward
 the request to a servlet in the other application using encodeRedirectURL
 and sendRedirect.  The receiving servlet creates a new session and session
 attributes are lost.
 Running Tomcat 5.5.17.

 Here is the flow:

 GET /App1/RedirectServlet HTTP/1.1
 Cookie: JSESSIONID=7AFACD0318419C34938B6410BB9A1937

 RedirectServlet
 response.sendRedirect(response.encodeRedirectURL(/App2/LaunchServlet));

 HTTP/1.x 302 Moved Temporarily

 GET /App2/LaunchServlet HTTP/1.1
 (no cookie)

 HTTP/1.x 200 OK
 Set-Cookie: JSESSIONID=BE408BFD3480E29DF2A4278BCA3C1FC6; Path=/App2


 The same behavior occurs in Firefox and IE.  Cookies are enabled in both
 browsers and crossContext=true in context.xml.  Is this a bug in Tomcat or
 a problem with my method of redirect?


I do not understand, what are you expecting?

Note, that according to the spec you cannot share a session between
different web applications. That is, session ID can be the same, but
the session object is different.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: encodeRedirectURL URL rewrite not working

2009-01-21 Thread Konstantin Kolinko
2009/1/21 Greg Burrow gregbur...@gmail.com:

 My expectation was that the same session would be used by App2 after
 the redirect.  The javadoc for HttpServletResponse. encodeRedirectURL
 looks clear that it should retain the session either by cookies or by
 URL rewriting.


 I do not understand, what are you expecting?

 Note, that according to the spec you cannot share a session between
 different web applications. That is, session ID can be the same, but
 the session object is different.


You should read chapter SRV.7.3 of the Servlet specification.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Windows Migration 5.5.23 to 6.0.18 - java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina

2009-01-21 Thread Konstantin Kolinko
2009/1/21 Dan d...@tipjarawards.com:
 I haven't changed anything from the default installation. I did the
 following:

 1. Installed 6.0.18 as windows service
 2. Launch the service after a successful installation, no problems it
 starts. Tried the tomcat6.exe directly, no problems.
 3. Click the service tray icon to change the -Dcatalina.base directory to
 c:\dev\tomcat
 4. Restart the service, it fails with the classnotfound exception as noted,
 same if I use tomcat6.exe.

 The c:\dev\tomcat contains my webapps etc. so it has a
 bin/conf/logs/shared/webapps/ directories.

 I'm really stumped on this one as I've used tomcat for years with no
 problems.

 Is there a CLASSPATH environment variable that needs to exist?


You cannot use pre-existing 5.5 configuration to run Tomcat 6.0. You
must copy the one from TC 6.0 installation and tune it accordingly.

Your specific problem is caused by the differences in
catalina.properties files (*.loader paths are different), but most of
other configuration files are also different between versions (though
similar).

CLASSPATH variable is not needed.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: UnsatisfiedLinkError in Windows Service (tomcat6w/5w.exe)

2009-01-21 Thread Konstantin Kolinko
2009/1/22 Michael Ludwig mil...@gmx.de:
 But I'm assured by the developers that:
   The Java API for DB XML begins by first trying to load the
   release versions of the libraries, and failing that then tries
   to load the debug versions. If it fails to find both versions
   then the UnsatisfiedLinkError is thrown listing the release
   library, even though it did look for the debug library.

Should be relatively easy to check: try to reproduce the error
with release versions of those libraries.


 C:\src\BerkeleyDbXml\dbxml-2.4.16\bin\debugnotepad libdb_java46d.dll

 This works, I can see the DLL in notepad. So the Local System account
 can read the files.


How about other DLLs that that DLL loads? Can you run a standalone
Java program that loads those libraries, or run startup.bat from that
command prompt window?

Also, though maybe not relevant for this very error, but for reference:
http://wiki.apache.org/tomcat/HowTo#head-a4b7185ee95d0cf14a48f92c08d1eb66b561139d

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: UnsatisfiedLinkError in Windows Service (tomcat6w/5w.exe)

2009-01-22 Thread Konstantin Kolinko
Hi, Michael.

I am glad to hear that you solved this.


 Hmm. Apparently, the directory hadn't been in the PATH the moment
 the SYSTEM account took a copy of it. Maybe SYSTEM doesn't read the
 environment again later on. It may only get to see updates to the PATH
 after a reboot. Or some other trick.

 On the other hand, Tomcat running as a service under the SYSTEM account
 should disregard the PATH, as far as I know and have heard so far.

 I did a reboot.

 Turns out the Tomcat service does not disregard the PATH. It needs the
 directory in the PATH, and *in addition* to be present in the PATH the
 directory has to be included in the Java property java.library.path.
 Nota bene, in addition to, but not in place of the PATH.

 So this is solved for me. But is this the correct behaviour?


I think that the answer is (and your solution proves this) that the statement
that service does not need environment variables is not 100% true.

That is, if you compare *.bat/*.sh with how the service is started, you can
see that  *.bat/*.sh processes some env variables and builds up a java -jar
command from those variables. The service launcher from the other hand,
launches that jar directly, thus you have to configure all the arguments
explicitly, and not relying on the env variables. It is those vars that are
not needed.

If I remember correctly, the PATH variable is respected by the Win32 API
that loads the dll libraries. Thus the behavior that you had to include that
folder into the PATH. Win32 API help should provide more information.

http://msdn.microsoft.com/en-us/library/ms684175(VS.85).aspx
http://msdn.microsoft.com/en-us/library/ms682586(VS.85).aspx

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Inner class trouble in JSP

2009-01-24 Thread Konstantin Kolinko
2009/1/24 Qiao Jin bra...@gmail.com:
  I am using Tomcat 6.0.18 with JDK 1.5.0_17 on CentOS 5. I am getting a
 compiling error on the following code in a jsp page that uses an inner
 class. I remember I used to be able to do this with a different container
 (implementing JSP 1.2 and JDK 1.4).


It has nothing to do with specific container. It is a plain Java issue:

you should learn the difference between inner classes and
static inner classes. Look somewhere for details.

Here, replace this line

 private class Test {

with
private static class Test {

and you will be fine.

An alternative solution would be to replace static field with an
instance one,

 static Test test = new Test(foobar);

Test test = new Test(foobar);

but that depends on what your intentions are.

Note, that because JSP page is a servlet, the same instance will be
reused for all requests, so there is no much difference between
static and instance field here.


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Unexpected redirect from https to http

2009-01-27 Thread Konstantin Kolinko
2009/1/27 Timothy Tagge tplimi...@gmail.com:
 I'm working on an application that does redirects to itself.  The
 application is intended to run under https for all pages.  However,
 when the redirect is requested, the resulting URL shown in the browser
 is http://secureServer/correctDomain/correctPage.jsp   This request
 times out because there is no http listener at secureServer.  However,
 requests directly to a jsp file in that application via https do not
 get changed to http and work just fine.  So the issue only happens
 during internal redirects.  Could this be cert related?  Apache or
 Tomcat config issue?

 Our setup is as follows...
 JDK 1.6.06
 Tomcat 5.5.15
 AJP1.3
 Big IP is providing https with a certificate supplied by Verisign
 Host file on the tomcat server that points all calls to secureServer
 to the IP Address for Big IP.  Big IP is configured to point back to
 tomcat on port 80


 ### AJP Configuration #
 !-- Define an AJP 1.3 Connector on port 8009 --
Connector port=8009
   enableLookups=false redirectPort=8443 protocol=AJP/1.3 /

 ### workers.properties configuration #
 worker.worker_aat.type=ajp13
 worker.worker_aat.host=localhost
 worker.worker_aat.port=8009


The doc
http://tomcat.apache.org/tomcat-5.5-doc/config/ajp.html
says that you can set scheme=https in your Connector . Also see
the proxyName, proxyPort, and secure attributes.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: enableLookups=true, getRemoteHost returns ip

2009-01-28 Thread Konstantin Kolinko
2009/1/28 otismo pe...@nomad.org:

 I'm struggling to get enableLookups to work on a new Ubuntu 8.10 tomcat
 6.0.18 install.  Calls to httpServletRequest.getHostName() always return the
 IP, instead of the host name.  I set the access log to resolve hosts and it
 also shows the ip.

 Tomcat 6.0.18 and the same webapp perform the reverse lookups fine on a
 WindowsXP machine.  It doesn't appear to be a permissions problem, as I've
 temporarily granted AllPermission to my webapp.  I've traced it down to
 java.net.InetAddress.getAddressFromNameService(String host, InetAddress
 reqAddr) and the subsequent call to
 sun.net.spi.nameservice.NameService.lookupAllHostAddr(host), which returns
 null.

 Inside getAddressFromNameService, the host is the valid host that I wish
 would be returned.  Since the lookupAllHostAddr(host) call fails,
 getAddressFromNameService then throws an UnknownHostException.

 I also tried setting -Dsun.net.spi.nameservice.provider.1=dns,sun but that
 didn't make a difference.

 Could it be a dns config issue on my ubuntu box (hosted by slicehost)?
 Using the host command and an IP in question returns the host name that I
 want to get back from httpServletRequest.getRemoteHost().  Any tips for me?
 I'm a linux noob.


It is a bit hard to read your message, because you traced it down
too deeply - the real cause / explanation is one level above that
getAddressFromNameService() call.

To get host name from its IP a reverse DNS lookup is performed.
That is,

java.net.InetAddress.getHostName() is called.

You problem is that that call fails and does not return the name of
the remote host. You can write a simple standalone Java program
and test that call on that ubuntu box.

Looking in to the JDK sources (I have 1.6.0_07 one), I see that
getHostName() method is implemented as a call to private method
java.net.InetAddress.getHostFromNameService()

The implementation of getHostFromNameService() has two steps:

1). reverse DNS lookup of Host name by its IP,
 - nameService.getHostByAddr( ..) call

2). forward DNS lookup of IP addresses for the found host name,
 - InetAddress.getAllByName0(...) call

and the second step checks, that the IP address whose Host name
you were asking is among the IP addresses for that name.

It does it to prevent DNS spoofing. If the check fails, the method rejects
the host name that it has found, and returns the IP address.

It is this second step that fails in your case.

Thus, it is Sun JRE issue, or feature, and not Tomcat one.


Some searching found the following:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4148388

That is, such behavior is there since 1.1.* versions of JRE.

Also,
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4670102
proposes a workaround that uses a JNDI call to implement a DNS
lookup. Do not know, whether that works. Also, a comment there
mentions the https://javadns.dev.java.net/ project.


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: NoClassDefFoundError: HttpServlet

2009-01-30 Thread Konstantin Kolinko
2009/1/30 Ladislav Gaspar ladislav.gas...@it-vision.com:


 As I wrote in the original post
(I've cleaned up the classpath, there are no duplicate servlet-api.jar files 
around)

 The servlet-api.jar is there and it's also in the classpath. (in 
 $catalina_home/lib)


I do not understand.  is there and it's also  It should be in one
place exactly. And it should NOT be mentioned in any %CLASSPATH%
variable (you should not adjust %CLASSPATH%, as it breaks classloading
hierarchy).

Also, how you are starting Tomcat (service? bat file? from inside an
IDE ?), and at what exact moment (at what step?, what you are doing?)
the message is displayed?


Also, the stacktrace that you cited - is it from the log file?

Can you provide a longer stacktrace? I am wondering where that class
loading is called from.



Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat including files from apache

2009-02-04 Thread Konstantin Kolinko
2009/2/3 chuckvb ch...@atnr.com:

 I have a basic configuration working where Apache serves my static html and
 tomcat provides my dynamic data.  Using Apache2 on linux with TomCat 6 and
 mod_jk.

 How do I include header files and other files from apache for my
 tomcat jsp files.  right now I use %@ include file=/header.html%
 but the header.html file must be in my tomcat directory.  I would like
 to pull that file from apache.  Tomcat will not accept %@ include
 file=http://www.myapp.com/header.html%
 --

I know of the following ways:

1) write a ServletContextListener that pulls those files from Apache,

2) set allowLinking=true on Content element in
META-INF/context.xml and use symbolic links

http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

3) provide your own implementation of javax.naming.directory.DirContext

http://tomcat.apache.org/tomcat-6.0-doc/config/resources.html

4) the c:import tag of JavaServer Pages™ Standard Tag Library 1.1 allows
specifying absolute URLs. I have not used that tag, though.

5) use SSIServlet.

http://tomcat.apache.org/tomcat-6.0-doc/ssi-howto.html


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Fun with the JVM crashing.

2009-02-06 Thread Konstantin Kolinko
 Caldarale, Charles R wrote:
 From: Bill Davidson [mailto:bill...@gmail.com]
 Subject: Fun with the JVM crashing.

 I'm thinking that the JVM shouldn't be getting SIGSEGV's.

 You're right about that. However, it could also be an OS or hardware
 problem. You might want to run some serious memory tests on the box,
 just to eliminate the latter.


Here is a good article/FAQ on Sig 11:

http://www.bitwizard.nl/sig11/

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat Domain for redirects

2009-02-06 Thread Konstantin Kolinko
2009/2/6 Christian Decker decker.christ...@gmail.com:

 Hi all,

 I'm not that good at configuring Tomcat so I thought I'd ask here. My
 problem is that I have a server that is running Tomcat 5.5 and an
 Apache server that runs on port 80 and uses mod_jk to redirect all
 incoming requests to the tomcat server.

 So far, so good. The problem is that I want to access the server from
 outside my local network, so instead of accessing http://server1/app/
 I now have http://server1.example.com/app/ which automatically
 redirects to an index page, but on the wrong address (http://server1/
 app/welcome instead of http://server1.example.com/app/welcome) which
 is kind of annoying.

 As this happens in many different places I assume that the tomcat
 server somehow believes that he is server1 instead of
 server1.example.com.

 Any directions on where to look?

 Regards,
 Chris

Read Apache HTTPD docs on how it determines its server name. I guess
it should have been the ServerName directive,
http://httpd.apache.org/docs/2.2/mod/core.html#servername

If I remember correctly, mod_jk passes that information to Tomcat, but if that
does not work, it can be overwritten in Connector element by setting
proxyName and proxyPort attributes,
http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Installing Tomcat on Windows

2009-03-17 Thread Konstantin Kolinko
2009/3/17 Dharani vishgnanik...@gmail.com:
 I installed apache-tomcat-5.5.27.exe in windows platform (In the machine I
 have installed jdk1.6. )
 But the server doesn't start with Windows start. Always I have to go to
 binfolder and run tomcat5.exe to start the server.

 How can I configure the server to start with when Windows starts?

 Is the problem occurring because of I use jdk1.6?

 Please I need a quick answer.


1. What is your Windows version and what is your processor?
Is it 32 bit or 64 bit?

2. It may be that mscvr71.dll is missing:
https://issues.apache.org/bugzilla/show_bug.cgi?id=41538
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6509291

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Is it possible to move Tomcat logfiles?

2009-05-10 Thread Konstantin Kolinko
2009/5/10 johnrock johnpi...@yahoo.com:

 I am setting up a CentOS 5 server running tomcat and wanted to know whether
 the best practice is to leave the Tomcat logfiles in their default location:

 /usr/share/apache-tomcat-6.0.18/logs

 or whether I should place them in another directory like /var/log/tomcat.

 Is this possible, and/or preferred?

 I am new to Linux, but my understanding so far was that changing data like
 logfiles should not be under /usr/ but instead under /var/.  Is that a
 correct interpretation in this case?

 Thanks
 --

1. the log folder contains:
1) log output

By default java.util.logging (aka JULI) is used to write those logs,
though there is possibility to use log4j.

It is configured as described in
 http://tomcat.apache.org/tomcat-5.5-doc/logging.html

For JULI the configuration file is logging.properties

2) catalina.out, that is redirected stdout, strerr of
java process running the server

Look into the shell script that starts Tomcat. That is where the
redirection occurs.

2. I have configurations where log folder is stored in /var/log/... and the
log folder of Tomcat is simply a symbolic link to that location.

It works, and I think that would be one of the easiest ways to configure it.

3. If you are concerned about /usr vs. /var, you may want to pay attention
to the possibility of separating CATALINA_HOME and CATALINA_BASE

E.g., you may place conf, webapps, work etc. folders on /var, while bin,
common, server remain on /usr.

See RUNNING.txt in the distributive.


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 5.5.27 404 for JSP's in a particular derectory

2009-05-10 Thread Konstantin Kolinko
2009/5/11 Mackstar richard.macks...@gmail.com:

 I have an app which is currently working fine under jetty and I have set up
 tomcat to be a replacement container (part of my clients requirements).

 All seems to work apart from the JSP's (and any other html file) in one
 directory for which I get 404's. If I change the directory's name it works.
 Example the dir name is called shuppin if I change the dir name to shuppin1
 I have no problems.

 I don't know what the problem is but fact that I have a classes dir called
 shuppin may also be causing problems?

 I will upload the web.xml and server.xml
 (the classes seem to work correctly when called from other dirs)

 I have also once cleared the work/Catalina dir to get rid of any caching.

 I also get the following error in my logs

 java.io.FileNotFoundException:
 /var/www/java/tomcat/work/Catalina/auction.provide-cars.com/shuppin/SESSIONS.ser
 (No such file or directory) http://www.nabble.com/file/p23475510/server.xml
 server.xml  http://www.nabble.com/file/p23475510/web.xml web.xml

 Any help is appreciatted.


1) Is shupping a web application, or just a subdirectory in it?

Note, that all subdirectories in appBase are separate independent web
applications, and the root web application in Tomcat should be named
ROOT (in uppercase),

2) Do not use the Invoker servlet. It is a hole you won't be able to patch
See
http://wiki.apache.org/tomcat/FAQ/Miscellaneous#Q2
http://wiki.apache.org/tomcat/FAQ/Miscellaneous#Q3

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Trouble parsing datetime strings

2009-05-11 Thread Konstantin Kolinko
2009/5/11 David kerber dcker...@verizon.net:
 This is related to the performance issues discussed in the thread
 Performance with many small requests.

 When I reworked my servlet to synchronize only on pieces that needed to be
 synchronized, rather than on the entire request processing routine, I am now
 throwing an exception when parsing a string into a java.util.Date variable.
  It only happens occasionally, maybe once every few dozen to a hundred or so
 requests, and I can't figure out why it doesn't work all the time.

 Declared at the class level, I have:

   private static final SimpleDateFormat    sdfFullDateTime = new
 SimpleDateFormat( -MM-dd HH:mm:ss );


 Then in the request processing method, I have

   dateTimeStr = dateStr +   + timeStr;
   try {
       dataDate = sdfFullDateTime.parse( dateTimeStr );
   } catch ( Exception e ) {
       writeLog( Unable to parse dataTime string: ', dateTimeStr + ':  +
 e );
   }


 (the try/catch is there only for debugging this issue), and in the log I'm
 seeing:

 2009-05-11 09:19:54: Unable to parse dateTime string: ':  '2009-05-11
 09:19:37': java.lang.NumberFormatException: For input string: '


 Which I don't understand at all; dateDate (java.util.Date), dateStr
 (String), timeStr (String) and dateTimeStr (String) are all declared in the
 processing method, NOT at the class level.

 Maybe I should move the declaration of the SimpleDateFormat into the
 processing method?  Or synchronize the date parse?


 I'm kind of lost here; any help appreciated!!

 Dave


As the JavaDoc says
http://java.sun.com/javase/6/docs/api/java/text/SimpleDateFormat.html

Date formats are not synchronized. It is recommended to create
separate format instances for each thread

You may either create a new instance of SimpleDateFormat each time, or
add a synchronization around that part of code, or use a ThreadLocal
(though ThreadLocal has its own caveats as the threads belong to
Tomcat and are shared among applications).

Without profiling you would not know which one of the ways I am
mentioning is faster.

Maybe I would start with creating a new instance each time, as GC for
short-living objects seems to be cheap in recent JREs. Though without
profiling you will not get the numbers.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Performance: switch vs if ... else if

2009-05-19 Thread Konstantin Kolinko
2009/5/19 David kerber dcker...@verizon.net:
 Caldarale, Charles R wrote:

 From: David kerber [mailto:dcker...@verizon.net]
 Subject: Performance: switch vs if ... else if

 I had to process based on a parameter that could take
 one of 6 different single-character string values.  I
 had been using an if .. else if construct.


 Interesting numbers.  Can you show us the exact code of the if .. else
 construct?

  - Chuck


 Here is the entire code.  The variables o and p are used to make sure there
 is actually some work done in each call to the test methods.  I've seen
 cases (mainly in Delphi) where an optimizer completely removed large chunks
 of code because it wasn't doing anything.  I don't know of java can do that
 or not...

 public class SwitchVsIfTest {
   (...)


1. If you are doing tests with the classic VM, allow it some time to warmup and
compile your code. That is, run the same test first with a smaller count of
iterations.

Server VM precompiles code before using it, while Classic one compiles
heavily used parts of code on-the-fly.

2. This line:
rtFields.valueOf( myChr )
does all the job that your if/elif/else tree did. That is, I expect
that all the time
is spent in there, not in switch(number) that follows it.

3. You can try the following:

private static void switchSub2( String myChr ) {
  if (myChr.length() != 1) {
  throw new AssertionError();
  }
  switch ( myChr.charAt(0)) {
  case 'c':
  o += 1;
  break;
  case 'r':
  o += 2;
  break;
  case 'l':
  o += 3;
  break;
  case 'a':
  o += 4;
  break;
  case 't':
  o += 5;
  break;
  case 'd':
  o += 6;
  break;
  }
  return;
  }

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Performance: switch vs if ... else if

2009-05-19 Thread Konstantin Kolinko
2009/5/20 Caldarale, Charles R chuck.caldar...@unisys.com:
 From: Konstantin Kolinko [mailto:knst.koli...@gmail.com]
 Subject: Re: Performance: switch vs if ... else if

 Server VM precompiles code before using it, while Classic one compiles
 heavily used parts of code on-the-fly.

 Your terminology is incorrect, as are your descriptions of when code is 
 compiled.  The phrase Classic VM refers to pre-HotSpot VMs - 1.3 and prior 
 levels.
 (...)

Thank you very much for correcting me.

I surely meant Client VM there, it was just a misprint.

Regarding Server VM: I accept it as my mistake. I know, that Client
VM is optimized for faster startup (and, well, it is written in the
FAQ [1]), but I do not know why I thought that slower startup of
Server VM is due to precompilations. Thank you for correcting me.

[1] http://java.sun.com/docs/hotspot/HotSpotFAQ.html#compiler_types

2009/5/20 David kerber dcker...@verizon.net:

 That's part of the reason I ran the tests twice in a row, in the main()
 method (that, and cache warming).


Oh, I see. I missed that.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat Access logs

2009-05-25 Thread Konstantin Kolinko
2009/5/22 Vijay vijay2...@gmail.com:
 Hi,
 I am using a tomcat tailer which needs the file name to be the same and not
 changinging (Dont want to see the Date in the file name). hence i want a
 solution to have the logs rotated as well as the file name of the active log
 files to remain the same Do we have a solution like it?


Try to specify rotatable=false in your configuration of AccessLogValve.

 When i search in the internet i found logrotate copytruncate option
 available, can we use this? whats the implication? do you guys recommend it?


It is fine. I am using it.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Problem Reading Property files

2009-05-26 Thread Konstantin Kolinko
2009/5/26 john S email2jo...@gmail.com:

 servlet
  servlet-nameABC/servlet-name
  servlet-classcom.ijk.abc/servlet-class
  init-param

Who wrote this com.ijk.abc servlet?

Does it have installation instructions? Are you following them?

Do you have source code? If not, ask the authors of that servlet.

If you do not know how they read those files, most of your
attempts will be futile.


What is your operating system?

 *Servlet Name: *
 * Servlet Code (class name): *
 * Servlet Classpath: *
 *  Servlet Args: loan=/opt/mywebapp/config,
 loan.props=abc.props,  loan.log=abc.log*

/opt/..  is an absolute path. So I think that relative paths
(/WEB-INF/...) that you are trying to use, will not work in your case.
 Also, loan.props and loan.log are relative paths.

Also, parameter names are case-sensitive.  It is loan, not Loan
that you tried.



Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Classloaders

2009-05-26 Thread Konstantin Kolinko
2009/5/26 Jon Pearson jon.pear...@sixnet.com:
 I'm having some trouble getting classes loaded by a new classloader to
 be able to see classes which should have been loaded automatically from
 WEB-INF/lib. All of the documentation that I've seen so far (FAQs,
 mailing list searches, ...) describe problems that people have had using
 the standard classloader that Tomcat provides, but I have yet to see one
 dealing with dynamically loading classes from a new classloader defined
 within a webapp.

 More specifically, here is my problem:

 I am developing an application suite involving a database backend which
 feeds and is updated by server processes and a Web UI. To support
 multiple databases, database modules (JAR files) can simply be dropped
 in and loaded by each application dynamically.

 The problem is that when the Web UI loads the database module, that
 module is unable to actually load the JDBC driver
 (org.postgresql.Driver) which is packaged in
 WEB-INF/lib/postgresql-8.3-604.jdbc4.jar (I've checked the case of the
 path components).

 This is definitely related to classloaders; I tried placing the database
 module directly into my WAR file under
 WEB-INF/classes/package/name/PostgreSQLDatabale.class and it worked. But
 if I do that, I lose the modularity and easy-upgrading that I achieved
 by going with the dynamic loading of classes from JARs.

 I'm using java.net.URLClassLoader with the parent classloader set to the
 classloader that loaded my application classes, so it should
 theoretically be the same classloader used to load the
 postgresql-8.3-604.jdbc4.jar file.

 Has anyone else encountered a problem like this? Any suggestions on what
 else I should try? Thanks in advance!

 Jonathan P. Pearson - Software Engineer
 --

1. What tomcat version?

2. The documentation on classloaders is here:
http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html

3. Some JDBC drivers use native code. Those cannot be loaded from
different class loaders in the same time. Thus, they cannot be loaded
from /WEB-INF/lib, as there will be conflicts between applications,
or between several instances of the same application if it is restarted.

4. Put the jar file into WEB-INF/lib, and then restart your web application.
 (E.g., using Tomcat Manager).  Your jar library will be loaded.
http://tomcat.apache.org/tomcat-6.0-doc/html-manager-howto.html
http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat Server can't load himself (without using localhost)

2009-05-26 Thread Konstantin Kolinko
2009/5/26 Sibil87 giorgio.zampare...@gmail.com:

 Hi guys!

 I mount Tomcat 6.0 on my server and u can visit it at
 http://application.sogetel.it:8080.

 If I open any browser from that machine and I try to visit
 http://localhost:8080 I can see my Servlet Manager and it's all ok.

 If I open any browser from that machine and I try to visit
 http://application.sogetel.it:8080 I don't have any response...

 Why http://application.sogetel.it:8080 is not working on the same machine?!?
 Is there any conf file of Tomcat I have to change to make it work?!?!


Can you ping / tracert / traceroute from that machine to
application.sogetel.it ?

Usually such address as 'application.sogetel.it' translates to an
external IP of your firewall / NAT router, and that IP is not
reachable from inside of your network / DMZ. (That depends on your
router configuration)

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Classloaders

2009-05-26 Thread Konstantin Kolinko
2009/5/27 Jon Pearson jon.pear...@sixnet.com:
 -Original Message-
 From: Konstantin Kolinko [mailto:knst.koli...@gmail.com]
 Sent: Tuesday, May 26, 2009 4:44 PM
 To: Tomcat Users List
 Subject: Re: Classloaders

 1. What tomcat version?

 Tomcat v. 6.0.18, JVM 1.6.0_13, Ubuntu 9.04 on kernel 2.6.28-11


OK

 2. The documentation on classloaders is here:
 http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html

 Thanks, but I've read through that a few times. It describes the
 existing classloader layout but does not describe how to avoid problems
 when using your own within Tomcat.


Well, at least you should cooperate with this layout. ;)


Some notes:

The class loader of a web application can be retrieved as
Thread#getContextClassLoader()

Also, if you run in development mode (see Jasper configuration), each JSP
is executed with its own class loader, so that they can be reloaded.
http://tomcat.apache.org/tomcat-6.0-doc/jasper-howto.html

 3. Some JDBC drivers use native code. Those cannot be loaded from
 different class loaders in the same time. Thus, they cannot be loaded
 from /WEB-INF/lib, as there will be conflicts between applications,
 or between several instances of the same application if it is
 restarted.

 This one does not include any native code, it is self-contained in a
 single JAR file.

 4. Put the jar file into WEB-INF/lib, and then restart your
 web application.
  (E.g., using Tomcat Manager).  Your jar library will be loaded.
 http://tomcat.apache.org/tomcat-6.0-doc/html-manager-howto.html
 http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html

 It is more of a plugin than a library. The location is user-specified, a
 directory to watch for plugin JARs. Each JAR contains metadata in the
 manifest describing the main class of the plugin. That main class is
 loaded using Class.forName(), causing a static{} block in the class to
 run, performing any registrations necessary to integrate with the
 application.

 When the class is needed (i.e. when I try to connect to a database), a
 new instance is created. That involves calling Class.forName()

Do you pass a ClassLoader reference to that forName() call?
What is classloader hierarchy for the ClassLoader used by that call?

See
http://java.sun.com/javase/6/docs/api/java/lang/Class.html#forName(java.lang.String)
http://java.sun.com/javase/6/docs/api/java/lang/Class.html#forName(java.lang.String,%20boolean,%20java.lang.ClassLoader)

 to load
 the PostgreSQL database driver (a class called 'org.postgresql.Driver'),
 contained in postgresql-8.3-604.jdbc4.jar (present in WEB-INF/lib). But
 that call to Class.forName() to load org.postgresql.Driver fails because
 the class cannot be found.

 This is confounding because an ancestor classloader of my URLClassLoader
 that made the classes in my plugin JAR available should have access to
 org.postgresql.Driver. In fact, one of them *must* because when the
 classes in my plugin JAR are placed into WEB-INF/classes in their raw
 .class state (not packaged into a jar), everything works.


It might be. What happens, step-by-step, in this case?  Additional
classes will be picked up by web-app classloader instantly. Additional
JARs - only upon restart of the web application, because it requires
reconfiguration of the class loader (adds additional URLs to scan for
classes).

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 6.0.20, JDK1.6.0_14 and security manager

2009-06-06 Thread Konstantin Kolinko
2009/6/6 andreas anpa0...@telia.com:
 Hi!

 Have anyone beside me had any issues with the software versions mentioned in 
 the subject line?


 First I thought it was my wacky setup, so I tried to vanilla directly from 
 tomcat.apache.org, and it still fails.

 NOTE : Running the same tomcat installation with JDK1.6.0_12 produces no 
 errors.


 This is what I get in 'catalina.out' with JDK1.6.0_14;

 Could not load Logmanager org.apache.juli.ClassLoaderLogManager
 java.security.AccessControlException: access denied 
 (java.lang.RuntimePermission setContextClassLoader)
        at 
 java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
        at 
 java.security.AccessController.checkPermission(AccessController.java:546)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
        at java.lang.Thread.setContextClassLoader(Thread.java:1351)
        at java.util.logging.LogManager$Cleaner.init(LogManager.java:204)
        at java.util.logging.LogManager$Cleaner.init(LogManager.java:198)
        at java.util.logging.LogManager.init(LogManager.java:235)
        at 
 org.apache.juli.ClassLoaderLogManager.init(ClassLoaderLogManager.java:47)
 (..)

 Something happened in the latest JDK-release, question is what... :)


Do you have sources for JDK classes?
I do not have 6u14 installed yet - I have only 6u13, and the
LogManager.Cleaner class there has no explicit constructor and has no
Thread.setContextClassLoader() call.

I think that is what changed.

Without the sources I do not know why it calls it, and whether there
will be any problems due to that.

You may try adding
permission java.lang.RuntimePermission setContextClassLoader;
for the file:${catalina.home}/bin/tomcat-juli.jar

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Problem with overriding the default servlet on tc 6.0.18

2009-06-09 Thread Konstantin Kolinko
2009/6/9 Bill Barker wbar...@wilshire.com:

 Incidentally I discovered you can't welcome-file-list by having an empty
 element, you have to have at least one welcome-file in there or the
 default servlet will use the one in $CATALINA_BASE/conf/web.xml .  Bug or
 feature?

 I'd say an enhancement rather than a bug, since you can always do (as you
 have discovered):
  welcome-file-list
      welcome-fileindex.doesnotexist/welcome-file
  /welcome-file-list

 For the benifit of the archives, this of course assumes that you have set
 replaceWelcomeFiles=true in the Context ... / element.


The above said about replaceWelcomeFiles is wrong.  That property
is not documented and is used by Tomcat internals only. It is automatically
switched on before processing a web.xml file, and thus its initial value, as
specified in context file, does not matter.

The welcome files list in a web application always replaces the default one.


In web-app_2_3.dtd there is
!ELEMENT welcome-file-list (welcome-file+)
so the list cannot be empty.

In 2.4 and 2.5 schemas the minOccurs attribute for welcome-file
element is 1 (the default value), so the list cannot be empty either.



Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Starting Tomcat 6.0

2009-06-09 Thread Konstantin Kolinko
2009/6/9 Dick Eastlake dickeastl...@yahoo.com:
 I currently start Tomcat with the Procrun Service Manager.

 It's an app called Apache Tomcat Properties with  six tabbed forms: general, 
 log on, logging, java, startup and shutdown.

 To start Tomcat I press the start button in the general tab.

 I want to experiment with security, lock down a directory so that only 
 authenticated users can get the pages, etc.

 The doc says I need to:
 Starting Tomcat With A SecurityManager

  Once you have configured the catalina.policy file for use
  with a SecurityManager, Tomcat can be started with a SecurityManager in
  place by using the -security option:

 %CATALINA_HOME%\bin\catalina start -security      (Windows)

 Unfortunately, I need more specific instructions on how to do this (not the 
 policy file changes, just the start part.)  I'm on Windows XP Pro SP3

 Please and thank you.


Switch to the Java tab and add the following two lines
into the Java Options field:

-Djava.security.manager
-Djava.security.policy==C:\Program Files\Apache Software
Foundation\Tomcat 6.0\conf\catalina.policy

Notes:
1. Adjust the path according to your configuration
2. There are two equal signs in the second line. That is as intended.
(If interested, see Specifying an Additional Policy File at Runtime
here:
http://java.sun.com/javase/6/docs/technotes/guides/security/PolicyFiles.html#DefaultLocs
)

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: UDP fails, but doesn't throw a SecurityException

2009-06-24 Thread Konstantin Kolinko
2009/6/24 Christopher Piggott cpigg...@gmail.com:
 I have a servlet that sends and listens to a local UDP service.  To
 allow this, I established the following policy:

 grant codebase file:${catalina.base}/webapps/modbus/- {
        permission java.net.SocketPermission localhost:502, connect;

 };


 This allowed packets out to the external service, but not responses.
 I changed it as follows:

 grant codebase file:${catalina.base}/webapps/modbus/- {
        permission java.net.SocketPermission localhost:502,
 connect,accept,listen;

 };

 and it started working.

 The client library in question creates a DatagramSocket(), then calls
 receive() on it with a timeout.  Before adding accept,listen t
 always timed out.

 Version information:
        Tomcat/6.0.18
        JVM     1.6.0_13-b03    Sun Microsystems Inc
        O/S Linux       2.6.28-13-server        i386


 Here's my question: if this was failing, why didn't it throw a
 SecurityException?  It would have been less challenging to figure out
 what was going on had there been one.


Ask your Java vendor. :)
There is no Tomcat code there.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat hang when start with service tomcat start

2009-06-30 Thread Konstantin Kolinko
2009/6/30 zhicheng wang zcwli...@hotmail.co.uk:

 if i try to start tomcat using

 service tomcat start

 it hangs at INFO: Initializing Spring root WebApplicationContext

 or reboot also hangs here



 BUT, if i run the following commands, it starts up fine:

 /etc/init.d/tomcat start

 /etc/rc5.d/S80tomcat start

 $CATALINA_HOME/bin/startup.sh


AFAIK, one of essentials about /sbin/service is that starts
the script using empty environment.

Maybe that causes the difference.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Cannot find any information on property 'x' in a bean of type 'bfs.beans.BFSInfo'

2009-07-02 Thread Konstantin Kolinko
2009/7/2 Jim Anderson ez...@ieee.org:
 Hi,

 I'm running tomcat 6.0.18 on Linux and I'm having a problem running
 a javabean. I created a bean and was able to call setProperty and
 getProperty
 for the property 'startPage' in the bean. When I added a 2nd property
 to the bean, I got the following message:

 org.apache.jasper.JasperException: Cannot find any information on property
 'midContent' in a bean of type 'bfs.beans.BFSInfo'

 The setter and getter methods were copied and pasted from 'startPage' so
 they
 should have worked. I checked the spelling of the new property 'midContent'
 VERY
 carefully and I'm sure there was not a spelling error.

 I experimented and found that no matter what name I gave the new property,
 it
 would not work with the getter and setter methods. In the jsp code, my
 getter
 and setter methods for 'startPage' continued to work. I decided to rename
 the property to 'sPage'. I did this, recompiled the source, rebuilt the jar
 file
 and placed it the web library. I ran the jsp page again and found that
 getProperty
 on 'sPage' failed, but if I changed 'sPage' back to 'startPage', the jsp
 page
 worked.

 It looks like tomcat is still is finding an old jar file or has cached a
 reference
 to the old library.


It looks like you have not restarted (reloaded) your web application.

One of the ways to do so in development mode is to touch your
WEB-INF/web.xml  (or any other WatchedResource if those are configured).

Another way is to use the Tomcat Manager web application.
http://tomcat.apache.org/tomcat-6.0-doc/html-manager-howto.html
http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Cannot find any information on property 'x' in a bean of type 'bfs.beans.BFSInfo'

2009-07-02 Thread Konstantin Kolinko
2009/7/2 Caldarale, Charles R chuck.caldar...@unisys.com:
 From: Pid [mailto:p...@pidster.com]
 Subject: Re: Cannot find any information on property 'x' in a bean of
 type 'bfs.beans.BFSInfo'

  25 public String getMidContent() {
  26 return(midContent);
  27 }

 wow. old school.

 Don't you love it when people think return is a method call?  Can't ever 
 have too many parentheses...


if(attr!=null)
return(attr);
- in o.a.c.connector.Request

Search for return( and you will find some other references. ;]


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Where can i get the specification of web.xml?

2009-07-03 Thread Konstantin Kolinko
2009/7/3 chenjh che...@thinker.com.cn:
 Hi all,

 Where can i find reference, or something like that, for tomcat's web.xml.

 Regards

 chenjh
 2009-07-03


web.xml is defined by the Java Servlet Specification.
There is nothing Tomcat-specific in it.

It is Servlet 2.5 for Tomcat 6, Servlet 2.4 for Tomcat 5.x

Also, each web.xml has DTD or schema reference in its first lines,
that determine to which version of the spec the web app adheres.

See
http://java.sun.com/products/servlet/reference/api/index.html


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Http Session Null issue

2009-07-03 Thread Konstantin Kolinko
 HttpSession session = request.getSession();

Is the request a legit one (that is, the one that is being served by
Tomcat now)?

Requests are recycled immediately after their processing is done,
and it can result in null being returned by that method (though throwing
an IllegalStateException would be better).




2009/7/3 Achal Patel patel.ac...@gmail.com:
 Its basically below:

 HttpSession session = request.getSession();
 Settings settings = (Settings) session.getAttribute(ATTR_NAME);

 I debugged it and got to know that session is getting null and again
 invoking the same resource from UI serves fine.
 The same is working fine on Weblogic.

 Regards,
 Achal.

 On Fri, Jul 3, 2009 at 7:06 PM, Pid p...@pidster.com wrote:

 On 3/7/09 14:25, Achal Patel wrote:

 Hi,

 I am facing strange issue with Tomcat 6 Jsp deployment.
 I have JSP pages deployed which internally performs operations and
 generates
 XML response which will be parsed using XSL and then finally displayed on
 the UI.
 Now when I invoke JSP pages from UI, session is getting null between the
 requests and this works perfectly fine on other Weblogic/Websphere App
 servers.
 We do use taglibs in xsl and JSPs.

 JDK version : 1.5.13
 Tomcat Ver: 6.0.18

 This error is again random but comes frequently even for the same page 2
 times out of 5 clicks.
 Any help on this will be useful, thanks.

 Posting the error message here for more info:

 org.apache.jasper.JasperException: java.lang.NullPointerException

  org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)

  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)


  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

 *root cause*

 java.lang.NullPointerException
        com.teradata.x2.context.Settings.getSettings(Settings.java:102)

  com.teradata.x2.context.ServletProcessContext.getSettings(ServletProcessContext.java:38)


 It's probably not that random.

 What is at Settings.java, line 102?

 p



  com.teradata.ui.web.common.HTMLComponent.getSettings(HTMLComponent.java:76)

  com.teradata.ui.web.common.StyleSheetLink.doInline(StyleSheetLink.java:237)

  com.teradata.ui.web.common.StyleSheetLink.prepareHTMLString(StyleSheetLink.java:170)


  com.teradata.ui.web.common.HTMLComponent.toHTMLString(HTMLComponent.java:91)

  com.teradata.ui.web.taglib.BodyTagBase.doEndTag(BodyTagBase.java:65)

  org.apache.jsp.bcm.framework.tableeditor.tableeditor_jsp._jspx_meth_td_005fstylesheet_005f0(tableeditor_jsp.java:201)


  org.apache.jsp.bcm.framework.tableeditor.tableeditor_jsp._jspService(tableeditor_jsp.java:99)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)

  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)

        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

 Regards,
 Achal.



 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




 --
 Regards,
 Achal Patel.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Multiple invocation of servlet with the same URL request

2009-07-06 Thread Konstantin Kolinko
2009/7/6 Daniele Development-ML daniele@googlemail.com:
(...)
 Looking at the log and all the printouts, I have noticed that the servlet is
 invoked four times (four log entries in the database) instead of one. This
 is also shown by the four System.out lines I found in the screen when
 requesting the same URL.

 Anybody has any hint about this problem and how to resolve it?

 My idea is that the servlet might be relatively slow and thus Tomcat
 reiterates the request. Is this right?


The user can reiterate the request if (s)he is tired of waiting, or
happened to click the link several times. There are also some download
accelerators that try to open several connections to download a file
faster (asking for different byte ranges of the same file).

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: header in Tomcat 6.x

2009-07-06 Thread Konstantin Kolinko
2009/7/6 Tuan Quan tuan_q...@yahoo.com:
 Dear all;
 How can I set header in Tomcat 6 similar to IIS, in a way that when users 
 type URL:
 http://mywebserver_name
 it automatically forwards to my webapp URL: 
 http://mywebserver_name/myweb/jsp/login.jsp

Don't know what there is in IIS,
but here you can set up ROOT application that has welcome-page that
sends HTTP status code 302 redirection to your clients.

E.g., (index.jsp):

%...@taglib prefix=c uri=http://java.sun.com/jsp/jstl/core%
c:redirect url=/myweb/jsp/ /

or using response.sendRedirect(...)

Also, usually you cannot send one to the login page directly:
you should send them to some of the protected pages, and they will be
redirected to the login page from there (unless they are already
authenticated).

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Error: cannot implement getDependants() in org.apache.jasper.runtime.JspSourceDependent

2009-07-10 Thread Konstantin Kolinko
There is an option in JspC that controls with what version of Java the
generated sources
are compatible with.

Try to explicitly specify 1.5 for source and target
(compilerSourceVM, compilerTargetVM ).
See
http://tomcat.apache.org/tomcat-6.0-doc/jasper-howto.html#Configuration
and the source of JspC class.

In current 6.0 releases the default for those options in JspC is 1.4,
which is wrong, and will be changed to be 1.5 in 6.0.21.

Best regards,
Konstantin Kolinko


2009/7/10 Elliot Huntington elliot.hunting...@gmail.com:
 An Object is not a List even though a List is an Object. The method you are
 trying to implement requires a return type of List, not Object.

 On Fri, Jul 10, 2009 at 9:08 AM, Gaurav Naigaonkar 
 gnaigaon...@gmail.comwrote:

 Hello,

 I get a number of similar compilation errors when I try to compile the
 Servlets that are generated by  Tomcat 6 Jsp-PreCompilation.

 One of them is as follows:

 C:\Program Files\Apache Software Foundation\Tomcat
 6.0\webapps\mobiledoc\WEB-INF\src\org\apache\jsp\index_jsp.java:18:
 getDependants() in org.apache.jsp.index_jsp cannot implement
 getDependants()
 in org.apache.jasper.runtime.JspSourceDependent; attempting to use
 incompatible return type

    [javac] found   : java.lang.Object

    [javac] required: java.util.List

    [javac]   public Object getDependants() {

  I looked up online but couldn’t find any solution to it. Let me know if
 someone can help.


 Thanks,
 --
 Gaurav Naigaonkar




 --
 Elliot


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Problems downloading files. How to identify the CANCEL butto n?

2009-07-11 Thread Konstantin Kolinko
What is the business requirement that forces you to log such information?
What is the cost of a false positive?

Some time ago I experimented with AccessLogValve, trying to download
some large file, to see how it logs aborted downloads.

I used Firefox and pressed cancel as soon as Save As dialog was
displayed. The result is that the log showed about 40-50 Mb of
transfered data by that time (the whole file was about 70 Mb), thus
the browser was caching the result while displaying the dialog.


Also, are you going to support resuming aborted downloads?
Are you dealing with download accelerators (that try to download the
same file in several pieces).
You will know which byte ranges were requested, but the size of each
piece will be less than the whole file.




2009/7/8  siom...@portosdobrasil.gov.br:
 The buttons I see [OPEN], [SAVE] and [CANCEL] are not created and controlled
 by me. They belong to the download manager window that comes automatically
 with a certain command.

 The problem I noticed is that by the time this download manager window
 shows up the entire code on the servlet has been already executed.

 The messages bellow that I included are displayed before any click on any of
 those buttons.
 here 1
 here 2
 here 3
 here 4
 here 5
 here 6

 Any help is welcome. I am looking so hard for a solution but I am not
 finding anything on the web.

 Siomara

 -Mensagem original-
 De: Martin Gainty [mailto:mgai...@hotmail.com]
 Enviada em: terça-feira, 7 de julho de 2009 19:51
 Para: Tomcat Users List
 Assunto: RE: Problems downloading files. How to identify the CANCEL button?


 at least 2 ways to determine the button selected
 1)set a boolean property which is enabled on or off based on executed button
 class MyAction extends ActionSupport {
   private boolean submit;
   private boolean clear;
   public void setSubmit(boolean submit) {
      this.submit = submit;
   }
   public void setClear(boolean clear) {
      this.clear = clear;
   }
   public String execute() {
      if (submit) {
         doSubmit();
         return submitResult;
      }
      if (clear) {
         doClear();
         return clearResult;
      }
      return super.execute();
   }
 }2)check the name of the button as indicated here
 class MyAction extends ActionSupport {
   private String buttonName;
   public void setButtonName(String buttonName) {
      this.buttonName = buttonName;
   }
   public String execute() {
      if (Submit.equals(buttonName)) {
         doSubmit();
         return submitResult;
      }
      if (Clear.equals(buttonName)) {
         doClear();
         return clearResult;
      }
      return super.execute();
   }
 }http://cwiki.apache.org/WW/multiple-submit-buttons.html

 many other solutions are available from devs
 Martin
 __
 Verzicht und Vertraulichkeitanmerkung

 Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
 Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
 Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
 dient lediglich dem Austausch von Informationen und entfaltet keine
 rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
 E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.






 From: siom...@portosdobrasil.gov.br
 To: users@tomcat.apache.org
 Subject: Problems downloading files. How to identify the CANCEL button?
 Date: Tue, 7 Jul 2009 15:09:05 -0300

 Dear all,

 I need to log some information only after a user downloads or opens a
 file.

 I am using a servlet for that and the download part works fine.

 However I need to identify which button was clicked because in case the
 user
 clicks [CANCEL] I am not supposed to register any information.

 I put lots of messages on the code to understand how it works and even if
 I
 click [CANCEL] the messages will be printed showing that all commands will
 be executed no matter which button was clicked.

 Can someone help me to identify which button was clicked?

 Thanks

 Siomara

 ===
 package servlets.comum;

 import java.io.*;
 import javax.servlet.*;
 import javax.servlet.http.*;


 /**
 * Definition of class DownloadFile.
 */

 public class DownloadFile extends HttpServlet

 {

     private String original_filename = MYFILE.txt;

     private String filename=C:\\ABC.txt;

     /**
      * Processes requests for both HTTP GET and POST methods.
      * @param request servlet request
      * @param response servlet response
      */

     protected void processRequest(HttpServletRequest request,
 HttpServletResponse response)

     throws ServletException, IOException

     {

         File                f        = new File(filename);

         int                 length   = 0;

         ServletOutputStream op       = response.getOutputStream();

         ServletContext      context  =
 getServletConfig().getServletContext();

         String              mimetype = 

Re: Symlinks inside WEB-INF/classes not working for me

2009-07-13 Thread Konstantin Kolinko
 While I agree with your recommendation for using a more sophisticated
 build/deployment process, I disagree with your reasoning. Java and/or
 Tomcat should not have any problem reading files via symlinks. As far as
 I know, Java's I/O API does not have the ability to distinguish between
 symbolic and hard links.

and some OS does not have the ability to distinguish lowercase and
uppercase names. (joking...).

See how allowLinking and caseSensitive options are implemented in
StandardContext.


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [ERROR] Cannot create JDBC driver of class '' for connect URL 'null'

2009-07-14 Thread Konstantin Kolinko
2009/7/14 Neil Youngman neil.young...@wirefast.com:
 I'm having trouble getting Oracle access from Axis2 to work under
 Tomcat 6. I've spent a lot of time Googling and prodding and poking
 the application and I haven't found a solution that works for me.

 Oddly the configuration I'm using seems to work for another
 application.

 Let's start with the configuration in axis2/META-INF/context.xml,
 which is:

(...)

Look at $CATALINA_BASE/conf/Catalina/localhost/your web app name.xml

That is a copy of your context.xml file that Tomcat creates when the
app is deployed. This copy takes precedence over its original. Maybe
your Resource isn't defined there.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Deploying ROOT application errors.

2009-07-15 Thread Konstantin Kolinko
Usual questions:
1. Your exact Tomcat version.
2. Your OS and configuration.


 If I try to deploy ROOT.war via the manager It just deletes the contents of
 the ROOT expanded directory minus the web-inf and meta-inf folders.

Maybe the following will help you:
http://wiki.apache.org/tomcat/FAQ/Windows

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: MalformedObjectNameException: Unterminated key property part

2009-07-16 Thread Konstantin Kolinko
1. What, exactly, Tomcat version is it? Do not forget to mention it
when asking the questions here.

2. This is wrong:
 Host name=
There should be a name. E.g. localhost, but any name will do.
It cannot be empty: It is used to name the host-specific configuration
and working directories, as well as when registering the component in
JMX. Thus the exception that you are seeing.

3. Service name=Tomcat-Standalone
Engine name=Standalone

Service and Engine name should better be equal. There were some bugs
(in some TC releases) if they are not.

This name (the Engine name, IIRC) also is used to name configuration
and working directories.


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: useHttpOnly - how to?

2009-07-16 Thread Konstantin Kolinko
 X-Powered-By: Servlet 2.4; JBoss-4.2.0.GA_CP02 (build:
 SVNTag=JBPAPP_4_2_0_GA_CP02 date=200801291544)/Tomcat-5.5

There is a build date in the above header. useHttpOnly is a recent
feature. It was not implemented back in January 2008. Also, that JBoss
version is using Tomcat 5.5.

For 5.5 branch it will be in Tomcat 5.5.28 (not yet released).

For 6.0 it is available since 6.0.20 release. (or 6.0.19, but that
version was not released)

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Any Help on this would be really appreciated...

2009-07-16 Thread Konstantin Kolinko
 Caused by: java.util.MissingResourceException: Can't find bundle for base
 name c
 onnection, locale fr_FR

 java.lang.NoClassDefFoundError: Could not initialize class
 fr.inria.monitoring.b
 ep.BEP4Sumit

I understand, that it cannot find BEP4Sumit class file that your valve is using.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Photo gallery webapp for Tomcat

2009-07-16 Thread Konstantin Kolinko
2009/7/16 David kerber dcker...@verizon.net:
 I'm looking for a free or low-cost photo gallery package suitable for
 hosting on tomcat, for use on my personal web site (which is on my home
 computer).  Something along the lines of coppermine
 (http://coppermine-gallery.net), but that doesn't require a separate http
 server like Apache or IIS.  Right now I'm running only TC, and I'd like to
 keep it that way if possible.

 Any suggestions/links/pointers?  I could write one myself, but I'd rather
 not reinvent this particular wheel if I don't have to.


Google has some links:
http://www.google.com/search?q=java+photo+gallery

Have not tried any of them.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: useHttpOnly - how to?

2009-07-16 Thread Konstantin Kolinko
2009/7/16 acastanheira2001 acastanheira2...@yahoo.com.br:

 Thanks for your reply.

 It appears on http://tomcat.apache.org/tomcat-6.0-doc/config/context.html;
 but not in http://tomcat.apache.org/tomcat-5.5-doc/config/context.html;.


If you are confused, those files are updated when a release is done,
not when someone updates them.


 Konstantin Kolinko wrote:

 X-Powered-By: Servlet 2.4; JBoss-4.2.0.GA_CP02 (build:
 SVNTag=JBPAPP_4_2_0_GA_CP02 date=200801291544)/Tomcat-5.5

 There is a build date in the above header. useHttpOnly is a recent
 feature. It was not implemented back in January 2008. Also, that JBoss
 version is using Tomcat 5.5.

 For 5.5 branch it will be in Tomcat 5.5.28 (not yet released).

 For 6.0 it is available since 6.0.20 release. (or 6.0.19, but that
 version was not released)

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: net stop tomcat6 service hangs on Windows 2008 (64-bit)

2009-07-18 Thread Konstantin Kolinko
2009/7/17 Caldarale, Charles R chuck.caldar...@unisys.com:
 From: Matt Sullivan [mailto:mjdsulli...@hotmail.com]
 Subject: RE: net stop tomcat6 service hangs on Windows 2008 (64-bit)

 Never heard back from anyone, and I'm left assuming this is a bug,
 albeit a difficult one to isolate.

 Refresh our memories - does the hang still occur if you use the shutdown.bat 
 script rather than net stop?


Just to share a bit of my experience:
I have seen Tomcat hanging (and unable to respond to shutdown.sh)
after an out-of-memory (PermGen). It was on Solaris.

I have not dug into it yet (as it is not so important for us), but I
can say that there are some places where an OOM is caught and ignored
or wrapped. The one that showed in our logs was Spring Framework's
DispatcherServlet,  but Tomcat itself does the same: merely throwing
an OOM Error results in the usual HTTP Status 500 error page being
shown.


If you face such a situation, then simply killing tomcat6.exe process
if net stop fails would be the only recipe that I know should be
working.

If your case is different, e.g. you failed to stop a Tomcat instance
that was not hung, then maybe some other cause and a suitable
solution/bugfix can be found. E.g. if it is the case of Application
threads that are not terminating, that Charles mentioned in his first
reply. And in my case of OOM, some tuning can lessen the probability
of it.

 I guess we'll stick with the less elegant workaround, simply killing
 tomcat6.exe process if net stop fails, unless anyone can think of something
 else to try.

I have only the thought of obtaining some diagnostics before killing
it, like getting the Java stack (using jstack tool from JDK, or from
the menu shown by  tomcat6w tray icon), or waiting until log4j flushes
the logs.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat admin webapp audit

2009-07-18 Thread Konstantin Kolinko

 there is a way to trace into a log file all the connections (and also every
 connection attempt) made into the admin tomcat webapp ? What I need to
 know is:

 login timestamp
 user
 src ip


It is called AccessLogValve,
http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Is it not possible to install apache-tomcat-6.0.20 with a J2SE 5 JRE

2009-07-18 Thread Konstantin Kolinko
Is you Windows  32-bit, or 64-bit one?


2009/7/18 Varuna Seneviratna varunasenevira...@gmail.com:
 Manually you can get it running But it is not possible to install using the
 setup apache-tomcat-6.0.20.exe.

 Varuna

 2009/7/18 Mark Thomas ma...@apache.org

 Varuna Seneviratna wrote:
  When I run the set up apache-tomcat-6.0.20.exe for WindowsXP I get the
  message from the Tomcat Setup as Failed to install tomcat6 service check
  your settings and permissions.I have the permissions.The only thing I
 think
  that is different from the setup needs is the JRE version.But the tomcat-
  preconfigured-6.0.18.zip downloaded from coreservlets.com
  http://coreservlets.com%20works fine with the J2SE 6 JRE.
 
  Your ideas please!!

 Start the service manually, tell us what error(s) you get.

 Mark


 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




 --
 Kind Regards Varuna

 Varuna Seneviratna
 No 514 Udumulla Road
 Battaramulla
 Sri Lanka
 Tel : 011-2888620
 Mobile:0715617141


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat 6 database pooling, DataSource returning NULL connection

2009-07-18 Thread Konstantin Kolinko
See
http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html#A%20word%20on%20Contexts

Tomcat makes a copy of your META-INF/context.xml when the application
is deployed, and will not see changes to that file unless you fully
undeploy and redeploy your application.


2009/7/19 Lucas Vickers lucasvick...@gmail.com:
 woops, email was sent prematurely

 anyway, the full email:

 META-INF/context.xml :

  Resource
     name=jdbc/tabscorp_tabsdb
     auth=Container
     type=javax.sql.DataSource
         maxActive=100 maxIdle=30 maxWait=1
         username=mylogin password=mypass
     driverClassName=com.mysql.jdbc.Driver
     logAbandoned=true removeAbandoned=true
     removeAbandonedTimeout=60
         url=jdbc:mysql://localhost:3306/mydb?autoReconnect=true/

 WEB-INF/web.xml :

    resource-ref
      descriptionTABS DB Connection/description
      res-ref-namejdbc/tabscorp_tabsdb/res-ref-name
      res-typejavax.sql.DataSource/res-type
      res-authContainer/res-auth
    /resource-ref


 Java Code:

                    InitialContext cxt = new InitialContext();
                    if ( cxt == null ) {
                        throw new Exception(InitialContext is NULL);
                    }

                    DataSource ds = (DataSource) cxt.lookup(
 java:/comp/env/jdbc/tabscorp_tabsdb );
                    if ( ds == null ) {
                        throw new Exception(Data source not found);
                    }

                    Connection conn = ds.getConnection();
                    if ( conn == null) {
                        throw new Exception(Connection is null);
                    }

                    stmt = connection.createStatement();


 I am getting a conn == null , but no other information, so I am having
 trouble debugging.
 suggestions?

 thanks


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Issues running 2 versions of tomcat?

2009-07-21 Thread Konstantin Kolinko
2009/7/21 Security Management list-subscripti...@secmgmt.com:
 I have a server, running Tomcat 5 with Java 4, and running Tomcat 6 with
 Java 6.

 There is another application that is an XMLRPC server on ports 8085-8100

 The XMLRPC service is running on Tomcat 5, and a struts 2 application is
 running on Tomcat 6.

 I have verified that there are no common ports listed for the 3 sets of
 ports (2 x server.xml, and the config for the rpc).

 Can anyone explain why the 8085-8100 ports might go haywire every now and
 then?  The app works fine with Tomcat 6 shutdown, but when Tomcat 6 starts,
 there are anomalies.  I've verified the correct JVMs are starting the
 correct Tomcat versions, etc.  Anywhere else I might find a clue?


1. Please provide your definition of haywire

2. Do you have Apache HTTPD in front of Tomcat ?  Do you use mod_jk?

3. Your operating system, and what versions of the mentioned software
you are running.
How old is your Tomcat 5? You may want to look at
http://tomcat.apache.org/security-5.html

Also Java 4 has already reached its EOL.
http://java.sun.com/j2se/1.4.2/download.html

Usually older apps run fine on Java 6, and Tomcat 5 apps run fine when
deployed on Tomcat 6,  and two instances of Tomcat, be them of
different or of the same version, run fine with each other.

4. What do you mean by 8085-8100


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Is it not possible to install apache-tomcat-6.0.20 with a J2SE 5 JRE: A new development

2009-07-21 Thread Konstantin Kolinko
2009/7/21 Varuna Seneviratna varunasenevira...@gmail.com:
 The set up dialog box that pops up saying unable to proceed has has 3
 buttons, the first is Abort second Retry, third Ignore.When I keep on
 clicking Retry for several times the setup goes a step forward and the
 Kaspersky icon at the bottom right corner display a message as NS130.TMP
 placed in low restricted area and again it stops with the dialog box popped
 up and again I keep on clicking Retry then the setup goes a step forward
 and Kaspersky again displays a message as before saying that it has placed
 another .TMP file in the low restricted area.The setup always stops when it
 displays the message Using jvm:C:/Program
 Files/Java/jre6/bin/client/jvm.dll.

 Can it be because of Kaspersky setting that I am unable to install Tomcat
 service?


Yes, that is highly probable.

I am also using Kaspersky 2009 (as seems you are using), and it asks
me to give permission to this setup application to modify system
services (I do not remember exact message, and I do not have a copy of
it on the PC that I use at this very moment, so it is all from my
memory). I always choose allow and in this session and it goes on,
but my Kaspersky was installed to run in interactive mode (ask the
user about its decisions), and I do not know about your settings. I do
not know, maybe you already clicked the forbid item when you were
asked, or maybe it did not ask you at all.

In any case, Kaspersky can be temporarily disabled from menu that pops
up when you right-click its icon in the tray, or from its
configuration dialog.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Editing startup.sh - help

2009-07-22 Thread Konstantin Kolinko
I agree with what David writes below, and in addition
1. There should be no : after $JAVA_OPTS.  It is not a classpath.
2. The preferred way is create a setenv.sh file, either in
$CATALINA_BASE\bin or in $CATALINA_HOME\bin
3. For setting these properties there is an easier way: add the following line
org.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false
to the catalina.properties file


Best regards,
Konstantin Kolinko

2009/7/22 David Smith d...@cornell.edu:
 Probably there needed to be a \ line continuation above the line you
 added.  Additionally I believe this stuff should find it's way into a
 separate setenv.sh file instead of editing startup.sh.

 --David

 alee amin wrote:
 I am trying to add the following option for tomcat startup in startup.sh
 file
 JAVA_OPTS=$JAVA_OPTS:
 -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false

 It's added at line # 36 of startup.sh and then i run the tomcat from
 terminal by issuing ./startup.sh command. and it gives me error
 -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false Command not
 found


 The same thing i did in startup.bat under windows environment and it worked
 fine. Is there any other way to edit startup.sh file? or what i am doing
 wrong?

 Thanks
 ..alee
 http://techboard.wordpress.com




 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: XSS vulnerability in Tomcat Host Header

2009-07-22 Thread Konstantin Kolinko
2009/7/22 Rémy Maucherat remy.mauche...@gmail.com:
 On Wed, Jul 22, 2009 at 2:37 PM, Mark Thomasma...@apache.org wrote:
 You'll need to provide more details. Nothing stands out from the security 
 pages.

 Please provide step by step instructions to reproduce from a clean Tomcat
 installation.

 Please also note that potential security vulnerabilities should be reported
 privately (see http://tomcat.apache.org/security.html), rather than to a 
 public
 list. Since you have posted to a public list, there is no point continuing in
 private.

 I don't think the host is used in HTML generated by Tomcat. OTOH, like
 the other strings returned by the API, ServletRequest.getServerName is
 not XSS filtered.


At least, if there are concerns about that, there is a workaround:

you can specify proxyName  attribute on a Connector element in server.xml

In that case the one that is in request will be ignored.

Documentation is here:
http://tomcat.apache.org/tomcat-6.0-doc/config/http.html
http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Fwd: Is it not possible to install apache-tomcat-6.0.20 with a J2SE 5 JRE: A new development

2009-07-23 Thread Konstantin Kolinko
 When given the long command

 C:\apache-tomcat-6.0.20\bintomcat6.exe //IS//%SERVICE_NAME%
 --StartClass
 org.
 apache.catalina.startup.Bootstrap --StopClass
 org.apache.catalina.startup.Bootst
 rap --StartParams start --StopParams stop

 The above command displayed a message box with a big Red X round shape
 mark(What do you call it?), titled Application System  and it's message
 was nonAlpha 37

 That is a new one to me, I never saw one of those.

I think that SERVICE_NAME variable was not defined, and you cannot
use %SERVICE_NAME% (literally) as a service name. The name must be
alphanumeric, no spaces etc., and % ((char)37) is not a valid
character here.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: DigestAuthenticator failure: java.sql.SQLException: Operation not allowed after ResultSet closed

2009-07-30 Thread Konstantin Kolinko
2009/7/30 DIGLLOYD INC digllo...@diglloyd.com:
 How can I resolve this issue?  It takes Tomcat own on a regular basis,
 locking out legitimate users.  Looks like JDBCRealm has some kind of bug.

 Thanks!

 Jul 29, 2009 1:46:41 PM org.apache.catalina.realm.JDBCRealm getRoles
 SEVERE: Exception performing authentication
 java.sql.SQLException: Operation not allowed after ResultSet closed
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
        at com.mysql.jdbc.ResultSetImpl.checkClosed(ResultSetImpl.java:768)
        at com.mysql.jdbc.ResultSetImpl.next(ResultSetImpl.java:7008)
        at org.apache.catalina.realm.JDBCRealm.getRoles(JDBCRealm.java:632)
        at
 org.apache.catalina.realm.JDBCRealm.getPrincipal(JDBCRealm.java:596)
        at
 org.apache.catalina.realm.RealmBase.authenticate(RealmBase.java:400)
        at
 org.apache.catalina.authenticator.DigestAuthenticator.findPrincipal(DigestAuthenticator.java:283)
        at
 org.apache.catalina.authenticator.DigestAuthenticator.authenticate(DigestAuthenticator.java:176)
        at
 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:491)
        at com.diglloyd.tomcat.BadInputValve.invoke(BadInputValve.java:284)
        at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at
 org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
        at
 org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:394)
        at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at
 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:613)


 diglloyd:bin lloyd$ ./version
 -bash: ./version: No such file or directory
 diglloyd:bin lloyd$ ./version.sh
 Using CATALINA_BASE:   /web/tomcat
 Using CATALINA_HOME:   /web/tomcat
 Using CATALINA_TMPDIR: /web/tomcat/temp
 Using JRE_HOME:
 /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
 Server version: Apache Tomcat/6.0.16
 Server built:   Jan 28 2008 11:35:29
 Server number:  6.0.16.0
 OS Name:        Mac OS X
 OS Version:     10.5.7
 Architecture:   i386
 JVM Version:    1.5.0_19-b02-304
 JVM Vendor:     Apple Inc.



 Lloyd Chambers
 http://diglloyd.com
 http://macperformanceguide.com/
 [Mac OS X 10.5.2 Intel, Tomcat 6.0.16]

It should be the following issue:
https://issues.apache.org/bugzilla/show_bug.cgi?id=45453

It was fixed in rev.685696
(http://svn.apache.org/viewvc?view=revrevision=685696)

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Newbie: CSS not taking effect

2009-07-31 Thread Konstantin Kolinko
2009/7/31 Roman Sokolyuk romsok.t...@gmail.com:
 I have only one question. How does the browser determine which parts of the
 URL to strip?


http://tools.ietf.org/html/rfc3986#section-5
http://www.w3.org/TR/html401/struct/links.html#h-12.4.1


Also, if I remember correctly, unless you remove this line:
?xml version=1.0 encoding=ISO-8859-1 ?
it won't work in Internet Explorer. It will try to show it as XML,
instead of (X)HTML that it actually is.

Also, that, and your %page contentType=.., contradicts with what
you have wrote in
meta http-equiv=Content-Type

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tribes

2009-08-08 Thread Konstantin Kolinko
Martin,

maybe you have not noticed them, but the JavaDocs are already there,

http://tomcat.apache.org/tomcat-6.0-doc/api/index.html
http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/catalina/tribes/package-summary.html#package_description

Also, they are included into the fulldocs bundle in the release.
http://www.apache.org/dist/tomcat/tomcat-6/v6.0.20/bin/

If you consider any improvements, please file an issue. Patches are welcomed.

Best regards,
Konstantin Kolinko

2009/8/4 Martin Gainty mgai...@hotmail.com:

 i like Ant javadoc as a follow-up task for javac ..(part of the build process)
 you create the package/class
 javadoc task will automatically create 'linted html'
 ANTS javadoc also has ability to read css stylesheet so you can
 bold method explanations
 italicise annotations

 http://ant.apache.org/manual/CoreTasks/javadoc.html

 prob the only thing ant javadoc wont do is translate to 
 german,swedish,french..

 you would also need to add in examples..

 another format would be pdf which would easily be accomplished thru FOP

 Martin Gainty
 __
 Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

 Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
 sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
 oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich 
 dem Austausch von Informationen und entfaltet keine rechtliche 
 Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen 
 wir keine Haftung fuer den Inhalt uebernehmen.
 Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
 destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
 l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci 
 est interdite. Ce message sert à l'information seulement et n'aura pas 
 n'importe quel effet légalement obligatoire. Étant donné que les email 
 peuvent facilement être sujets à la manipulation, nous ne pouvons accepter 
 aucune responsabilité pour le contenu fourni.




 Date: Mon, 3 Aug 2009 08:52:27 -0600
 From: devli...@hanik.com
 To: users@tomcat.apache.org
 Subject: Re: Tribes

 I will work on better docs, in the mean time, quick start is here

 http://tomcat.apache.org/tomcat-6.0-doc/tribes/introduction.html


 On 08/03/2009 06:02 AM, nash4403X wrote:
  Filip-  Needless to say a product is as good as its documentation.
 
  I wanted to try tribes but without proper docs/articles and my limited
  knowledge it's tough and make me look at other options. All I wanted to do
  is messaging with help of tribes in between 5 tomcat instances.
  I wanted to have some code in my startup to instantiate the channel and 
  when
  required all instances should receive or send messages to one another.
 
  Can you do the write up of an article on how to do this?
 
  I understand your valuable time and I volunteer to do an article on tribes
  for messaging but only if I understand? Can you help please?
 
 
 
  Filip Hanik - Dev Lists wrote:
 
  that is cause *one* of my flaws as a developer is that I'm not very good
  at writing and maintaining docs
  there is a bit more here
  http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-channel.html
 
  the rest is in the code of the library, which isn't that big.
  if you have any specific questions let me know
 
  Filip
 
  Jorge Medina wrote:
 
  Is there a way to get more documentation on the Tribes package ?
  I would like to reuse the dynamic membership discovery feature of
  Tribes, but many of the links are not working on the page
  http://tomcat.apache.org/tomcat-6.0-doc/tribes/introduction.html
 
  Thanks
 
  -Jorge
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 
 
 
 


 _
 Get your vacation photos on your phone!
 http://windowsliveformobile.com/en-us/photos/default.aspx?OCID=0809TL-HM

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 6 shutdown hangs server when using JDK 6.0_15

2009-08-12 Thread Konstantin Kolinko
2009/8/11 Dan Denton dden...@remitpro.com:
 (...)
 Sorry to be a pest, but I'd really appreciate any input from the community on 
 this. I could always use JDK 5, but my developers would like to use 6 and I 
 don't see a logical reason why such a major release would have so much 
 negative impact on tomcat 6, or the host OS.


Re: major release

Note, that there are two generations of JDK 6:  there were major
changes in 6u10.
Also IIRC, some minor changes were in 6u14.

You may want to try 6u7.
Also, beware of this issue (regression since 6u7, still open more than
8 months):
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6778921

Regarding 6u15 I remember the following thread on this list:
Tomcat 6.0.20, JDK1.6.0_14 and security manager
http://markmail.org/thread/igcdgzponj2g5m3n
I do not think that it is your case.  Just one of changes that occurred in 6u14.



Thus:
1. Try with previous JDK releases
2. Try to switch SE Linux to warnings only mode. Look into the system
logs for any messages.

3. Check your network configuration and Tomcat connectors.
What connectors you are using? Whether there is IPv4 or IPv6, or both
on that machine.  One of steps during shutdown is that Tomcat closes
open sockets, and there might be some system-specific issues.

4. Are these hangs occurring with a clean tomcat (without any web
applications), or only when some applications are deployed?


5.
 I've attempted to use jstack and pstack to get a trace of the process during 
 shutdown,
 but the server dies before anything useful is logged.

Are the logs empty, or you cannot read them because they are lost?
If the latter, you may try redirecting them somewhere, e.g. over the net.
You may increase details level,  so to see what shutdown steps are
successfully completed before the hang occurs.

6.
 This occurs when shutting down the canned instance, or any other webapp such 
 as artifactory.

I do not understand this part of the above phrase: any other webapp
such as artifactory.
What do you mean by shutting down an webapp? What is canned?


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: test

2009-08-12 Thread Konstantin Kolinko
2009/8/12 support_hockey antas.mis...@tcs.com:

 i will delete this after i test how to create a message  here...
 --
 View this message in context: 
 http://www.nabble.com/test-tp24934739p24934739.html
 Sent from the Tomcat - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org



It is not a forum. It is a mailing list.
You cannot delete an e-mail once that it is sent.

Please start here:
http://tomcat.apache.org/lists.html#tomcat-users


BTW, archived copies of your test mails:
http://markmail.org/thread/cfvxc3xdeqtjb6g6
http://markmail.org/thread/a35f3tabuc6ddzpm

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Setting Context Path in Tomcat

2009-08-12 Thread Konstantin Kolinko
2009/8/12 Caldarale, Charles R chuck.caldar...@unisys.com:
 From: carbotex [mailto:carbo...@gmail.com]
 Subject: RE: Setting Context Path in Tomcat

 I'm running Tomcat 5.5.27.

 For that level, it's a bit more complicated.

Chuck, that feature has already been ported to 5.5. It is mentioned as
44021, 43013: Add support for # to signify multi-level contexts for
directories and wars.
in  http://tomcat.apache.org/tomcat-5.5-doc/changelog.html



  Instead of just renaming the .war files, you have to deploy them somewhere 
 *outside* of the Host appBase directory, and create a Context element for 
 each in conf/Catalina/[host]/[appName].xml.  (In your case, appName would be 
 group1#app1, group1#app2, group1#app3.)  Inside each Context element, 
 include a docBase attribute that points to the location of the respective 
 .war file.

  - Chuck


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat writing the wrong timestamp on compiled JSP's

2009-08-14 Thread Konstantin Kolinko
2009/8/14 André Warnier a...@ice-sa.com:

 This is really off-topic here, being WinSCP more than anything else.
 But since I am also a heavy user of WinSCP, connecting to my various Apache
 and Tomcat machines, and I also see that same issue (some server sometimes
 showing me server files with a timestamp off by one hour more or less), and
 this has been puzzling me at some low level for a couple of years now, I'd
 also like to understand the issue fully while we have the chance.  This does
 not only concern JSP files by the way, but also logfiles etc..
 I thought it was just a bug of WinSCP. I've kind of learned to live with it,
 and to mentally adjust for the discrepancies, but it's still puzzling.
 My systems are using NTP to synchronise their time, workstations too. But I
 still see this discrepancy.  Care to repeat the explanation and the fix, or
 is it not a fix ?


WinSCP documentation:
http://winscp.net/eng/docs/timestamp

FAQ pages (they point back to documentation, though):
http://winscp.net/eng/docs/faq_win_timestamp
http://winscp.net/eng/docs/faq_timestamp

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: website offline

2009-08-28 Thread Konstantin Kolinko
2009/8/28 Nikolay Diulgerov ndiulge...@imx.fr:
 Hello guys,
 at the moment http://tomcat.apache.org/ is unavailable (you can see the page
 coming).
 Can someone involved directly state if this anyway compromised the builds
 provided for download in some timeframe in the past.


You should be able to check it by yourself: there is a PGP signature
for each of the released files provided by release managers, and
their public keys can be found in SVN, e.g. here:
https://svn.apache.org/repos/asf/tomcat/trunk/KEYS
and on some keyservers.

http://www.apache.org/info/verification.html

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 5.5 org.apache.naming.ResourceRef cannot be cast to javax.sql.DataSource

2010-01-25 Thread Konstantin Kolinko
2010/1/25 Steve Ryder sry...@jsrsys.com:
 Resource name=jdbc/MySql auth=Container type=javax.sql.Datasource

The above should be javax.sql.DataSource


Do you have any references to this resource in your web.xml file?


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 5.5 org.apache.naming.ResourceRef cannot be cast to javax.sql.DataSource

2010-01-25 Thread Konstantin Kolinko
2010/1/26 Steve Ryder sry...@jsrsys.com:
 at gnu.gcj.convert.Input_iconv.read(libgcj.so.81)

Stop right there. Do not use GNU Java for anything.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat access is very slow

2010-01-26 Thread Konstantin Kolinko
2010/1/26 Yu Chao yves0...@gmail.com:
 sorry for my later response because I reinstalled my computer... the
 situation is still slow, I got mad...

1. Your operating system = ?
2. Your Java runtime vendor and its version = ?
3. What are you trying to do, step by step. At what step do you
observe the delays?
4. Is it only your application, that opens slowly? How about Tomcat
examples? What about other, external, web sites?
5. Does your application have connections to a Database?
6. What web browser are you using?


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat/JDBC Thin Client and Oracle SQL Parsing

2010-01-26 Thread Konstantin Kolinko
2010/1/26 Dan Denton dden...@remitpro.com:

 Can anyone point out any instances they've had where Tomcat or Tomcat with 
 the Oracle JDBC driver has exhibited similar behavior?

Is your JDBC driver up-to-date, or as old as the Tomcat version that
you are using? I once solved a thing by updating the driver.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: the context.xml is not preserved

2010-01-28 Thread Konstantin Kolinko
2010/1/28 LI Daobing lidaob...@gmail.com:
 my system: Ubuntu 9.04, x86_64, tomcat 6.0.18,

See the Changelog file for a list of issues fixed since 6.0.18. (Or
search the Bugzilla) I remember that something similar was there.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: can't call my servlet on Tomcat 6 (Error 404)

2010-01-31 Thread Konstantin Kolinko
2010/2/1 hbral nro...@web.de:

 tomcat: 6.0.24
 os: debian linux 2.6.12.6-xenU
 jvm: 1.6.0_12-b04

 log files contain nothing use full other than that i successfully deployed
 the war file


What URL are you calling by your browser?

If your war was named mywar.war then you should call
http://localhost:8080/mywar/myservlet

Also,
http://wiki.apache.org/tomcat/HowTo#How_do_I_make_my_web_application_be_the_Tomcat_default_application_.3F

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: changing trace level of 'internal' tomcat logs

2010-02-02 Thread Konstantin Kolinko
2010/2/2 Lominchar García, José Luis jllo...@mapfre.com:
 Hi,
 ¿does somebody knows what I have to do to change trace level of
 jakarta_service_date.log  and stdout_date.log from 'info' to 'warn'?

 jakarta_service_date.log :

Start  All Programs  Apache Tomcat 6.0  Configure Tomcat

then switch to the Logging page and choose Level, one of: Error,
Info, Warning, Debug.

 stdout_date.log:

java.util.logging.ConsoleHandler.level = WARNING
(in conf\logging.properties)

See java.util.logging log level names here:
http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Level.html


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: NullPointerException in MimeHeaders

2010-02-02 Thread Konstantin Kolinko
2010/2/2 Bertalan Kis bertalan@razorfish.com:
 It seems attachments are disabled.
 Here are the stacktraces:

 Jan 29, 2010 1:13:20 AM 
 com.sun.xml.ws.transport.http.servlet.WSServletDelegate doGet
 SEVERE: caught throwable
 java.lang.NullPointerException
        at 
 org.apache.tomcat.util.http.MimeHeaders.setValue(MimeHeaders.java:269)
(...)

 At my company we can see NullPointerExceptions in the catalina.out files
 (see the attachments). We use Tomcat 6.0.14 on our 4 servers

https://issues.apache.org/bugzilla/show_bug.cgi?id=47655#c9

Though that might not help you to find an error in your code.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: changing trace level of 'internal' tomcat logs

2010-02-03 Thread Konstantin Kolinko
2010/2/3 Lominchar García, José Luis jllo...@mapfre.com:

 What bin/*.exe corresponds to 'Start  All Programs  Apache Tomcat 6.0  
 Configure Tomcat' ?


tomcat6w.exe


 java.util.logging.ConsoleHandler.level = WARNING
 (in conf\logging.properties) didn't work ..


I've tried and it works for me. Maybe you forgot to restart the service.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: changing trace level of 'internal' tomcat logs

2010-02-03 Thread Konstantin Kolinko
2010/2/3 Konstantin Kolinko knst.koli...@gmail.com:
 2010/2/3 Lominchar García, José Luis jllo...@mapfre.com:

 jakarta_service_date.log :

 Start  All Programs  Apache Tomcat 6.0  Configure Tomcat

 then switch to the Logging page and choose Level, one of: Error,
 Info, Warning, Debug.


 What bin/*.exe corresponds to 'Start  All Programs  Apache Tomcat 6.0  
 Configure Tomcat' ?


 tomcat6w.exe


Note, that that dialog displays Error level  when no logging level
is configured.  Just choose something else first.

https://issues.apache.org/bugzilla/show_bug.cgi?id=48663


 java.util.logging.ConsoleHandler.level = WARNING
 (in conf\logging.properties) didn't work ..


 I've tried and it works for me. Maybe you forgot to restart the service.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Embedding tomcat and bug in org.apache.catalina.startup.Catalina

2010-02-03 Thread Konstantin Kolinko
2010/2/1 Henning Blohm henning.bl...@gmail.com:
 Hi,

  this is a question about embedding Tomcat into an application so that
 it can still be configured using server.xml and web applications can be
 added or removed programmatically.

  I am using Tomcat 6.0.24.

  The way I tried to make it work is by instantiating an instance of
 Catalina, feeding in all necessary config and then adding
 StandardContext instances as needed to a named host of a named service
 etc. However there is a bug (I believe) in Catalina that made me
 subclass Catalina and add a getServer() method:

 public class MyCatalina extends Catalina {
        public Server getServer() {
                return this.server;
        }
 }

  This is due to Catalina declaring its own protected member variable
 server and a corresponding setServer method, while Catalina's super
 class Embedded has a private member server and a getServer method,
 so that Catalina sets its service member, but when asking, will return
 super.server which is consistently null.


I agree that it is a bug. Please add it to bugzilla.

You can include a link to your message,
http://marc.info/?l=tomcat-userm=126502245412565w=2

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Critical Problem with Tomcat instances

2010-02-08 Thread Konstantin Kolinko
2010/2/8 Arunkumar Janarthanan arunkumar.webad...@gmail.com:
 I am going through a critical problem that my payment system has 4 Tomcat
 instances and outofthem two instances simply redirecting to login page after
 user logged in into the application and trigger any action (even just
 clicking any link in the application) Not sure if this is application
 behavior while the same application doing on on other Two tomcat instances.


Read through the docs,
http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html

and make sure that
1. you have configured all properly
2. jvmRoute values for all 4 servers are different

If you want us to point at your errors, you should post here your
configuration files.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: How to enable RMISecurityManager in Tomcat 6.0?

2010-02-08 Thread Konstantin Kolinko
2010/2/8 Caldarale, Charles R chuck.caldar...@unisys.com:
 From: Konstantin Kolinko [mailto:knst.koli...@gmail.com]
 Subject: Re: How to enable RMISecurityManager in Tomcat 6.0?

 2010/2/7 Suman.P.S suman_...@yahoo.com:
 
   I am interested to know how to enable RMISecurityManager when Tomcat
 6.0 is running as Windows service?

 See
 http://marc.info/?l=tomcat-userm=120156204111331w=2

 I'm not sure that does what the OP wants.  There is a separate 
 java.rmi.RMISecurityManager class that should be used here, but I don't think 
 there's a way to specify that on the command line.  I haven't yet looked at 
 the RMISecurityManager code, so I don't know how it differs from the regular 
 SecurityManager implementation.


1. I have not actually tried, but it should be possible to specify
-Djava.security.manager=java.rmi.RMISecurityManager

(following an example here:
http://java.sun.com/javase/6/docs/technotes/guides/security/spec/security-spec.doc6.html
)

2. In the message that I referenced above there is a small error. The
policy should be specified with
-Djava.security.policy==tomcat_installation_dir/conf/catalina.policy

(note that the value of the property starts with '=')  That is to
avoid combining it with the JVM default policy. Though I think it
should work without that as well.


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: jsp compilation fails depending on how WEB-INF classes are build

2010-02-08 Thread Konstantin Kolinko
2010/2/8 Fabian Panthen f...@unitb-consulting.de:

java -version
 java version 1.6.0_14
 Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
 Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode)

echo %JAVA_HOME%
 C:\Program Files\Java\jdk1.6.0_14

ant -diagnostics
 ...
 ---
 System properties
 ---
 java.runtime.name : Java(TM) SE Runtime Environment
 sun.boot.library.path : C:\Program Files\Java\jdk1.6.0_14\jre\bin
 java.vm.version : 14.0-b16
 ...

 and eclipse is using that same jre6 for compilation so tomcat should einther
 have a problem with clase compiled by either one of them or with none,
 right?


1. What exactly Tomcat versions are you using.
2. How do you deploy your application? There might be old class files
in the ${CATALINA_BASE}/work folder. Please remove them.
3. What were you trying to do, step by step, and at what step it fails?


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat6 and https

2010-02-09 Thread Konstantin Kolinko
2010/2/9 Fabien COMBERNOUS fcombern...@kezia.com:
 My second connector (https) :
 Connector port=8443 protocol=HTTP/1.1 SSLEnabled=true
              maxThreads=150 scheme=https secure=true
               keystoreFile=conf/keystore keystorePass=changeit
 clientAuth=false
               sslProtocol=TLS /

Try to specify
keystoreFile=${catalina.base}/conf/keystore  keyAlias=tomcat

Note, that the SSL Howto document has Troubleshooting section:
http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html#Troubleshooting

HTTP Connector configuration reference:
http://tomcat.apache.org/tomcat-6.0-doc/config/http.html

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: 405 error?

2010-02-10 Thread Konstantin Kolinko
2010/2/11 Christopher Schultz ch...@christopherschultz.net:
 By calling the superclass's
 doGet method, you get the default implementation, which is to /not/
 support GET (sorry, I can't find the source for HttpServlet quite yet,
 so you'll have to read bytecode):

For 6.0.20 the source will be here:

http://svn.apache.org/viewvc/tomcat/tc6.0.x/tags/TOMCAT_6_0_20/java/javax/servlet/http/HttpServlet.java?view=markup#l166

As said, do not call super.doGet().

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: libapr /usr/lib64/libapr-1.so.0 not picked up by JAVA_OPTS in tomcat6.xml

2010-02-11 Thread Konstantin Kolinko
2010/2/11 J4 ju...@klunky.co.uk:
 Dear everyone,

    I am trying to use the APR based Apache Tomcat Native library on
 SLES11 and it is installed in:
 lrwxrwxrwx    1 root    root               17 Oct 12 01:03
 /usr/lib64/libapr-1.so.0 - libapr-1.so.0.3.3
 -rwxr-xr-x    1 root    root           181112 Oct 12 01:03
 /usr/lib64/libapr-1.so.0.3.3

 I changed the JAVA_OPTS in tomcat6.conf to read:
 JAVA_OPTS=-Xmx256m -XX:MaxPermSize=256m -Djava.library.path=/usr/lib64
 but when tomcat was restarted it still gave the same message, as shown
 below, which makes me think that it did not pick it up.


You are trying to load APR,  but Tomcat cannot use it directly.
Tomcat uses its own library, named Tomcat-Native, libtcnative-1.so,
that provides it with access to APR. Please read its documentation for
details.

http://tomcat.apache.org/download-native.cgi
http://tomcat.apache.org/native-doc/

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



<    1   2   3   4   5   6   7   8   9   10   >