Re: database - jdbc setup help

2005-05-12 Thread Lutz Zetzsche
Hi Bagus,

Am Donnerstag, 12. Mai 2005 00:38 schrieb Bagus:
 I've now set up Tomcat 5.5.4 and have installed
 mysql-standard-4.1.9-unknown-freebsd4.7-i386 on my Freebsd 5.3 box
 intel box.
 I've loaded some databases and tables into the database.

 How do I get them to work together with jsp?

 Can anyone point me to a short-sweet tutorial that can get me from
 here to there?

 I'm not sure if I need to install jdbc and the mysql driver or if
 those are included in the tomcat release.

 A tutorial that takes me through all that would be great.

Firstly, you have to install the MySQL JDBC driver. That means you have 
to download it from here:

http://dev.mysql.com/doc/mysql/en/java-connector.html

Then untar it somewhere outside the $CATALINA_HOME and only put the 
mysql-connector-java-3.1.8-bin.jar file into 
$CATALINA_HOME/common/lib/. Put it only there and nowhere else!

Secondly, nest the following Resource definition into the Context 
element of your web application's context file:

Resource
auth=Container
driverClassName=com.mysql.jdbc.Driver
logAbandoned=true
maxActive=100
maxIdle=30
maxWait=1
name=jdbc/{ResourceName}
password={UnencryptedUserPassword}
removeAbandoned=true
removeAbandonedTimeout=300
type=javax.sql.DataSource

url=jdbc:mysql://localhost:3306/{DatabaseName}?autoReconnect=true
username={DatabaseUserName}
/

You have to set the following parameters accordingly:

- name/{ResourceName}:
  How you want to call your resource is up to you, i.e.
  jdbc/{DatabaseName} where {DatabaseName} stands for the name of the
  database which this resource will connect to.

- url/{DatabaseName}:
  The hostname should normally be localhost and the port 3306;
  you only have to change this, if your database doesn't run on
  localhost and port 3306;
  most importantly you have to set the database name right; here you
  tell the resource which database from the mysql server to use;
  it is vitally important to set the database name absolute correctly,
  as it is also case-sensitive (dataBase != database !!!); if it is no
  absolutely correct, your database connection will fail!

- username/{DatabaseUserName}:
  A database user which has permission to access the database,
  specified in the url. If necessary, grant rights in the mysql.user
  table and in other tables of the mysql database.

- password/{UnencryptedUserPassword}:
  The unencrypted password of the mysql user, specified with username.

Thirdly, you have set the following resource reference in the web.xml of 
your web application:

resource-ref
descriptionMySQL Database Connection/description
res-ref-namejdbc/{ResourceName}/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref

The description, you choose, is free. The res-ref-name has to be the 
name of the resource defined in your Context file (see above).

After you have made all these configurations, you have to restart Tomcat 
to activiate the new resource. Please note, that the above 
configuration uses the Tomcat DBCP:

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html

And finally, you will find a short test script at the bottom of this 
mail which I have used to test my MySQL database connection. It will 
show you the tables in the database if the connection was established 
successfully and the sql query was executed successfully as well. Don't 
forget to set the {ResourceName} correctly in line 41 of the script.

If you should run Tomcat using the Security Manager, you have to grant 
the necessary runtime and network-socket permissions for the connection 
in the §CATALINA_HOME/conf/catalina.policy file. I don't think that you 
run Tomcat with the Security Manager, but if you should, just drop a 
line. Yesterday I have figured out, which permission I have to set to 
connect to a MySQL database while the Security Manager is running.


Good luck!

Lutz



[EMAIL PROTECTED] contentType=text/html%
[EMAIL PROTECTED] pageEncoding=UTF-8%

%@ page import=javax.naming.* %
%@ page import=javax.sql.* %
%@ page import=java.sql.* %

%--
The taglib directive below imports the JSTL library. If you uncomment 
it,
you must also add the JSTL library to the project. The Add Library... 
action
on Libraries node in Projects view can be used to add the JSTL 1.1 
library.
--%
%--
[EMAIL PROTECTED] uri=http://java.sun.com/jsp/jstl/core; prefix=c% 
--%

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
   http://www.w3.org/TR/html4/loose.dtd;

html
head

Re: UTF-8 Problem with Tomcat 5.0.27 and POST

2005-05-12 Thread Steve Bosman
On 5/10/05, Bernhard v. Fromberg [EMAIL PROTECTED] wrote:
 Hi all,
 
 I desperatly try to POST UTF-8 data to an application using struts.
 GET method works perfectly fine, but post does not.
 I am using CharacterEncodingFilter
 All pages have Content-Type header
 
 java1.5.0 update 2
 Tomcat 5.0.27
 various Un*x systems.
 
I think this might be a similar question to one I asked recently and
the following helped me

-- Forwarded message --
From: Mark Thomas [EMAIL PROTECTED]
Date: Apr 6, 2005 4:14 PM
Subject: Re: URL encoding/decoding of UTF-8 characters
- Hide quoted text -
To: Tomcat Users List tomcat-user@jakarta.apache.org

It is a lack of agreed standard problem. You can force Tomcat to use
UTF-8 encoding by setting the URIEncoding parameter on the connector.
There are some other parameters that you can set as well. See
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/http.html
-- End Forwarded message --

Using link in this mail from the tomcat user maiIing list I have
changed my connector settings to:
   Connector port=8080
  maxThreads=150 minSpareThreads=25 maxSpareThreads=75
  enableLookups=false redirectPort=8443 acceptCount=100
  debug=0 connectionTimeout=2
  disableUploadTimeout=true URIEncoding=UTF-8 /
   Connector port=8443
  maxThreads=150 minSpareThreads=25 maxSpareThreads=75
  enableLookups=false disableUploadTimeout=true
  acceptCount=100 debug=0 scheme=https secure=true
  clientAuth=false sslProtocol=TLS URIEncoding=UTF-8 /
That is I have added URIEncoding=UTF-8 and characters are now
decoded correctly.

Steve

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



Re: tomcat and virtual hosts

2005-05-12 Thread Lutz Zetzsche
Hi Bogus,

Am Donnerstag, 12. Mai 2005 00:52 schrieb Bagus:
 Here's a more general question about Tomcat.

 I'm used to using apache to set up virtual hosts, but when Tomcat
 installed, http://localhost/ now goes to my tomcat installation. So
 how does one set up multiple virtual hosts with Tomcat? Is it in the
 server.xml file or something? Or do I somehow now modify my apache
 configuration to be able to use tomcat and the jsp files?

have a look here:

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/engine.html
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/host.html
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html

You need to know a bit about all three to successfully set up a virtual 
host.


(1) ENGINE

As regards the Engine element, the only important thing is the 
defaultHost parameter:

The default host name, which identifies the Host that will process 
requests directed to host names on this server, but which are not 
configured in this configuration file. This name MUST match the name  
attributes of one of the Host elements nested immediately inside.
 
You can nest one or more Host elements inside this Engine element, each 
representing a different virtual host associated with this server. At 
least one Host  is required, and one of the nested Hosts MUST have a 
name that matches the name specified for the defaultHost attribute, 
listed above.

So, if you should later change the hostname of the default host, that 
means the name attribute of the Host element representing the default 
host, you must not forget to set the defaultHost attribute of the 
Engine element accordingly.


(2) HOST

Different to the Apache HTTP server, a virtual host is not equivalent 
with a web application in Tomcat terms. It can host several web 
applications, and so the Host element only contains the appBase 
attribute and not a docBase attribute:

appBase: The Application Base directory for this virtual host. This is 
the pathname of a directory that may contain web applications to be 
deployed on this virtual host.


(3) CONTEXT

Concerning the Context element, you have to observe three things:

a) You may define as many Context elements as you wish. Each such 
Context MUST have a unique context path, which is defined by the path 
attribute. In addition, you MUST define a Context with a context path 
equal to a zero-length string. This Context becomes the default  web 
application for this virtual host, and is used to process all requests 
that do not match any other Context's context path.

b) Normally, your context files will be placed here:

$CATALINA_HOME/conf/[enginename]/[hostname]/

So, if you should later change the hostname, that means the name 
attribute of the Host element, you must not forget to rename the 
directory of the associated context files accordingly.

c) For the web application which you want to run as ROOT application - 
http://localhost:8080/ instead of http://localhost:8080/webapp/ - need 
to have a context file called ROOT.xml:

$CATALINA_HOME/conf/[enginename]/[hostname]/ROOT.xml


Best wishes

Lutz

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



Re: Apache2+Tomcat5.5+mod_jk loadbalancing: Sticky sessions not working

2005-05-12 Thread Mladen Turk
Hi,
What is your session timeout on tomcat?
It might be that the session simply times out,
so the next tomcat is elected from the load
balancer.
Regards,
Mladen.
Edlira Kumbarÿe7e wrote:
Hello,
It
doesn't seem to work. Each time I refresh the page, it
get served from the same tomcat a couple of times,
then it gets served from the other tomcat, stays on
that tomcat a couple of refresh hits and then swiches
again. I can't see a pattern or figure out why this is
happening.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


cannot access tomcat

2005-05-12 Thread Ajay Brar
hi,

i installed tomcat 5.5 on my winxp. i start the service but when i try
and access it at http://localhost:8080 i get a 'Cannot find Server'
error page on IE.
i have tried disabling my firewall but still cant access the tomcat
welcome page or the manager section.

I also installed apache web server and can access that at http://localhost

any help would be most appreciated.

thanks

-- 
--
Ajay Brar
http://www.it.usyd.edu.au/~abrar1
http://ravesandrants.blogspot.com

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



Re: cannot access tomcat

2005-05-12 Thread Lutz Zetzsche
Hi Ajay,

Am Donnerstag, 12. Mai 2005 10:14 schrieb Ajay Brar:
 i installed tomcat 5.5 on my winxp. i start the service but when i
 try and access it at http://localhost:8080 i get a 'Cannot find
 Server' error page on IE.
 i have tried disabling my firewall but still cant access the tomcat
 welcome page or the manager section.

 I also installed apache web server and can access that at
 http://localhost

 any help would be most appreciated.

That sounds familiar to me... :-)

Tomcat 5.5 requires JRE 1.5 to run or you install the JDK 1.4 
compatibility pack if you want to run it with JDK 1.4. Did you install 
JRE or JDK 1.5 and did you configure the JRE_HOME path accordingly 
before starting Tomcat?

Note: Tomcat 5.5 only requires the Java Runtime Environment (JRE). It is 
no longer necessary to install a full Java Development Kit (JDK).

I hope this solves your problem.


Best wishes

Lutz

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



Re: tomcat and virtual hosts

2005-05-12 Thread Pete Stevens
On Wed, 11 May 2005, Bagus wrote:


 Here's a more general question about Tomcat.

 I'm used to using apache to set up virtual hosts, but when Tomcat installed,
 http://localhost/ now goes to my tomcat installation. So how does one set up
 multiple virtual hosts with Tomcat? Is it in the server.xml file or
 something? Or do I somehow now modify my apache configuration to be able to
 use tomcat and the jsp files?

Here's my guide to making Tomcat behave like Apache, rather than the J2EE .war
file fashion.

http://www.ex-parrot.com/~pete/tomcat-vhost.html

Yours,

Pete Stevens


--
Pete Stevens
[EMAIL PROTECTED]
http://www.ex-parrot.com/~pete/

 It was either burnt to a cinder or it escaped through a small hole in the
corner of the shed, but I imagine it perished and went to bunny heaven.
 -- Fire Station Commander on a burning bunny rabbit that cause GBP6 damage

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



Re: Basic load balancing

2005-05-12 Thread Harry Mantheakis
 Yeah, it's a mix of load balancing and clustering.
 
 SNIP - lots of good stuff

 Regards,
 
 Will Hartung
 ([EMAIL PROTECTED])

Thank you for posting that reply, Will.

What load balancing system would you recommend? (Is there some consensus,
cost issues aside, as to what the best type of load balancing system is?)

Kind regards

Harry Mantheakis
London, UK


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



RE: UTF-8 Problem with Tomcat 5.0.27 and POST

2005-05-12 Thread Arup Vidyerthy
Steve,

We have a similar requirement in that everything stored in the DB has to
UTF-8. Well, to address this we have written an UTF-8 Filter which
implements the Filter interface. All you need to do there is set the
character encoding to UTF8. The class looks like this...

public class UTF8Filter implements Filter {

/**
 * default constructor 
 */
public UTF8Filter() {
super();
}

/* (non-Javadoc)
 * @see javax.servlet.Filter#init(javax.servlet.FilterConfig)
 */
public void init(FilterConfig arg0) throws ServletException {
// this doesn't need to do anything
//
}

/* (non-Javadoc)
 * @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest,
javax.servlet.ServletResponse, javax.servlet.FilterChain)
 */
public void doFilter(ServletRequest req, ServletResponse res,
FilterChain chain)
throws IOException, ServletException {

// set the encoding to UTF-8 on the request
//
req.setCharacterEncoding(IProcessor.UTF_8_ENCODING);

// pass the filter along the chain
//
chain.doFilter(req, res);
}

/* (non-Javadoc)
 * @see javax.servlet.Filter#destroy()
 */
public void destroy() {
// this doesn't need to do anything
//
}
}

In your web.xml define this filter and make sure all your request go through
this filter. 

   filter
  filter-nameUTF8Filter/filter-name
 
filter-classuk.co.limehouse.publisher.struts.UTF8Filter/filter-class
   /filter

   filter-mapping
  filter-nameUTF8Filter/filter-name
  url-pattern*.do/url-pattern
   /filter-mapping
 

Hope this helps...

Arup

-Original Message-
From: Steve Bosman [mailto:[EMAIL PROTECTED] 
Sent: 12 May 2005 08:31
To: Tomcat Users List
Subject: Re: UTF-8 Problem with Tomcat 5.0.27 and POST

On 5/10/05, Bernhard v. Fromberg [EMAIL PROTECTED] wrote:
 Hi all,
 
 I desperatly try to POST UTF-8 data to an application using struts.
 GET method works perfectly fine, but post does not.
 I am using CharacterEncodingFilter
 All pages have Content-Type header
 
 java1.5.0 update 2
 Tomcat 5.0.27
 various Un*x systems.
 
I think this might be a similar question to one I asked recently and the
following helped me

-- Forwarded message --
From: Mark Thomas [EMAIL PROTECTED]
Date: Apr 6, 2005 4:14 PM
Subject: Re: URL encoding/decoding of UTF-8 characters
- Hide quoted text -
To: Tomcat Users List tomcat-user@jakarta.apache.org

It is a lack of agreed standard problem. You can force Tomcat to use
UTF-8 encoding by setting the URIEncoding parameter on the connector.
There are some other parameters that you can set as well. See
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/http.html
-- End Forwarded message --

Using link in this mail from the tomcat user maiIing list I have changed my
connector settings to:
   Connector port=8080
  maxThreads=150 minSpareThreads=25 maxSpareThreads=75
  enableLookups=false redirectPort=8443 acceptCount=100
  debug=0 connectionTimeout=2
  disableUploadTimeout=true URIEncoding=UTF-8 /
   Connector port=8443
  maxThreads=150 minSpareThreads=25 maxSpareThreads=75
  enableLookups=false disableUploadTimeout=true
  acceptCount=100 debug=0 scheme=https secure=true
  clientAuth=false sslProtocol=TLS URIEncoding=UTF-8 /
That is I have added URIEncoding=UTF-8 and characters are now decoded
correctly.

Steve

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


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



how to access JSPs using servername/~username

2005-05-12 Thread Akhthar Parvez. K
Hi,

I used to access the html webpages using 
servername.(http://servername/~username)
But I am not able to access JSPs in the above fashion. What could be added into 
server.xml
so that I can access jsps using servername.(http://servername/~username)

-- 
With Regards,

Akhthar

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



Tomcat and SuSE 9.3...

2005-05-12 Thread Quinton Delpeche
Hello everybody,

I have been doing some research and there seems to be a problem with Tomcat 
and SuSE 9.3 professional.

I haven't managed to find a solution yet or figure out one for myself.

Does anybody have a suggestion?

I do NOT want to role back to 9.2 as this is now out of the question due to 
other factors involved.

Any help will be greatly appreciated and thank-you in advance.

Q
-- 
Quinton Delpeche
Internal Systems Developer
Softline VIP

Telephone: +27 12 420 7000
Direct:+27 12 420 7007
Facsimile: +27 12 420 7344

http://www.vippayroll.co.za/

Don't feed the bats tonight.


pgp54HV7pPlWG.pgp
Description: PGP signature


RE: Tomcat and SuSE 9.3...

2005-05-12 Thread Raghupathy,Gurumoorthy
Wht is the problem ?

-Original Message-
From: Quinton Delpeche [mailto:[EMAIL PROTECTED] 
Sent: 12 May 2005 12:34
To: Tomcat Users List
Subject: Tomcat and SuSE 9.3...


Hello everybody,

I have been doing some research and there seems to be a problem with Tomcat 
and SuSE 9.3 professional.

I haven't managed to find a solution yet or figure out one for myself.

Does anybody have a suggestion?

I do NOT want to role back to 9.2 as this is now out of the question due to 
other factors involved.

Any help will be greatly appreciated and thank-you in advance.

Q
-- 
Quinton Delpeche
Internal Systems Developer
Softline VIP

Telephone: +27 12 420 7000
Direct:+27 12 420 7007
Facsimile: +27 12 420 7344

http://www.vippayroll.co.za/

Don't feed the bats tonight.

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



Re: Where to put version information in war file?

2005-05-12 Thread Lionel Farbos
On Wed, 11 May 2005 15:03:37 -0400
Henri Dupre [EMAIL PROTECTED] wrote:

 I was wondering what is the best place to put version information in a war 
 file?
 I'd like to put a build version and date at built time to my
 application and have a way to retrieve them from the servlets.
 
 I'm used to add the META-INF Implementation-version tag with jar files
 but with Tomcat war files it doesn't work. Are there other
 standard places where to put version information?
 
 Henri.
 
Hi,

I use this mecanism and it works.
I put version information in the META-INF/MANIFEST.MF of the war,
then thanks to getServletContext().getResource(/META-INF/MANIFEST.MF), you 
can get this file and parse it.

Regards.

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



ClassLoading in webapps

2005-05-12 Thread Narayan, Satya
Hi all,
   Is it possible to load few jars from an external directory
outside tomcat. The problem is I donot want this to be inside
WEB-inf/lib of the web application. 
Is it possible in any way ?
Kindly advise.

Thanks and Regards,
Satya



Re: Tomcat and SuSE 9.3...

2005-05-12 Thread Quinton Delpeche
On Thursday 12 May 2005 13:32, Raghupathy,Gurumoorthy wrote:
 Wht is the problem ?

When I install Tomcat 5 (base, examples, and admin) I get an error with the 
packages. I read that this is to do with incorrect directory names or link 
names.

On one of my other test machines I keep getting a socket exception and a 
broken pipe exception when trying to connect via JDBC to a PostgreSQL server.

My catalina.start in the log files directory indicates a problem with the 
permissions for tomcat5.pid.

Now I have spent the whole day trawling the web, searching google, trying 
various things and even searching the archives of this mailing list and I 
still can't solve the problem.

I have now tried this on 5 different machines with two different (original) 
sets of SuSE 9.3 discs and I still get these errors.

I have tried both 1.4 and 1.5 SDKs and still these errors persist.

I can't believe that I am the unfortunate person to discover this 
problem... ...I can't be that unlucky. :(

Q
-- 
Quinton Delpeche
Internal Systems Developer
Softline VIP

Telephone: +27 12 420 7000
Direct:+27 12 420 7007
Facsimile: +27 12 420 7344

http://www.vippayroll.co.za/

Finagle's fourth Law:
Once a job is fouled up, anything done to improve it only makes
it worse.


pgpRwczp8ID8j.pgp
Description: PGP signature


Re: how to access JSPs using servername/~username

2005-05-12 Thread Nikola Milutinovic
Akhthar Parvez. K wrote:
Hi,
I used to access the html webpages using servername.(http://servername/~username)
But I am not able to access JSPs in the above fashion. What could be added into server.xml
so that I can access jsps using servername.(http://servername/~username)
 

There is no ellegant solution, like in Apache HTTPD (UserDir directive).
Firstly, Tomcat doesn't really care about users on the system or their 
home directories. Secondly, it deals with Web Applications, known as 
Contexts, rather than directories. Sure, you can keep your JSPs in a 
directory, but they can also be in a WAR file.

So, with Tomcat there is no UserDir concept.
What I usually do, is one VHost - one user account and then create 
webapps dir for TC web applications.

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


Re: SuSE 9.3 and Tomcat 3...

2005-05-12 Thread Quinton Delpeche
Here are some of the errors I get:

1). This is the one that occurs when I attempt to install Tomcat Webapps.
error
2005-05-12 13:40:44 tomcat5-webapps-5.0.30-4.noarch.rpm install failed
rpm output:
/usr/bin/build-jar-repository: error: JVM_LIBDIR /usr/lib/jvm-exports/java 
does not exist or is not a directory
error: %post(tomcat5-webapps-5.0.30-4) scriptlet failed, exit status 5
/error

2). This is the error that I get in the start.log file.
error
/usr/share/tomcat5/bin/catalina.sh: line 284: /var/run/tomcat5.pid: Permission 
denied
/error

3). The other was a broken pipe and socket exception error that appears in the 
application log (i.e. ROOT log), unfortunately I don't have an example of 
this one.

Thanks
Q
-- 
Quinton Delpeche
Internal Systems Developer
Softline VIP

Telephone: +27 12 420 7000
Direct:+27 12 420 7007
Facsimile: +27 12 420 7344

http://www.vippayroll.co.za/

Political T.V. commercials prove one thing: some candidates can tell
all their good points and qualifications in just 30 seconds.


pgpVsFox9u7tQ.pgp
Description: PGP signature


RE : Common vs. Shared

2005-05-12 Thread LERBSCHER Jean-Pierre


-Message d'origine-
De : Ron Heeb [mailto:[EMAIL PROTECTED] 
Envoyé : vendredi 6 mai 2005 18:18
À : tomcat-user@jakarta.apache.org
Objet : RE: Common vs. Shared

my understanding comes from this book i got: 'common is responsible for 
classes that are used by Tomcat and publicly available to all Web 
apps'.  shared is like common, except that 'developers can place their 
own classes and JAR files into the shared class loader domain'.  


developers shouldn't put anything into common.
False. Typically if you plan to use JAASRealm and specific login module your
have to put your library in common/lib.

  this is from 
Professional Apache Tomcat 5 from Wrox.  for what it's worth...ron

-- 
Ron Heeb, Project Leader
Applications Development - Information Technology Resources
California State University, Northridge




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

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



RE: how to access JSPs using servername/~username

2005-05-12 Thread Raghupathy,Gurumoorthy
No this is not true 
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/host.html

Its says ... 


==
Many web servers can automatically map a request URI starting with a tilde
character (~) and a username to a directory (commonly named public_html)
in that user's home directory on the server. You can accomplish the same
thing in Catalina by using a special Listener element like this (on a Unix
system that uses the /etc/passwd file to identify valid users):

   
 Host name=localhost ...
  ...
  Listener className=org.apache.catalina.startup.UserConfig
directoryName=public_html
userClass=org.apache.catalina.startup.PasswdUserDatabase/
  ...
/Host

  
   

On a server where /etc/passwd is not in use, you can request Catalina to
consider all directories found in a specified base directory (such as
c:\Homes in this example) to be considered user home directories for the
purposes of this directive:

   
 Host name=localhost ...
  ...
  Listener className=org.apache.catalina.startup.UserConfig
directoryName=public_html
homeBase=c:\Homes
userClass=org.apache.catalina.startup.HomesUserDatabase/
  ...
/Host

  
   

If a user home directory has been set up for a user named craigmcc, then its
contents will be visible from a client browser by making a request to a URL
like:

   
 http://www.mycompany.com:8080/~craigmcc


==

  
   


-Original Message-
From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] 
Sent: 12 May 2005 12:47
To: Tomcat Users List
Subject: Re: how to access JSPs using servername/~username


Akhthar Parvez. K wrote:

Hi,

I used to access the html webpages using
servername.(http://servername/~username)
But I am not able to access JSPs in the above fashion. What could be added
into server.xml
so that I can access jsps using servername.(http://servername/~username)
  


There is no ellegant solution, like in Apache HTTPD (UserDir directive).

Firstly, Tomcat doesn't really care about users on the system or their 
home directories. Secondly, it deals with Web Applications, known as 
Contexts, rather than directories. Sure, you can keep your JSPs in a 
directory, but they can also be in a WAR file.

So, with Tomcat there is no UserDir concept.

What I usually do, is one VHost - one user account and then create 
webapps dir for TC web applications.

Nix.

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

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



Re: how to access JSPs using servername/~username

2005-05-12 Thread Tim Funk
There is the concept of user dirs ...
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html
See the section User Web Applications
-Tim
Nikola Milutinovic wrote:
Akhthar Parvez. K wrote:
Hi,
I used to access the html webpages using 
servername.(http://servername/~username)
But I am not able to access JSPs in the above fashion. What could be 
added into server.xml
so that I can access jsps using servername.(http://servername/~username)
 

There is no ellegant solution, like in Apache HTTPD (UserDir directive).
Firstly, Tomcat doesn't really care about users on the system or their 
home directories. Secondly, it deals with Web Applications, known as 
Contexts, rather than directories. Sure, you can keep your JSPs in a 
directory, but they can also be in a WAR file.

So, with Tomcat there is no UserDir concept.
What I usually do, is one VHost - one user account and then create 
webapps dir for TC web applications.

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


Re: Tomcat and SuSE 9.3...

2005-05-12 Thread Bjørn T Johansen
But why do you use the Tomcat that comes with SuSE 9.3??
I am using SuSE 9.3 and Tomcat works like a charm.. (but I don't use SuSE's 
version...)

BTJ

Quinton Delpeche wrote:
 On Thursday 12 May 2005 13:32, Raghupathy,Gurumoorthy wrote:
 
Wht is the problem ?
 
 
 When I install Tomcat 5 (base, examples, and admin) I get an error with the 
 packages. I read that this is to do with incorrect directory names or link 
 names.
 
 On one of my other test machines I keep getting a socket exception and a 
 broken pipe exception when trying to connect via JDBC to a PostgreSQL server.
 
 My catalina.start in the log files directory indicates a problem with the 
 permissions for tomcat5.pid.
 
 Now I have spent the whole day trawling the web, searching google, trying 
 various things and even searching the archives of this mailing list and I 
 still can't solve the problem.
 
 I have now tried this on 5 different machines with two different (original) 
 sets of SuSE 9.3 discs and I still get these errors.
 
 I have tried both 1.4 and 1.5 SDKs and still these errors persist.
 
 I can't believe that I am the unfortunate person to discover this 
 problem... ...I can't be that unlucky. :(
 
 Q


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



Re: Tomcat and SuSE 9.3...

2005-05-12 Thread Quinton Delpeche
On Thursday 12 May 2005 14:12, Bjrn T Johansen wrote:
 But why do you use the Tomcat that comes with SuSE 9.3??
 I am using SuSE 9.3 and Tomcat works like a charm.. (but I don't use SuSE's
 version...)

Yeah ... I asked myself that same question 3 minutes ago. :(

I guess I will go to a NON-SuSE version of Tomcat. I just normally like to use 
the ones that come with the Distro, because they are apparently tested and 
there should be NO issues... ...well I guess NOT. :(

What version of Tomcat are using on SuSE 9.3?

I have downloaded 5.5.9, but now I broke the one SuSE 9.3 install, so I will 
have to re-install first.

*sigh* Should have stayed in bed today. ;)

 BTJ

Q
-- 
Quinton Delpeche
Internal Systems Developer
Softline VIP

Telephone: +27 12 420 7000
Direct:+27 12 420 7007
Facsimile: +27 12 420 7344

http://www.vippayroll.co.za/

Power, n:
The only narcotic regulated by the SEC instead of the FDA.


pgpkq1wo8jFrS.pgp
Description: PGP signature


Re: RE : Common vs. Shared

2005-05-12 Thread Nikola Milutinovic
LERBSCHER Jean-Pierre wrote:
-Message d'origine-
De : Ron Heeb [mailto:[EMAIL PROTECTED] 
Envoyé : vendredi 6 mai 2005 18:18
À : tomcat-user@jakarta.apache.org
Objet : RE: Common vs. Shared

my understanding comes from this book i got: 'common is responsible for 
classes that are used by Tomcat and publicly available to all Web 
apps'.  shared is like common, except that 'developers can place their 
own classes and JAR files into the shared class loader domain'.  
 

${CATALINA_HOME}/server/lib is picked up by TC only
${CATALINA_HOME}/shared/lib is picked by all web-apps
${CATALINA_HOME}/common/lib is picked up by both TC and all web-apps
${Context_HOME}/WEB-INF/lib is picked up by that web-app only
Nix.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: how to access JSPs using servername/~username

2005-05-12 Thread Nikola Milutinovic
Tim Funk wrote:
There is the concept of user dirs ...
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html
See the section User Web Applications

I stand corrected.
I still prefer explicit context mappings. How would you deploy JNDI 
resources in userdir case?

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


Re: Tomcat and SuSE 9.3...

2005-05-12 Thread Nikola Milutinovic
Quinton Delpeche wrote:
On Thursday 12 May 2005 14:12, Bjrn T Johansen wrote:
 

But why do you use the Tomcat that comes with SuSE 9.3??
I am using SuSE 9.3 and Tomcat works like a charm.. (but I don't use SuSE's
version...)
   

Yeah ... I asked myself that same question 3 minutes ago. :(
I guess I will go to a NON-SuSE version of Tomcat. I just normally like to use 
the ones that come with the Distro, because they are apparently tested and 
there should be NO issues... ...well I guess NOT. :(
 

What happened to SuSE? They used to be professional...
What version of Tomcat are using on SuSE 9.3?
I have downloaded 5.5.9, but now I broke the one SuSE 9.3 install, so I will 
have to re-install first.
 

You could try JPackage, but be prepared for dependency nightmare.
*sigh* Should have stayed in bed today. ;)
Sometimes...
Nix.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat and SuSE 9.3...

2005-05-12 Thread Paul Puschmann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Quinton Delpeche wrote:
 When I install Tomcat 5 (base, examples, and admin) I get an error with the 
 packages. I read that this is to do with incorrect directory names or link 
 names.
 
 On one of my other test machines I keep getting a socket exception and a 
 broken pipe exception when trying to connect via JDBC to a PostgreSQL server.
 
 My catalina.start in the log files directory indicates a problem with the 
 permissions for tomcat5.pid.
 
 Now I have spent the whole day trawling the web, searching google, trying 
 various things and even searching the archives of this mailing list and I 
 still can't solve the problem.
 
 I have now tried this on 5 different machines with two different (original) 
 sets of SuSE 9.3 discs and I still get these errors.
 
 I have tried both 1.4 and 1.5 SDKs and still these errors persist.
 
 I can't believe that I am the unfortunate person to discover this 
 problem... ...I can't be that unlucky. :(
 
 Q
File a bug at suse.

Find out if all files (e.g. the .pid) have the correct users and rights.

Kind regards, Paul
- --
Linux-User #271918 with the Linux Counter, http://counter.li.org/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2 (MingW32)

iEYEARECAAYFAkKDS6QACgkQqErKtBWD7VSFBgCg/SffP4T72fwd3M/4Rb5Y93ty
ZJkAoP8IG41eDY14LpSpbGIxBrczJPWL
=svkk
-END PGP SIGNATURE-


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



RE: ClassLoading in webapps

2005-05-12 Thread Arup Vidyerthy
Yes, all you need to do is get the Tomcat System class loader to load it.

If you are on Windows put these extra jar files as class path entries inside
the setclasspath.bat file. On Linux either setclasspath.sh or catalina.sh

Hope this helps...

Arup 

-Original Message-
From: Narayan, Satya [mailto:[EMAIL PROTECTED] 
Sent: 12 May 2005 12:33
To: tomcat-user@jakarta.apache.org
Subject: ClassLoading in webapps

Hi all,
   Is it possible to load few jars from an external directory
outside tomcat. The problem is I donot want this to be inside WEB-inf/lib of
the web application. 
Is it possible in any way ?
Kindly advise.

Thanks and Regards,
Satya



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



Re: Tomcat and SuSE 9.3...

2005-05-12 Thread Mario Ivankovits
Nikola Milutinovic wrote:
You could try JPackage, but be prepared for dependency nightmare.
But SuSE 9.3 uses JPackage, am I wrong?
I managed to setup the SuSE 9.3 tomcatjava but there where a couple of 
missing libraries.
And a missing link to correctly startup java at all.

In fact SuSE installed them, but tomcat was not able to find them.
I resolved it by placing some symbolic links, though, I cant recall 
exactly where and what.

Sorry that I cant help more!
---
Mario
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: how to access JSPs using servername/~username

2005-05-12 Thread Tim Funk
~user/public_html/META-INF/context.xml might do the trick.
-Tim
Nikola Milutinovic wrote:
Tim Funk wrote:
There is the concept of user dirs ...
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html
See the section User Web Applications

I stand corrected.
I still prefer explicit context mappings. How would you deploy JNDI 
resources in userdir case?
 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: database - jdbc setup help

2005-05-12 Thread Terence M. Bandoian
For information about JDBC, you may want to try the Sun JDBC tutorial
http://java.sun.com/docs/books/tutorial/jdbc/ -
http://java.sun.com/docs/books/tutorial/jdbc/

-Terence

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



RE: question about load-on-startup in web.xml

2005-05-12 Thread Michael Oliver
If I were doing it I would put a singleton class in the /common/lib/
that had a Hashtable and in my application's startup I would get the
singleton and have the first application I want to load put a string
loading (or whatever) in the Hashtable of the singleton with the key
webappY.  The second webappX get the singleton and look for
webappY/loading.  If it is still there sleep and check again later.
When webappY is finished starting it removes the 'loading' from the
Hashtable of the singleton and when webappX sees it is gone, it
continues. 

Michael Oliver
CTO
Alarius Systems LLC
6800 E. Lake Mead Blvd, #1096
Las Vegas, NV 89156
Phone:(702)643-7425
Fax:(702)974-0341
*Note new email changed from [EMAIL PROTECTED]
-Original Message-
From: Annie Wang [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 11, 2005 3:47 PM
To: Parsons Technical Services; Tomcat Users List
Subject: Re: question about load-on-startup in web.xml

i tried putting in a sleep in my servlet's init method, but
$CATALINA_HOME/logs/catalina.out seems to indicate that tomcat waits
for it to initalize..

in my catalina.out, i have:

May 11, 2005 2:12:06 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path /webappX from URL
file:/jakarta-tomcat/webapps/webappX
***webappX***start init
***webappX***end init
May 11, 2005 2:12:06 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path /webappY from URL
file:/jakarta-tomcat/webapps/webappY

any one know if there's a way to make webappY get installed before
webappX?  what determines the install order?  i thought it was
load-on-startup in the web.xml file, but maybe that affects the
ordering of servlet initalization within a web application (if the web
application has multiple servlets), but not the ordering of web
application installation on tomcat startup.

thanks.
-annie


On 5/10/05, Annie Wang [EMAIL PROTECTED] wrote:
 hi doug, yup, was thinking along similar lines.  just wasn't sure if
 there was some setting i wasn't aware of to do what i'm looking for.
 
 thanks.
 -annie
 
 On 5/10/05, Parsons Technical Services
[EMAIL PROTECTED] wrote:
  I may be off base on this one but I think that once Tomcat fires off
the
  init method it doesn't care or monitor the progress of the servlet.
Just
  think, some servlets may take several minutes to finish. If other
apps had
  to wait then it could take a long time to get the server started.
 
  Now as for a solution I am really speculating here (hopefully
someone can
  educate both of us). I would look at a wait statement in the init
method to
  pause the second app's servlet until the first one is done. Simply
time the
  first app's servlet and set it for a little more.
 
  Hopefully someone will set me straight if I am off base here.
 
  Doug
 
  - Original Message -
  From: Annie Wang [EMAIL PROTECTED]
  To: tomcat-user@jakarta.apache.org
  Sent: Tuesday, May 10, 2005 6:59 PM
  Subject: question about load-on-startup in web.xml
 
  hi,
 
  regarding the load-on-startup tag in web.xml:
 
  say i have 2 web apps (webapp1 and webapp2).  if i configure
webapp1's
  servlet to have load-on-startup1/load-on-startup and webapp2's
  servlet to have load-on-startup100/load-on-startup, does this
mean
  that tomcat will init webapp1's servlet first and once that's done,
  it'll init webapp2's servlet?
 
  basically, i want both web app's servlets to auto initialize on
tomcat
  startup, but i want webapp2's servlet to initialze only after
  webapp1's servlet has finished initialization.  when i use the above
  load-on-startup settings, webapp2's servlet seems to initialize
before
  webapp1's servlet has finished initialization.
 
  thanks.
  -annie
 
 
-
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



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



.asp and tomcat 5.5.9

2005-05-12 Thread Trung Nguyen
Hello,

Is there a way to configure tomcat 5.5.9 to support .asp extension?  

Thanks,
Trung


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



RE: .asp and tomcat 5.5.9

2005-05-12 Thread Arup Vidyerthy
Why would anybody want that? You should be writing your application in Java
:-D

Sorry couldn't help. And no, I do not know if Tomcat can support .asp!

Arup



-Original Message-
From: Trung Nguyen [mailto:[EMAIL PROTECTED] 
Sent: 12 May 2005 14:36
To: tomcat-user@jakarta.apache.org
Subject: .asp and tomcat 5.5.9

Hello,

Is there a way to configure tomcat 5.5.9 to support .asp extension?  

Thanks,
Trung


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


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



RE: .asp and tomcat 5.5.9

2005-05-12 Thread Peter Crowther
 From: Trung Nguyen [mailto:[EMAIL PROTECTED] 
 Is there a way to configure tomcat 5.5.9 to support .asp extension?

If you mean 'serve static content that has a .asp suffix as MIME type
x/y', yes.  Configure a MIME-type in Tomcat's conf/web.xml (or your
webapp's web.xml) and you're done.

If you mean 'process Microsoft-style Active Server Pages in the same way
that IIS does', no.  The main product I know that could do that on
non-Microsoft platforms is http://www.sun.com/software/chilisoft/ - Mono
does similar for ASP.Net.  It might be barely possible to use Tomcat to
retrieve pages from such a back-end system and forward them to the
client browser, but I suspect it would be a poor engineering solution.

What are you trying to do?

- Peter

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



RE: .asp and tomcat 5.5.9

2005-05-12 Thread Trung Nguyen
Thank you very much for the fast reply.  What we're trying to do here is one of 
our client requested to show .asp instead of .jsp  I know this is crazy, but I 
guess they're Microsoft company :)

Of course all our files end with .jsp

-Original Message-
From: Peter Crowther [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 12, 2005 9:41 AM
To: Tomcat Users List
Subject: RE: .asp and tomcat 5.5.9


 From: Trung Nguyen [mailto:[EMAIL PROTECTED] 
 Is there a way to configure tomcat 5.5.9 to support .asp extension?

If you mean 'serve static content that has a .asp suffix as MIME type
x/y', yes.  Configure a MIME-type in Tomcat's conf/web.xml (or your
webapp's web.xml) and you're done.

If you mean 'process Microsoft-style Active Server Pages in the same way
that IIS does', no.  The main product I know that could do that on
non-Microsoft platforms is http://www.sun.com/software/chilisoft/ - Mono
does similar for ASP.Net.  It might be barely possible to use Tomcat to
retrieve pages from such a back-end system and forward them to the
client browser, but I suspect it would be a poor engineering solution.

What are you trying to do?

- Peter

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


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



Re: .asp and tomcat 5.5.9

2005-05-12 Thread Charles Harvey III
You can map any .extension to a servlet.  It can be .asp, .php,
.do, .html or .java.  Now, that DOES NOT mean that Tomcat will
render an actual .asp page written in VBScript.  It just means
that you can have people think that your website is written in
.asp but it is really java.

Charlie
Arup Vidyerthy said the following on 5/12/2005 9:44 AM:
Why would anybody want that? You should be writing your application in Java
:-D
Sorry couldn't help. And no, I do not know if Tomcat can support .asp!
Arup

-Original Message-
From: Trung Nguyen [mailto:[EMAIL PROTECTED] 
Sent: 12 May 2005 14:36
To: tomcat-user@jakarta.apache.org
Subject: .asp and tomcat 5.5.9

Hello,
Is there a way to configure tomcat 5.5.9 to support .asp extension?  

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

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


RE: .asp and tomcat 5.5.9

2005-05-12 Thread Trung Nguyen
Peter,

Thanks again.  What I'm trying to do is write code in Java and name it .asp 
because our client wanted to have .asp instead of .jsp



-Original Message-
From: Peter Crowther [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 12, 2005 9:41 AM
To: Tomcat Users List
Subject: RE: .asp and tomcat 5.5.9


 From: Trung Nguyen [mailto:[EMAIL PROTECTED] 
 Is there a way to configure tomcat 5.5.9 to support .asp extension?

If you mean 'serve static content that has a .asp suffix as MIME type
x/y', yes.  Configure a MIME-type in Tomcat's conf/web.xml (or your
webapp's web.xml) and you're done.

If you mean 'process Microsoft-style Active Server Pages in the same way
that IIS does', no.  The main product I know that could do that on
non-Microsoft platforms is http://www.sun.com/software/chilisoft/ - Mono
does similar for ASP.Net.  It might be barely possible to use Tomcat to
retrieve pages from such a back-end system and forward them to the
client browser, but I suspect it would be a poor engineering solution.

What are you trying to do?

- Peter

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


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



RE: .asp and tomcat 5.5.9

2005-05-12 Thread Trung Nguyen
Charlie,

Thank you very much for the reply.  This is what we want, we just want people 
think that the site is written in .asp but it is really java.  How do I mapy 
.extension to servlet?

Thanks,
Trung


-Original Message-
From: Charles Harvey III [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 12, 2005 9:55 AM
To: Tomcat Users List
Subject: Re: .asp and tomcat 5.5.9


You can map any .extension to a servlet.  It can be .asp, .php,
.do, .html or .java.  Now, that DOES NOT mean that Tomcat will
render an actual .asp page written in VBScript.  It just means
that you can have people think that your website is written in
.asp but it is really java.



Charlie


Arup Vidyerthy said the following on 5/12/2005 9:44 AM:

Why would anybody want that? You should be writing your application in Java
:-D

Sorry couldn't help. And no, I do not know if Tomcat can support .asp!

Arup



-Original Message-
From: Trung Nguyen [mailto:[EMAIL PROTECTED] 
Sent: 12 May 2005 14:36
To: tomcat-user@jakarta.apache.org
Subject: .asp and tomcat 5.5.9

Hello,

Is there a way to configure tomcat 5.5.9 to support .asp extension?  

Thanks,
Trung


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


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


  


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


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



Re: tomcat-user Digest 12 May 2005 01:34:48 -0000 Issue 5616

2005-05-12 Thread Ankit Shah
Hi Mark,
My jar file is placed in $CATALINA_HOME/server/lib/

Here is the slice of my server.xml

Service name=Service-name
Engine defaultHost=localhost name=Catalina
Realm className=my.realm.classname 
datasource=datasourcename ... other attributes/
Host docbase=webapps name=localhost/
/Engine
/Service

Thanks,
Ankit




[EMAIL PROTECTED] 
05/11/2005 09:34 PM
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
tomcat-user@jakarta.apache.org
cc

Subject
tomcat-user Digest 12 May 2005 01:34:48 - Issue 5616







tomcat-user Digest 12 May 2005 01:34:48 - Issue 5616

Topics (messages 126492 through 126521):

Re: Issues with Custom Realm in Tomcat 5.5
 126492 by: Mark Thomas


--


- Message from Mark Thomas [EMAIL PROTECTED] on Wed, 11 May 2005 
19:08:15 +0100 -
To:
Tomcat Users List tomcat-user@jakarta.apache.org
Subject:
Re: Issues with Custom Realm in Tomcat 5.5

Where are you placing the .jar/.class files for your custom realm?

At what level in server.xml is your realm configured?

Mark

Ankit Shah wrote:
 Hi everyone,
 I hope someone can help us with this problem.
 
 Current Tomcat settings:
 Release in use: 5.5.9 along with 1.4.2 compatibility add-on
 Logging using Log4J
 JRE version: 1.4.2_05
 
 We have written our own custom realm that essentially extends the 
standard 
 DataSource Realm. However, we are unable to authenticate users of 
Tomcat's 
 admin and manager application using our Realm. When setting Log4J 
logging 
 level to Debug, we discovered the following:
 
 1. The Realm is loaded into the MBean Manager. We see a message 'MBean 
 successfully registered' for our Realm
 2. When admin is user is being validated, the log messages say 
 'ClassLoader error: class not found'. and authentication fails. I am not 

 sure whether it failed to load our Realm (shouldn't happen since already 

 registered with MBean) or something else went missing. We CAN perform 
 authentication using the MemoryRealm that's configured by default.
 
 What makes this problem even more strange is our Realm worked 
successfully 
 with Tomcat 5.5.7
 
 Anyone have ANY suggestions as where can we investigate for this 
problem, 
 please do respond back
 
 Thanks in advance.
 
 Ankit
 











RE: .asp and tomcat 5.5.9

2005-05-12 Thread Peter Crowther
 From: Trung Nguyen [mailto:[EMAIL PROTECTED] 
 What we're trying to 
 do here is one of our client requested to show .asp instead 
 of .jsp  I know this is crazy, but I guess they're Microsoft 
 company :)
 
 Of course all our files end with .jsp

Ah!  OK, so what I think you want is to continue writing your pages as
Java Server Pages, but to rename them filename.asp instead of
filename.jsp, and for Tomcat to process filename.asp as a Java
Server Page?  I.e. this is purely eye candy for any user who reads too
much into a 'asp' suffix.

Am I correct here?  If so, look in Tomcat's conf/web.xml, find the
servlet-mapping that maps *.jsp to the JSP servlet, and add a mapping
for *.asp.  Then try it.

If I'm not correct and your client genuinely wants to run MS-style ASPs,
buy and run a Windows server!  The TCO will almost certainly be lower
than you putting the effort into finding an alternative solution, then
maintaining that solution.

- Peter

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



Re: .asp and tomcat 5.5.9

2005-05-12 Thread David Smith
You could just add this to your web.xml file in the proper place:

servlet-mapping
  servlet-namejsp/servlet-name
  url-pattern*.asp/url-pattern
/servlet-mapping

--David

Trung Nguyen wrote:

Peter,

Thanks again.  What I'm trying to do is write code in Java and name it .asp 
because our client wanted to have .asp instead of .jsp



-Original Message-
From: Peter Crowther [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 12, 2005 9:41 AM
To: Tomcat Users List
Subject: RE: .asp and tomcat 5.5.9


  

From: Trung Nguyen [mailto:[EMAIL PROTECTED] 
Is there a way to configure tomcat 5.5.9 to support .asp extension?



If you mean 'serve static content that has a .asp suffix as MIME type
x/y', yes.  Configure a MIME-type in Tomcat's conf/web.xml (or your
webapp's web.xml) and you're done.

If you mean 'process Microsoft-style Active Server Pages in the same way
that IIS does', no.  The main product I know that could do that on
non-Microsoft platforms is http://www.sun.com/software/chilisoft/ - Mono
does similar for ASP.Net.  It might be barely possible to use Tomcat to
retrieve pages from such a back-end system and forward them to the
client browser, but I suspect it would be a poor engineering solution.

What are you trying to do?

   - Peter

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


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

  



-- 
===
David Smith
Network Operations Supervisor
Department of Entomology
College of Agriculture  Life Sciences
Cornell University
2132 Comstock Hall
Ithaca, NY  14853
Phone: 607.255.9571
Fax: 607.255.0939



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



Re: .asp and tomcat 5.5.9

2005-05-12 Thread Jess Holle
Trung Nguyen wrote:
Charlie,
Thank you very much for the reply.  This is what we want, we just want people think that the site is written in .asp but it is really java.  How do I mapy .extension to servlet?
 

You could likely have the files names .jsp and have a filter that 
forwards all *.asp requests to *.jsp counterparts.

That seems cleanest in that you don't have to retrain IDE's or anything 
else to treate .asp as .jsp.

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


Can a client recapture a session in Tomcat 4.1

2005-05-12 Thread Millies, Sebastian

Can a client recapture his Tomcat session after he
has accidentally closed the browser, provided that
the session object still exists on the server?

Would this be a browser-specific thing? After all,
I guess I'd need to tell the browser to persist
the session cookie or some such thing. Or would it
work browser-independently using URL-rewriting?

If there is such a mechanism, does it pose any
security concerns (e. g. through Tomcat reusing
a session-id for a totally different session?)

We're on Tomcat 4.1. Would the answer be any
different for Tomcat 5.0?

Thanks for any enlightenment or additional
pointers-. -- Sebastian

--
Sebastian Millies, IDS Scheer AG
Postfach 10 15 34, 66015 Saarbrücken
Zi D1.16, [EMAIL PROTECTED]
fon +49-681-210-3221, fax +49-681-210-1311

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



Re: .asp and tomcat 5.5.9

2005-05-12 Thread Tim Funk
Add this to you web.xml
servlet-mapping
servlet-namejsp/servlet-name
url-pattern*.asp/url-pattern
/servlet-mapping
This assumes you name all your jsp files with a file extension of asp.
Otherwise you would need a filter which would trap *.asp and forward to the 
filename name with the jsp extension.

-Tim
Trung Nguyen wrote:
Charlie,
Thank you very much for the reply.  This is what we want, we just want people 
think that the site is written in .asp but it is really java.  How do I mapy 
.extension to servlet?
Thanks,
Trung
-Original Message-
From: Charles Harvey III [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 12, 2005 9:55 AM
To: Tomcat Users List
Subject: Re: .asp and tomcat 5.5.9
You can map any .extension to a servlet.  It can be .asp, .php,
.do, .html or .java.  Now, that DOES NOT mean that Tomcat will
render an actual .asp page written in VBScript.  It just means
that you can have people think that your website is written in
.asp but it is really java.

Charlie
Arup Vidyerthy said the following on 5/12/2005 9:44 AM:

Why would anybody want that? You should be writing your application in Java
:-D
Sorry couldn't help. And no, I do not know if Tomcat can support .asp!
Arup

-Original Message-
From: Trung Nguyen [mailto:[EMAIL PROTECTED] 
Sent: 12 May 2005 14:36
To: tomcat-user@jakarta.apache.org
Subject: .asp and tomcat 5.5.9

Hello,
Is there a way to configure tomcat 5.5.9 to support .asp extension?  

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



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

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


RE: Can a client recapture a session in Tomcat 4.1

2005-05-12 Thread Arup Vidyerthy
I am not sure if this can be done... I guess you could build framework where
the user's  session id and ip is logged (unless they logout) and then when
the user comes back you could use the old session. I have never tried this
but this personally but I don’t see why it should not work. 

Arup
-Original Message-
From: Millies, Sebastian [mailto:[EMAIL PROTECTED] 
Sent: 12 May 2005 15:57
To: tomcat-user@jakarta.apache.org
Subject: Can a client recapture a session in Tomcat 4.1


Can a client recapture his Tomcat session after he has accidentally closed
the browser, provided that the session object still exists on the server?

Would this be a browser-specific thing? After all, I guess I'd need to tell
the browser to persist the session cookie or some such thing. Or would it
work browser-independently using URL-rewriting?

If there is such a mechanism, does it pose any security concerns (e. g.
through Tomcat reusing a session-id for a totally different session?)

We're on Tomcat 4.1. Would the answer be any different for Tomcat 5.0?

Thanks for any enlightenment or additional pointers-. -- Sebastian

--
Sebastian Millies, IDS Scheer AG
Postfach 10 15 34, 66015 Saarbrücken
Zi D1.16, [EMAIL PROTECTED] fon +49-681-210-3221, fax
+49-681-210-1311

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


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



tomcat and security

2005-05-12 Thread Lapo TIN
I would like to limit tomcat features as much as possible for avoiding 
undesiderables external accesses to the web server.
I want that only 2 servlets have to run on HTTPS, port 8443.
And these two servlets are simply replying to a GET with a static XML. Nothing 
more.
I define the ssl connector listening on port 8443, and create the 2 servlets.
Everything is running well, 
soo my intent is to close every other possibility of access (such as HTTP on 
8080, manager and admin from outside, etc...)

Is there a list somewhere of tips of security of tomcat ?
Or do you have any suggestion ?
thanks in advance.

Lapo

Re: Can a client recapture a session in Tomcat 4.1

2005-05-12 Thread Lutz Zetzsche
Hi Sebastian,

Am Donnerstag, 12. Mai 2005 16:57 schrieb Millies, Sebastian:
 Can a client recapture his Tomcat session after he
 has accidentally closed the browser, provided that
 the session object still exists on the server?

 Would this be a browser-specific thing? After all,
 I guess I'd need to tell the browser to persist
 the session cookie or some such thing. Or would it
 work browser-independently using URL-rewriting?

 If there is such a mechanism, does it pose any
 security concerns (e. g. through Tomcat reusing
 a session-id for a totally different session?)

 We're on Tomcat 4.1. Would the answer be any
 different for Tomcat 5.0?

 Thanks for any enlightenment or additional
 pointers-.

From my point of view, you are already asking the right questions.

Firstly, if you would always maintain the session by using cookies and 
never by transporting the session id with the url, if you would 
furthermore set a persistent session cookie which would not be 
destroyed when the browser would be closed, and if last but not least 
the user would have made his browser settings accordingly - not 
deleting cookies when closing the browser -, then it would be possible 
to re-capture the Tomcat session as long as it would exist on the 
server.

As you can see, there are a lot if's.

Secondly, it would be a severe security hole in your application if you 
would set persistent session cookies. From the security point of view, 
the session cookie has to be destroyed when the browser is closed.

Imagine, a user does close the browser intentionally and not 
accidentally, and the next user can re-capture, rather hijack, his 
session just because the session cookie is persistent.

Draw the conclusion yourself, but a persistent session cookie to comfort 
the user when closing the browser accidentally results in a security 
hole which I would not allow in my web application. It cannot be in the 
interest of the user concerned that you cannot guarantee the privacy of 
his data after the browser has been closed due to persistent session 
cookies.


Best wishes

Lutz

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



RE: database - jdbc setup help

2005-05-12 Thread Geoff Wiggs
Lutz,

Thank you for the excellent primer on Tomcat DB setup.  I'm going to keep
this around forever.  Quick question, how can you tell that it is really
using the db pool?  Is there a monitoring tool somewhere that would show the
number of connections in use?

Geoff Wiggs
Orcas Technologies, Inc


-Original Message-
From: Lutz Zetzsche [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 12, 2005 12:14 AM
To: Tomcat Users List
Subject: Re: database - jdbc setup help

Hi Bagus,

Am Donnerstag, 12. Mai 2005 00:38 schrieb Bagus:
 I've now set up Tomcat 5.5.4 and have installed
 mysql-standard-4.1.9-unknown-freebsd4.7-i386 on my Freebsd 5.3 box
 intel box.
 I've loaded some databases and tables into the database.

 How do I get them to work together with jsp?

 Can anyone point me to a short-sweet tutorial that can get me from
 here to there?

 I'm not sure if I need to install jdbc and the mysql driver or if
 those are included in the tomcat release.

 A tutorial that takes me through all that would be great.

Firstly, you have to install the MySQL JDBC driver. That means you have 
to download it from here:



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



Re: Can a client recapture a session in Tomcat 4.1

2005-05-12 Thread Tim Diggins
Using IP sounds a bit scary as a lookup - think of all the users with 
equivalent IP addresses (because of NATing routers/firewalls, etc.). 
Plus it would be a strikes me it would be a nightmare to test...

But, if instead you wanted to have a session that wasn't linked to 
tomcat's notion of a session, you could (maybe) build a separate Session 
management that was stored in a regular (non-session) cookie -- it would 
 then persist across sessions in the same browser...

Tim
Arup Vidyerthy wrote:
I am not sure if this can be done... I guess you could build framework where
the user's  session id and ip is logged (unless they logout) and then when
the user comes back you could use the old session. I have never tried this
but this personally but I dont see why it should not work. 

Arup
-Original Message-
From: Millies, Sebastian [mailto:[EMAIL PROTECTED] 
Sent: 12 May 2005 15:57
To: tomcat-user@jakarta.apache.org
Subject: Can a client recapture a session in Tomcat 4.1

Can a client recapture his Tomcat session after he has accidentally closed
the browser, provided that the session object still exists on the server?
Would this be a browser-specific thing? After all, I guess I'd need to tell
the browser to persist the session cookie or some such thing. Or would it
work browser-independently using URL-rewriting?
If there is such a mechanism, does it pose any security concerns (e. g.
through Tomcat reusing a session-id for a totally different session?)
We're on Tomcat 4.1. Would the answer be any different for Tomcat 5.0?
Thanks for any enlightenment or additional pointers-. -- Sebastian
--
Sebastian Millies, IDS Scheer AG
Postfach 10 15 34, 66015 Saarbrcken
Zi D1.16, [EMAIL PROTECTED] fon +49-681-210-3221, fax
+49-681-210-1311
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


RE: Setting an environment variable in tomcat 5.5 service?

2005-05-12 Thread Mufaddal Khumri
Que: Am I understanding this right, the environment entries you can set
in tomcat web.xml are not the same as the ones you would be setting from
under Windows-startup-control panel-system-Advanced??

Basically I am trying to set a environment variable to a particular
file. In my webapp I use some third party libraries that make some JNI
calls that require that environment variable to be set.

Thanks,


-Original Message-
From: Gurumoorthy [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 11, 2005 11:00 PM
To: Tomcat Users List
Subject: Re: Setting an environment variable in tomcat 5.5 service?

You cant use System.env ... you have to use JNDI to to get the variable
names
Search google ... with words JNDI variables tomcat ...

Something like this ...

Context initialContext = new InitialContext();
String value = initialContext.lookup(java:env/ + VAR_NAME ) ;

Regards
Guru
- Original Message -
From: Mufaddal Khumri [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Wednesday, May 11, 2005 10:31 PM
Subject: RE: Setting an environment variable in tomcat 5.5 service?


Yes, I did.

-Original Message-
From: Lutz Zetzsche [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 11, 2005 2:16 PM
To: Tomcat Users List
Subject: Re: Setting an environment variable in tomcat 5.5 service?

Am Mittwoch, 11. Mai 2005 18:26 schrieb Mufaddal Khumri:
 Thank you for the reply. I am trying to set in web.xml using:

   env-entry
 env-entry-nameMY_ENV_VAR/env-entry-name
 env-entry-valueC:/config/one.xml/env-entry-value
 env-entry-typejava.lang.String/env-entry-type
   /env-entry

 I am placing this right above the /web-app ending tag.

[...]

 Any clues as to why my env-entry is not taking effect?

Did you restart Tomcat?

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




--
This email and any files transmitted with it are confidential
and intended solely for the use of the individual or entity
to whom they are addressed. If you have received this
email in error please notify the system manager. Please
note that any views or opinions presented in this email
are solely those of the author and do not necessarily
represent those of the company. Finally, the recipient
should check this email and any attachments for the
presence of viruses. The company accepts no liability for
any damage caused by any virus transmitted by this email.
Consult your physician prior to the use of any medical
supplies or product.


--


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


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


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



RE: Basic load balancing

2005-05-12 Thread Faine, Mark
Thanks for the tip, we will look at it.

-Mark 

-Original Message-
From: Wade Chandler [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 11, 2005 1:40 PM
To: Tomcat Users List
Subject: Re: Basic load balancing

Joe Plautz wrote:
  From what I understand load balancing is done at the router, where 
 clustering is a tomcat setup issue.
 
 Joe
 
 Faine, Mark wrote:
 
 Tomcat 5.0.28

 We seem to often have to make minor changes that cause us to have to 
 restart our tomcat server (the whole server, not just a web 
 application) and this has lead me to decide to research load 
 balancing.  The idea would be to have two servers that would be exact 
 duplicates.  One of the servers would only become available when the 
 other was not running.  This way we could make the change on server2 
 (and restart it) and then bring server1 down and make the change to 
 it as well.  This would prevent any real downtime for our users.
 Where should I look for info on how to implement this type of failover?
 Thanks for your help

 -Mark

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

 .

 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
You can also use an Apache server as a front end to multiple
servers/tomcats.  I'm not talking about using mod_jk either, but using
Apache as a traffic router.  It works well, and you will be using
mod_rewrite and/or mod_proxy.  Check them out.

Wade

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

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



Re: Help needed with Hibernate persistent servlet

2005-05-12 Thread David Haynes
Allistair Crossley wrote:
Hi,
Hibernate needs a bunch of other jar files too. There is a text file in the H3 
distrib indicating which are requisite and which are mandatory.
You do not menion whether this HibernateUtil you are using as a servlet has an 
overridden init() method that creates the SessionFactory.
Finally, the way we set the Hibernate sub-system up here is to use a 
ContextListener for our application which calls HibernateUtil.init which 
instances the SessionFactory. Another way to go about Hibernate3 usage in web 
apps is to use the Inversion of Control part of Spring.
Cheers, Allistair.
 

-Original Message-
From: David Haynes [mailto:[EMAIL PROTECTED]
Sent: 10 May 2005 19:30
To: tomcat-user@jakarta.apache.org
Subject: Help needed with Hibernate persistent servlet
I feel that I am almost there, but can't quite get the last 
problem out 
of the way.

I am using Tomcat 5.5.7, NetBeans 4.1rc2, and Hibernate 3.0.3.
I have set up the web.xml for my project to start the 
HibernateUtil as a 
load-on-startup servlet and confirmed that the proper libraries (jar 
files) are in place under WEB-INF/lib. I know that the servlet is 
running since I put the declaration into the global web.xml 
and got back 
the duplicate service error.

My problem is that I am getting NoClassDefFoundError. Looking at the 
java generated for my jsp, I see that the class not found is the one 
which references my persistent object. ( i.e. when I reference 
HibernateUtil.currentSession() )

Do I need to do something else to make the persistent object 
visible to 
my jsp? The jsp does import my package containing 
HibernateUtil and the 
org.hibernate.* set as well.

Googling seems to indicate that getting this to work is an often seen 
problem, but there not a lot of details about how to fix this. I have 
checked all the fixes I can find but nothing seems to be working.

Thanks for any ideas/help.
-david-
   

Thanks for taking the time to try to help. It turns out to be a 
documentation problem with Hibernate 3.0 in that one of the required jar 
libraries is not documented as being required. Once I added the asm.jar 
library, everything started to work properly.

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


RE: Can a client recapture a session in Tomcat 4.1

2005-05-12 Thread Arup Vidyerthy
I agree, actually once I posted it I thought the same thing. What I
suggested is not particularly useful but I have seen it done :-(

I guess, in the end this whole session persistence is just a bad idea.

Arup

-Original Message-
From: Tim Diggins [mailto:[EMAIL PROTECTED] 
Sent: 12 May 2005 16:21
To: Tomcat Users List
Subject: Re: Can a client recapture a session in Tomcat 4.1

Using IP sounds a bit scary as a lookup - think of all the users with
equivalent IP addresses (because of NATing routers/firewalls, etc.). 
Plus it would be a strikes me it would be a nightmare to test...

But, if instead you wanted to have a session that wasn't linked to tomcat's
notion of a session, you could (maybe) build a separate Session management
that was stored in a regular (non-session) cookie -- it would
  then persist across sessions in the same browser...

Tim

Arup Vidyerthy wrote:
 I am not sure if this can be done... I guess you could build framework 
 where the user's  session id and ip is logged (unless they logout) and 
 then when the user comes back you could use the old session. I have 
 never tried this but this personally but I don’t see why it should not
work.
 
 Arup
 -Original Message-
 From: Millies, Sebastian [mailto:[EMAIL PROTECTED]
 Sent: 12 May 2005 15:57
 To: tomcat-user@jakarta.apache.org
 Subject: Can a client recapture a session in Tomcat 4.1
 
 
 Can a client recapture his Tomcat session after he has accidentally 
 closed the browser, provided that the session object still exists on the
server?
 
 Would this be a browser-specific thing? After all, I guess I'd need to 
 tell the browser to persist the session cookie or some such thing. Or 
 would it work browser-independently using URL-rewriting?
 
 If there is such a mechanism, does it pose any security concerns (e. g.
 through Tomcat reusing a session-id for a totally different session?)
 
 We're on Tomcat 4.1. Would the answer be any different for Tomcat 5.0?
 
 Thanks for any enlightenment or additional pointers-. -- Sebastian
 
 --
 Sebastian Millies, IDS Scheer AG
 Postfach 10 15 34, 66015 Saarbrücken
 Zi D1.16, [EMAIL PROTECTED] fon +49-681-210-3221, fax
 +49-681-210-1311
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


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


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



RE: .asp and tomcat 5.5.9

2005-05-12 Thread Trung Nguyen
Thanks all of you.  I did create a simple context and named all the files with 
*.asp instead of *.jsp and mapped .asp to servlet. It worked.

thanks again,
Trung

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



Re: Memory for JSP Compliation in 4.1

2005-05-12 Thread Wendy Smoak
From: Will Hartung [EMAIL PROTECTED]
 Um...how big is the JSP that you're compiling? Is there perhaps a way to
 make it smaller? Perhaps including some of the static content at runtime
 rather than compile? (I'm trying to fathom a big enough JSP that would
blow
 up the compiler, but who knows.)

Each JSP is tiny, and they get assembled at runtime by Tiles in a Struts
app.  I'm looking in the 'work' directory on my Win2K development box (on
which this webapp works _fine_) and none of the .java files is over 100K.

It's only when I put the .war file on the production HP-UX server that I
have a problem.  So it's probably just another quirk of HP's JVM.  It
wouldn't be the first.  The current machine is on 1.4.2 still, so I'm going
to cross my fingers that it goes away with the 1.5 JVM.

Thanks for confirming my suspicion that -Xmx isn't going to help if it forks
a new JVM.  (And there's nowhere to specify how much memory for the forked
JVM??)

Any opinion on my turning fork to false and starting Tomcat with
JAVA_OPTS=-Xmx512M ?  (Knowing that there might be a memory leak and it may
need to be restarted occasionally.)  Is that considered a lot of memory
for Tomcat?  Too much?  (The machine has 4G.)  I need to limp along for
another couple of weeks until our scheduled maintenance outage time.

Thanks,
Wendy Smoak


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



Re: tomcat and security

2005-05-12 Thread Lutz Zetzsche
Hi Lapo,

Am Donnerstag, 12. Mai 2005 17:10 schrieb Lapo TIN:
 I would like to limit tomcat features as much as possible for
 avoiding undesiderables external accesses to the web server. I want
 that only 2 servlets have to run on HTTPS, port 8443. And these two
 servlets are simply replying to a GET with a static XML. Nothing
 more. I define the ssl connector listening on port 8443, and create
 the 2 servlets. Everything is running well,
 soo my intent is to close every other possibility of access (such as
 HTTP on 8080, manager and admin from outside, etc...)

 Is there a list somewhere of tips of security of tomcat ?
 Or do you have any suggestion ?
 thanks in advance.

There are several things you can do to enforce security on your server:

1. Close all ports in your firewall which you don't need. Normally, the 
HTTP (80 or 8080), HTTPS (443 or 8443) and SSH (22) port are needed and 
nothing more.

2. You can configure SSH in a way, that a root login is not possible. So 
everyone has to login with normal user rights and can then get root 
privileges changing with su.

3. Don't run the tomcat process with root rights. Create a group 
tomcat with a user tomcat and don't give this user shell rights 
(- /bin/false) as shell access poses an additional security risk. All 
files in $CATALINA_HOME should be owned by this user. Most importantly, 
start the Tomcat server as user tomcat, like:

sudo -u tomcat $CATALINA_HOME/bin/startup.sh

Be aware, that if you should accidentally start the server as root and 
files to the work directory etc. should be written by the user root, 
you will get file permission problems when starting the server as user 
tomcat next time.

Be also aware, that you cannot use ports below port 1024 without root 
rights. So, if you should want to run Tomcat on port 80, then you have 
to run it i.e. on port 8080 locally and have to add a iptables 
redirection rule in your firewall forwarding requests for port 80 to 
port 8080. Of course, this is only possible if no other server is 
already running on port 80.

4. Additionally to 3., you can try to run Tomcat within a ChRoot 
environment. However, I didn't get this work which seemed to be due to 
a bug in the JDK, I was using, as far as I could find out.

5. Start Tomcat using the Security Manager:

sudo -u tomcat $CATALINA_HOME/bin/startup.sh -security

The default settings in $CATALINA_HOME/conf/catalina.policy are already 
ok for normal use but you can much more tighten security by 
implementing your own settings.

6. For web applications like the Tomcat Manager and the Administration 
Tool which should not be accessible from outside, you can use 
RemoteAddrValve or/and the RemoteHostValve with which you can exactly 
define from which Host or IP it is allowed to access an application.


Best wishes

Lutz

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



Re: Can a client recapture a session in Tomcat 4.1

2005-05-12 Thread Lutz Zetzsche
Hi Tim,

Am Donnerstag, 12. Mai 2005 17:20 schrieb Tim Diggins:
 Using IP sounds a bit scary as a lookup - think of all the users with
 equivalent IP addresses (because of NATing routers/firewalls, etc.).
 Plus it would be a strikes me it would be a nightmare to test...

 But, if instead you wanted to have a session that wasn't linked to
 tomcat's notion of a session, you could (maybe) build a separate
 Session management that was stored in a regular (non-session) cookie
 -- it would then persist across sessions in the same browser...

But how do you validate that it is still the right person in front of 
the pc / monitor? ;-) Persistent session cookies are simply an 
inacceptable security breach if more than one person can have access to 
the pc.


Best wishes

Lutz

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



tomcat 5.5.9 version stable?

2005-05-12 Thread Woodchuck
hihi all,

is the tomcat 5.5.9 version a 'stable' version?

when i go to browse the download folder i see versions marked with
'-alpha' and '-beta'... but none marked with '-stable'

does that mean 'stable' versions are the ones without any markings (ie.
'alpha' or 'beta')?

thanks in advance!
woodchuck



Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html


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



Two instances configuration

2005-05-12 Thread Diogo Martinez
Hi,

does anybody know how to set up two instances of Tomcat in a same
machine, listening to different ports?
I already tried to configure server.xml as following:

...
Connector className=org.apache.coyote.tomcat4.CoyoteConnector
acceptCount=100 bufferSize=2048 compression=off connectionLinger=-1
connectionTimeout=2 connectionUploadTimeout=30 debug=0
disableUploadTimeout=true enableLookups=true maxKeepAliveRequests=100
maxProcessors=75 minProcessors=5 port=8080
protocolHandlerClassName=org.apache.coyote.http11.Http11Protocol
proxyPort=0 redirectPort=8443 scheme=http secure=false
serverSocketTimeout=0 tcpNoDelay=true tomcatAuthentication=true
useURIValidationHack=false
  Factory
className=org.apache.catalina.net.DefaultServerSocketFactory/
/Connector
...

When I shut down one instance, both are shut down together, and the
same happens when I start up one of them.

Could anybody help me, please?

Thanks,
Dioog

Esta mensagem, incluindo seus anexos, pode conter informações privilegiadas
e/ou de caráter confidencial, não podendo ser retransmitida sem autorização
do remetente. Se você não é o destinatário ou pessoa autorizada a recebê-la,
informamos que o seu uso, divulgação, cópia ou arquivamento são proibidos.
Portanto, se você recebeu esta mensagem por engano, por favor, nos informe
respondendo imediatamente a este e-mail e em seguida apague-a.

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



RE: tomcat 5.5.9 version stable?

2005-05-12 Thread Allistair Crossley
yes, it says so on the tomcat homepage.

 -Original Message-
 From: Woodchuck [mailto:[EMAIL PROTECTED]
 Sent: 12 May 2005 16:57
 To: tomcat
 Subject: tomcat 5.5.9 version stable?
 
 
 hihi all,
 
 is the tomcat 5.5.9 version a 'stable' version?
 
 when i go to browse the download folder i see versions marked with
 '-alpha' and '-beta'... but none marked with '-stable'
 
 does that mean 'stable' versions are the ones without any 
 markings (ie.
 'alpha' or 'beta')?
 
 thanks in advance!
 woodchuck
 
 
   
 Yahoo! Mail
 Stay connected, organized, and protected. Take the tour:
 http://tour.mail.yahoo.com/mailtour.html
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Two instances configuration

2005-05-12 Thread Peter Crowther
 From: Diogo Martinez [mailto:[EMAIL PROTECTED] 
   does anybody know how to set up two instances of Tomcat 
 in a same
 machine, listening to different ports?

As well as configuring the connector, check and change the shutdown port
(near the top of conf/server.xml).  Each instance needs a unique
shutdown port in addition to any ports used by its connectors.

- Peter

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



Re: Common vs. Shared

2005-05-12 Thread Dakota Jack
I have not read all the responses, but:



 Bootstrap
 |
  System
 |
  Common
 /  \
Catalina   Shared
   /   \
   Webapp1  Webapp2 ...

On 5/5/05, Michael Oliver [EMAIL PROTECTED] wrote:
  
  
 
 I am quite sure this has been asked and answered but I googled a bunch of
 combinations and didn't find the answer, so I am sure someone here will know
 and share. 
 
   
 
 What is the difference between the /common/ and /shared/ 
 
   
 
 I understand this is a class loader issue, and I have read the comments in
 catalina.properties. 
 
   
 
 What would go into 'common' that wouldn't go into 'shared' and vice versa? 
 
   
 
 If a jar is in /common/lib/ and a different version of that jar is in
 /shared/lib/ what will be the effect? 
 
   
 
 Similarly, if I modify catalina.properties and add something to 'common'
 that is already in 'shared', etc. 
 
   
 
 Understanding the relationship between 'common' and 'shared' and the
 intended use thereof should be of interest to more than just me. 
 
   
 
 Ollie 
 
   
 
   
  
  
  
  
 
  
 
 Loosely Coupled 
 
  
 
   
  
  
 
 Mike Oliver
  CTO 
 
 Alarius Systems LLC
  6800 E. Lake Mead Blvd
  Apt 1096
  Las Vegas, NV 89156 
  
 
 [EMAIL PROTECTED]
  [EMAIL PROTECTED]
  IM: [EMAIL PROTECTED]
  http://www.alariussystems.com/ 
  
 
 tel: 
  fax: 
  mobile: 
 
 (702)643-7425
  (702)974-0341
  (518)378-6154 
 
  
 
  
 
  
 
   
 
  
  
  
 
 Add me to your address book... 
 
 Want a signature like this? 
 
  
 
   


-- 
You can lead a horse to water but you cannot make it float on its back.
~Dakota Jack~

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



Re: Apache2+Tomcat5.5+mod_jk loadbalancing: Sticky sessions not working

2005-05-12 Thread Kumbarÿffffffffffffffffe7e
Thank you for your reply.
I don't think it's the session timeout on tomcat
because, as I said in my previous message,I don't see
a pattern in the time pages are served from the same
tomcat. In other words, a page gets served from
tomcat1 maybe 4 times (each page refresh), then 2
times from tomcat2, then 3 times from tomcat1, without
a specific pattern.
Here's my tomcat1 server.xml file, if you can take a
look at it:
!-- Example Server Configuration File --
!-- Note that component elements are nested
corresponding to their
 parent-child relationships with each other --

!-- A Server is a singleton element that represents
the entire JVM,
 which may contain one or more Service
instances.  The Server
 listens for a shutdown command on the indicated
port.

 Note:  A Server is not itself a Container, so
you may not
 define subcomponents such as Valves or
Loggers at this level.
 --

Server port=8005 shutdown=SHUTDOWN
!-- Listener
className=org.apache.jk.config.ApacheConfig
modJk=C:/Program Files/Apache
Group/Apache2/modules/mod_jk.so /--

  !-- Comment these entries out to disable JMX MBeans
support used for the 
   administration web application --
  Listener
className=org.apache.catalina.mbeans.ServerLifecycleListener
/
  Listener
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
/
  Listener
className=org.apache.catalina.storeconfig.StoreConfigLifecycleListener/

  !-- Global JNDI resources --
  GlobalNamingResources

!-- Test entry for demonstration purposes --
Environment name=simpleValue
type=java.lang.Integer value=30/

!-- Editable user database that can also be used
by
 UserDatabaseRealm to authenticate users --
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
   description=User database that can be updated
and saved
  
factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /

  /GlobalNamingResources

  !-- A Service is a collection of one or more
Connectors that share
   a single Container (and therefore the web
applications visible
   within that Container).  Normally, that
Container is an Engine,
   but this is not required.

   Note:  A Service is not itself a Container,
so you may not
   define subcomponents such as Valves or
Loggers at this level.
   --

  !-- Define the Tomcat Stand-Alone Service --
  Service name=Catalina

!-- A Connector represents an endpoint by which
requests are received
 and responses are returned.  Each Connector
passes requests on to the
 associated Container (normally an Engine)
for processing.

 By default, a non-SSL HTTP/1.1 Connector is
established on port 8080.
 You can also enable an SSL HTTP/1.1 Connector
on port 8443 by
 following the instructions below and
uncommenting the second Connector
 entry.  SSL support requires the following
steps (see the SSL Config
 HOWTO in the Tomcat 5 documentation bundle
for more detailed
 instructions):
 * If your JDK version 1.3 or prior, download
and install JSSE 1.0.2 or
   later, and put the JAR files into
$JAVA_HOME/jre/lib/ext.
 * Execute:
 %JAVA_HOME%\bin\keytool -genkey -alias
tomcat -keyalg RSA (Windows)
 $JAVA_HOME/bin/keytool -genkey -alias
tomcat -keyalg RSA  (Unix)
   with a password value of changeit for
both the certificate and
   the keystore itself.

 By default, DNS lookups are enabled when a
web application calls
 request.getRemoteHost().  This can have an
adverse impact on
 performance, so you can disable it by setting
the
 enableLookups attribute to false.  When
DNS lookups are disabled,
 request.getRemoteHost() will return the
String version of the
 IP address of the remote client.
--

!-- Define a non-SSL HTTP/1.1 Connector on port
8080 --

Connector port=8080 maxHttpHeaderSize=8192
   maxThreads=150 minSpareThreads=25
maxSpareThreads=75
   enableLookups=false
redirectPort=8443 acceptCount=100
   connectionTimeout=2
disableUploadTimeout=true /

!-- Note : To disable connection timeouts, set
connectionTimeout value
 to 0 --

!-- Note : To use gzip compression you could set the
following properties :

   compression=on 
   compressionMinSize=2048 
   noCompressionUserAgents=gozilla, traviata 
   compressableMimeType=text/html,text/xml
--

!-- Define a SSL HTTP/1.1 Connector on port 8443
--
!--
Connector port=8443 maxHttpHeaderSize=8192
   maxThreads=150 minSpareThreads=25
maxSpareThreads=75
   enableLookups=false
disableUploadTimeout=true
   acceptCount=100 scheme=https
secure=true
   

How to use Admin and Manager app. when $CATALINA_BASE is redefined ?

2005-05-12 Thread MERCADIER Didier ROSI/SIFAC
Hi,

We use Tomcat 4.1.24 and JSDK 1.4.1.07 on Windows 2000.

In our project, we have redefined $CATALINA_BASE to point to our webapp 
directory outside of $CATALINA_HOME. It works perfectly.

So now, we want to use administration and manager web applications. But /admin 
and /manager are searched from our webapp directory and not from 
$CATALINA_HOME/server/webapps.

How can i do to redirect to $CATALINA_HOME/server/webapps/admin and 
$CATALINA_HOME/server/webapps/manager ?

We have tried to modify our server.xml :

Initial content :
Server debug=0 port=8081 shutdown=SHUTDOWN
  Service name=Tomcat-Standalone
Connector acceptCount=10 
className=org.apache.catalina.connector.http.HttpConnector 
connectionTimeout=6 debug=0 maxProcessors=75 minProcessors=5 
port=8080/
Engine debug=0 defaultHost=localhost name=Standalone
  Host appBase=webApp debug=0 name=localhost unpackWARs=false
Context path= debug=0 docBase=/
  /Host
/Engine
  /Service
/Server 

Modified content :
Server debug=0 port=8081 shutdown=SHUTDOWN
  Service name=Tomcat-Standalone
Connector acceptCount=10 
className=org.apache.catalina.connector.http.HttpConnector 
connectionTimeout=6 debug=0 maxProcessors=75 minProcessors=5 
port=8080/
Engine debug=0 defaultHost=localhost name=Standalone
  Host appBase=webApp debug=0 name=localhost unpackWARs=false
Context path= debug=0 docBase=/
Context path=/admin privileged=true debug=0 
docBase=C:/ProgramFiles/Tomcat4.1/server/webapps/admin/
Context path=/manager privileged=true debug=0 
docBase=C:/ProgramFiles/Tomcat4.1/server/webapps/manager/  
/Host
/Engine
  /Service
/Server 

But we have got the following errors :

//
HttpConnector Opening server socket on all host IP addresses
Dmarrage du service Tomcat-Standalone
Apache Tomcat/4.1.24-LE-jdk14
WebappLoader[/admin]: Deploying class repositories to work directory 
F:\DEV\Moteur\work\Standalone\l
ocalhost\admin
WebappLoader[/admin]: Deploy class files /WEB-INF/classes to 
C:\APPFT\Tomcat4.1\server\webapps\admin
\WEB-INF\classes
WebappLoader[/admin]: Deploy JAR /WEB-INF/lib/struts.jar to 
C:\APPFT\Tomcat4.1\server\webapps\admin\
WEB-INF\lib\struts.jar
ContextConfig[/admin]: Exception lors du traitement du JAR indiqu par le 
chemin de ressource /WEB-I
NF/lib/struts.jar
javax.servlet.ServletException: Exception lors du traitement du JAR indiqu par 
le chemin de ressour
ce /WEB-INF/lib/struts.jar
javax.servlet.ServletException: Exception lors du traitement du JAR indiqu par 
le chemin de ressour
ce /WEB-INF/lib/struts.jar
at 
org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:930)
at 
org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868)
at 
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647)
at 
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:3567)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:497)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)
at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
ContextConfig[/admin]: Cette application est marque comme non disponible suite 
aux erreurs prcden
tes
StandardManager[/admin]: Alimentation de la classe du gnrateur de nombre 
alatoire java.security.S
ecureRandom
StandardManager[/admin]: L'alimentation du gnrateur de nombre alatoire est 
termin
StandardContext[/admin]: Erreur de dmarrage du contexte suite aux erreurs 
prcdentes
WebappLoader[/manager]: Deploying class repositories to work directory 
F:\DEV\Moteur\work\Standalone
\localhost\manager
ContextConfig[/manager]: Aucun royaume (realm) n''a t configur pour raliser 
l''authentification
ContextConfig[/manager]: Cette application est 

Re: Apache2+Tomcat5.5+mod_jk loadbalancing: Sticky sessions not working

2005-05-12 Thread Mladen Turk
Edlira Kumbarÿe7e wrote:
I don't think it's the session timeout on tomcat
because, as I said in my previous message,I don't see
a pattern in the time pages are served from the same
tomcat. In other words, a page gets served from
tomcat1 maybe 4 times (each page refresh), then 2
times from tomcat2, then 3 times from tomcat1, without
a specific pattern.
Really have no idea.
What version of mod_jk you are using?
Regards,
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Apache2+Tomcat5.0.19+mod_jk+windows loadbalancing

2005-05-12 Thread Rehman Adil \(KI/EAB\)
Hi

I am trying to use Apache 2.0 on windows to load balance three tomcat
workers using  mod_jk(mod_jk_1.2.6_2.0.50.dll).
When I browse the URL  (http://localhost/jsp-examples/index.jsp), Apache
does not forward the request as I get the following in the Apache log file.

File does not exist: C:/apache/Apache2/htdocs/jsp-examples/index.jsp

This means that Apache is not delegating the request to the tomcat workers.
Although, I have defined the jsp-examples context in the 
conf/workers2.properties
file like  this:

# Map the Tomcat jsp-examples webapp to the Web server uri space
[uri:/jsp-examples/*.jsp]
info=mapping the jsp-examples context of Tomcat
context=/jsp-examples
group=balanced

In each Tomcat worker, I have a jk2.properties file with different ports,
which looks like this.

channelSocket.port=8009
channelSocket.address=localhost
shm.file=c:/cluster/apache/jk2.shm

Any help will be HIGHLY appreciated.
Please have a quick look on the attached files.
Note that I am doing it on Windows 2000. workers2.properties and httpd.conf are 
in conf folder of apache.
I have also attached the server.xml and jk.properties file, server.xml and 
web.xml which 
are present on each tomcat worker with the only difference of port number becoz 
I am trying all the Tomcat workers
on one machine.

Any clue ? What could be the reason ?

Regards,
Rehman Adil

!-- Example Server Configuration File --
!-- Note that component elements are nested corresponding to their
 parent-child relationships with each other --

!-- A Server is a singleton element that represents the entire JVM,
 which may contain one or more Service instances.  The Server
 listens for a shutdown command on the indicated port.

 Note:  A Server is not itself a Container, so you may not
 define subcomponents such as Valves or Loggers at this level.
 --

Server port=8005 shutdown=SHUTDOWN debug=0


  !-- Comment these entries out to disable JMX MBeans support --
  !-- You may also configure custom components (e.g. Valves/Realms) by 
   including your own mbean-descriptor file(s), and setting the 
   descriptors attribute to point to a ';' seperated list of paths
   (in the ClassLoader sense) of files to add to the default list.
   e.g. descriptors=/com/myfirm/mypackage/mbean-descriptor.xml
  --
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener
debug=0/
  Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
debug=0/

  !-- Global JNDI resources --
  GlobalNamingResources

!-- Test entry for demonstration purposes --
Environment name=simpleValue type=java.lang.Integer value=30/

!-- Editable user database that can also be used by
 UserDatabaseRealm to authenticate users --
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
   description=User database that can be updated and saved
/Resource
ResourceParams name=UserDatabase
  parameter
namefactory/name
valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
  /parameter
  parameter
namepathname/name
valueconf/tomcat-users.xml/value
  /parameter
/ResourceParams

  /GlobalNamingResources

  !-- A Service is a collection of one or more Connectors that share
   a single Container (and therefore the web applications visible
   within that Container).  Normally, that Container is an Engine,
   but this is not required.

   Note:  A Service is not itself a Container, so you may not
   define subcomponents such as Valves or Loggers at this level.
   --

  !-- Define the Tomcat Stand-Alone Service --
  Service name=Catalina

!-- A Connector represents an endpoint by which requests are received
 and responses are returned.  Each Connector passes requests on to the
 associated Container (normally an Engine) for processing.

 By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
 You can also enable an SSL HTTP/1.1 Connector on port 8443 by
 following the instructions below and uncommenting the second Connector
 entry.  SSL support requires the following steps (see the SSL Config
 HOWTO in the Tomcat 5 documentation bundle for more detailed
 instructions):
 * If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or
   later, and put the JAR files into $JAVA_HOME/jre/lib/ext.
 * Execute:
 %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
 $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA  (Unix)
   with a password value of changeit for both the certificate and
   the keystore itself.

 By default, DNS lookups are enabled when a web application calls
 request.getRemoteHost().  This can have an adverse impact on
 performance, so you can disable it by setting 

Apache2+Tomcat5.0.19+mod_jk+windows loadbalancing

2005-05-12 Thread Rehman Adil \(KI/EAB\)



Hi

I am trying to use Apache 2.0 on windows to load balance three tomcat
workers using  mod_jk(mod_jk_1.2.6_2.0.50.dll).
When I browse the URL  (http://localhost/jsp-examples/index.jsp), Apache
does not forward the request as I get the following in the Apache log file.

File does not exist: C:/apache/Apache2/htdocs/jsp-examples/index.jsp

This means that Apache is not delegating the request to the tomcat workers.
Although, I have defined the jsp-examples context in the 
conf/workers2.properties
file like  this:

# Map the Tomcat jsp-examples webapp to the Web server uri space
[uri:/jsp-examples/*.jsp]
info=mapping the jsp-examples context of Tomcat
context=/jsp-examples
group=balanced

In each Tomcat worker, I have a jk2.properties file with different ports,
which looks like this.

channelSocket.port=8009
channelSocket.address=localhost
shm.file=c:/cluster/apache/jk2.shm

Any help will be HIGHLY appreciated.
Please have a quick look on the attached files.
Note that I am doing it on Windows 2000. workers2.properties and httpd.conf are 
in conf folder of apache.
I have also attached the server.xml and jk.properties file, server.xml and 
web.xml which 
are present on each tomcat worker with the only difference of port number becoz 
I am trying all the Tomcat workers
on one machine.

Any clue ? What could be the reason ?

Regards,
Rehman Adil

!-- Example Server Configuration File --
!-- Note that component elements are nested corresponding to their
 parent-child relationships with each other --

!-- A Server is a singleton element that represents the entire JVM,
 which may contain one or more Service instances.  The Server
 listens for a shutdown command on the indicated port.

 Note:  A Server is not itself a Container, so you may not
 define subcomponents such as Valves or Loggers at this level.
 --

Server port=8005 shutdown=SHUTDOWN debug=0


  !-- Comment these entries out to disable JMX MBeans support --
  !-- You may also configure custom components (e.g. Valves/Realms) by 
   including your own mbean-descriptor file(s), and setting the 
   descriptors attribute to point to a ';' seperated list of paths
   (in the ClassLoader sense) of files to add to the default list.
   e.g. descriptors=/com/myfirm/mypackage/mbean-descriptor.xml
  --
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener
debug=0/
  Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
debug=0/

  !-- Global JNDI resources --
  GlobalNamingResources

!-- Test entry for demonstration purposes --
Environment name=simpleValue type=java.lang.Integer value=30/

!-- Editable user database that can also be used by
 UserDatabaseRealm to authenticate users --
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
   description=User database that can be updated and saved
/Resource
ResourceParams name=UserDatabase
  parameter
namefactory/name
valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
  /parameter
  parameter
namepathname/name
valueconf/tomcat-users.xml/value
  /parameter
/ResourceParams

  /GlobalNamingResources

  !-- A Service is a collection of one or more Connectors that share
   a single Container (and therefore the web applications visible
   within that Container).  Normally, that Container is an Engine,
   but this is not required.

   Note:  A Service is not itself a Container, so you may not
   define subcomponents such as Valves or Loggers at this level.
   --

  !-- Define the Tomcat Stand-Alone Service --
  Service name=Catalina

!-- A Connector represents an endpoint by which requests are received
 and responses are returned.  Each Connector passes requests on to the
 associated Container (normally an Engine) for processing.

 By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
 You can also enable an SSL HTTP/1.1 Connector on port 8443 by
 following the instructions below and uncommenting the second Connector
 entry.  SSL support requires the following steps (see the SSL Config
 HOWTO in the Tomcat 5 documentation bundle for more detailed
 instructions):
 * If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or
   later, and put the JAR files into $JAVA_HOME/jre/lib/ext.
 * Execute:
 %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
 $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA  (Unix)
   with a password value of changeit for both the certificate and
   the keystore itself.

 By default, DNS lookups are enabled when a web application calls
 request.getRemoteHost().  This can have an adverse impact on
 performance, so you can disable it by setting 

SSL on multiple IP addreses?

2005-05-12 Thread Paul Singleton
I'm trying to set up several SSL-enabled virtual hosts
under Tomcat 5.5.9 (Linux), each on a different IP address
(all via the same NIC).
I think I need a separate certificate (self-signed is OK)
for each, but cannot see how to associate them...
Do I have to create separate keystores? or is there a
neater way?
Paul Singleton
Jambusters Ltd
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.8 - Release Date: 10/May/2005
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Tomcat 5.5.7 will not autodeploy war files

2005-05-12 Thread BATCHELOR, SCOTT \(CONTRACTOR\)
I apologize up front if this has been answered at some other time.  This is my 
first day on the list and I could not locate a search function for the archives.

I am running Tomcat 5.5.7 with Apache 2.0.52 and ModJk 1.2.6

For some reason when I drop a war file in the webapps directory it will not 
auto deploy if there is already a version of the application in the webapps 
directory.  In fact I have to delete the application directory and then restart 
Tomcat for it to deploy the changes.

Has anyone ran into this before?

Here is part of my server.xml file

Host name=localhost appBase=webapps
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false

And here is part of the context

Context path=/some_app
 docpath=some_app
 crosscontext=false
 debug=0
 reloadable=true

Is there another config file that might be causing this problem?

Thanks in Advance.

-SB


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



Re: SSL on multiple IP addreses?

2005-05-12 Thread David Wall
How will you configure multiple IP addresses on a single NIC?  Normally, 
you have one NIC per IP address.  You will need to use two keystores for 
each system, and configure the keystores as you normally would under the 
SSL connector.  I'm not sure how to configure the CoyoteConnector so 
that it will listen on a particular IP address, but the docs no doubt 
explain how.

Good luck...
Paul Singleton wrote:
I'm trying to set up several SSL-enabled virtual hosts
under Tomcat 5.5.9 (Linux), each on a different IP address
(all via the same NIC).
I think I need a separate certificate (self-signed is OK)
for each, but cannot see how to associate them...
Do I have to create separate keystores? or is there a
neater way?
Paul Singleton
Jambusters Ltd

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


RE: Tomcat 5.5.7 will not autodeploy war files (UNCLASSIFIED)

2005-05-12 Thread Samara, Fadi N Mr ACSIM/ASPEX
Classification:  UNCLASSIFIED 
Caveats: NONE

Looking at your server.xml file, it should actually autodeploy it. 
How are you updating the war file ? Copy/paste ? Or you're actually
Letting your IDE auto deploy to the webapps directory ?


-Original Message-
From: BATCHELOR, SCOTT (CONTRACTOR) [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 12, 2005 1:19 PM
To: tomcat-user@jakarta.apache.org
Subject: Tomcat 5.5.7 will not autodeploy war files

I apologize up front if this has been answered at some other time.  This is
my first day on the list and I could not locate a search function for the
archives.

I am running Tomcat 5.5.7 with Apache 2.0.52 and ModJk 1.2.6

For some reason when I drop a war file in the webapps directory it will not
auto deploy if there is already a version of the application in the webapps
directory.  In fact I have to delete the application directory and then
restart Tomcat for it to deploy the changes.

Has anyone ran into this before?

Here is part of my server.xml file

Host name=localhost appBase=webapps
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false

And here is part of the context

Context path=/some_app
 docpath=some_app
 crosscontext=false
 debug=0
 reloadable=true

Is there another config file that might be causing this problem?

Thanks in Advance.

-SB


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Classification:  UNCLASSIFIED 
Caveats: NONE


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



RE: Tomcat 5.5.7 will not autodeploy war files (UNCLASSIFIED)

2005-05-12 Thread Marquez, Omar

I used to have this problem. It was solved when I moved the context entries
out of server.xml and into conf/Catalina/localhost as pointed out by:

Contexts hardcoded in server.xml are not autodeployed or manageable
(except to some extent through the admin webapp). They are hardcoded
and always deployed on startup, and that's it.

-- 
x
Rémy Maucherat
Developer  Consultant
JBoss Group (Europe) SàRL
x


-Original Message-
From: Samara, Fadi N Mr ACSIM/ASPEX [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 12, 2005 12:37 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat 5.5.7 will not autodeploy war files (UNCLASSIFIED)


Classification:  UNCLASSIFIED 
Caveats: NONE

Looking at your server.xml file, it should actually autodeploy it. 
How are you updating the war file ? Copy/paste ? Or you're actually
Letting your IDE auto deploy to the webapps directory ?


-Original Message-
From: BATCHELOR, SCOTT (CONTRACTOR) [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 12, 2005 1:19 PM
To: tomcat-user@jakarta.apache.org
Subject: Tomcat 5.5.7 will not autodeploy war files

I apologize up front if this has been answered at some other time.  This is
my first day on the list and I could not locate a search function for the
archives.

I am running Tomcat 5.5.7 with Apache 2.0.52 and ModJk 1.2.6

For some reason when I drop a war file in the webapps directory it will not
auto deploy if there is already a version of the application in the webapps
directory.  In fact I have to delete the application directory and then
restart Tomcat for it to deploy the changes.

Has anyone ran into this before?

Here is part of my server.xml file

Host name=localhost appBase=webapps
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false

And here is part of the context

Context path=/some_app
 docpath=some_app
 crosscontext=false
 debug=0
 reloadable=true

Is there another config file that might be causing this problem?

Thanks in Advance.

-SB


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Classification:  UNCLASSIFIED 
Caveats: NONE


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
The information contained in this communication may be CONFIDENTIAL and is
intended only for the use of the recipient(s) named above.  If you are not
the intended recipient, you are hereby notified that any dissemination,
distribution, or copying of this communication, or any of its contents, is
strictly prohibited.   If you have received this communication in error,
please notify the sender and delete/destroy the original message and any
copy of it from your computer or paper files.

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



RE: Tomcat 5.5.7 will not autodeploy war files (UNCLASSIFIED)

2005-05-12 Thread BATCHELOR, SCOTT \(CONTRACTOR\)
I am actually just copying the war file to the webapps directory.  This is the 
way I have always done it in the past but with 5.5.7 it doesnt seem to be 
working.

Thanks,

SB

-Original Message-
From: Samara, Fadi N Mr ACSIM/ASPEX [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 12, 2005 12:37 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat 5.5.7 will not autodeploy war files (UNCLASSIFIED)


Classification:  UNCLASSIFIED 
Caveats: NONE

Looking at your server.xml file, it should actually autodeploy it. 
How are you updating the war file ? Copy/paste ? Or you're actually
Letting your IDE auto deploy to the webapps directory ?


-Original Message-
From: BATCHELOR, SCOTT (CONTRACTOR) [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 12, 2005 1:19 PM
To: tomcat-user@jakarta.apache.org
Subject: Tomcat 5.5.7 will not autodeploy war files

I apologize up front if this has been answered at some other time.  This is
my first day on the list and I could not locate a search function for the
archives.

I am running Tomcat 5.5.7 with Apache 2.0.52 and ModJk 1.2.6

For some reason when I drop a war file in the webapps directory it will not
auto deploy if there is already a version of the application in the webapps
directory.  In fact I have to delete the application directory and then
restart Tomcat for it to deploy the changes.

Has anyone ran into this before?

Here is part of my server.xml file

Host name=localhost appBase=webapps
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false

And here is part of the context

Context path=/some_app
 docpath=some_app
 crosscontext=false
 debug=0
 reloadable=true

Is there another config file that might be causing this problem?

Thanks in Advance.

-SB


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Classification:  UNCLASSIFIED 
Caveats: NONE


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


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



Re: Apache2+Tomcat5.5+mod_jk loadbalancing: Sticky sessions not working

2005-05-12 Thread Kumbarÿffffffffffffffffe7e
I'm using the binary version of mod_jk.
Apache v2.0.54
Tomcat v5.5
JK v1.2.12

Thank you,
Edlira
--- Mladen Turk [EMAIL PROTECTED] wrote:
 Edlira Kumbarÿe7e wrote:
  I don't think it's the session timeout on tomcat
  because, as I said in my previous message,I don't
 see
  a pattern in the time pages are served from the
 same
  tomcat. In other words, a page gets served from
  tomcat1 maybe 4 times (each page refresh), then 2
  times from tomcat2, then 3 times from tomcat1,
 without
  a specific pattern.
 
 Really have no idea.
 What version of mod_jk you are using?
 
 Regards,
 Mladen.
 

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

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



RE: SSL on multiple IP addreses?

2005-05-12 Thread Trung Nguyen
You can configure multiple IP adresses on a single NIC and add new IP/domain 
name to the server.xml

To configure multiple IP address on a single NIC on Linux (RHEL):
1.  cd /etc/sysconfig/network-scripts
2.  Make a copy of ifcfg-eth0 to ifcfg-eth0:0
3.  Edit ifcfg-eth0:0 and change DEVICE to eth0:0 and change the IPADDR to new 
IP

You can do this as many as you want by increase the last number by 1.

Hope this help.
Trung




-Original Message-
From: David Wall [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 12, 2005 1:31 PM
To: Tomcat Users List
Subject: Re: SSL on multiple IP addreses?


How will you configure multiple IP addresses on a single NIC?  Normally, 
you have one NIC per IP address.  You will need to use two keystores for 
each system, and configure the keystores as you normally would under the 
SSL connector.  I'm not sure how to configure the CoyoteConnector so 
that it will listen on a particular IP address, but the docs no doubt 
explain how.

Good luck...


Paul Singleton wrote:

 I'm trying to set up several SSL-enabled virtual hosts
 under Tomcat 5.5.9 (Linux), each on a different IP address
 (all via the same NIC).

 I think I need a separate certificate (self-signed is OK)
 for each, but cannot see how to associate them...

 Do I have to create separate keystores? or is there a
 neater way?

 Paul Singleton
 Jambusters Ltd



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


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



RE: SSL on multiple IP addreses?

2005-05-12 Thread Caldarale, Charles R
 From: David Wall [mailto:[EMAIL PROTECTED] 
 Subject: Re: SSL on multiple IP addreses?
 
 How will you configure multiple IP addresses on a single NIC? 

IP addresses are a figment of the software TCP stack's imagination.  All
real operating systems provide the capability of assigning multiple
arbitrary IP addresses to a NIC.

  Normally, you have one NIC per IP address.

Depends on the requirements of the implementation.

But to get back to the original question, I think the OP will need
multiple .keystore files, although that may well depend on how the
certificate is created.  Take a look at:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/ssl-howto.html
especially the Certificates and General Tips sections.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



Re: Common vs. Shared

2005-05-12 Thread Gabriel Belingueres
Yes, it works this way for javax.mail.Session too. You need to put mail.jarand 
activation.jar in lib/common so as you can find the Session from JNDI.

 On 5/6/05, Michael Echerer [EMAIL PROTECTED] wrote: 
 
 Ron Heeb wrote:
  my understanding comes from this book i got: 'common is responsible for
  classes that are used by Tomcat and publicly available to all Web
  apps'. shared is like common, except that 'developers can place their
  own classes and JAR files into the shared class loader domain'.
  developers shouldn't put anything into common. this is from
  Professional Apache Tomcat 5 from Wrox. for what it's worth...ron
 
 You need common/lib e.g. for JDBC drivers. Because if you want to
 configure a JNDI Datasource and use Tomcats Jakarta Commons DBCP
 connection pool there's no other way then placing the driver.jar
 into common/lib because Tomcat itself requires the classes already, not
 only your webapps.
 
 Moreover you should make sure that the webapps don't contain the
 driver.jar in that case again.
 Otherwise you'll face lot's of funny classloading issues...
 E.g. if you work with driver specific data types you could face problems
 like instanceof returning false although using the same class because
 objects might be loaded by different classloaders (and instanceof and
 casting only works within the same classloader).
 
 Cheers,
 Michael
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



Re: Basic load balancing

2005-05-12 Thread Will Hartung
 From: Harry Mantheakis [EMAIL PROTECTED]
 Sent: Thursday, May 12, 2005 1:51 AM

 What load balancing system would you recommend? (Is there some consensus,
 cost issues aside, as to what the best type of load balancing system is?)

I wish I could say.

We use a pair of redundant BigIP's from F5 (which are eleventy zillion
dollars), so, they're quite sophisticated.

I know Cisco has some as well (which are probably eleventy and a half
zillion dollars).

3 common paths are to use Apache's mod_proxy, mod_jk, or the Tomcat balancer
app.

I don't think any of them provide sticky sessions (though, obviously, the
Tomcat webapp could probably be reasonably modified to support that -- but I
don't know if anyone uses the Tomcat balancer in production).

I don't think any of them let you easily bring down an individual server on
your own, though you might be able to reconfigure mod_proxy on the fly
with Apache and do a graceful restart after you've taken your downed
server out of the mix in the httpd.conf file. The children should finish
their requests normally and safely.

The biggest problem with load balancing and such is that it opens up a HUGE
kettle of fish with regards to testing and such.

For example, you'll get it all set up, type http://myhost/webapp/page.jsp
and it'll magically appear and then you'll go Yea, but WHERE did it come
from?

We modified all of our JSPs, for example, to put the host of the server they
came from in an HTML comment.

It really starts getting confusing.

You should have a good set of web based tests for your application so that
you can be sure that it's still working the same when you add the new
servers. Then you can start testing things like yanking network cables from
your tomcat servers to see if failover happens (or not), and other effects,
and then decide if you're happy with it. You also can see if you perhaps
gained any capacity by splitting the tomcats (if you're app is DB bound,
then the bottleneck may be your DB server and the extra tomcat may not help
you at all, for example).

But, either way, testing is the key here to make sure everything is working
as planned (and unplanned) since the new configuration is that much more
complicated than it was before.

Regards,

Will Hartung
([EMAIL PROTECTED])


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



Re: Basic load balancing

2005-05-12 Thread Peter Lin
If you can afford it, go with hardware load balancing. it's easier to
setup and configure. it's also more reliable and robust.  of course,
you have to open up your wallet and let the money fall out.

if you really want sophisticated load balancing that allows you to
schedule a server to go down, i would recomend Resonate. I've used
them in the past and their product is solid.

peter


On 5/12/05, Will Hartung [EMAIL PROTECTED] wrote:
  From: Harry Mantheakis [EMAIL PROTECTED]
  Sent: Thursday, May 12, 2005 1:51 AM
 
  What load balancing system would you recommend? (Is there some consensus,
  cost issues aside, as to what the best type of load balancing system is?)
 
 I wish I could say.
 
 We use a pair of redundant BigIP's from F5 (which are eleventy zillion
 dollars), so, they're quite sophisticated.
 
 I know Cisco has some as well (which are probably eleventy and a half
 zillion dollars).
 
 3 common paths are to use Apache's mod_proxy, mod_jk, or the Tomcat balancer
 app.
 
 I don't think any of them provide sticky sessions (though, obviously, the
 Tomcat webapp could probably be reasonably modified to support that -- but I
 don't know if anyone uses the Tomcat balancer in production).
 
 I don't think any of them let you easily bring down an individual server on
 your own, though you might be able to reconfigure mod_proxy on the fly
 with Apache and do a graceful restart after you've taken your downed
 server out of the mix in the httpd.conf file. The children should finish
 their requests normally and safely.
 
 The biggest problem with load balancing and such is that it opens up a HUGE
 kettle of fish with regards to testing and such.
 
 For example, you'll get it all set up, type http://myhost/webapp/page.jsp
 and it'll magically appear and then you'll go Yea, but WHERE did it come
 from?
 
 We modified all of our JSPs, for example, to put the host of the server they
 came from in an HTML comment.
 
 It really starts getting confusing.
 
 You should have a good set of web based tests for your application so that
 you can be sure that it's still working the same when you add the new
 servers. Then you can start testing things like yanking network cables from
 your tomcat servers to see if failover happens (or not), and other effects,
 and then decide if you're happy with it. You also can see if you perhaps
 gained any capacity by splitting the tomcats (if you're app is DB bound,
 then the bottleneck may be your DB server and the extra tomcat may not help
 you at all, for example).
 
 But, either way, testing is the key here to make sure everything is working
 as planned (and unplanned) since the new configuration is that much more
 complicated than it was before.
 
 Regards,
 
 Will Hartung
 ([EMAIL PROTECTED])
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: .asp and tomcat 5.5.9

2005-05-12 Thread Will Hartung
 From: Trung Nguyen [EMAIL PROTECTED]
 Sent: Thursday, May 12, 2005 6:56 AM

 Thanks again.  What I'm trying to do is write code in Java and 
 name it .asp because our client wanted to have .asp instead of .jsp

:-)

Well that certainly can meet the letter of the request, if not the spirit!

Regards,

Will Hartung
([EMAIL PROTECTED])


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



Session Creation fails without proxy

2005-05-12 Thread Kannan V
Hello:
  I am facing a very strange problem in our production environment. We are 
using Tomcat 4.1.29 version. We have two applications, one modelled with SOFIA 
and another with Webwork. The two applications are running on different servers 
and from the SOFIA application, the WebWork application is called by absolute 
url from a link and loaded into an iframe within the SOFIA application page. 

 The problem is that if  Proxy for LAN is NOT set in IE, then the first 
session created for the webwork application on clicking the link from SOFIA 
application is lost forever. That is, when i click on the link to the webwork 
applcation, a session object is created and the page is rendered. Then when the 
webwork application page is submitted, a second (new)session object is created 
so the first session scope objects are lost. This leads to application error. 
So on debugging I found that if the lan proxy is NOT set, the second request 
(Webwork submission) doesn't have JSESSIONID in the cookies collection of the 
request header. If proxy is set, the header contains JSESSIONID cookie and 
every thing works fine. 

   The browser is cookie-enabled and every thing works fine if the request is 
coming thru proxy. I also tried with Tomcat 5.0 but the behaviour is same. Does 
anyone has a clue of what is happening?

thanks and regards,

-- Kannan.

-- 
___
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm


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



RE: Tomcat 5.5.7 will not autodeploy war files (UNCLASSIFIED)

2005-05-12 Thread BATCHELOR, SCOTT \(CONTRACTOR\)
I just want to say thanks very much for the help!  Not sure how I missed this 
in the Tomcat Docs but that did fix my problem.

-SB

-Original Message-
From: Marquez, Omar [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 12, 2005 12:45 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat 5.5.7 will not autodeploy war files (UNCLASSIFIED)



I used to have this problem. It was solved when I moved the context entries
out of server.xml and into conf/Catalina/localhost as pointed out by:

Contexts hardcoded in server.xml are not autodeployed or manageable
(except to some extent through the admin webapp). They are hardcoded
and always deployed on startup, and that's it.

-- 
x
Rémy Maucherat
Developer  Consultant
JBoss Group (Europe) SàRL
x


-Original Message-
From: Samara, Fadi N Mr ACSIM/ASPEX [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 12, 2005 12:37 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat 5.5.7 will not autodeploy war files (UNCLASSIFIED)


Classification:  UNCLASSIFIED 
Caveats: NONE

Looking at your server.xml file, it should actually autodeploy it. 
How are you updating the war file ? Copy/paste ? Or you're actually
Letting your IDE auto deploy to the webapps directory ?


-Original Message-
From: BATCHELOR, SCOTT (CONTRACTOR) [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 12, 2005 1:19 PM
To: tomcat-user@jakarta.apache.org
Subject: Tomcat 5.5.7 will not autodeploy war files

I apologize up front if this has been answered at some other time.  This is
my first day on the list and I could not locate a search function for the
archives.

I am running Tomcat 5.5.7 with Apache 2.0.52 and ModJk 1.2.6

For some reason when I drop a war file in the webapps directory it will not
auto deploy if there is already a version of the application in the webapps
directory.  In fact I have to delete the application directory and then
restart Tomcat for it to deploy the changes.

Has anyone ran into this before?

Here is part of my server.xml file

Host name=localhost appBase=webapps
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false

And here is part of the context

Context path=/some_app
 docpath=some_app
 crosscontext=false
 debug=0
 reloadable=true

Is there another config file that might be causing this problem?

Thanks in Advance.

-SB


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Classification:  UNCLASSIFIED 
Caveats: NONE


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
The information contained in this communication may be CONFIDENTIAL and is
intended only for the use of the recipient(s) named above.  If you are not
the intended recipient, you are hereby notified that any dissemination,
distribution, or copying of this communication, or any of its contents, is
strictly prohibited.   If you have received this communication in error,
please notify the sender and delete/destroy the original message and any
copy of it from your computer or paper files.

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


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



Re: Can a client recapture a session in Tomcat 4.1

2005-05-12 Thread Will Hartung
 From: Millies, Sebastian [mailto:[EMAIL PROTECTED]
 Sent: 12 May 2005 15:57

 Can a client recapture his Tomcat session after he has accidentally closed
 the browser, provided that the session object still exists on the server?

If the client authenticates to your server (i.e. they log in), then you can
use their login credentials as a key for session data.

The downside is that you'll have to basically build your own session manager
to facilitate this. (To handle expiration, inactivation, etc. if you want
those features).

However, there's no reason you can't leverage the built in session listeners
to help implement this. For example, you can do some crude reference
counting and when a user logs in, you register their session with your
login-ID based session manager.

Then, when the session expires (and calls the listener), it can check to see
if any other sessions are registered, and if not, then it can safely kill
the login-ID based session. This gives you the time out capability fairly
cheaply.

You don't get serialization and such though, nor clustering, but if you're
not using those features, you don't care.

Actually, as an aside, this would be a bit nasty, but you may be able to
tweak the Tomcat session code to instead of using a temporary, browser based
JSESSIONID cookie, make it permanent (but still expire in, say, an hour --
whatever timeout is suitable). This cookie would survive browser restarts
(for good and ill). Other folks have mentioned the potential ramifications
of that, but by doing it this way, it's possible. Just hope they don't use
this in a public library.

This basically redefines how sessions work for YOUR Tomcat, but it doesn't
sound like an arduous change, and you get all of the other Tomcat session
infrastructure for free. Your webapp won't be portable if you really on this
though, since you have to change Tomcat itself to make it work.

Regards,

Will Hartung
([EMAIL PROTECTED])


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



Re: SSL on multiple IP addreses?

2005-05-12 Thread Will Hartung
 From: David Wall [EMAIL PROTECTED]
 Sent: Thursday, May 12, 2005 10:31 AM

 How will you configure multiple IP addresses on a single NIC?  Normally,
 you have one NIC per IP address.  You will need to use two keystores for
 each system, and configure the keystores as you normally would under the
 SSL connector.  I'm not sure how to configure the CoyoteConnector so
 that it will listen on a particular IP address, but the docs no doubt
 explain how.

Just an FYI, it's pretty simple and common to have a single NIC listen to
multiple IP's. It's fairly trivial to do in Linux/Unix, and I know it's
possible in Windows, but I don't know the details of how to do it.

Regards,

Will Hartung
([EMAIL PROTECTED])


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



Realms and Filters question

2005-05-12 Thread Brett Parsons
Hi All,
I've implemented a custom realm and a custom filter for my webapp.  The idea 
is, I want the filter to handle incoming requests for ALL resources within 
the webapp while the realm is only going to handle several resources within 
the webapp.

The problem is, I need the filter to be called before the realm, but this 
doesn't seem to be happening.  Is there anyway to specify whether the realm 
or the filter gets hit first?

For instance, right now, my request is following this order:
Realm - Filter
But I want it to follow this order:
Filter - Realm
I appreciate any help you can provide !!!
Thanks,
Brett P

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


Admin Application messes up HTTPS Connectors in server.xml

2005-05-12 Thread Ankit Shah
Hi,
The Tomcat admin utility doesn't save the HTTPS connectors properly. It 
misses out the 'sslProtocol' attribute and this results in the failed 
connector. Does anyone have a fix around this?

The following is the current state of our server:
Tomcat 5.5.9 with 1.4.2 compatibility add-on.
JRE version 1.4.2_05

My Tests and results:
About certificates:
We are using our own keytool generated unsigned certificates. 
Everytime i point firefox to the admin app, it will present the 
certificate for my approval. I temporarily accept the certificate for my 
session.

1. Install tomcat, configure an HTTPS connector
Run the admin app and change a parameter (acceptCount in my case: 
raised it from 8 to 10) and click Save and then Commit Changes

Restart tomcat. Restart Firefox. Pointing the browser to the admin 
app homepage will not load anything.
No Certificate presented!!

2. Manually did a diff on server.xml and server.xml.backup . The 
difference is the missing 'sslProtocol' attribute. The docs say this 
attribute is optional, but that doesn't seem like the case. Added the 
attribute manually
sslProtocol=TLS

Restart Tomcat. Restart Firefox. Certificate presented. Admin App 
Homepage Loaded.

3. By seeing the server.xml written out by Admin app, it is clear that 
only attributes with non-default values are written out.
From the admin app, set SSL Protocol field's value to SSL. Save. 
Commit Changes

Restart Tomcat. Restart Firefox. NO Certificate Presented. Admin 
App homepage NOT loaded.

In server.xml - sslProtocol attribute is NOT written out.

I also inspected the logs (Generated by Log4J and logging level set to 
debug)

Upon save:
bean is updated with sslProtocol's new value
Upon Commit:
the list of attributes for the connector doesn't have sslProtocol 
as one of the attributes that will be written out

Can you help me how i can make admin application available for Tomcat 
administration by the assigned administrators? What fixes will be needed. 
If there are any known get-arounds for this.

Thanks in advance for all your help and appreciate your patience in 
reading through my email.

Ankit
PS: I can mail you the log files if you want (I have about 11 of them, 
each is 10M). Thanks once again



Sharing Data Sources

2005-05-12 Thread Cook, Jared
 
I have a lot of virtual hosts that need access to a lot of the same
databases.  Security isn't an issue because they are all trusted sites.  I
would like to be able to share the ResourceLinks across all the virtual
hosts without having to have them all defined in every ROOT.xml.  Is there a
way to include a file in all my conf files?  Is there a way to globally
share out these datasources?
 
Thanks.


Re: SSL on multiple IP addreses?

2005-05-12 Thread David Wall
That's very cool.   Didn't even know it was possible. 

I hope the original question has been answered in terms of creating 
multiple SSL connectors and having each point to a different keystore, 
since each keystore will hold the cert for each domain name.

Trung Nguyen wrote:
You can configure multiple IP adresses on a single NIC and add new IP/domain 
name to the server.xml
To configure multiple IP address on a single NIC on Linux (RHEL):
1.  cd /etc/sysconfig/network-scripts
2.  Make a copy of ifcfg-eth0 to ifcfg-eth0:0
3.  Edit ifcfg-eth0:0 and change DEVICE to eth0:0 and change the IPADDR to new 
IP
You can do this as many as you want by increase the last number by 1.
Hope this help.
Trung
 

 

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


Re: SSL on multiple IP addreses?

2005-05-12 Thread jejones
On Solaris:
Lets say the default interface is hme0, then all the aliases are hme0:1, 
hme0:2, hme0:3 - and so on...

ifconfig hme0:1 ip netmask netmask up
ifconfig hme0:2 ip netmask netmask up
each aliases having a different IP of course!
-jrj
Will Hartung wrote:
From: David Wall [EMAIL PROTECTED]
Sent: Thursday, May 12, 2005 10:31 AM
   

 

How will you configure multiple IP addresses on a single NIC?  Normally,
you have one NIC per IP address.  You will need to use two keystores for
each system, and configure the keystores as you normally would under the
SSL connector.  I'm not sure how to configure the CoyoteConnector so
that it will listen on a particular IP address, but the docs no doubt
explain how.
   

Just an FYI, it's pretty simple and common to have a single NIC listen to
multiple IP's. It's fairly trivial to do in Linux/Unix, and I know it's
possible in Windows, but I don't know the details of how to do it.
Regards,
Will Hartung
([EMAIL PROTECTED])
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 


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


Re: Session Creation fails without proxy

2005-05-12 Thread Kannan V
Hello:

Problem Identified. The application works fine with or without proxies with 
Mozilla. So we narrowed down our problem to Browser and found that the privacy 
setting of IE should be low to allow a third part cookie and that solved the 
problem. 

thanks and regards,

-- Kannan.
- Original Message -
From: Kannan V [EMAIL PROTECTED]
To: tomcat-user@jakarta.apache.org
Subject: Session Creation fails without proxy
Date: Thu, 12 May 2005 13:51:40 -0500

 
 Hello:
I am facing a very strange problem in our production 
 environment. We are using Tomcat 4.1.29 version. We have two 
 applications, one modelled with SOFIA and another with Webwork. The 
 two applications are running on different servers and from the 
 SOFIA application, the WebWork application is called by absolute 
 url from a link and loaded into an iframe within the SOFIA 
 application page.
 
   The problem is that if  Proxy for LAN is NOT set in IE, then 
 the first session created for the webwork application on clicking 
 the link from SOFIA application is lost forever. That is, when i 
 click on the link to the webwork applcation, a session object is 
 created and the page is rendered. Then when the webwork application 
 page is submitted, a second (new)session object is created so the 
 first session scope objects are lost. This leads to application 
 error. So on debugging I found that if the lan proxy is NOT set, 
 the second request (Webwork submission) doesn't have JSESSIONID in 
 the cookies collection of the request header. If proxy is set, the 
 header contains JSESSIONID cookie and every thing works fine.
 
 The browser is cookie-enabled and every thing works fine if the 
 request is coming thru proxy. I also tried with Tomcat 5.0 but the 
 behaviour is same. Does anyone has a clue of what is happening?
 
 thanks and regards,
 
 -- Kannan.
 
 --
 ___
 Sign-up for Ads Free at Mail.com
 http://promo.mail.com/adsfreejump.htm
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-- 
___
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm


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



Re: How get www.site.com homepage requests to forward to Tomcat without a redirect?

2005-05-12 Thread PAlvin
Removing the [R] from the RewriteRule breaks everything and no page
is served:

RewriteRule ^/$ /home.htm  **does not work**

I'm curious: how does everyone else map the domain request to an
actual page???

domain.com --to-- domain.com/home.htm

Everyone must be doing this, right?  What are other solutions for
doing this?

Pete



On Mon, 25 Apr 2005 08:13:19 +0200, Trond G. Ziarkowski wrote:
Hi,

try removing the [R] from your RewriteRule. If you read up on the
mod_rewrite docs, you should see that the [R] flag is causing the
redirect.

Trond

PAlvin wrote:

I'm currently using Tomcat 4.

When someone goes to my site, say, www.site.com, I'd like it run a
servlet for the home page instead of a static page (my entire site
is
dynamic).

I configured the connector to send all *.htm files to Tomcat and I
created a re-write rule in the Apache configuration file like this:

RewriteEngine on
RewriteRule ^/$ /home.htm [R]

This works great, EXCEPT, that the browser is sent a redirect and I
heard that is bad for search engines.

I could send *all* http requests to tomcat, BUT, obviously, I DON'T
want Tomcat serving up images.

So, is there any way to configure Apache and/or Tomcat to make:

www.site.com ---run-- www.site.com/home.htm

without a redirect?

How do I get www.site.com requests to go to Tomcat???

Peter Alvin
mobile 719-210-3858
skype 'smartmicro'








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







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







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



RE: How get www.site.com homepage requests to forward to Tomcat without a redirect?

2005-05-12 Thread Trung Nguyen
Put these lines into web.xml file

welcome-file-list
welcome-filehome.htm/welcome-file
/welcome-file-list

Hope this help!

Trung


-Original Message-
From: PAlvin [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 12, 2005 5:31 PM
To: Tomcat Users List
Subject: Re: How get www.site.com homepage requests to forward to Tomcat
without a redirect?


Removing the [R] from the RewriteRule breaks everything and no page 
is served:

RewriteRule ^/$ /home.htm  **does not work**

I'm curious: how does everyone else map the domain request to an 
actual page???

domain.com --to-- domain.com/home.htm

Everyone must be doing this, right?  What are other solutions for 
doing this?

Pete



On Mon, 25 Apr 2005 08:13:19 +0200, Trond G. Ziarkowski wrote:
Hi,

try removing the [R] from your RewriteRule. If you read up on the
mod_rewrite docs, you should see that the [R] flag is causing the
redirect.

Trond

PAlvin wrote:

I'm currently using Tomcat 4.

When someone goes to my site, say, www.site.com, I'd like it run a
servlet for the home page instead of a static page (my entire site
is
dynamic).

I configured the connector to send all *.htm files to Tomcat and I
created a re-write rule in the Apache configuration file like this:

RewriteEngine on
RewriteRule ^/$ /home.htm [R]

This works great, EXCEPT, that the browser is sent a redirect and I
heard that is bad for search engines.

I could send *all* http requests to tomcat, BUT, obviously, I DON'T
want Tomcat serving up images.

So, is there any way to configure Apache and/or Tomcat to make:

www.site.com ---run-- www.site.com/home.htm

without a redirect?

How do I get www.site.com requests to go to Tomcat???

Peter Alvin
mobile 719-210-3858
skype 'smartmicro'








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







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







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


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



Re: How get www.site.com homepage requests to forward to Tomcat without a redirect?

2005-05-12 Thread Jason Bainbridge
On 5/12/05, PAlvin [EMAIL PROTECTED] wrote:
 Removing the [R] from the RewriteRule breaks everything and no page
 is served:
 
 RewriteRule ^/$ /home.htm  **does not work**
 
 I'm curious: how does everyone else map the domain request to an
 actual page???
 
 domain.com --to-- domain.com/home.htm
 
 Everyone must be doing this, right?  What are other solutions for
 doing this?

Am I missing something here or do you just need:

welcome-file-list
welcome-fileindex.html/welcome-file
welcome-fileindex.htm/welcome-file
welcome-fileindex.jsp/welcome-file
/welcome-file-list

in your web.xml or the same thing in Apache?



-- 
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.com

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



Sessions and keep-alives

2005-05-12 Thread Patrick Lacson
hi All!

I'm involved in a project that integrates two disparate web
applications: webapp A is using WebSphere and webapp B is using
Tomcat.

The integration involves Single Sign On, with webapp A being the
primary webapp from which webapp B is launched.  webapp B is launched
as a popup-window.

My question is: how can i ensure that while the user is working on the
webapp B popup, the parent window webapp A, does not time-out?

Thanks in advance!
-- 
Patrick

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



Realm and Filter question

2005-05-12 Thread Brett Parsons
Hi All,
I've implemented a custom realm and a custom servlet filter for my webapp.  
The idea
is, I want the filter to handle incoming requests for ALL resources within
the webapp while the realm is only going to handle several resources within
the webapp.

The problem is, I need the filter to be called before the realm, but this
doesn't seem to be happening.  Is there anyway to specify whether the realm
or the filter gets hit first?
For instance, right now, my request is following this order:
Realm - Filter
But I want it to follow this order:
Filter - Realm
I appreciate any help you can provide !!!
Thanks,
Brett P

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


Cannot access Tomcat from remote box

2005-05-12 Thread Vincent Yau
Hi:
I have a very odd error hope someone can tell me how to fix it.
I am not a new Tomcat user, been using it on and off for the last few years.
I never really dive into the setup as my need had always been very simple.
Today, I got hold of 2 boxes that I need to setup tomcat.  Both are
Linux.  One with Kernel 2.4, the other is 2.6.10.  I have a 3rd box
with Tomcat up and running that I setup a few months ago (version 5.0.28).
So I downloaded Tomcat 5.0.28 on box boxes earlier today.  They ran fine
with a local browser accessing it.  However, no other box on the network
can access it.  I got Connection Refused when trying to load
the front page from any other machine (http://thatbox:8080).
There is no firewall on either machine.  I have tried ping, ssh, scp, httpd 
and all traffic
goes through fine on both boxes.  I have also tried Tomcat version 5.0.28, 
5.5.7, 5.5.8.
I have also tried Java 1.4.2 and Java 1.5.

I have no idea why browser on the local host loaded the Tomcat front page
just fine but not from any other machine on the network.
Is there a new Tomcat option that disabled remote connection?
Thanks for any tip...
--Vincent
_
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/

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


RE: Form Based Authentication

2005-05-12 Thread David B. Saul
Never Mind - It was permissions on the tomcat-users.xml file. Duh!




-Original Message-
From: David B. Saul [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 12, 2005 7:37 PM
To: 'Tomcat Users List'
Subject: Form Based Authentication


Having a problem being challenged on Linux.

Form based using the tomcat-users.xml file works under windows.

However, when same code is deployed to Linux the page is never challenged.

I checked server.xml on both platforms as well as the specific webapp. Even
built a Hello World example to eliminate other stuff.

Any suggestions/ideas?

thanks
Dave


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


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



RE: How get www.site.com homepage requests to forward to Tomcat without a redirect?

2005-05-12 Thread PAlvin
Thanks, but it still doesn't work!  I removed the RewriteRule from
httpd.conf and added the welcome-file-list section to the web.xml
file.   Now, when I go to my vanilla domain (www.smartmicro.com) I
get this message:

Forbidden
You don't have permission to access / on this server.
Apache/2.0.47 (Unix) mod_ssl/2.0.47 OpenSSL/0.9.7b DAV/2 mod_jk/1.2.4
Server at www.smartmicro.com Port 80

It's as if Apache isn't even trying to forward the request to Tomcat.

What do you guys configure, next, to get www.domain.com requests to
be processed by Tomcat?

Peter Alvin
mobile 719-210-3858
skype 'smartmicro'


On Thu, 12 May 2005 17:41:27 -0400, Trung Nguyen wrote:
Put these lines into web.xml file

welcome-file-list
welcome-filehome.htm/welcome-file
/welcome-file-list

Hope this help!

Trung


-Original Message-
From: PAlvin [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 12, 2005 5:31 PM
To: Tomcat Users List
Subject: Re: How get www.site.com homepage requests to forward to
Tomcat
without a redirect?


Removing the [R] from the RewriteRule breaks everything and no page
is served:

RewriteRule ^/$ /home.htm  **does not work**

I'm curious: how does everyone else map the domain request to an
actual page???

domain.com --to-- domain.com/home.htm

Everyone must be doing this, right?  What are other solutions for
doing this?

Pete



On Mon, 25 Apr 2005 08:13:19 +0200, Trond G. Ziarkowski wrote:
Hi,

try removing the [R] from your RewriteRule. If you read up on the
mod_rewrite docs, you should see that the [R] flag is causing the
redirect.

Trond

PAlvin wrote:

I'm currently using Tomcat 4.

When someone goes to my site, say, www.site.com, I'd like it run a
servlet for the home page instead of a static page (my entire site
is
dynamic).

I configured the connector to send all *.htm files to Tomcat and I
created a re-write rule in the Apache configuration file like
this:

RewriteEngine on
RewriteRule ^/$ /home.htm [R]

This works great, EXCEPT, that the browser is sent a redirect and
I
heard that is bad for search engines.

I could send *all* http requests to tomcat, BUT, obviously, I
DON'T
want Tomcat serving up images.

So, is there any way to configure Apache and/or Tomcat to make:

www.site.com ---run-- www.site.com/home.htm

without a redirect?

How do I get www.site.com requests to go to Tomcat???

Peter Alvin
mobile 719-210-3858
skype 'smartmicro'







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








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







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


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





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



Form Based Authentication

2005-05-12 Thread David B. Saul
Having a problem being challenged on Linux.

Form based using the tomcat-users.xml file works under windows.

However, when same code is deployed to Linux the page is never challenged.

I checked server.xml on both platforms as well as the specific webapp.
Even built a Hello World example to eliminate other stuff.

Any suggestions/ideas?

thanks
Dave


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



Re: Cannot access Tomcat from remote box

2005-05-12 Thread Hassan Schroeder
Vincent Yau wrote:
Today, I got hold of 2 boxes that I need to setup tomcat.  Both are
Linux.  

So I downloaded Tomcat 5.0.28 on box boxes earlier today.  They ran fine
with a local browser accessing it.  However, no other box on the network
can access it.  I got Connection Refused when trying to load
the front page from any other machine (http://thatbox:8080).
There is no firewall on either machine.
Almost certainly wrong -- most new distros have iptables enabled by
default.
I have tried ping, ssh, scp, 
httpd and all traffic
goes through fine on both boxes. 
But have you tried `telnet thatbox 8080` -- which is what would
actually confirm there's something listening (unblocked) there? :-)
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.

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


  1   2   >