REALM and JNDI configuration

2007-01-30 Thread Alessandro Ilardo
I'm having some trouble when I attempt to authenticate myself into my 
web application using the REALM.
I always get the error login page. Would you have a look on my 
configuration reported belowe as for the first time I'm trying to 
connect it to the database via JNDI.

Thanks in advance for you support.

?xml version=1.0 encoding=UTF-8?
Context path=/allysia reloadable=true
   Resource name=jdbc/allysiaDB auth=Container 
type=javax.sql.DataSource

   username=allysia password=xxx
   driverClassName=org.gjt.mm.mysql.Driver
   url=jdbc:mysql://127.0.0.2:3306/test?autoReconnect=true 
maxActive=100 maxIdle=30

   maxWait=1/
   Realm className=org.apache.catalina.realm.DataSourceRealm
   name=jdbc/allysiaDB digest=MD5 localDataSource=true
   debug=99 roleNameCol=role userCredCol=password 
userNameCol=username

   userRoleTable=role userTable=user/
   Valve className=org.apache.catalina.valves.AccessLogValve
   directory=logs  prefix=allysia_access_log. suffix=.txt
   pattern=common resolveHosts=false/
/Context


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: session and AJP

2007-01-24 Thread Alessandro Ilardo

Ok, I think is better if I give the scenario:
A Tomcat 5.5 and JBoss are behind a firewall, they serve external 
request exclusively trough a connector used by an Apache HTTP reachable 
from Internet.
As I'm in a Tomcat mailing list I'll only refer to the sample 
application which is included in the Tomcat installation, but the same 
kind of error happens with JBoss.
(in the following code I omitted ONLY the domain in order to protect it, 
I hope it doesn't confuse)


calling this sample application directly from Tomcat I don't get any errors
http://saturn.domain.com:8080/jsp-examples/sessions/carts.htm

while if I try to get the same application trough Apache HTTP
http://www.xxx.eu/jsp-examples/sessions/carts.html
As soon as I try to submit the form I get the this error (perhaps from 
Apache HTTP)
Error. The file was not found. (filename = 
/etc/httpd/htdocs/jsp-examples/sessions/carts.jsp)


These are the Access Logs from Tomcat (the first attempt) and Apache 
HTTP (second attempt)
xx.xx.xx.185 - - [24/Jan/2007:10:36:51 +] GET 
/jsp-examples/sessions/carts.jsp?item=NIN+CDsubmit=add HTTP/1.1 200 2027

(it works)

Access log calling the same application, but passing from Apache HTTP / 
connector
xx.xx.xx.185 - - [24/Jan/2007:10:58:24 +] GET 
/jsp-examples/sessions/carts.jsp?item=X-files+moviesubmit=add HTTP/1.1 
404 94 http://www.xxx.eu/jsp-examples/sessions/carts.html; 
Mozilla/5.0 (X11; U; Linux i686; it; rv:1.8.0.3) Gecko/20060425 
SUSE/1.5.0.3-7 Firefox/1.5.0.3


Here belowe the configuration I'm using for the Virtual-Host on Apache 
HTTP and the worker

VirtualHost *:80
ServerName www.x.eu
JkMount /* tomcat559Saturn
/VirtualHost


worker.list=tomcat559Saturn,jboss322Pluto
worker.tomcat559Saturn.type=ajp13
worker.tomcat559Saturn.port=8009
worker.tomcat559Saturn.host=saturn.domain.com
worker.jboss322Pluto.type=ajp13
worker.jboss322Pluto.port=8009
worker.jboss322Pluto.host=pluto.domain.com

This what I think:
on both Tomcat and JBoss the problem occurs when I try to set values in 
the session. It only happens when I post the data trough Apache HTTP and 
the Connector.
I'm probably missing some configurations in the Virtual-Host which 
refers to cookies, session or path.


Can anyone tell me where is the problem and possibly how I can solve it?


Rainer Jung ha scritto:

[EMAIL PROTECTED] schrieb:
  

I'm trying to set up an AJP connector between Apache 2 (red hat) and
Tomcat 5.5 (red hat) running on two different servers.

VirtualHost *:80
ServerName server2.domain.com
DocumentRoot /var/www/html
JkMount /id/admin/* tomcat559
/VirtualHost



OK, no rules for jboss322, so we can ignore this worker.

  

worker.list=tomcat559,jboss322
worker.tomcat559.maintain=60



Drop the maintain line, it will not do anything.

  

worker.tomcat559.type=ajp13
worker.tomcat559.port=8009
worker.tomcat559.host=intServer.domain.com
worker.jboss322.maintain=60



Drop the maintain line, it will not do anything.

  

worker.jboss322.type=ajp13
worker.jboss322.port=8009
worker.jboss322.host=server3.domain.com

If I call the following url
http://server2.domain.com/id/admin/



/id/ or /im/ (which you wrote above)?

  

The web application running on Tomcat correctly asks me for a user
identification. Once I enter the user name and password a file not found
back to me.

Error. The file was not found. 
filename = /etc/httpd/htdocs/im/admin/index.jsp



Activate the access log in tomcat and check what's in the Tomcat access
log. Check if the URL occuring there is what you expect.

  

On Tomcat I get the following message
[Channel Socket] Connection timeout reached


I also made a test with the sample application which is included in the Tomcat 
installation.
 /jsp-examples/sessions/carts.html
and it reported the same kind of error while inside the firewall, with a url 
like this
http://intServer.domain.com:8080/jsp-examples/sessions/carts.html
the sample application works fine.



Which firewall?

  

I guess my problem is related to the session and connector.
Can anyone tell me how to fix it?


Thanks in advance

Regards
Alessandro Ilardo



Regards,

Rainer

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



session and AJP

2007-01-23 Thread alessandro . ilardo
I'm trying to set up an AJP connector between Apache 2 (red hat) and
Tomcat 5.5 (red hat) running on two different servers.

VirtualHost *:80
ServerName server2.domain.com
DocumentRoot /var/www/html
JkMount /id/admin/* tomcat559
/VirtualHost


worker.list=tomcat559,jboss322
worker.tomcat559.maintain=60
worker.tomcat559.type=ajp13
worker.tomcat559.port=8009
worker.tomcat559.host=intServer.domain.com
worker.jboss322.maintain=60
worker.jboss322.type=ajp13
worker.jboss322.port=8009
worker.jboss322.host=server3.domain.com

If I call the following url
http://server2.domain.com/id/admin/
The web application running on Tomcat correctly asks me for a user
identification. Once I enter the user name and password a file not found
back to me.

Error. The file was not found. 
filename = /etc/httpd/htdocs/im/admin/index.jsp

On Tomcat I get the following message
[Channel Socket] Connection timeout reached


I also made a test with the sample application which is included in the Tomcat 
installation.
 /jsp-examples/sessions/carts.html
and it reported the same kind of error while inside the firewall, with a url 
like this
http://intServer.domain.com:8080/jsp-examples/sessions/carts.html
the sample application works fine.

I guess my problem is related to the session and connector.
Can anyone tell me how to fix it?


Thanks in advance

Regards
Alessandro Ilardo

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat doesn't reload my classes

2006-10-06 Thread Alessandro Ilardo
I think that all the others problems I had were related to this 
configuration.
Anyway, I had an issue with data saved in the application scope which 
after the user switched from http to https was not anymore available, 
and now I understand why.


If you don't mind I'd like to ask a couple of questions more about 
Tomcat configuration and the reasons of why often  is  associated with 
Apache http
1. You mentioned about Apache modules which webapp may need. Excluding 
php, are there any other useful modules which are not available using 
Tomcat and Java technology?


2. I'm a programmer, and not an expert of SSl encryption and 
certificates, but is it true that to each network card or IP address can 
be only associated one certificate?


Thanks



--- Alessandro Ilardo
[EMAIL PROTECTED] wrote:
  

back to my problem: I discovered that the kindly
network administrator 
had configured two tomcat instances, one working
with apache connector 
for the normal http request and the other on a
different port for the 
ssl. Both instances get the classes from the same
directory, but 
apparently on the one set for the ssl, reload
attribute was disabled for 
some how. In another words it means that each time I
reloaded the tomcat 
I only did it for the http connection.



Not sure why he had two instances for HTTPS vs HTTP. 
Apache filters out the encryption and passes off to

Tomcat, so you should only have had to have Apache
with the certificate installed, one tomcat instance
(or multiple workers for session sharing), and there
you go.  Bad configuration.

  

I have to say that I didn't have an easy life with
Apache http connector 
and Tomcat, especially for what regards ssl. I
believe that for future 
I'll opt for using tomcat as standalone webserver
which to serve html 
pages too, instead to lose working days again.



Yes if you are not going to use any Apache modules for
anything it is a good option to just use Tomcat.  I
have a server running pure Tomcat, and I've had no
problems, though once you have the connector and SSL
setup for Apache there really isn't anything different
from a plain install.  What problems have you had
really?

Wade

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



tomcat doesn't reload my classes

2006-10-05 Thread Alessandro Ilardo

Hi there,
on a remote tomcat 5.5 webserver we uploaded new .class files, we 
reloaded at least three times trough the manager but anytime we test it, 
looks like the old files are still running.

The META-INF folder contain the following context.xml configuration file:
Context path= docBase=/home/virtual/*/fst/var/www/html/tomcat/ 
debug=0 reloadable=true
Realm className=org.apache.catalina.realm.JDBCRealm debug=0 
digest=MD5 driverName=org.gjt.mm.mysql.Driver 
connectionURL=jdbc:mysql://*** userTable=user userNameCol=user 
userCredCol=password userRoleTable=role roleNameCol=role/

/Context

which it seems be ok.
Any help are welcome,
thanks in advance.

Alessandro ilardo

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat doesn't reload my classes

2006-10-05 Thread Alessandro Ilardo
Your suggestion is appreciated, all my webapp implement the driver 
you've suggested, but regarding the Realm configuration I preferred 
follow the tomcat docs which says: The fully qualified Java class name 
of this Realm implementation. You *MUST* specify the value 
|org.apache.catalina.realm.JDBCRealm| here.  (see 
http://tomcat.apache.org/tomcat-5.0-doc/realm-howto.html).


back to my problem: I discovered that the kindly network administrator 
had configured two tomcat instances, one working with apache connector 
for the normal http request and the other on a different port for the 
ssl. Both instances get the classes from the same directory, but 
apparently on the one set for the ssl, reload attribute was disabled for 
some how. In another words it means that each time I reloaded the tomcat 
I only did it for the http connection.


I have to say that I didn't have an easy life with Apache http connector 
and Tomcat, especially for what regards ssl. I believe that for future 
I'll opt for using tomcat as standalone webserver which to serve html 
pages too, instead to lose working days again.


Thanks for your help



David Smith ha scritto:
On the outset, looks good to me.  Can you confirm the location of your 
new class files are where they belong inside of WEB-INF/classes of the 
webapp?  Are there any logging messages that might suggest tomcat 
isn't reading classes from the expected location?


This comment has nothing to do with your problem, just an 
observation.  The mysql driver name org.gjt.mm.mysql.Driver is very 
old and kept only for compatibility reasons.  The driver location is 
currently at com.mysql.jdbc.Driver.


--David

Alessandro Ilardo wrote:


Hi there,
on a remote tomcat 5.5 webserver we uploaded new .class files, we 
reloaded at least three times trough the manager but anytime we test 
it, looks like the old files are still running.
The META-INF folder contain the following context.xml configuration 
file:
Context path= 
docBase=/home/virtual/*/fst/var/www/html/tomcat/ debug=0 
reloadable=true
Realm className=org.apache.catalina.realm.JDBCRealm debug=0 
digest=MD5 driverName=org.gjt.mm.mysql.Driver 
connectionURL=jdbc:mysql://*** userTable=user 
userNameCol=user userCredCol=password userRoleTable=role 
roleNameCol=role/

/Context

which it seems be ok.
Any help are welcome,
thanks in advance.

Alessandro ilardo

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--

gent


 Alessandto Ilardo

[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]

NEVENT srl

Via Giardini 456/C - 41100 MODENA
Tel. 059.2929413 - Fax 059.2920320

www.nevent.it http://www.nevent.it
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Bundled Tomcat slow shut down

2006-09-12 Thread Alessandro Ilardo

Hi there,
I just installed NetBeans 5 wich has Tomcat 5 bundled.
I can start Tomcat without any trouble, but if I stop it, becomes really 
slow getting this error message on the screen:



12-set-2006 21.43.03 org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8084
12-set-2006 21.46.12 org.apache.catalina.connector.Connector pause
GRAVE: Protocol handler pause failed
java.net.ConnectException: Connection timed out
   at java.net.PlainSocketImpl.socketConnect(Native Method)
   at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
   at 
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)

   at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
   at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
   at java.net.Socket.connect(Socket.java:516)
   at java.net.Socket.connect(Socket.java:466)
   at java.net.Socket.init(Socket.java:366)
   at java.net.Socket.init(Socket.java:208)
   at 
org.apache.jk.common.ChannelSocket.unLockSocket(ChannelSocket.java:463)

   at org.apache.jk.common.ChannelSocket.pause(ChannelSocket.java:272)
   at org.apache.jk.server.JkMain.pause(JkMain.java:677)
   at 
org.apache.jk.server.JkCoyoteHandler.pause(JkCoyoteHandler.java:209)

   at org.apache.catalina.connector.Connector.pause(Connector.java:943)
   at 
org.apache.catalina.core.StandardService.stop(StandardService.java:491)
   at 
org.apache.catalina.core.StandardServer.stop(StandardServer.java:717)

   at org.apache.catalina.startup.Catalina.stop(Catalina.java:586)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:561)
   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:585)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
12-set-2006 21.46.13 org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
12-set-2006 21.46.13 org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8084

I hope you can help me.
Thanks in advance.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]