Re: Unexpected redirect from https to http

2009-01-27 Thread removeps-groups
If the internal redirects and forwards did change the scheme to http, then they wouldn't work because there is no http listener. Is this what you want? I have no idea, except that perhaps Tomcat changes the scheme to https automatically whenever it can. --- On Mon, 1/26/09, Timothy Tagge

Is it possible for error page from one webapp to direct to another?

2009-01-25 Thread removeps-groups
Is it possible for error page from one webapp to direct to another? What I'm thinking is: In mywebservice/WEB-INF/web.xml error-page error-code404/error-code location/errors/404.html/location /error-page But I want the error page to be ROOT/errors/404.html Thanks.

RE: How to have multiple loggers with shared code also using the logger?

2009-01-24 Thread removeps-groups
Here's an update on the logger issue. It too me long to figure out because I ran into an issue about privileged servlets and had to write my own log4j.properties parser. The original code posted earlier in this thread works in that it creates a different logger for web application, and allows

Re: which JSP web hosting(windows or linux)

2009-01-18 Thread removeps-groups
There's also mochahost.com. It is not necessary to know Linux to use a Linux plan. Though be aware that file names are case sensitive. On MochaHost, it looks like if you must use MSSqlServer, then you have to go with the Windows plan, and use ASP instead of JSP. In theory it should be

RE: How to have multiple loggers with shared code also using the logger?

2009-01-15 Thread removeps-groups
Thanks, this makes sense. However, I'd like to find out what is being held onto by the log4j.jar. So I'd like to test it out. How does one redploy a single application? Strange, I could not find any information on this seemingly basic task on google. Thanks again. --- On Wed, 1/14/09,

RE: How to have multiple loggers with shared code also using the logger?

2009-01-14 Thread removeps-groups
Because of the classloading hierarchy. Once the logger is initialized with the common classloader, everybody uses that one. Thanks. I studied the Apache logger code. When we call org.apache.log4j.Logger.getLogger(), it calls functions of LogManager. The static initializer block of

RE: How to have multiple loggers with shared code also using the logger?

2009-01-13 Thread removeps-groups
Why is it what I'm trying to do not working though? It seems that my MyLog.getLogger function does find the correct logger name, and that Logger.getLogger() is always using the the first log4j.properties that was found. Yeah, I had tried something like this, namely to have a class

How to have multiple loggers with shared code also using the logger?

2009-01-12 Thread removeps-groups
How to have multiple loggers with shared code also using the logger? In ${catalina.home}/lib there is a jar file that contains class MyLog. There is a function in it public class MyLog { public static Logger getLogger() { ClassLoader classLoader =

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

2009-01-01 Thread removeps-groups
Do you mean set session attributes? How do you do that from the client side? --- On Wed, 12/31/08, Konstantin Kolinko knst.koli...@gmail.com wrote: From: Konstantin Kolinko knst.koli...@gmail.com Subject: Re: How can the login page see parameters in the original request? To: Tomcat Users

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

2009-01-01 Thread removeps-groups
Most thorough, thanks! --- On Thu, 1/1/09, Konstantin Kolinko knst.koli...@gmail.com wrote: From: Konstantin Kolinko knst.koli...@gmail.com Subject: Re: How can the login page see parameters in the original request? To: Tomcat Users List users@tomcat.apache.org Date: Thursday, January 1,

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

2008-12-30 Thread removeps-groups
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

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

2008-12-29 Thread removeps-groups
How can the login page see parameters in the original request? In my app, I make a request to https://localhost/mywebservice/action.do. Because the user is not authenticated, Tomcat redirects them to the login page. I want the login page to be able to see the parameters passed in the original

Re: Case-insensitive JDBC Realm j_security_check

2008-12-18 Thread removeps-groups
Yes, this is possible. Override JDBCRealm.authenticate. Details: 1. Class is org.apache.catalina.realm.JDBCRealm. 2. Override authenticate of 2 arguments. I guess you would convert username and/or password to lowercase and call super.authenticate. 3. The jar file containing your class, or the

How to install the session cookie into the original request of the secure area?

2008-12-16 Thread removeps-groups
How to install the session cookie into the original request of the secure area? Here is my problem. When making a connection to the secure area of my website through code, the original request is saved, but the JSESSIONID cookie is not added to it. So after j_security_check succeeds, the

unable to login to second application because of password digest issues

2008-12-14 Thread removeps-groups
Hi. I added a second application, but am unable to login to it because of password digest issues. Stepping into RealmBase.java this is what I find: When I log in to the primary application (under ROOT) the password is test and the password saved in the database is the sha1 which is

Re: unable to login to second application because of password digest issues

2008-12-14 Thread removeps-groups
Nevermind, I figured it out. In the second request to login, there was an extra line, so the password was actually test\r\n. --- On Sun, 12/14/08, removeps-gro...@yahoo.com removeps-gro...@yahoo.com wrote: From: removeps-gro...@yahoo.com removeps-gro...@yahoo.com Subject: unable to

Server returned HTTP response code: 408 for URL: https...j_security_check

2008-12-14 Thread removeps-groups
Server returned HTTP response code: 408 for URL: https...j_security_check In my testing I get the following error: Server returned HTTP response code: 408 for URL: https://localhost:6143/mywebservice/action/j_security_check 408 = request time out. So the question is how can a client

RE: Server returned HTTP response code: 408 for URL: https...j_security_check

2008-12-14 Thread removeps-groups
But how does this work through code? My initial request is to http://localhost/mywebservice/file.do; (and all this is through Java code similar to below). Tomcat redirects the request to the login page specified in web.xml http://localhost/mywebservice/login.html;. Then either Tomcat returns

RE: Server returned HTTP response code: 408 for URL: https...j_security_check

2008-12-14 Thread removeps-groups
It should be a POST request to /[webapp]/j_security_check, and include the JSESSIONID cookie set by the server when the login page was returned. Thanks, this seems to be the issue. There is a call to org.apache.catalina.connector.Request.setRequestedSessionId(String id) from

RE: Server returned HTTP response code: 408 for URL: https...j_security_check

2008-12-14 Thread removeps-groups
Nevermind, I see that JSESSIONID is added to the response automatically from Tomcat. The code System.out.println(connection.getHeaderField(Set-Cookie)); prints JSESSIONID=56136B3CE4CC657DD36C226E264A97AD; Path=/mywebservice; Secure So now I think I just have to include that cookie in every

Re: configure JNDI to avoid error Last packet sent to the server was xxxxx ms ago

2008-12-09 Thread removeps-groups
to the server was x ms ago To: Tomcat Users List users@tomcat.apache.org Date: Tuesday, December 9, 2008, 6:55 AM Dear removeps-groups, Thanks for the links. But in answer to the issues below: chmod 600 is not sufficient because the admin of my website should not be able to see

Re: Tomcat not displaying jsp files.

2008-12-08 Thread removeps-groups
What address are you typing into the address/location bar? --- On Mon, 12/8/08, Gaurav Pruthi [EMAIL PROTECTED] wrote: From: Gaurav Pruthi [EMAIL PROTECTED] Subject: Tomcat not displaying jsp files. To: Tomcat Users List users@tomcat.apache.org Date: Monday, December 8, 2008, 5:27 AM Hi,

Re: configure JNDI to avoid error Last packet sent to the server was xxxxx ms ago

2008-12-07 Thread removeps-groups
Thanks for the links. But in answer to the issues below: chmod 600 is not sufficient because the admin of my website should not be able to see the passwords either. And if you're using a web hosting service, all the more reason. The decryption algorithm may need a license key which is

default application versus secondary application

2008-12-07 Thread removeps-groups
Sorry, I could not find info on this topic on the internet, though I'm sure it's there. My directory structure is like this: c:\webapps\ c:\webapps\ROOT\ c:\webapps\ROOT\index.html c:\webapps\secondApp\ c:\webapps\secondApp\index.html To use the second application I type

Re: configure JNDI to avoid error Last packet sent to the server was xxxxx ms ago

2008-12-06 Thread removeps-groups
But I need to re-trigger the operation (such as an INSERT statement), and also to remove the dead connection from the pool or reconnect it. --- On Sat, 12/6/08, Ken Bowen [EMAIL PROTECTED] wrote: From: Ken Bowen [EMAIL PROTECTED] Subject: Re: configure JNDI to avoid error Last packet sent to

configure JNDI to avoid error Last packet sent to the server was xxxxx ms ago

2008-12-05 Thread removeps-groups
How to configure JNDI in order to avoid the error Last packet sent to the server was x ms ago.? I've seen two other errors which seem to be from the same cause: Communications link failure and Connection.close90 has already been called. This is what I've come up with, but wonder if it is

Re: Setup Logging for Tomcat 6

2008-11-24 Thread removeps-groups
To setup log4j, here's what I did. Copy the log4j jar file to WEB-INF/lib. Put it in ${catalina.home}/lib if you want all webapps to be able to see this file. Create a log4j.properties. Initially this file was in WEB-INF/classes/log4j.properties. Now I have the file in

Re: Default location

2008-11-21 Thread removeps-groups
You have to specify the servlet classname in the WEB-INF/web.xml file. The jar or class file containing the servlet must be on your classpath. The classpath in Tomcat is the following to the best of my knowledge, though I don't know the order - the system classpath - the ${catalina.home}/lib

How do I configure server.xml for Tomcat to recognize my application directory?

2008-11-18 Thread removeps-groups
How do I configure server.xml for Tomcat to recognize the following setup? Tomcat is in C:\Program Files\Apache Software Foundation\Tomcat 6.0 The application is in C:\public_html The directory structure of the application is C:\public_html\index.html C:\public_html\WEB-INF\

RE: How do I configure server.xml for Tomcat to recognize my application directory?

2008-11-18 Thread removeps-groups
Thanks to everyone. I will try out these suggestions tonight and write back if they do not work. In response to What is in your webapp's META-INF/context.xml file? It should not have either the path or the docBase attributes set. the file contents are as follows (note: no attributes in

Re: Tomcat vs Daemons

2008-11-18 Thread removeps-groups
In my code, I have a ServletContextListener (configured in web.xml or similar file, don't remember exactly), so when the servlet context is created it calls contextInitialized(ServletContextEvent). In this function I start the daemon threads. There is a function contextDestroyed which you can

RE: How do I configure server.xml for Tomcat to recognize my application directory?

2008-11-18 Thread removeps-groups
The suggestion works. However, many of the log files are gone. There used to be in the ${catalina.home}/logs folder files such as catalina...log admin...log host-manager...log etc Now there is only jakarta_service...log stderr...log stdout...log I tried creating a folder log at the same