Re: cannot setup JNDI with MySQL

2005-10-06 Thread andy gordon
John, 
 
Possibly the following will help as it is listed in the 5.5 JDBC DataSource 
html page in the User guide: 
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html
 

Please note that JNDI resource configuration has changed somewhat between 
Tomcat 5.0.x and Tomcat 5.5.x. You will most likely need to modify your JNDI 
resource configurations to match the syntax in the example below in order to 
make them work in Tomcat 5.5.x 

 

With that said you can replace your specified parameters with the following 
from the mysql section of that page. 

 
  Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource
   maxActive=100 maxIdle=30 maxWait=1
   username=javauser password=javadude 
driverClassName=com.mysql.jdbc.Driver
   url=jdbc:mysql://localhost:3306/javatest?autoReconnect=true/

Hope this helps
 
- andy

John Cherouvim [EMAIL PROTECTED] wrote:
Hello

I've been trying to setup a mysql connection pool using JNDI as shown in 
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html
But no luck.

I never get to see the datasource registered Tomcat Administration Tool.
I've included in server.xml the following lines somewhere inside the 
.. 




factory 
org.apache.commons.dbcp.BasicDataSourceFactory 


driverClassName 
com.mysql.jdbc.Driver 


url 
jdbc:mysql://localhost:3306/dea?autoReconnect=true 



username myusername 


password mypassword 


maxActive 20 


maxIdle 10 


maxWait 40 




I have Tomcat/5.0.28

And the following files in common\lib
mysql-connector-java-3.1.10-bin.jar
commons-collections-3.1.jar
commons-dbcp-1.2.1.jar
commons-pool-1.2.jar
*

*What I get in tomcat\logs\stdout.log is:
NotifyUtil::java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:161)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148)
at java.net.Socket.connect(Socket.java:425)
at java.net.Socket.connect(Socket.java:375)
at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:366)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:582)
at sun.net.www.http.HttpClient.(HttpClient.java:292)
at sun.net.www.http.HttpClient.(HttpClient.java:253)
at sun.net.www.http.HttpClient.New(HttpClient.java:321)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:301)
at 
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:469)
at 
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:460)
at 
sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:516)
at 
org.netbeans.modules.web.monitor.server.NotifyUtil$RecordSender.run(NotifyUtil.java:237)


What did I miss? I've even tried setting up the JNDI in the 
conf\Catalina\localhost\myapp.xml
And also tried instead of 

I also tried all that with the org.gjt.mm.mysql.Driver

Regards,
I.

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



-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 

Re: cannot setup JNDI with MySQL

2005-10-06 Thread andy gordon
One more thing and i may have missed it in your note: Did you say you placed 
mysql's jar file in the common\lib directory ?

John Cherouvim [EMAIL PROTECTED] wrote:Hello

I've been trying to setup a mysql connection pool using JNDI as shown in 
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html
But no luck.

I never get to see the datasource registered Tomcat Administration Tool.
I've included in server.xml the following lines somewhere inside the 
.. 




factory 
org.apache.commons.dbcp.BasicDataSourceFactory 


driverClassName 
com.mysql.jdbc.Driver 


url 
jdbc:mysql://localhost:3306/dea?autoReconnect=true 



username myusername 


password mypassword 


maxActive 20 


maxIdle 10 


maxWait 40 




I have Tomcat/5.0.28

And the following files in common\lib
mysql-connector-java-3.1.10-bin.jar
commons-collections-3.1.jar
commons-dbcp-1.2.1.jar
commons-pool-1.2.jar
*

*What I get in tomcat\logs\stdout.log is:
NotifyUtil::java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:161)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148)
at java.net.Socket.connect(Socket.java:425)
at java.net.Socket.connect(Socket.java:375)
at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:366)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:582)
at sun.net.www.http.HttpClient.(HttpClient.java:292)
at sun.net.www.http.HttpClient.(HttpClient.java:253)
at sun.net.www.http.HttpClient.New(HttpClient.java:321)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:301)
at 
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:469)
at 
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:460)
at 
sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:516)
at 
org.netbeans.modules.web.monitor.server.NotifyUtil$RecordSender.run(NotifyUtil.java:237)


What did I miss? I've even tried setting up the JNDI in the 
conf\Catalina\localhost\myapp.xml
And also tried instead of 

I also tried all that with the org.gjt.mm.mysql.Driver

Regards,
I.

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




-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 

Re: Setting environment variables in server.xml.

2005-10-04 Thread andy gordon
David, 
 
Just in case you haven't done this yet, have you checked to see if the 
environment variable shows up as a catalina:type=Environment MBean? if so you 
should be able to access it. Hope this helps. 
 
- andy gordon

David Kerber [EMAIL PROTECTED] wrote:
If I'm reading it correctly, according to the docs, I should be able to 
set an environment variable in server.xml, like the built-in example:




Unfortunately, I can't get this to work; I can't read in simpleValue, or 
the ones I really want to do when they are defined in server.xml. But I 
have no problems when I put them into the application's web.xml; they 
come in just fine using the InitialContext stuff from the docs. Is 
there something extra I need to do to make them visible from server.xml?

Thanks,
Dave

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



-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 

Re: Setting environment variables in server.xml.

2005-10-04 Thread andy gordon
if you are using 5.5x you can look at the mbean with jmxproxy which is part of 
the manager app.

David Kerber [EMAIL PROTECTED] wrote:Nope, never heard of that one. I'll see 
if I can figure out how to get 
at that type.


andy gordon wrote:

David, 
 
Just in case you haven't done this yet, have you checked to see if the 
environment variable shows up as a catalina:type=Environment MBean? if so you 
should be able to access it. Hope this helps. 
 
- andy gordon

David Kerber wrote:
If I'm reading it correctly, according to the docs, I should be able to 
set an environment variable in server.xml, like the built-in example:




Unfortunately, I can't get this to work; I can't read in simpleValue, or 
the ones I really want to do when they are defined in server.xml. But I 
have no problems when I put them into the application's web.xml; they 
come in just fine using the InitialContext stuff from the docs. Is 
there something extra I need to do to make them visible from server.xml?

Thanks,
Dave
 




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




-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 

Re: JMX Method to check JDBC connection acivity?

2005-09-28 Thread andy gordon
Edmon, 
 
Did you get an answer to your question?
 
I found your question quite interesting. I ran some tests and received the same 
error (RMI permission) as you. I used JConsole as well as looked at JMXProxy 
and could not determine if my datasource (in this case MySQL) was running or 
not. The informatio available via JMX was the same whether MySQL was started or 
not. 
 
I am wondering if creating your own MBean is the appropriate way to test the 
connection.   
 
Let me know how this comes out. 
 
- Andy Gordon

Edmon Begoli [EMAIL PROTECTED] wrote:
Is there a handy MBean in Tomcat that would allow me to do on demand check
if the connection to the database is up?

I've looked at DataSource but that one does not expose getConnection, and
the one that requires username and password throws RMI permission exception.
I would really like to have something simple as can connect or similar.

--
Thank you,
Edmon Begoli
http://blogs.ittoolbox.com/eai/software


-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 

Re: How to configure a single JDBC connection via Tomcat's JDBC JNDI configurations for Oracle

2005-09-27 Thread andy gordon
The attribute maxactive controls how big the pool is. if maxactive is set to 1 
then there can be only 1 per time. There are also non-dbcp solutions which have 
oracle examples described under JDBC datasources link in tomcat 5.5 doc at 
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html
 
good luck
 
- andy gordon

Edmon Begoli [EMAIL PROTECTED] wrote:
Anyone,

I want to configure Tomcat 5.5.x to access each database in the Oracle
cluster, and not using the pool.
This configuration is for database diagnostic puproses, so I need to create
a single connection everytime.

What is the most appropriate way to this using Oracle driver?

Currently I am doing this:

 
auth=Container
driverClassName=oracle.jdbc.driver.OracleDriver
type=javax.sql.DataSource
username=
password=

url=jdbc:oracle:thin:@
maxActive=1
maxIdle=1
maxWait=-1
removeAbandoned=true
logAbandoned=true
removeAbandonedTimeout=300 /

--
Thank you,
Edmon Begoli
http://blogs.ittoolbox.com/eai/software


-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 

Re: someone familar with this error?

2005-09-22 Thread andy gordon
Leon, 
 
Not sure if this will help, but it looks like there was an error when 
registering MBeans. Did make any modifications with the Coyote Connnector? This 
is the connector that integrates with Apachr or IIS for example. 
 
- andy

Leon Rosenberg [EMAIL PROTECTED] wrote:
starting tomcat:

22.09.2005 12:41:27 org.apache.coyote.tomcat5.MapperListener init
WARNUNG: Error registering contexts
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:782)
at java.util.HashMap$EntryIterator.next(HashMap.java:824)
at java.util.HashMap.putAllForCreate(HashMap.java:424)
at java.util.HashMap.clone(HashMap.java:656)
at mx4j.server.DefaultMBeanRepository.clone(DefaultMBeanRepository.java:56)
at mx4j.server.MBeanServerImpl.findMBeansByPattern(MBeanServerImpl.java:1603)
at mx4j.server.MBeanServerImpl.queryObjectNames(MBeanServerImpl.java:1568)
at mx4j.server.MBeanServerImpl.queryMBeans(MBeanServerImpl.java:1512)
at org.apache.coyote.tomcat5.MapperListener.init(MapperListener.java:115)
at org.apache.coyote.tomcat5.CoyoteConnector.start(CoyoteConnector.java:1510)

tomcat 5.0.25, jdk1.4, winxp

-
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 

Re: Asking again: index.jsp and virtual directories

2005-09-22 Thread andy gordon
David, 
 
Have you looked at setting up virtual hosts in tomcat as this seems to be what 
you are looking for.
 
- andy gordon

David Thielen [EMAIL PROTECTED] wrote:
Hi;

I am running on Windows 2003/IIS 6.0  tomcat. I have a single IP address
for all of my websites (I have several) and then use the request header to
determine which website to return. IIS does this very nicely.

I want to have index.jsp in each of these websites. How can I set it up so
that when isapi_redirect calls tomcat, it knows which website's index.jsp to
use? The solution JRun uses is it will look in the IIS directory of the
website for the jsp file. But I tried that with tomcat and it didn't work.

Is there a way to do this?

Thanks - dave

Ps - to see what I mean, you can go to:
http://www.windward.net or http://jasmine.windward.net/windward/
http://www.windwardreports.com or
http://jasmine.windward.net/windwardreports/



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



-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 

Re: ACCESSING TOMCAT JMX SUPPORT REMORTELY VIA THE RMI CONNECTOR

2005-09-21 Thread andy gordon
Dirk is correct you need to check out the doc in order to understand your 
options. To add a little specificity to your challenge, you need to do at least 
the following to get going: 
 
1) set remote monitoring options when you are starting the JVM. This can be 
accomplished multiple ways. One place is in catalina.bat

1) set remote monitoring port   -Dcom.sun.management.jmxremote.port=
2) turn on remote monitoring-Dcom.sun.management.jmxremote

there are others for SSL and authentication and you have to decide if 
they are needed.

2)  create the RMI connector client in a very small bit of java code as well as 
establish as use the MBeanServerConnection class to access TOMCAT domains and 
MBeans.

 

THis is probably about a 1/2 dozen LOC to gain access and there are examples to 
be found.

 

You can use JConsole (JMX monitoring from SUN)  which is located in the JDK 1.5 
BIN directory to validate configuration tasks without any coding or installing 
any other software. 

 

hope this helps. 

 

- andy  
 

Dirk Weigenand [EMAIL PROTECTED] wrote:
Hi,

 --- Ursprüngliche Nachricht ---
 Von: jiang ying 
 An: tomcat-user@jakarta.apache.org
 Betreff: ACCESSING TOMCAT JMX SUPPORT REMORTELY VIA THE RMI CONNECTOR
 Datum: Wed, 21 Sep 2005 16:26:00 +0800
 
 hi, I know the way to access Tomcat JMX support via http adaptor.
 I also know how to monitor an application via JMX by registering an 
 mbeanserver.
 But I really confused about accessing Tomcat JMX support via RMI
 connector:
 1. how to configure Mx4j RMI connector with Tomcat 5.5, since only 
 Activating JMX MX4J Http Adaptor could be found in the Tomcat website.
 2. after configuring RMI connector, how can I access Tomcat JMX support 
 programmatically? I am not clear about the mbeanserver that tomcat mbeans 
 has been registed. How can I make use of the connector, thread pool, 
 servlet information that Tomcat has already monitored and controlled.
 Thank you. 
 :)
 

Have a look at
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/monitoring.html.

You can then use e.g. MC4J (http://mc4j.org/confluence/display/MC4J/Home?)
for monitoring Tomcat.

Regards
Dirk

-- 
GMX DSL = Maximale Leistung zum minimalen Preis!
2000 MB nur 2,99, Flatrate ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl

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





-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 

Re: conf/tomcat-users.xml syntax and semantics

2005-09-21 Thread andy gordon

A realm, in this case the UserDatabase realm is simply a collection of users, 
passwords, and roles. You could also think of a role as a group. It identifies 
valid users of a web application (or set of web applications), plus an 
enumeration of the list of roles associated with each valid user.

 

You should be able to assign user names and passwords ok. Then you assign users 
to responsibilities i.e. roles such as manager. 

 

Realms may be defined at the Engine, Host, or Context level. The UserDataBase 
realm is at the engine level i..e the top level. Host and context are 
subordinate levels and their scope is limited to the host or web application 
(context) level and are defined there (with the web app or host). 

 

listed below is an example: 

 

tomcat-users
  role rolename=tomcat/
  role rolename=role1/
  role rolename=manager/
  role rolename=admin/
  user username=singleton password=paul roles=admin,manager/
  user username=tomcat password=tomcat roles=tomcat/
  user username=both password=tomcat roles=tomcat,role1/
  user username=role1 password=tomcat roles=role1/
  user username=admin password=admin roles=admin,manager/
/tomcat-users 

 

 

notice that userid singleton has a password of paul and has the role of admin 
and manager meaning that singleton can access applications that require admin 
or manager privileges in order to be used.

 

hope this helps.

 

- andy


Paul Singleton [EMAIL PROTECTED] wrote:
What is the correct syntax (for 5.5.9 and later) of
conf/tomcat-users.xml, and what do the entries mean?
(I've read the docs, but still don't really get it)

Should I put
or

Are these entries




purely illustrative and can they be deleted? (I prefer to keep
documentation elsewhere)

Is 'standard' a built-in role, and if so what is it for?

Finally (for now) I don't understand why my tomcat-users.xml
gets touched (at least) at each restart, and has its permissions
reset (from -rw--- to -rw-rw-r--)

Paul Singleton


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.3/107 - Release Date: 20/Sep/2005


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



-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 

Re: Unable to login Tomcat Manager?

2005-09-21 Thread andy gordon
if you enable the jdbc realm then authentication and authorizaiton comes from a 
jdbc datasource not the tomcat.uses.xml file. This is why tomcat keeps asking 
you for a user name and password. I suggest you read the realm how to on the 
tomcat website so you can correct your problem.
 
- andy

±ç¬±³õ [EMAIL PROTECTED] wrote:
I have enabled JDBCRealm with MD5 in server.xml Tomcat 5.5.
Then I am not able to login Tomcat Manager.
When I click Tomcat Manager,
I input the username and password in tomcat-users.xml,
it keeps on prompting me username and password.
I wonder if the old password is not encrypted by MD5.
Then I encrypt the password by MD5 and put into tomcat-users.xml.



Still the same?

-
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 

Re: Unable to login Tomcat Manager?

2005-09-21 Thread andy gordon
I suggest you read the JDBC realm documentation and be exact about what it 
says. 
Do you have a table called USERS?  Make sure its populated correctly. 
do you have a table called USER_ ROLES? Make sure it is populated correctly. 
You should be able to understand the relationships between the two tables 
Username to Username/Role
 
I think you are close but off just a bit.
 
again follow the quick start guide in the documentation and you should have it.
 
good luck, 
 
Andy Gordon

±ç¬±³õ [EMAIL PROTECTED] wrote:
However I go into http://localhost:8080/erp
It is ok.

I have added record to user_profile, user_role

Table: user_role
usernm role_name
admin Administrator
admin Manager
admin admin

The error message becomes
Access to the requested resource has been denied

Why?


2005/9/22, æ¢ç‚³å ´ 
:
 However I go into http://localhost:8080/erp
 It is ok.

 I have added record to user_profile, user_role

 Table: user_role
 usernm role_name
 admin Administrator
 admin Manager
 admin admin

 The error message becomes
 Access to the requested resource has been denied

 Why?


 2005/9/22, andy gordon :
  if you enable the jdbc realm then authentication and authorizaiton comes
  from a jdbc datasource not the tomcat.uses.xml file. This is why tomcat
  keeps asking you for a user name and password. I suggest you read the realm
  how to on the tomcat website so you can correct your problem.
 
  - andy
 
  ±ç¬±³õ 
wrote:
  I have enabled JDBCRealm with MD5 in server.xml Tomcat 5.5.
  Then I am not able to login Tomcat Manager.
  When I click Tomcat Manager,
  I input the username and password in tomcat-users.xml,
  it keeps on prompting me username and password.
  I wonder if the old password is not encrypted by MD5.
  Then I encrypt the password by MD5 and put into tomcat-users.xml.
 
 
 
  Still the same?
 
  -
  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


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

Re: jdbc driver

2005-09-19 Thread andy gordon
is the MySQL Connector Jar file in the $CATALINA_HOME/common/lib  directory?

Kito Holliday [EMAIL PROTECTED] wrote:Attempting to use connector-java-3.3.10 
with tomcat 4.0 and mysql and
servlets. The Java code:
InitialContext ctx = new InitialContext();
DataSource ds = (DataSource)lookup(jdbc/TestDB);

throws the exception:
Exception creating DataSource: org.hsql.jdbcDriver

The problem is that my .xml files never mentions the hsql jdbcDriver.
Obviously tomcat is ignoring my 

Specifically, I have a web.xml having:
**

PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;


DB Connection
jdbc/TestDB
javax.sql.DataSource
Container


***

and a server.xml having

*Sorry for the long server.xml**



port=8080 minProcessors=5 maxProcessors=75
enableLookups=true redirectPort=8443 acceptCount=10
debug=0 connectionTimeout=6 /

prefix=standaloneEngine_log. suffix=.txt
timestamp=true/


directory=logs prefix=localhost_access_log. suffix=.txt
pattern=common /
directory=logs prefix=standaloneHost_log. suffix=.txt
timestamp=true /

privileged=true
prefix=standalone_manager_log. suffix=.txt
timestamp=true /

reloadable=true crossContext=true
prefix=standalone_examples_log. suffix=.txt
timestamp=true /
value=15 /

override=false /
type=javax.mail.Session /


mail.smtp.host
localhost




crossContext=true
prefix=standalone_DBTest_log. suffix=.txt
timestamp=true /
type=javax.sql.DataSource
driverClassName=com.mysql.jdbc.Driver /



factory
org.apache.commons.dbcp.BasicDataSourceFactory




factory
com.mysql.jdbc.jdbc2.optional.
MysqlConnectionPoolDataSource




maxActive
100




maxIdle
30




maxWait
1




username
javauser




password
javadude




driverClassName
com.mysql.jdbc.Driver




url
jdbc:mysql://localhost:3306
/javatest?autoReconnect=true




removeAbandoned
true




removeAbandonedTimeout
60




logAbandoned
true








prefix=tomcat_apache_service. suffix=.txt
timestamp=true/
port=8008 minProcessors=5 maxProcessors=75
enableLookups=true appBase=webapps acceptCount=10
debug=0 /
name=Apache localHost=127.0.0.1 debug=5
prefix=tomcatapacheEngine. suffix=.txt timestamp=true/

unpackWARs=true
directory=logs prefix=tomcatapacheHost_log.
suffix=.txt timestamp=true /

reloadable=true crossContext=true useNaming=false
prefix=tomcatapache_DBTest_log. suffix=.txt
timestamp=true /
type=javax.sql.DataSource
driverClassName=com.mysql.jdbc.Driver
username=javauser password=javadude
url=jdbc:mysql://localhost:3306
/javatest?autoReconnect=true
factory=org.apache.commons.dbcp.
BasicDataSourceFactory
maxActive=100
maxIdle=30
validationQuery=SELECT 1
testOnBorrow=true
testWhileIdle=true
timeBetweenEvictionRunsMillis=1
minEvictableIdletime=6
maxWait=1
removeAbandoned=true
removeAbandonedTimeout=60
logAbandoned=true /

- privileged=true
prefix=apachetomcat_manager_log. suffix=.txt
timestamp=true /

reloadable=true crossContext=true
prefix=apachetomcat_examples_log. suffix=.txt
timestamp=true /
value=15 /

override=false /
type=javax.mail.Session /



mail.smtp.host
localhost









-
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 

Manager error 'FAIL - Invalid context path null was specified'

2005-09-03 Thread Andy

Hi All,

I'm trying to configure the manager application with virtual
hosts.

When I request a reload like this -

http://testxtb.example.com/manager/reload?xtb

I get this response-

FAIL - Invalid context path null was specified

However according to this page -

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/manager-howto.html

This is a valid syntax, as 'xtb' is my web application name in the
webapps directory - my web application works fine btw, and so does the
manager's list command.

I can only think I haven't understood something correctly, and my
configuration is somehow wrong.

It would be great if somebody could tell me what's wrong so I don't
spend an entire weekend on this. My config follows -

$CATALINA_HOME/conf/server.xml (chopped)

Engine name=Catalina defaultHost=testxtb.example.com

Host name=testxtb.example.com appBase=C:\Program Files\Apache
Software Foundation\Tomcat 5.5\webapps
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false

... chopped ...

/Host

/Engine

$CATALINA_HOME/conf/Catalina/testxtb.example.com/context.xml.default


Context docBase=xtb
 privileged=true antiResourceLocking=false
antiJARLocking=false

/Context


$CATALINA_HOME/conf/Catalina/testxtb.example.com/manager.xml
-

Context docBase=${catalina.home}/server/webapps/manager
 privileged=true antiResourceLocking=false
antiJARLocking=false

  !-- Link to the user database we will get roles from --
  ResourceLink name=users global=UserDatabase
type=org.apache.catalina.UserDatabase/

/Context


$CATALINA_HOME/webapps/xtb/
--

Web application files under this directory - this is why
reload?xtb should work.


Thanks,

Andy.





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



mysql, Tomcat and Connector/mxj

2005-08-19 Thread andy gordon
All, 
 
Has anyone successfully run Connector MXJ successfully with Tomcat, Standalone, 
or with JBoss? 
Connector MXJ allows you to manage MySQL databases through JDBC or JMX MBeans.
 
- andy



-
 Start your day with Yahoo! - make it your home page 

Tomcat 5.0.28 and JPDA

2005-07-31 Thread Andy Yang
Hi there,

I'm just trying to start up a standalone instance of
Tomcat 5.0.28 in a Windows XP environment
(non-service) with JPDA and I'm getting the following
error when I execute: catalina.bat jpda run

Error [2] in connect() call!
err:: No such file or directory
Socket transport failed to init.
Transport dt_socket failed to initialize, rc = -1.
FATAL ERROR in native method: No transports
initialized

I'm getting this while running Tomcat with JDK
1.4.2_04. The full startup command is:

c:\j2sdk1.4.2_04\bin\java   -Xdebug -Xrunjdwp:tra
nsport=dt_socket,address=8000 ,server=y,suspend=n 
-Djava.endorsed.dirs=D:\jaka
rta-tomcat-5.0.28\common\endorsed -classpath
c:\j2sdk1.4.2_04\lib\tools.jar;D:
\jakarta-tomcat-5.0.28\bin\bootstrap.jar
-Dcatalina.base=D:\jakarta-tomcat-5.0
.28 -Dcatalina.home=D:\jakarta-tomcat-5.0.28
-Djava.io.tmpdir=D:\jakarta-tom
cat-5.0.28\temp org.apache.catalina.startup.Bootstrap
 start

Has anyone come across this? I was originally running
Tomcat using JDK 1.5 - but ran into similar problems
trying to get debug working. Would there be any
compiled artifacts hanging around that might be
throwing Tomcat off?

Could a software firewall be interfering with things?

Thanks for your time,
Andy

__
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]



xml, jse1.5 and the endorsed directory

2005-07-12 Thread Andy Kriger
Does jse1.5 still require using the endorsed directory to override the
built-in parser?

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



How do you set up JMX remote for Tomcat 5.5.9?

2005-07-07 Thread andy gordon
 Help, 
 
How do you set up JMX remote for Tomcat 5.5.9? 
 
For instance where do you specify the JVM startup option 
 
-Dcom.sun.management.jmxremote.port=9998 
 
that enables remote monitoring and management? 
 
THank you 
 
- andy



-
 Sell on Yahoo! Auctions  - No fees. Bid on great items.

Re: How do you set up JMX remote for Tomcat 5.5.9?

2005-07-07 Thread andy gordon
Thank you for the info but I don't think it helped. Your insight is valued. 
 
I set an environment variable called JAVA_OPTS to 
 
-Dcom.sun.management.jmxremote.port=9998 
 
and started tomcat using startup.bat.  The cmd window opened and closed. 
Meaning tomcat didn't start. Suggestions?  
 
I have not done anything else at this point with respect to enabling JMX remote.
 
Thank you 
 
- andy

Tim Funk [EMAIL PROTECTED] wrote:
http://jakarta.apache.org/tomcat/faq/misc.html#properties

-Tim

andy gordon wrote:

 Help, 
 
 How do you set up JMX remote for Tomcat 5.5.9? 
 
 For instance where do you specify the JVM startup option 
 
 -Dcom.sun.management.jmxremote.port=9998 
 
 that enables remote monitoring and management? 
 

-
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 

Convert URL path from directory/ to directory/index.htm (Spring related)

2005-06-29 Thread Andy

Hi,

Is there anyway to get Tomcat to convert a request such as
myserver.com/directory into myserver.com/directory/index.htm.

The reason for this is that in Spring you have to specify a
wild card to match against the URL path in order to invoke
the DispatcherServlet, if this wild card is *.htm then a
requested without index.htm in it results in a 404 from Tomcat.

i.e. myserver.com/directory
 - gives a 404 response
 myserver.com/directory/index.htm
 - invokes Spring to deal with the request

Perhaps this is an issue I can solve within Spring but
thought I'd try the Tomcat angle first.

This is what I have in my web.xml for Spring -

servlet
servlet-nameabc/servlet-name

servlet-classorg.springframework.web.servlet.DispatcherServlet/servlet-cl
ass
load-on-startup1/load-on-startup
/servlet

servlet-mapping
servlet-nameabc/servlet-name
url-pattern*.htm/url-pattern
/servlet-mapping


Thanks,

Andy.






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



Please help with PermGen OutOfMemory error

2005-06-27 Thread Andy Kriger
After many webapp installs, I get this in my tomcat logs...

Exception in thread
ContainerBackgroundProcessor[StandardEngine[Catalina]]
java.lang.OutOfMemory
Error: PermGen space

MaxPermSize=128m, but the errors still happen. I understand that this
comes from apps not releasing all their resources. How do I track down
what part of my app is leaving these resources behind? I'm hoping for
pointers to tools/articles/blog entries - anything that'll let me
isolate this problem (hopefully to a part of my code that I can
actually fix as opposed to third party code I have no control over).

thx
andy

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



help needed with UTFDataFormatException

2005-06-23 Thread Andy Kriger
Hello. I have a Tomcat 5.5.8 based web application running an Axis
1.2.0 driven web service. When I run a certain chunk of code doing
XSLT transformations, the code fails with There was an error while
transforming document - java.io.UTFDataFormatException: Invalid byte 1
of 1-byte UTF-8 sequence.

I can run this code outside of Tomcat without any problem (using
command-line JUnit tests). However, if I run the code from a JSP page
or using my web service, it fails with that error.

Xerces and Xalan are definitely the same version (System.out with
their respective Version objects shows the same info). I am attaching
the XSLT file in question in case anyone can see something I can't.

Has anyone seen this problem? I'm not finding much useful information
searching the archives (of Tomcat, Axis or googling the
web/newsgroups).

thx
andy
?xml version=1.0 encoding=UTF-8?
xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;

xsl:output method=html indent=yes encoding=US-ASCII/


xsl:template match=/content
htmlbody
	xsl:apply-templates/
/body/html
/xsl:template

xsl:template match=@*|node()
	xsl:choose
		xsl:when test=@redlined='yes'
			R
xsl:copy
	xsl:copy-of select=attribute::node()[not(name()='redlined')]/
	xsl:apply-templates/
/xsl:copy
xsl:if test=name(.)='td' or name(.)='p' or name(.)='tr' or name(.)='table' or name(.)='img'xsl:text#10;/xsl:text/xsl:if
			/R
		/xsl:when
		xsl:otherwise
			xsl:copy
xsl:copy-of select=@*/
xsl:apply-templates/
			/xsl:copy
			xsl:if test=name(.)='td' or name(.)='p' or name(.)='tr' or name(.)='table'xsl:text#10;/xsl:text/xsl:if
		/xsl:otherwise
	/xsl:choose
/xsl:template

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

RE: html:errors/ blank page on invalid form

2005-05-26 Thread Andy

Guru and Nikola,

Thanks for the suggestions, having looked at this again, I think this is a
Struts problem however, so I've posted to struts-users.

Thanks anyway,

Andy.

-Original Message-
From: Gurumoorthy [mailto:[EMAIL PROTECTED]
Sent: 26 May 2005 08:37
To: Tomcat Users List
Subject: Re: html:errors/ blank page on invalid form


hello
html:form action=/SubmitLogonForm.do is wrong
html:form action=/SubmitLogonForm

Regards
Guru

- Original Message -
From: Nikola Milutinovic [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Thursday, May 26, 2005 6:04 AM
Subject: Re: html:errors/ blank page on invalid form


 Andy wrote:

 Hi All,
 
 I'm unable to output any errors using html:errors/ tag, in Tomcat
 5.5.7 I've tried numerous configurations and have now ran out of
patience.
 As I haven't been using Struts for more than three days I hope somebody
 more experienced can point help me out.
 
 When I select Submit, entering data into my form fields so the form is
 parsed as valid, the forward works correctly. When I leave the fields
 empty, so the form is parsed as invalid, I just get an empty page back -
 which must be generated by Struts as it doesn't match any HTML I have.
 
 

 Check out the logs, you could be running into an exception. Also, set
 buffer size of 20kb on all your pages, while you're testing. Empty
 output can also be caused by an exception in the page itself, and buffer
 being already sent.

 Here is what I have in various files -
 

--
-
-
 
 
 logon.jsp -
 
 %@ page contentType=text/html;charset=UTF-8 language=java %
 %@ taglib uri=/tags/struts-bean prefix=bean %
 %@ taglib uri=/tags/struts-html prefix=html %
 html
 head
 titlebean:message key=logon.title//title
 /head
 body
 html:errors/
 html:form action=/SubmitLogonForm.do
 table
 tr
 tdUsername/td
 tdhtml:text property=username//td
 /tr
 tr
 tdPassword/td
 tdhtml:text property=password//td
 /tr
 tr
 td
 html:submit/
 html:cancel/
 /td
 td/td
 /tr
 /table
 /html:form
 
 /body
 
 

 Looks fine, except for the buffer page directive.

 In LogonAction.java -
 
 
 public ActionForward execute(ActionMapping mapping, ActionForm form,
  HttpServletRequest request,
 HttpServletResponse response)
 throws Exception {
 
 if (isCancelled(request)) {
 log.debug(cancel pressed);
 return mapping.findForward(Constants.FAILURE);
 }
 
 

 Why would you consider Cancel a failure? Not that it will not work,
but...

 LogonForm logonForm = (LogonForm)form;
 log.debug(username +logonForm.getUsername());
 log.debug(password +logonForm.getPassword());
 
 return mapping.findForward(Constants.SUCCESS);
 }
 
 

 You're not checking the login, but that's fine for a test.

 In LogonForm.java (I have getters/setters for HTML fields, and a reset
 method,
 not shown) -
 
 public ActionErrors validate(ActionMapping actionMapping,
 HttpServletRequest httpServletRequest) {
 
 log.debug(validate);
 ActionErrors errors = new ActionErrors();
 
 if
 (FormUtils.isNullOrEmpty(httpServletRequest.getParameter(username))) {
 log.debug(logon.form.username.invalid);
 errors.add(ActionErrors.GLOBAL_MESSAGE,new
 ActionMessage(logon.form.username.invalid));
 }
 
 

 You don't need to use GLOBAL_MESSAGE, that is wrong, I think. And use
 errors, not messages. My validation would read:

 errors.add( username, new ActionError( logon.form.username.invalid));

 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]





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



html:errors/ blank page on invalid form

2005-05-25 Thread Andy

Hi All,

I'm unable to output any errors using html:errors/ tag, in Tomcat
5.5.7 I've tried numerous configurations and have now ran out of patience.
As I haven't been using Struts for more than three days I hope somebody
more experienced can point help me out.

When I select Submit, entering data into my form fields so the form is
parsed as valid, the forward works correctly. When I leave the fields
empty, so the form is parsed as invalid, I just get an empty page back -
which must be generated by Struts as it doesn't match any HTML I have.

Here is what I have in various files -




logon.jsp -

%@ page contentType=text/html;charset=UTF-8 language=java %
%@ taglib uri=/tags/struts-bean prefix=bean %
%@ taglib uri=/tags/struts-html prefix=html %
html
head
titlebean:message key=logon.title//title
/head
body
html:errors/
html:form action=/SubmitLogonForm.do
table
tr
tdUsername/td
tdhtml:text property=username//td
/tr
tr
tdPassword/td
tdhtml:text property=password//td
/tr
tr
td
html:submit/
html:cancel/
/td
td/td
/tr
/table
/html:form

/body





In LogonAction.java -


public ActionForward execute(ActionMapping mapping, ActionForm form,
 HttpServletRequest request,
HttpServletResponse response)
throws Exception {

if (isCancelled(request)) {
log.debug(cancel pressed);
return mapping.findForward(Constants.FAILURE);
}

LogonForm logonForm = (LogonForm)form;
log.debug(username +logonForm.getUsername());
log.debug(password +logonForm.getPassword());

return mapping.findForward(Constants.SUCCESS);
}





In LogonForm.java (I have getters/setters for HTML fields, and a reset
method,
not shown) -

public ActionErrors validate(ActionMapping actionMapping,
HttpServletRequest httpServletRequest) {

log.debug(validate);
ActionErrors errors = new ActionErrors();

if
(FormUtils.isNullOrEmpty(httpServletRequest.getParameter(username))) {
log.debug(logon.form.username.invalid);
errors.add(ActionErrors.GLOBAL_MESSAGE,new
ActionMessage(logon.form.username.invalid));
}
if
(FormUtils.isNullOrEmpty(httpServletRequest.getParameter(password))) {
log.debug(logon.form.password.invalid);
errors.add(ActionErrors.GLOBAL_MESSAGE,new
ActionMessage(logon.form.password.invalid));
}

return errors.isEmpty() ? null : errors;
}





Two tags of interest from struts-config.xml -

   !-- Process a user logon --
   action   path=/SubmitLogonForm
 type=template.action.LogonAction
 name=LogonForm
 scope=request
 input=/logon.jsp
  forward name=success path=/welcome.jsp /
   /action



!-- Logon form --
form-bean name=LogonForm type=template.form.LogonForm/




ApplicationResources.properties - Note this is found and read by Tomcat, I
can
pull values from it using bean:message - the errors.head and prefix are not
displayed however, so clearly no error messages are being generated at all.

index.heading=Index Page Heading
index.logon=Logon
index.register=New User
#
struts.logo.path=/struts-power.gif
struts.logo.alt=Powered by Struts
# form fields
logon.form.username.invalid=Username invalid
logon.form.password.invalid=Password invalid
# page titles
error.title=Error Title
logoff.title=Logoff Title
logon.title=Logon Title
register.title=Register Title
welcome.title=Welcome Title
#
errors.header=Errors
errors.prefix=Error prefix





Well it's 2AM here in London, so here's hoping for an answer when I get up
later
today !

TIA,

Andy.



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



commercial monitoring tools

2005-05-11 Thread Andy Kriger
I'm interested in people's experiences with commerical monitoring
tools and Tomcat. I found one called ManageEngine that looks
interesting - has anyone used that specifically? Are there open-source
tools (e.g. Nagios - which I have no experience with) that can do the
job just as well (including and especially an easy to use website for
displaying monitoring info)?

I'm interesting in coming with something that will let me track
Tomcat's performance/behavior such that I can isolate what causes it
to occasionally hang-up (no info in the logs) or run out of memory. If
anyone has already looked into these things and come up with a decent
solution please share.

Thank you
andy kriger

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



5.5.8 release timeframe?

2005-03-07 Thread Andy Kriger
I've read the FAQ regarding 'when it's ready' and I haven't seen
anything about this in the mailing list archives, however, I still
need to be able to answer this question for my boss.

We started up the 5.5 path with .4, which had a bug with POST and
basic auth that required upgrading to .7 which has a bug with
DataSources not closing connections that is fixed in .8 - can anyone
give a timeframe for a 5.5.8 release? A rough scale would be fine -
days? weeks? months?

Even a guesstimate based on experience with how long previous alpha's
took to release would help me ease my boss's concerns.

thx
andy

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



authentication sporadically fails?

2005-02-04 Thread Andy Kriger
I have Tomcat 5.5.4 configured with basic authentication through a
JNDI named JDBC connection pool. The Resource and Realm are specified
in META-INF/context.xml. The resource-ref and security-constraint are
specified in WEB-INF/web.xml (releveant parts included at the end of
this message).

There are 3 users assigned roles in the db (MySQL 4.1.8). Sometimes I
am seeing one or more of these users fail to authenticate, even though
moments before they were able to authenticate. Usually, 1 of the users
can still authenticate but the other 2 cannot (though I have seen all
3 fail). Restarting Tomcat usually fixes the problem (though sometimes
several restarts are required).

I am using IE, Firefox, Java code making HttpUrlConnections, and
Apache Axis code making SOAP requests so I'm pretty sure the issue is
with Tomcat and not with the component making the request. To the best
of my knowledge, when authentication fails, it is failing on the same
Authorization header that was succeeding moments before (from watching
the access logs and packet sniffing).

The problem is inconsistent but frustrating and important for us to
figure out. Has anyone seen this kind of behavior? Does anyone have
any suggestions for how I can isolate the problem further?

thx

--- context.xml ---

Resource
name=jdbc/mydb
auth=Container
type=javax.sql.DataSource
maxActive=64
maxIdle=16
maxWait=1
driverClassName=com.mysql.jdbc.Driver
url=jdbc:mysql://localhost/MYDB
username=user
password=pass
/

Realm
className=org.apache.catalina.realm.DataSourceRealm
localDataSource=true
dataSourceName=jdbc/mydb
userTable=user
userNameCol=name
userCredCol=password
userRoleTable=role
roleNameCol=rolename
digest=SHA
/

--- web.xml ---

resource-ref
descriptionmy database/description
res-ref-namejdbc/mydb/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref

security-constraint
web-resource-collection
web-resource-nameAuthentication/web-resource-name
url-pattern/*/url-pattern
/web-resource-collection
auth-constraint
role-namemyRole/role-name
/auth-constraint
/security-constraint

login-config
auth-methodBASIC/auth-method
realm-nameMy Realm/realm-name
/login-config

security-role
role-namemyRole/role-name
/security-role

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



bizarre authentication problem

2005-01-24 Thread Andy Kriger
I have an Tomcat server on an internal network configured to require
basic authentication. This works fine when I use IE or Java code to
access a site, but when I try to access the site using Firefox, the
user/password is never accepted. I have packet sniffed the GET calls
from both IE and Firefox and the Authorization header is the same for
both. I can access the Tomcat Manager using basic auth and external
sites with auth so it's not entirely broken. Tomcat has
maxKeepAliveRequests set to 1 (to deal with a .NET SOAP interop
problem) - that's the only oddball config in Tomcat.

I realize this is more likely a Firefox problem than a Tomcat one, but
I'm wondering if anyone has seen behavior like this.

This is the diff between the IE HTTP headers () and the Firefox HTTP
headers ()...
 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/vnd.ms-excel,
application/vnd.ms-powerpoint, application/msword, */*
 Accept-Language: en-us
 Accept-Encoding: gzip, deflate
 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0;
Feedreader; .NET CLR 1.0.3705; .NET CLR 1.1.4322)
7c3,9
 Connection: Keep-Alive
---
 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) 
 Gecko/20041107 Firefox/1.0
 Accept: 
 text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
 Accept-Language: en-us,en;q=0.5
 Accept-Encoding: gzip,deflate
 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
 Keep-Alive: 300
 Connection: keep-alive

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



reload log4j.properties on-the-fly?

2005-01-21 Thread Andy Kriger
I am running Tomcat 5.5 with log4j logging (log4j.properties in common/classes).

Is it possible to make changes to the log4j properties and have the
changes reloaded on-the-fly instead of having to restart Tomcat in
order to pick up changes? This would be very useful for those times
debug level logging or specific class logging is needed where
generally that level of logging is not required.

thx
andy

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



Re: reload log4j.properties on-the-fly?

2005-01-21 Thread Andy Kriger
Right - I have logging in WEB-INF/classes that I can reload by
reloading the webapp (not a big deal).

What I'd like is to be able to reload the Tomcat logging (which uses
log4j in common/lib and configured in common/classes) without having
to restart Tomcat. It's a bit extreme to restart the server just to
change logging levels for an specific situation.


On Fri, 21 Jan 2005 12:55:15 -0600, Mike Curwen
[EMAIL PROTECTED] wrote:
 Ah, then it wouldn't work at all.  I failed to see you say common/classes.
 
 It's probably the preferred option to put it in WEB-INF/classes though (not
 to mention a log4j.jar file per app in WEB-INF/lib).  That way you can
 independantly control logging for each of your apps, plus your logging
 config won't interfere with Tomcat's internal logging (which many people
 experience, when they try to do the common/lib approach).
 
 Mike Curwen
 Product Manager
 Globally Boundless
 www.globallyboundless.com
 204.885.7733 ext 227
 
 
 
 Privacy Compliance: This e-mail message is intended only for the use of the
 individual or entity to which it is addressed, and may contain information
 that is privileged, confidential and exempt from disclosure under applicable
 law. Any other distribution, copying or disclosure is strictly prohibited.
 If you have received this message in error, please notify us immediately by
 telephone (800) 665-1321 and reply to the sender via e-mail, confirming
 deletion of the original e-mail and any attachment(s).
 
 
 
 
 
  -Original Message-
  From: Andy Kriger [mailto:[EMAIL PROTECTED] 
 
  Sent: Friday, January 21, 2005 12:26 PM
  To: Mike Curwen
  Subject: Re: reload log4j.properties on-the-fly?
 
 
  In the first case, since log4j.properties is in the global
  Tomcat classes dir - would that reload every Context?
 
 
  On Fri, 21 Jan 2005 12:19:48 -0600, Mike Curwen
  [EMAIL PROTECTED] wrote:
   There's two approaches.
  
   Configure tomcat to reload the context when class changes are made
   (log4j.properties being in the classes directory, will count as a
   class being changed, and then the whole context will
  reload).  We do
   this all the time.
  
   Log4j can be used in a manner where config changes are
  discovered at
   run-time, though I've never tried it (and you should ask
  about in on
   the log4j-user list)
  
   Mike Curwen
  
  
-Original Message-
From: Andy Kriger [mailto:[EMAIL PROTECTED]
Sent: Friday, January 21, 2005 12:03 PM
To: tomcat-user@jakarta.apache.org
Subject: reload log4j.properties on-the-fly?
   
   
I am running Tomcat 5.5 with log4j logging (log4j.properties in
common/classes).
   
Is it possible to make changes to the log4j properties
  and have the
changes reloaded on-the-fly instead of having to restart
  Tomcat in
order to pick up changes? This would be very useful for
  those times
debug level logging or specific class logging is needed where
generally that level of logging is not required.
   
thx
andy
   
   
  
-
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: reload log4j.properties on-the-fly?

2005-01-21 Thread Andy Kriger
To clarify - an initialization servlet defined in conf/web.xml will be
able to reload the log4j config used by the Tomcat server (remember
we're not talking about webapps)?


On Fri, 21 Jan 2005 14:18:22 -0500, Derrick Koes
[EMAIL PROTECTED] wrote:
 
 Use the configureAndWatch method of a configurator in an initialization 
 servlet.
 
 -Original Message-
 From: Andy Kriger [mailto:[EMAIL PROTECTED] 
 Sent: Friday, January 21, 2005 2:06 PM
 To: tomcat-user@jakarta.apache.org
 
 Subject: Re: reload log4j.properties on-the-fly?
 
 Right - I have logging in WEB-INF/classes that I can reload by reloading the 
 webapp (not a big deal).
 
 What I'd like is to be able to reload the Tomcat logging (which uses log4j in 
 common/lib and configured in common/classes) without having to restart 
 Tomcat. It's a bit extreme to restart the server just to change logging 
 levels for an specific situation.
 
 On Fri, 21 Jan 2005 12:55:15 -0600, Mike Curwen [EMAIL PROTECTED] wrote:
  Ah, then it wouldn't work at all.  I failed to see you say common/classes.
 
  It's probably the preferred option to put it in WEB-INF/classes though
  (not to mention a log4j.jar file per app in WEB-INF/lib).  That way
  you can independantly control logging for each of your apps, plus your
  logging config won't interfere with Tomcat's internal logging (which
  many people experience, when they try to do the common/lib approach).
 
  Mike Curwen
  Product Manager
  Globally Boundless
  www.globallyboundless.com
  204.885.7733 ext 227
 
  --
  --
  
  Privacy Compliance: This e-mail message is intended only for the use
  of the individual or entity to which it is addressed, and may contain
  information that is privileged, confidential and exempt from
  disclosure under applicable law. Any other distribution, copying or 
  disclosure is strictly prohibited.
  If you have received this message in error, please notify us
  immediately by telephone (800) 665-1321 and reply to the sender via
  e-mail, confirming deletion of the original e-mail and any attachment(s).
 
  --
  --
  
 
 
   -Original Message-
   From: Andy Kriger [mailto:[EMAIL PROTECTED]
 
   Sent: Friday, January 21, 2005 12:26 PM
   To: Mike Curwen
   Subject: Re: reload log4j.properties on-the-fly?
  
  
   In the first case, since log4j.properties is in the global Tomcat
   classes dir - would that reload every Context?
  
  
   On Fri, 21 Jan 2005 12:19:48 -0600, Mike Curwen
   [EMAIL PROTECTED] wrote:
There's two approaches.
   
Configure tomcat to reload the context when class changes are made
(log4j.properties being in the classes directory, will count as a
class being changed, and then the whole context will
   reload).  We do
this all the time.
   
Log4j can be used in a manner where config changes are
   discovered at
run-time, though I've never tried it (and you should ask
   about in on
the log4j-user list)
   
Mike Curwen
   
   
 -Original Message-
 From: Andy Kriger [mailto:[EMAIL PROTECTED]
 Sent: Friday, January 21, 2005 12:03 PM
 To: tomcat-user@jakarta.apache.org
 Subject: reload log4j.properties on-the-fly?


 I am running Tomcat 5.5 with log4j logging (log4j.properties in
 common/classes).

 Is it possible to make changes to the log4j properties
   and have the
 changes reloaded on-the-fly instead of having to restart
   Tomcat in
 order to pick up changes? This would be very useful for
   those times
 debug level logging or specific class logging is needed where
 generally that level of logging is not required.

 thx
 andy


   
 -
 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]



plus/minus of unpack war?

2005-01-20 Thread Andy Kriger
Can someone inside the Tomcat crew explain the
advantages/disadvantages of setting unpackWAR=false in the Host
configuration?

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



RE: undeploy/deploy

2005-01-19 Thread Andy Kriger
 Which ant task do you use to deploy/undeploy wars? What is the url in task?

target name=webapp-undeploy depends=webapp-prepare if=app-deployed
undeploy url=${container.mgr.url}
username=${container.mgr.name}
password=${container.mgr.pass}
path=/${webapp.name}/
/target

target name=webapp-deploy depends=webapp-prepare
deploy url=${container.mgr.url}
username=${container.mgr.name}
password=${container.mgr.pass}
path=/${webapp.name}
war=${webapp.war}/
/target

${container.mgr.url} = http://localhost:8080/manager

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



RE: undeploy/deploy

2005-01-19 Thread Andy Kriger
 Since 5.x, you don't really need to undeploy first, adding update=true 
 into deploy task will undeploy your app before deployment..

I added that to my Ant script and removed the dependency on
webapp-undeploy. Still works about as often as it doesn't. The WAR
file is removed but the directory isn't - deploy runs and fails
because the path already exists.

This is the Host element in server.xml
Host name=localhost appBase=webapps
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false.../Host

This is the Context element in myWebapp/META-INF/context.xml
Context antiJARLocking=true antiResourceLocking=true.../Context

Is there any specific logging (Tomcat or system) that I could turn on
to see why the directory isn't always removed on undeploy?

thx
andy

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



undeploy/deploy problem

2005-01-18 Thread Andy Kriger
I am running Tomcat 5.5.x on Solaris 9.x with Java 1.4.x

I use an Ant script to deploy my WAR file to Tomcat - it builds a WAR,
undeploys the existing webapp, and deploys the WAR. Usually this works
fine. However, often enough to big a major annoyance, it doesn't work
- the webapp undeploys (according to the Ant output) but the WAR
cannot deploy because the directories have not been deleted.
Sometimes, I can fix this by manually deleteing the webapps/webapp,
conf/Catalina/localhost/webapp.xml and work/Catalina/localhost/webapp
directories, sometimes I cannot (if I refresh the manager list,
sometimes the webapp disappears, sometimes not). When that doesn't
work, I have to restart Tomcat.

Does anyone have any ideas what might be going on here and how I might
track down the problem?

thx
andy

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



resource-ref question

2005-01-11 Thread Andy Kriger
I'm coming to Tomcat 5.5 from greater experience with Resin. I am
setting up a JDBC connection pool. No problems there, I have a
META-INF/context.xml file with a Resource element in the Context
block. What is strange is that I do not need a resource-ref element in
the web.xml; my connection pool works fine without it. I see in the
docs on the Context config element that Resource and resource-ref are
equivalent so I guess that makes sense.

What I wonder about is portability - this is locked into Tomcat's way
of doing things. Is there a generic way to define connection pools (or
a more generic way since I'm guessing there's always going to be some
container-specific config).

thx
andy

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



reset Resource with JMX?

2005-01-04 Thread Andy Kriger
I have a webapp that defines a JDBC connection pool resource in
META-INF/context.xml. When I made a change to the resource name and
restarted the webapp, I found that Tomcat did not pick up the new name
- my JSP did not work and JConsole showed the old name for the
DataSource. I had to restart Tomcat to effect the change. I'm guessing
that though the resource is defined in the webapp, because the
connection pool is controlled by Tomcat maybe changes aren't picked up
on webapp restart?

Though I looked around the JMX beans exposed by JConsole and did not
see a way to refresh the Resource there, I figure it doesn't hurt to
ask the list if anyone knows if this is possible.

thx
andy

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



Admin app fails with MBeanServer is not available

2004-12-20 Thread Andy Cohen
I've searched the mailing list archives, and the net at large, but I haven't
seen anyone report this problem for Tomcat 5:

I downloaded and installed Tomcat 5.5.4, and version 5.5.4 of the Admin
webapp. The Admin webapp starts up fine, but when I click on the
Environment Entries button in the Admin webapp, I get the error message
which I've appended to this email. I've tried downloading various
incarnations of JMX jars, and putting them in various Tomcat folders, as
some archived messages recommended for this problem under Tomcat 4.x, but
to no avail.

Is this a real bug, or am I just doing something wrong?

Thanks for any help,

Andy Cohen
System Software Developer
[EMAIL PROTECTED]



HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it
from fulfilling this request.

exception

javax.servlet.ServletException: MBeanServer is not available

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:845)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:778)

admin.resources.listEnvEntries_jsp._jspService(listEnvEntries_jsp.java:437)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)

org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)

org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

javax.servlet.jsp.JspException: MBeanServer is not available
org.apache.webapp.admin.AttributeTag.doEndTag(AttributeTag.java:163)

admin.resources.listEnvEntries_jsp._jspx_meth_controls_attribute_0(listEnvEntries_jsp.java:766)

admin.resources.listEnvEntries_jsp._jspService(listEnvEntries_jsp.java:380)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)

org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)

org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

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



Runtime exec (again)

2004-12-02 Thread andy wix
Hi,
Still can't get this to work.
There must be some reason why this won't run under Tomcat but does work 
stand-alone.
To recap, I am trying to execute the following code on an Xp box with Tomcat 
5.0.27:

Process proc = runtime.exec(cmd.exe /C shutdown -r -f -m \\myPC -t 50);
int exitVal = proc.waitFor();
When this runs the proc exits with a value of 0 but nothing happens (no 
re-boot) and no exceptions are thrown.

I have tried running the code from a batch file and without the cmd.exe /C 
bit.

I have tried running Tomcat from the command line (not as service).
I have tried allowing all permissions in the catalina.policy file:
grant codeBase file:${catalina.home}/webapps/ROOT/WEB-INF/classes/- {
  permission java.security.AllPermission *;
};
I CAN successfully set the the system time and date using the same approach
though.
I have absolutely no idea on this now.
Thanks,
Andy
_
Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Runtime exec (again)

2004-12-02 Thread andy wix
Hi,
The shutdown command now works OK.
There have been a few issues with this that I didn't have in the right 
combination.

The Tomcat service must have suitable permissions. To do this:
- Under control panel select Admin tools - Services
- Right click Apache Tomcat service and select properties
- Select the logon tab
- Under 'This account' select a user account with administrator role.
Not that Windows 2K doesn't come with a shutdown command.  There is one 
supplied with the Win2K resource kit.

- The command must be run from the overloaded exec method that takes a 
String array as it will not work declared as a string.
- Both output and error streams must be read otherwise the process will 
hang.
(see http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html)

- The code will not run from a batch file.
Thanks for your help.
Andy
_
Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Runtime.exec security issue?

2004-11-30 Thread andy wix
Any further thoughts on this issue?  There must be some reason why this 
won't run under Tomcat but does work stand-alone.

To recap, I am trying to execute the following code on an Xp box with Tomcat 
5.0.27:

Process proc = runtime.exec(cmd.exe /C shutdown -r -f -m \\myPC -t 50);
int exitVal = proc.waitFor();
When this runs the proc exits with a value of 0 but nothing happens (no 
re-boot) and no exceptions are thrown.

I have tried running the code from a batch file and without the cmd.exe /C 
bit.

I have tried running Tomcat from the command line (not as service).
I have tried allowing all permissions in the catalina.policy file:
grant codeBase file:${catalina.home}/webapps/ROOT/WEB-INF/classes/- {
   permission java.security.AllPermission *;
};
I CAN successfully set the the system time and date using the same approach
though.
I am truly flummoxed!
Thanks,
Andy
_
Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Runtime.exec security issue?

2004-11-29 Thread andy wix
Hi,
I am trying to run a simple exec command to open notepad with code as 
follows:

Runtime runtime = Runtime.getRuntime();
Process proc = runtime.exec(C:\\WINDOWS\\system32\\notepad.exe);
This code works fine from a stand-alone program but not run under Tomcat.
I CAN successfully set the the system time and date using the same approach 
though.

I get the same results when Tomcat is not run as a service.
I am running Xp with Tomcat 5.0.27.
I thought this might be a java permissions issue, but I don't get any 
exceptions thrown - just nothing happens.

Thanks,
Andy
_
Use MSN Messenger to send music and pics to your friends 
http://www.msn.co.uk/messenger

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


RE: Runtime.exec security issue?

2004-11-29 Thread andy wix
Hi Matt,
I have tried running the Tomcat service with 'allow service to interact with 
desk top' checked in the service properties - I don't know if this should 
allow Tomat to know about Windows?

Also, I don't think the application is actually getting launched as I don't 
see it in the processes list.

Thanks,
Andy
_
Stay in touch with absent friends - get MSN Messenger 
http://www.msn.co.uk/messenger

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


RE: Runtime.exec security issue?

2004-11-29 Thread andy wix
Hi,
Actually, I was assuming this was a simple example of a runitme call.
My real goal is to allow a privelidged user to re-boot the server with the 
following code:

runtime.exec(cmd.exe /C shutdown -r -f -m \\myPC -t 50);
I would also like to call a couple of batch files.
These attempts have met with the same (nothing doing) response.
Cheers
Andy
_
It's fast, it's easy and it's free. Get MSN Messenger today! 
http://www.msn.co.uk/messenger

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


RE: Runtime.exec security issue?

2004-11-29 Thread andy wix
Hi,
I've tried without the cmd.exe bit and also I have tried with the service 
set to run as Administrator.

Cheers
Andy
_
Stay in touch with absent friends - get MSN Messenger 
http://www.msn.co.uk/messenger

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


Re: Installing a webmail client such as squirrelmail (PHP) on tomcat?

2004-11-19 Thread Andy Savage
Wouldn't the easiest way be to run apache as a front end with mod_jk2? 
It's pretty simple and it saves the hassle of possibly taking down the 
whole server with a crash, or any security hassles.

Serve php with apache, serve everything else to tomcat.
Kind Regards,
Andy Savage
--
Bluewire Solutions
Position: Partner
Contact: +64 27 4678 262
Website: www.bluewire.net.nz
Email: [EMAIL PROTECTED]
David Lee wrote:
Hi! Folks,
 
Has anyone run the php application on Tomcat?. I'm trying to install the
squirrelmail on tomcat so I can web access my james email server.
 
What is the best way to integrate the php with tomcat or any
suggesstions or pitfalls to avoid?
 
Any comments welcome.
 
Thanks
 
David Lee

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


trouble with static html using 5.5.2

2004-10-17 Thread andy davidson
Hi

I just installed the binary release of 5.5.2. do I
have to change something in a config file to so that
tomcat can server up html?

Here is my test. I created servlet foo.bar.bazServlet.
I installed it under webapps/baz. I created servlet
tags in webapps/baz/WEB-INF/web.xml

http://localhost:8080/baz works as expected.

I have a file webapps/bas/test.html

http://localhost:8080/baz/test.html causes my servlet
to run? Do I have to create some sort of mapping entry
in webapps/bas/WEB-INF/web.xml for html to work?

my servlet generates a image tag as follows
img src=images/baz.gif

i have webapps/bas/images/baz.gif installed how ever
this image is never loaded into my browser? Do I have
to create some sort of mapping entry in
webapps/bas/WEB-INF/web.xml for html to work?
 
thanks in advance

andy



__
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: trouble with static html using 5.5.2

2004-10-17 Thread andy davidson
please see my comments bellow

thanks

andy

--- QM [EMAIL PROTECTED] wrote:

 On Sun, Oct 17, 2004 at 09:23:09AM -0700, andy
 davidson wrote:


 
 : Here is my test. I created servlet
 foo.bar.bazServlet.
 : I installed it under webapps/baz. I created
 servlet
 : tags in webapps/baz/WEB-INF/web.xml
 

http://localhost:8080/baz works as expected

 What about servlet-mapping tags?  Those are
 required to map the
 servlet class to a (context-relative) URI.
 
 
 : http://localhost:8080/baz/test.html causes my
 servlet
 : to run? Do I have to create some sort of mapping
 entry
 : in webapps/bas/WEB-INF/web.xml for html to work?
 



here is my web.xml file. What am I missing?

web-app
servlet
servlet-namebaz/servlet-name
   
servlet-classfoo.bar.bazServlet/servlet-class
/servlet

servlet-mapping
servlet-namebaz/servlet-name
 url-pattern//url-pattern
/servlet-mapping

/web-app

My guess is I need some sort of url-pattern that maps
/baz/* to /baz/*. What would the syntax be? this is
not a servlet thing? where can I find a dtd for
web.xml?

thanks andy









__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

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



how to get relative URL to work with 5.5.2?

2004-10-17 Thread andy davidson
Hi

I have a simple sevlet that generates img. I can not
get the images to load? I read the servlet essential
tutorial at sun.com, but that did not help. To try to
figure what was going on I turned on the dumper. Here
is my file layout

webapps/MyBookmarks/images/*.gif
webapps/MyBookmarks/WEB-INF/web.xml
webapps/MyBookmarks/WEB-INF/classes/com/.../MyBookmarks/MyBookmarksServlet.class

http://localhost:8080/MyBookmarks runs my servlet as
expected

looking at the output of the dump, I see
request URI = /MyBookmarks
servletPath=/
status=200

my servlet generates two tags as follows neither of
these work. (I have tried many other ways)

img src=MyBookmarks/images/close.gif

dump output
request URI=/MyBookmarks/images/close.gif
contextpath=/MyBookmarks
header=refer=http://localhost:8080/MyBookmarks
servletPath=/images/close.gif
status=200
method=get
pathinfo=null

status=200?? the image did not load! I even hit the
reload button on my web browser

img src=/images/open.gif
dump output
request URI=/images/openFolder.gif
contextPath=
servletpath=/images/close.gif
status=400


here is my web.xml file

web-app
servlet
servlet-nameMyBookmarks/servlet-name
   
servlet-classcom.sharkBiteRight.MyBookmarks.MyBookmarksServlet/servlet-class
/servlet

servlet-mapping
servlet-nameMyBookmarks/servlet-name
!--
http://localhost:8080/MyBookmarks/MyBookmarks works
 url-pattern/MyBookmarks/url-pattern
--

!-- http://localhost:8080/MyBookmarks works
--
 url-pattern//url-pattern
/servlet-mapping
/web-app

thanks in advance

andy




__
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail

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



Resin slower than Tomcat, fails the AppFuse Test

2004-10-14 Thread Andy Hutchinson
So now you know!
http://raibledesigns.com/page/rd/20041007#resin_slower_than_tomcat_fails
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat command line arguments

2004-10-14 Thread Andy Hutchinson
At 15:15 14/10/2004, you wrote:
Hey
I give the following command to start Tomcat version 5 with a 
CATALINA_BASE different to the default one:

./startup.sh -Dcatalina.base=/some/dir/that/exists
But it fails to pass the argument, what am I doing wrong?
Set the environment variable CATALINA_OPTS instead.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


MemoryRealm in a Context

2004-09-30 Thread Andy Hutchinson
Setup is Tomcat 5.0.28, J2SE 1.4.2, Redhat 9.
I've been using a MemoryRealm in a Host container and everything works 
fine. It is ideal for a computer to computer link over HTTPS to 
authenticate access.

I've now decided that I want a different setup on a per Context basis. The 
docs for the realm component say that a Realm can be inside a Context 
container so I moved the Realm section from the Host to the Context and 
restarted Tomcat.

Now when I try and authenticate the debug log shows that the realm is being 
treated as a JAAS realm and consequently fails.

Is there something clever going on here that I'm not aware of or do I need 
to made further config changes?

Cheers,
Andy. 

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


RE: Server Alias

2004-09-15 Thread Andy Eastham
Dionisio,

The first option, with multiple alias tags.

Andy

 -Original Message-
 From: Dionisio Ruiz de Zárate [mailto:[EMAIL PROTECTED]
 Sent: 15 September 2004 15:28
 To: Tomcat Users List
 Subject: Re: Server Alias
 
 i have see the doc.
 but if i have several aliases for one host how must i solve it?
 Aliasmyalias1.com/Alias
 Aliasmyalias2.com/Alias
 AliasmyaliasX.com/Alias
 
 or
 Aliasmyalias1.com myalias2.com myaliasX.com/Alias
 
 thanks
 
 - Original Message -
 From: Mark Lowe [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Wednesday, September 15, 2004 10:32 AM
 Subject: Re: Server Alias
 
 
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html
 
 Between the host tag you can use
 
 Aliasmyalias.com/Alias
 
 Mark
 
 On 14 Sep 2004, at 23:20, Dionisio Ruiz de Zárate wrote:
 
  Hello for configurin one alias in apache i use the serverAlias
  there is any form for configure several ServerAlias for one domain in
  tomcat
  4?
  thanks
 
 
 
  -
  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]



Clustering problems during session replication at startup

2004-09-09 Thread Andy Natt
)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1567)
at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j
ava:488)
at
org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:482
)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:968)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:119)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at
org.apache.catalina.core.StandardService.start(StandardService.java:480)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
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.start(Bootstrap.java:284)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)
Aug 24, 2004 11:25:30 AM org.apache.catalina.cluster.session.DeltaManager
start
WARNING: Manager[/webapp], requesting session state from
org.apache.catalina.cluster.mcast.McastMember[tcp://*.*.*.*:4001,*.*.*.*,400
1, alive=3211070]. This operation will timeout if no session state has been
received within 60 seconds

--
Andy Natt.
DigitalRum Ltd



RE: Unable to integrate Apache 2.0.24, mod_jk2 with Tomcat 5.

2004-09-03 Thread Andy Eastham
Joao,

The way I do this is to forward all of a subdirectories requests to a webapp
on tomcat, and then I give my servlets an arbitrary extension (I use .isa
for irrelevant reasons).

For example, in workers2.properties, I forward everything to the apache url
/control to tomcat:
[uri:localhost/control/*]
worker=ajp13:localhost:8009

[uri:wwws/control/]
worker=ajp13:localhost:8009

[uri:127.0.0.1/control/*]
worker=ajp13:localhost:8009

Then in tomcats server.xml:
 Host name=xxx.xx.xxx.xx.xx debug=0 appBase=webapps
unpackWARs=true autoDeploy=true
 Aliaswww.xxx.com/Alias
 Alias192.168.0.102/Alias
 Aliaslocalhost/Alias
 Aliaswwws/Alias
 Alias127.0.0.1/Alias


 Context path=control docBase=
debug=1/

 Valve
className=org.apache.catalina.valves.AccessLogValve
 directory=logs  prefix=home_access_log. suffix=.txt
 pattern=common resolveHosts=false/
/Host

Note the context path for control, and the aliases for different urls your
server may be called by.

Then in the web.xml for the control webapp (under WEB-INF directory):
servlet
servlet-name
myServlet
/servlet-name
servlet-class
com..servlet.myServlet
/servlet-class
load-on-startup1/load-on-startup
/servlet


servlet-mapping
servlet-name
myServlet
/servlet-name
url-pattern
*.isa
/url-pattern
/servlet-mapping

This maps any requests to anything.isa to my servlet.

If you don't want to use the extension method, you can use the invoker
servlet supplied with Tomcat.

This method requires that you redirect a subdirectory, not all apache
requests.  I don't know if you can redirect all apache requests, but that
would lose some of the benefits of using apache with tomcat, eg serving
images and other static content directly from apache.

Hope this helps,

Andy



 -Original Message-
 From: João Gil ACE-SC [mailto:[EMAIL PROTECTED]
 Sent: 03 September 2004 12:18
 To: Tomcat Users List
 Subject: RE: Unable to integrate Apache 2.0.24, mod_jk2 with Tomcat 5.
 
 
 Hello,
 
 Thank's to Andy Eastham solution I managed to get Apache to forward *.jsp
 requests to Tomcat. In adition I also discovered
 that I had to define localhost(127.0.0.1) in JK2.properties file as
 without this config Tomcat(JK2) was listening on the wrong
 IP(0.0.0.0.).
 
 Servlets are still not being forwarded - Apache reports - 404 file not
 found when I click on, for example, - http://localhost/MyServlet.
 MyServlet exists on my root_path as MyServlet.class . Can anyone tell me
 how to prevent this error and forward the request to
 Tomcat5?
 
 Warmest Regards
 Joao Gil
 
 
 
 
   Andy Eastham
   [EMAIL PROTECTED]To:   'Tomcat Users
 List' [EMAIL PROTECTED]
   om  cc:
Subject:  RE: Unable to
 integrate Apache 2.0.24 with Tomcat 5.
   02-09-2004 16:41
   Please respond to
   Tomcat Users
   List
 
 
 
 
 
 
 Joao,
 
 I looked at that url and the way redirections are configured is different
 to
 mine.
 
 I do NOT have things like
 Location /*.jsp
 JkUriSet worker ajp13:localhost:8009
 /Location
 
 Location /mywebapp
 JkUriSet worker ajp13:localhost:8009
 /Location
 
 (in fact these look like mod_jk configuration to me)
 
 Instead, my workers2.properties is as follows:
 [logger.apache2]
 #level=DEBUG
 
 [shm]
 file=/usr/local/apache2/logs/shm.file
 size=1048576
 
 # Example socket channel, override port and host.
 [channel.socket:localhost:8009]
 port=8009
 host=127.0.0.1
 
 # define the worker
 [ajp13:localhost:8009]
 channel=channel.socket:localhost:8009
 
 # Uri mapping
 [uri:192.168.0.103/wisadmin/*]
 worker=ajp13:localhost:8009
 
 [uri:localhost/wisadmin/*]
 worker=ajp13:localhost:8009
 
 [uri:wis/wisadmin/]
 worker=ajp13:localhost:8009
 
 [uri:127.0.0.1/wisadmin/*]
 worker=ajp13:localhost:8009
 
 Note that the URIs are mapped in this file.
 
 Give this a try,
 
 Andy
 
  -Original Message-
  From: João Gil ACE-SC [mailto:[EMAIL PROTECTED]
  Sent: 02 September 2004 16:25
  To: [EMAIL PROTECTED]
  Subject: Unable to integrate Apache 2.0.24 with Tomcat 5.
 
 
  Greatings,
 
  I am trying to integrate Apache 2.0.24 with Tomcat 5 with no success.
 
  The best solution I have found on the net is at
  http://www.dynamicobjects.com/d2r/archives/002574.html
 
  After configuring Apache and Tomcat as instructed, both execute with
  no problem. But Apache is still not forwarding JSP pages/Servlets
  to Tomcat. Can anyone help me?
 
  Warmest Regards
  Joao Gil

RE: Unable to integrate Apache 2.0.24 with Tomcat 5.

2004-09-02 Thread Andy Eastham
Joao,

I looked at that url and the way redirections are configured is different to
mine.

I do NOT have things like
Location /*.jsp
JkUriSet worker ajp13:localhost:8009
/Location

Location /mywebapp
JkUriSet worker ajp13:localhost:8009
/Location

(in fact these look like mod_jk configuration to me)

Instead, my workers2.properties is as follows:
[logger.apache2]
#level=DEBUG

[shm]
file=/usr/local/apache2/logs/shm.file
size=1048576

# Example socket channel, override port and host.
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1

# define the worker
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009

# Uri mapping
[uri:192.168.0.103/wisadmin/*]
worker=ajp13:localhost:8009

[uri:localhost/wisadmin/*]
worker=ajp13:localhost:8009

[uri:wis/wisadmin/]
worker=ajp13:localhost:8009

[uri:127.0.0.1/wisadmin/*]
worker=ajp13:localhost:8009

Note that the URIs are mapped in this file.

Give this a try,

Andy

 -Original Message-
 From: João Gil ACE-SC [mailto:[EMAIL PROTECTED]
 Sent: 02 September 2004 16:25
 To: [EMAIL PROTECTED]
 Subject: Unable to integrate Apache 2.0.24 with Tomcat 5.
 
 
 Greatings,
 
 I am trying to integrate Apache 2.0.24 with Tomcat 5 with no success.
 
 The best solution I have found on the net is at
 http://www.dynamicobjects.com/d2r/archives/002574.html
 
 After configuring Apache and Tomcat as instructed, both execute with
 no problem. But Apache is still not forwarding JSP pages/Servlets
 to Tomcat. Can anyone help me?
 
 Warmest Regards
 Joao Gil
 
 
 
 -
 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: understanding web.xml

2004-08-17 Thread Andy Eastham
Also look at the sample chapter at http://www.moreservlets.com/

Andy

 -Original Message-
 From: Thilo Krawietz [mailto:[EMAIL PROTECTED]
 Sent: 17 August 2004 08:07
 To: Tomcat Users List
 Subject: Re: understanding web.xml
 
 Hi Tobias,
 
 in Suns official Servlet specification all elements of web.xml are
 explained widely, so i would suggest, that you study this one. You can
 get it here:
 
 http://java.sun.com/products/servlet/download.html
 
 Hope this helps  regards,
 
 Thilo
 
 
 Tobias Eriksson wrote:
 
 Hi
  I have been searching the web some for information about how to
 configure / setup; web.xml, but haven't really found anything. I thought
 there would be something in the TOMCAT documentation, perhaps I wasn't
 to thorough when I browsed through it. Does anyone have a link to some
 tutorial or article that explains the web.xml?
 
 Regards
  Tobias
 
 
 
 -
 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: apache2 crashes when using connectors - nobody?

2004-07-06 Thread Andy Spiegl
Hi David,

thanks for your reply.

 Someone might be able to help if you would be so kind as to provide more 
 information like relevant parts of your Apache config
---8---8--
IfModule mod_jk.c

JkWorkersFile /opt/jakarta/tomcat/conf/workers.properties
JkLogFile /opt/jakarta/tomcat/logs/mod_jk.log

# Log level to be used by mod_jk
JkLogLevel debug
#JkLogLevel error

# The following line makes apache aware of the location of
# the /examples context
Alias /examples /opt/jakarta/webapps/examples
Directory /opt/jakarta/webapps/examples
Options Indexes FollowSymLinks
allow from all
/Directory

# The following line mounts all JSP files and the /servlet/ uri to tomcat
JkMount /examples/servlet/* ajp13
JkMount /examples/*.jsp ajp13

# The following line prohibits users from directly accessing WEB-INF
Location /examples/WEB-INF/
AllowOverride None
deny from all
/Location

/IfModule
---8---8--

 and the workers.properties file.
---8---8--
# Define some properties
workers.apache_log=/var/log/apache2/
workers.tomcat_home=/opt/jakarta/
#workers.java_home=/opt/IBMJava2-131/
ps=/
# Define 1 worker
worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
---8---8--

 Also was the mod_jk connector package you installed built for this
 version of Apache?
Hm, I think so.  I tried:
 apache2-jakarta-tomcat-connectors-4.1.27-63.i586.rpm
 apache2-jakarta-tomcat-connectors-4.1.27.tgz
and
 
http://www.apache.de/dist/jakarta/tomcat-connectors/jk2/binaries/linux/Suse-9.0-i386.tar.gz

Thank you for any help!
 Andy.

-- 
  o  _ _ _
  --- __o   __o  /\_   _ \\o  (_)\__/o  (_)  -o)
  - _`\,__`\,__(_) (_)/_\_| \   _|/' \/   /\\
   (_)/ (_)  (_)/ (_)  (_)(_)   (_)(_)'  _\o__\_v
 
 Do not marry a person that you know that you can live with;
 only marry someone that you cannot live without.(Unknown)

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



Re: apache2 crashes when using connectors - nobody?

2004-07-06 Thread Andy Spiegl
 The name you gave your workers in workers.properties has to be used in
 you JkMount statements.
Oops, thanks.
But could that be the reason for a complete crash?
 Andy.

-- 
  o  _ _ _
  --- __o   __o  /\_   _ \\o  (_)\__/o  (_)  -o)
  - _`\,__`\,__(_) (_)/_\_| \   _|/' \/   /\\
   (_)/ (_)  (_)/ (_)  (_)(_)   (_)(_)'  _\o__\_v
 
 Linux. Because life is too short to reboot.

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



apache2 crashes when using connectors - nobody?

2004-07-02 Thread Andy Spiegl
Hm, nobody out there who has seen this problem before and might
be able to help me?


I installed tomcat-4.1.30 on a SuSE 9 box.  So far so good.
But then I tried to install the connector modules into the apache
(version 2.0.49-23) but didn't succeed.

I find this type of lines in the apache error.log:
 [notice] child pid 21721 exit signal Segmentation fault (11)

and these lines in the mod_jk.log:
 [jk_uri_worker_map.c (485)]: Into jk_uri_worker_map_t::map_uri_to_worker
 [jk_uri_worker_map.c (619)]: In jk_uri_worker_map_t::map_uri_to_worker, wrong 
parameters

I checked all available documentation and web resources but couldn't find
any pointers to why that is so.  I have tried pretty much all versions of
the connector modules I could find but apache always crashes like this.

For now I chose the mod_proxy method to serve the jsp files, but I'd prefer
the connectors.  Could some kind soul please point me to the solution.

Thanks in advance,
 Andy.

-- 
  o  _ _ _
  --- __o   __o  /\_   _ \\o  (_)\__/o  (_)  -o)
  - _`\,__`\,__(_) (_)/_\_| \   _|/' \/   /\\
   (_)/ (_)  (_)/ (_)  (_)(_)   (_)(_)'  _\o__\_v
 
 Programmers - Use Safer Hex !

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



Tomcat 5 - Servlet action is currently unavailable

2004-07-01 Thread Andy Festa
Hi.

I've recently upgraded to Tomcat 5.0.25 from Tomcat
4.1.24.  I'm using Eclipse 3.0RC3 with the Sysdeo
Tomcat Plugin V3.  The directory for my web app is not
under my tomcat directory.

The servlet that I'm using now no longer works,
whereas it did work under Tomcat 4.  I'm getting this
error:

HTTP Status 503 - Servlet action is currently
unavailable

Oddly enough, I can get the app to run when I manually
start Tomcat 5 by using startup.bat.

I've even tried this under Eclipse 2.1 and with the
older Tomcat plug-in with no success.

Is there any configuration issues I'm missing?

Thanks!
~Andy Festa




__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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



Re: Tomcat 5 - Servlet action is currently unavailable

2004-07-01 Thread Andy Festa
Correction to my question... it doesn't work manually
via startup.bat either.  Oversight on my part.

--- Andy Festa [EMAIL PROTECTED] wrote:
 Hi.
 
 I've recently upgraded to Tomcat 5.0.25 from Tomcat
 4.1.24.  I'm using Eclipse 3.0RC3 with the Sysdeo
 Tomcat Plugin V3.  The directory for my web app is
 not
 under my tomcat directory.
 
 The servlet that I'm using now no longer works,
 whereas it did work under Tomcat 4.  I'm getting
 this
 error:
 
 HTTP Status 503 - Servlet action is currently
 unavailable
 
 Oddly enough, I can get the app to run when I
 manually
 start Tomcat 5 by using startup.bat.
 
 I've even tried this under Eclipse 2.1 and with the
 older Tomcat plug-in with no success.
 
 Is there any configuration issues I'm missing?
 
 Thanks!
 ~Andy Festa
 
 
 
   
 __
 Do you Yahoo!?
 New and Improved Yahoo! Mail - Send 10MB messages!
 http://promotions.yahoo.com/new_mail 
 

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




__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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



apache2 crashes when using connectors

2004-06-30 Thread Andy Spiegl
Hi,

I installed tomcat-4.1.30 on a SuSE 9 box.  So far so good.
But then I tried to install the connector modules into the apache
(version 2.0.49-23) but didn't succeed.

I find this type of lines in the apache error.log:
 [notice] child pid 21721 exit signal Segmentation fault (11)

and these lines in the mod_jk.log:
 [jk_uri_worker_map.c (485)]: Into jk_uri_worker_map_t::map_uri_to_worker
 [jk_uri_worker_map.c (619)]: In jk_uri_worker_map_t::map_uri_to_worker, wrong 
parameters

I checked all available documentation and web resources but couldn't find
any pointers to why that is so.  I have tried pretty much all versions of
the connector modules I could find but apache always crashes like this.

For now I chose the mod_proxy method to serve the jsp files, but I'd prefer
the connectors.  Could some kind soul please point me to the solution.

Thanks in advance,
 Andy.

-- 
  o  _ _ _
  --- __o   __o  /\_   _ \\o  (_)\__/o  (_)  -o)
  - _`\,__`\,__(_) (_)/_\_| \   _|/' \/   /\\
   (_)/ (_)  (_)/ (_)  (_)(_)   (_)(_)'  _\o__\_v
 
 A chicken crossing the road is poultry in motion.

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



RE: Too many open files on Solaris

2004-06-16 Thread Andy Eastham
The first thing that came up in Google was this, which might help:

http://support.bea.com/support_news/product_troubleshooting/Too_Many_Open_Fi
les_Pattern.html

Andy

 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Davor Cengija
 Sent: 16 June 2004 09:59
 To: [EMAIL PROTECTED]
 Subject: Too many open files on Solaris
 
 My application is hitting that 'too many open files' limit on Solaris.
 
 Jun 15, 2004 11:23:01 AM org.apache.tomcat.util.net.PoolTcpEndpoint
 acceptSocket
 SEVERE: Endpoint ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=8080]
 ignored exception: java.net.SocketException: Too many open files
 java.net.SocketException: Too many open files
 at java.net.PlainSocketImpl.socketAccept(Native Method)
 at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353)
 at java.net.ServerSocket.implAccept(ServerSocket.java:448)
 at java.net.ServerSocket.accept(ServerSocket.java:419)
 at
 org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(Default
 ServerSocketFactory.java:107)
 at
 org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.ja
 va:387)
 at
 org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:557)
 at
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.j
 ava:683)
 at java.lang.Thread.run(Thread.java:534)
 Jun 15, 2004 11:23:01 AM org.apache.tomcat.util.net.PoolTcpEndpoint
 closeServerSocket
 SEVERE: Caught exception trying to unlock accept on 8080
 java.net.SocketException: Too many open files
 Jun 15, 2004 11:23:01 AM org.apache.tomcat.util.net.PoolTcpEndpoint
 acceptSocket
 WARNING: Reinitializing ServerSocket
 
 I realize that increasing file descriptor limit per process could help a
 bit, but my system administrator simply doesn't want to do that (since it
 requires restart).
 
 Now, the problem is how to avoid too many open files exception. Any
 suggestions regarding Tomcat (or Apache) configuration, coding practice,
 some runtime operating system parameters would be greatly appreciated.
 
 Here's my configuration:
 
 Default Solaris 8 (I believe) installation on 2CPU+4GB RAM box. TCP
 connection wait timeout (I believe that the correct wording) is decreased
 from 240sec to 60sec and that's the only parameter changed on Solaris.
 
 Tomcat 4.1.30 with j2sdk 1.4.2_04 (server mode) with Apache 2.0 as a
 proxy.
 Every single request goes through Apache which then routes it to Tomcat.
 600.000 hits and cca 3GB of data daily, with peaks during working hours,
 of
 course, about 50.000 hits per hour. The delivered content consists mostly
 of small images (3-20k) delivered directly from a database (servlet sets
 content type etc, img src=/preview?id=123 style)
 
 Application lives about 24hours and then dies with the exception shown
 above. As far as I can see, all input- and output- streams are flushed and
 closed, at least in my application. Cannot guarantee for the underlining
 libraries.
 
 Somehow I think that I cannot squeeze the application anymore and that
 we're
 hitting tomcat+solaris limit.
 
 Ahm... whoever managed to completelly read this rather long post I hope
 will
 have some suggestions.
 
 Thanks in advance!
 
 Cheers,
 Davor
 --
 Davor Cengija, [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 to (Unique value)?

2004-06-16 Thread Andy Eastham
Unique keys are generated by using the AUTO_INCREMENT attribute on an
integer column.  

http://dev.mysql.com/doc/mysql/en/example-AUTO_INCREMENT.html

Andy

 -Original Message-
 From: A Z [mailto:[EMAIL PROTECTED]
 Sent: 16 June 2004 12:28
 To: [EMAIL PROTECTED]
 Subject: How to (Unique value)?
 
 
 4.0.14
 
 Its rather a general SQL question, I'll ask it as I'm
 using MySQL.
 
 An converted table has field of type VarChar(6),
 containing alphanumeric chars.
 Is it possible to run a query to generate a unique key
 so this can be used for new record?
 
 regards
 
 
 
 
 
 
 ___ALL-NEW Yahoo!
 Messenger - so many all-new ways to express yourself
 http://uk.messenger.yahoo.com
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]




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



RE: Repost... no response from numerous posts

2004-06-14 Thread Andy Eastham
Jack,

I think what you are looking for is the following set of directives:

In httpd.conf, in the Virtual Host section something like the following:
Location /control/
JkUriSet worker ajp13:localhost:8009
/Location
Location /wwwsadmin/
JkUriSet worker ajp13:localhost:8009
/Location

Then in workers2.properties:
# define the worker
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009

# Uri mapping
[uri:192.168.0.102/control/*]
worker=ajp13:localhost:8009

[uri:external.host.name/control/*]
worker=ajp13:localhost:8009

[uri:localhost/control/*]
worker=ajp13:localhost:8009

[uri:internal.host.name/control/]
worker=ajp13:localhost:8009

[uri:127.0.0.1/control/*]
worker=ajp13:localhost:8009

[uri:192.168.0.102/wwwsadmin/*]
worker=ajp13:localhost:8009

[uri:localhost/wwwsadmin/*]
worker=ajp13:localhost:8009

[uri: external.host.name /wwwsadmin/]
worker=ajp13:localhost:8009

[uri:internal.host.name/wwwsadmin/]
worker=ajp13:localhost:8009

[uri:127.0.0.1/wwwsadmin/*]
worker=ajp13:localhost:8009

You may not need all the variations of name and IP address in
workers2.properties, but I've added them all in and it works...

Also, I've just noticed that on my laptop, I've only got the
workers2.properties file and settings, not the Location directives in
httpd.conf, and that seems to work too.  However, the above is taken from a
production Solaris 9 server.

Andy

 -Original Message-
 From: Jack Lauman [mailto:[EMAIL PROTECTED]
 Sent: 12 June 2004 01:53
 To: Tomcat Users List
 Subject: Re: Repost... no response from numerous posts
 
 Apache and tomcat are on the same box.  I'd prefer to be able to do it
 the way I did in the past.  Has this feature been intentionally removed
 from jk2?
 
 Jack
 
 Keene, David wrote:
 
  Try looking at mod_rewrite with the proxy mode on.  There were a couple
  of email yesterday about it.
 
  dave
 
  -Original Message-
  From: Jack Lauman [mailto:[EMAIL PROTECTED]
  Sent: Friday, June 11, 2004 5:08 PM
  To: Tomcat Users List
  Subject: Repost... no response from numerous posts
 
  I've posted this same question on the apache and tomcat lists for the
  past six weeks and gotten no answers.  Not even an insult saying the
  question was stupid.  If I could find the answer in the docs I wouldn't
  be asking.
 
  I have virtual host in apache 2.0.49 with mod_jk2 its DocumentRoot is
  domain.com it has a subdirectory called members (i.e.
  domain.com/members) that has an html doc with links to three different
  tomcat apps.  (i.e. domain.com/members/index.html with a link of
  http://www.domain.com/members/minutes/index.jsp).
 
  On the tomcat 5.0.24 side I have a minutes webapp (minutes.war) in the
  default context (i.e. $TOMCAT_HOME/webapps/minutes.war) and deploys
  under the directory minutes.  (The members directory does not exist on
  the tomcat side).
 
  How do you map the apache path of
  http://www.domain.com/members/minutes/index.jsp to the tomcat minutes
  app?
 
  In the past using both of these would worked:
  In mod_webapp/warp connector I could use:
  WebAppDeploy minutes warpConnection /members/minutes/
 
  In mod_jk I could use:
  JkMount /members/minutes/*.jsp Worker
  JkMount /members/minutes/*.do Worker
 
  The question
  Is this possible in mod_jk2 and if so how do you do it?
 
  TIA
 
  Jack
 
 
  -
  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: Common/lib works shared/lib doesn't

2004-06-11 Thread Andy Eastham
Marc,

The only issue with having jars in common/lib, is that any static class
variables are shared across every webapp, as the class loader only loads
these classes once per server.  Classes under webapp/WEB-INF/lib are loaded
once per webapp and invisible to other webapps. 

For example, if you're using log4j, you can get every webapp logging to the
same file, even if each webapp initialises logging separately (the webapp
that initialises last wins).  This is because log4j uses static variables
to hold log configuration.  To prevent this, I keep a copy of log4j.jar in
webapp/WEB-INF/lib for every webapp.  I keep most other jars in common/lib
though

This is not to say that everything should be in webapp/WEB-INF/lib, just
that its worth knowing that there can be confusing consequences of sharing
jars across webapps.

Andy

 -Original Message-
 From: Wangenheim, Marc [mailto:[EMAIL PROTECTED]
 Sent: 11 June 2004 15:18
 To: Tomcat Users List
 Subject: RE: Common/lib works shared/lib doesn't
 
 
 OK I'll leave it in common/lib. The problem with WEB-INF/lib is that is
 takes too much time to update all webapps. We have a rather cumbersome
 environment. Each app has to go through four environments (development,
 integration, certification, production) before it is available to the
 customer. Hopping from one environment to the next can take up to two
 days each because after Sarbanes-Oxley all we developers have access to
 is development and that's it. Now imagine I have 30 apps using this jar.
 If I need to make a change to the jar it becomes a nightmare to deploy.
 
 Thanks for the help tho =)
 
 
 
 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 11, 2004 9:56 AM
 To: Tomcat Users List
 Subject: RE: Common/lib works shared/lib doesn't
 
 
 
 Hi,
 It's OK to leave it in common/lib.  (IMHO it's also fine to have a copy
 for each webapp in WEB-INF/lib, but you stated you don't want that).
 
 Yoav Shapira
 Millennium Research Informatics
 
 
 
 **
 
 The content of this e-mail message and any attachments are confidential
 and may be
 
 legally privileged, intended solely for the addressee.  If you are not the
 intended
 
 recipient, be advised that any use, dissemination, distribution, or
 copying of this
 
 e-mail is strictly prohibited.  If you receive this message in error,
 please notify
 
 the sender immediately by reply email and destroy the message and its
 attachments.
 
 **
 
 -
 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: JSP source being shown (not being executed)

2004-06-09 Thread Andy Eastham
Michael,

If you put the JSPs under the WEB-INF folder of the web app, Tomcat will be
unable to serve them directly.

Does that make any difference?

Andy

 -Original Message-
 From: Schalk [mailto:[EMAIL PROTECTED]
 Sent: 08 June 2004 20:43
 To: 'Tomcat Users List'
 Subject: RE: JSP source being shown (not being executed)
 
 If all .html files should go to this try using a filter instead.
 
 Kind Regards
 Schalk Neethling
 Web Developer.Designer.Programmer.President
 Volume4.Development.Multimedia.Branding
 emotionalize.conceptualize.visualize.realize
 Tel: +27125468436
 Fax: +27125468436
 email:[EMAIL PROTECTED]
 web: www.volume4.com
 
 This message contains information that is considered to be sensitive or
 confidential and may not be forwarded or disclosed to any other party
 without the permission of the sender. If you received this message in
 error,
 please notify me immediately so that I can correct and delete the original
 email. Thank you.
 
 :: -Original Message-
 :: From: Schalk [mailto:[EMAIL PROTECTED]
 :: Sent: Tuesday, June 08, 2004 9:27 PM
 :: To: 'Tomcat Users List'
 :: Subject: RE: JSP source being shown (not being executed)
 ::
 :: I stand under correction but, it may even be that this not allowed at
 all
 or
 :: anymore. Try rather creating another extension for these files that you
 can
 :: map to. Probably the easiest.
 ::
 :: Kind Regards
 :: Schalk Neethling
 :: Web Developer.Designer.Programmer.President
 :: Volume4.Development.Multimedia.Branding
 :: emotionalize.conceptualize.visualize.realize
 :: Tel: +27125468436
 :: Fax: +27125468436
 :: email:[EMAIL PROTECTED]
 :: web: www.volume4.com
 ::
 :: This message contains information that is considered to be sensitive or
 :: confidential and may not be forwarded or disclosed to any other party
 :: without the permission of the sender. If you received this message in
 error,
 :: please notify me immediately so that I can correct and delete the
 original
 :: email. Thank you.
 ::
 :: :: -Original Message-
 :: :: From: Michael Mehrle [mailto:[EMAIL PROTECTED]
 :: :: Sent: Tuesday, June 08, 2004 8:44 PM
 :: :: To: Tomcat Users List
 :: :: Subject: Re: JSP source being shown (not being executed)
 :: ::
 :: :: Actually, I'm not running Apache right now. This has something to do
 with
 :: my
 :: :: servlet context (*.html) not being sent to the JSP engine - it's
 treating
 :: it
 :: :: like regular HTML right now. Strange, since my other mappings seem
 to
 :: work
 :: :: fine (*.do).
 :: ::
 :: :: Michael
 :: ::
 :: ::
 :: :: - Original Message -
 :: :: From: Schalk [EMAIL PROTECTED]
 :: :: To: 'Tomcat Users List' [EMAIL PROTECTED]
 :: :: Sent: Tuesday, June 08, 2004 11:23 AM
 :: :: Subject: RE: JSP source being shown (not being executed)
 :: ::
 :: ::
 :: :: Just a thought but, if you are running both Apache and Tomcat,
 Apache
 is
 :: :: probably picking up the .html extension and tries to display the
 content
 :: of
 :: :: the file which will result in it displaying the code.
 :: ::
 :: :: Kind Regards
 :: :: Schalk Neethling
 :: :: Web Developer.Designer.Programmer.President
 :: :: Volume4.Development.Multimedia.Branding
 :: :: emotionalize.conceptualize.visualize.realize
 :: :: Tel: +27125468436
 :: :: Fax: +27125468436
 :: :: email:[EMAIL PROTECTED]
 :: :: web: www.volume4.com
 :: ::
 :: :: This message contains information that is considered to be sensitive
 or
 :: :: confidential and may not be forwarded or disclosed to any other
 party
 :: :: without the permission of the sender. If you received this message
 in
 :: error,
 :: :: please notify me immediately so that I can correct and delete the
 :: original
 :: :: email. Thank you.
 :: ::
 :: :: :: -Original Message-
 :: :: :: From: Michael Mehrle [mailto:[EMAIL PROTECTED]
 :: :: :: Sent: Tuesday, June 08, 2004 7:58 PM
 :: :: :: To: Tomcat Users List
 :: :: :: Subject: JSP source being shown (not being executed)
 :: :: ::
 :: :: :: For some reason my JSP source is being shown - it's not being
 compiled
 :: :: and
 :: :: :: executed. It might be worthwhile mentioning that I am mapping
 some
 :: :: servlet
 :: :: :: context as *.html, which redirects to this jsp - but it worked in
 :: another
 :: :: :: app of mine and inside my new app it doesn't work.
 :: :: ::
 :: :: :: I'm running Tomcat 5.0.26 btw.
 :: :: ::
 :: :: :: Any input would be welcome.
 :: :: ::
 :: :: :: Michael
 :: :: ::
 :: :: ::
 :: :: ::
 -
 :: :: :: To unsubscribe, e-mail: tomcat-user-
 [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

RE: AW: IP Adresses

2004-06-09 Thread Andy Eastham
Gunnar,

You are contacting the developers of Tomcat.  I'm not one myself, but I bet
some of the people who have put in vast amounts of their own time
voluntarily to develop Tomcat would be quite offended by your comment.

I also wouldn't be surprised if the reason that you can't run another web
server on port 80 is due to your own misconfiguration and not actually a bug
in Tomcat at all.  

But as Tomcat is open source, you could of course check the source yourself
to confirm this.  If you did indeed find a bug, you could even fix it.
That's how open source software works. 

Andy

 -Original Message-
 From: Gunnar Pörschke [mailto:[EMAIL PROTECTED]
 Sent: 09 June 2004 15:09
 To: 'Tomcat Users List'
 Subject: AW: AW: IP Adresses
 
 Thanks, this time it helps. But Tomcat still blocking all my ip adresses.
 I
 cannot run other web server on the other IP with the port 80 :(
 
 Nevertheless I'll find a different solution.
 How can we contact the developer of tomcat? Maybe it is a bug and will be
 fixed in version 6 or 7 ;-)
 
 Many thanks!
 
 Gunnar
 
 -Ursprüngliche Nachricht-
 Von: David Smith [mailto:[EMAIL PROTECTED]
 Gesendet: Mittwoch, 9. Juni 2004 15:26
 An: Tomcat Users List
 Betreff: Re: AW: IP Adresses
 
 
 Use the address attribute of your connector to make the connector listen
 on only one IP.
 
 Connector port=8080 address=192.168.0.10 ...all the rest /
 
 --David
 
 Gunnar Pörschke wrote:
 
 :-( this is how to configure remote ip adresses. This doesn't help at
 all... I need to configure the ip adress for my (local) tomcat itself
  Tomcat currently listen to all incoming connections no matter if
 they come from network interface card 1 or network interface card 2
 : Any other suggestion?
 
 grunar
 
 -Ursprüngliche Nachricht-
 Von: Tim Funk [mailto:[EMAIL PROTECTED]
 Gesendet: Mittwoch, 9. Juni 2004 15:07
 An: Tomcat Users List
 Betreff: Re: IP Adresses
 
 
 http://jakarta.apache.org/tomcat/faq/security.html#restrict
 
 -Tim
 
 Gunnar Pörschke wrote:
 
 
 Does anyone know how to configure tomcat to block only one specific Ip
 adress. I have one PC with two NICs. Tomcat blocks all available ip
 adress. How can I set a limitation?
 
 to anable additionally connectors in tomcats admin interface doesn`t
 work, either :-(
 
 
 
 
 -
 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]



Off Topic - Java Graphing Package

2004-05-12 Thread Andy Eastham
Hi,

Sorry this is a bit off topic, but can anyone recommend an open source or
freeware toolkit for building bar charts and graphs in java?

I am going to use it within Tomcat, but I could probably use something
that's aimed at applets if I had the source code.

Thanks to anyone who responds.

Best regards,

Andy



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



RE: Off Topic - Java Graphing Package

2004-05-12 Thread Andy Eastham
Thanks very much - I'll have a go with JFreeChart - it looks perfect on
first glance.

Andy

 -Original Message-
 From: foxgem [mailto:[EMAIL PROTECTED]
 Sent: 12 May 2004 10:58
 To: Tomcat Users List
 Subject: Re: Off Topic - Java Graphing Package
 
 jfreechart  cewolf ( it is a taglib for jfreechart).
 u can find it at sourceforge.
 - Original Message -
 From: Andy Eastham [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Wednesday, May 12, 2004 5:41 PM
 Subject: Off Topic - Java Graphing Package
 
 
  Hi,
 
  Sorry this is a bit off topic, but can anyone recommend an open source
 or
  freeware toolkit for building bar charts and graphs in java?
 
  I am going to use it within Tomcat, but I could probably use something
  that's aimed at applets if I had the source code.
 
  Thanks to anyone who responds.
 
  Best regards,
 
  Andy
 
 
 
  -
  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: Off Topic - Java Graphing Package

2004-05-12 Thread Andy Eastham
Thanks Ryan.  That's a useful resource.

Andy

 -Original Message-
 From: Ryan Lissack [mailto:[EMAIL PROTECTED]
 Sent: 12 May 2004 10:44
 To: 'Tomcat Users List'
 Subject: RE: Off Topic - Java Graphing Package
 
 Hi,
 
 This might help :
 
 http://www.manageability.org/blog/stuff/open-source-structured-graphics-
 libr
 aries-in-java/view
 
 Ryan.
 
 -Original Message-
 From: Andy Eastham [mailto:[EMAIL PROTECTED]
 Sent: 12 May 2004 10:41
 To: 'Tomcat Users List'
 Subject: Off Topic - Java Graphing Package
 
 
 Hi,
 
 Sorry this is a bit off topic, but can anyone recommend an open source or
 freeware toolkit for building bar charts and graphs in java?
 
 I am going to use it within Tomcat, but I could probably use something
 that's aimed at applets if I had the source code.
 
 Thanks to anyone who responds.
 
 Best regards,
 
 Andy
 
 
 
 -
 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: SSL and sessions

2004-04-21 Thread Andy Eastham
Glen,

I found this a right pain, and currently I'm using SSL for the whole app.
But this is storing up performance problems as I'm sending fairly high rez
astronomical images over SSL and I know I'll have to fix it sometime.

The way I'm thinking of getting round it is to send back a one time key in a
cookie in the redirect page, that is the key to an application visible
hashtable where I'll put the original session as the value against this key.
When the redirect occurs, I'll read my key cookie to get the one time key to
retrieve the original session, then create a new session for the insecure
request, and copy everything I need from the secure session to the new
session.

I haven't tried this yet though and if anyone's got any better ideas, I'd be
pleased to hear them...

Andy

-Original Message-
From: Drinkwater, GJ (Glen) [mailto:[EMAIL PROTECTED] 
Sent: 21 April 2004 13:15
To: 'Tomcat Users List'
Subject: SSL and sessions

Hi

I am using tomcat with ssl for the initial log into my application over ssl,
the problem is that if i send the application back to http (normal) the
session that i first created under ssl is different from the session that is
created going back to http.  Is there any configuration that allows the same
session to go to and from https and http with the same session id.

Cheers Glen


-
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: Classpath problems with tomcat on Linux 9

2004-04-20 Thread Andy Wadsworth

Figured out my problem. I wasn't placing the class file in a subdirectory
of the WEB-INF/classes/package.

Solution:
   created UserData.java with package name userdata
   created directory WEB-INF/classes/userdata
   placed UserData.class in WEB-INF/classes/userdata

Thank you all who responded, and anyone else that read this and spent
more then the time to click the delete button on it.

-Andy.

On Monday 19 April 2004 12:27 pm, Stephen Bacon wrote:
 Hi Andy,

I'm porting over to TC5 and I've not had any problems with it finding
 my classes, *BUT* I don't put any classes into the base directory
 itself, but below that.

 So for example, my UserBean class is in
 myapp/WEB-INF/classes/AccessCtrl and it is part of the package
 AccessCtrl (i.e. first line of bean is package AccessCtrl;)

 The pages that use this include the directive:
 %@ page import=AccessCtrl.* %
 so that it can find them.

 Additionally, to avoid problems, I generally include the packagename
 anyways in my useBean tags:
 jsp:useBean id=beanUser
   class=AccessCtrl.UserBean
   scope=session /
 Which shouldn't be necessary, but I find it increases readability anyways.

 -Steve

 Andy Wadsworth wrote:
  Should I expect Tomcat to find my UserData.class file if I put it
  in webapps/myapp/WEB-INF/classes? Do I need to create a web.xml
  or should it find the class file without any web.xml customization?
  If anyone has a very simple example that I could drop in to see if
  it works, I'd appreciate it. I've already verified that the jsp-examples
  all work, but there is a lot of stuff in the web.xml that I shouldn't
  need for what I want to do, and finding what I need is probably where
  my problems lie.

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

-- 
###
# Andy Wadsworth  #
# #
# BondMart Technologies, Inc. #
# [EMAIL PROTECTED]  #
# #
###
Historical High School Essay Bloopers:
They (Greeks) also had myths.  A myth is a
female moth.  One myth says that the mother
of Achilles dipped him in the River Stynx
until he became intollerable.


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



Re: Classpath problems with tomcat on Linux 9

2004-04-19 Thread Andy Wadsworth

Still no luck. I'm basically trying to do exactly the same thing
that the jsp-examples/checkbox is doing and I can't get Tomcat
to recognize my UserData.class file. I've tried placing my UserData.class
file in every location possible, and no luck. My next step will be
to downgrade to Tomcat 4 so I can at least try out the examples that
are described in the Tomcat Bible (the examples don't work with
Tomcat 5).

Should I expect Tomcat to find my UserData.class file if I put it
in webapps/myapp/WEB-INF/classes? Do I need to create a web.xml 
or should it find the class file without any web.xml customization?
If anyone has a very simple example that I could drop in to see if
it works, I'd appreciate it. I've already verified that the jsp-examples
all work, but there is a lot of stuff in the web.xml that I shouldn't
need for what I want to do, and finding what I need is probably where
my problems lie.

-Andy.


On Friday 16 April 2004 07:32 pm, Berry, Layton wrote:
 I'm guessing you need to put the UserData class in a package,
 and import it into your savename page.

 Quoting from JSP 2.0 spec, As of JSP 2.0, it is illegal
 to refer to any classes from the unnamed (a.k.a. default) package.

 -Layton

 -Original Message-

 From: Andy Wadsworth [mailto:[EMAIL PROTECTED]

 Sent: Friday, April 16, 2004 2:26 PM
 To: [EMAIL PROTECTED]
 Subject: Classpath problems with tomcat on Linux 9
 
 
 
 I'm just getting started with my JSP and tomcat experience, and while
 learning how JSP works, I'm can't get tomcat to recognize supporting
 class definitions that I have placed in myapp/WEB-INF/classes.
 
 Here's my setup:
 * tomcat 5.0.19, running on RedHat Linux 9.0 Pro
 * no customization to $CATALINA_HOME/conf/web.xml
   no customization to $CATALINA_HOME/conf/server.xml
   added my user account as a manager in
 $CATALINA_HOME/conf/tomcat-users.xml
 * I'm running tomcat using the $CATALINA_HOME/bin/startup.sh
 * I'm running tomcat as my normal login id, although I've also
 tried it as
   root just to make sure it wasn't a file permissions issue.
 * I'm able to use the Tomcat manager at
 http://localhost:8080/manager to
   start/stop/reload/deploy applications
 * The jsp-examples appear to work fine
 
 Here's what I'm trying to do:
 * Created the following index.jsp and placed it in
   $CATALINA_HOME/webapps/test
 
 htmlbody
 form method=post action =savename.jsp
 What's your name?  input type=text name=username size=20
 What's your email? input type=text name=email size=20
 Pinput type=submit
 /form/body/html
 
 * Created the following as $CATALINA_HOME/webapps/test/savename.jsp
 jsp:useBean id=user class=UserData scope=session/
 jsp:setProperty name=user property=*/
 htmlbody
 Name: %= user.getUsername() %BR
 Email: %= user.getEmail() %BR
 /body/html
 
 * Created a UserData.java file that defines a public class UserData
   with username and email fields as type String. Added public
   access methods for setUsername, getUsername, setEmail, getEmail.
   I compiled UserData.java using javac, and to produce UserData.class
   which I placed in $CATALINA_HOME/webapps/test/WEB-INF/classes. The
   UserData.java class does not define a package nor does it import
   anything (line 1 is public class UserData)
 
 * deployed the test application using the tomcat manager and it shows
   that the application is deployed with no errors.
 
 * Using IE 6.0, I enter the url to test.jsp and it displays the form as
   expected. I enter a name and email value into the form and press the
   submit button and I get the following:
  HTTP Status 500 -
  exception
  org.apache.jasper.JasperException: Unable to compile class for JSP
  An error occurred at line: 1 in jsp file: /savename.jsp
 
  Generated sevlet error:
 [javac] Compiling 1 source file
 
 .../work/Catalina/localhost/test/org/apache/jsp/savename_jsp.java:42
  symbol : class UserData
 location: class org.apache.jsp.savename_jsp
 UserDAta user = null
 
 
 I suspect this is a classpath issue but everything I read says
 that if you
 put your classes in appdir/WEB-INF/classes, it will just work.
 
 There must be some basic thing I'm missing. Any help would be very much
 apprciated.
 
 Thanks in advance.
 -Andy.
 
 --
 ###
 # Andy Wadsworth  #
 # #
 # BondMart Technologies, Inc. #
 # [EMAIL PROTECTED]  #
 # #
 ###
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-- 
###
# Andy Wadsworth  #
# #
# BondMart Technologies, Inc. #
# [EMAIL PROTECTED]  #
# #
###
The average woman

Classpath problems with tomcat on Linux 9

2004-04-16 Thread Andy Wadsworth

I'm just getting started with my JSP and tomcat experience, and while 
learning how JSP works, I'm can't get tomcat to recognize supporting
class definitions that I have placed in myapp/WEB-INF/classes.

Here's my setup:
* tomcat 5.0.19, running on RedHat Linux 9.0 Pro
* no customization to $CATALINA_HOME/conf/web.xml
  no customization to $CATALINA_HOME/conf/server.xml
  added my user account as a manager in $CATALINA_HOME/conf/tomcat-users.xml
* I'm running tomcat using the $CATALINA_HOME/bin/startup.sh
* I'm running tomcat as my normal login id, although I've also tried it as
  root just to make sure it wasn't a file permissions issue.
* I'm able to use the Tomcat manager at http://localhost:8080/manager to
  start/stop/reload/deploy applications
* The jsp-examples appear to work fine

Here's what I'm trying to do:
* Created the following index.jsp and placed it in
  $CATALINA_HOME/webapps/test

htmlbody
form method=post action =savename.jsp
What's your name?  input type=text name=username size=20
What's your email? input type=text name=email size=20
Pinput type=submit
/form/body/html

* Created the following as $CATALINA_HOME/webapps/test/savename.jsp
jsp:useBean id=user class=UserData scope=session/
jsp:setProperty name=user property=*/
htmlbody
Name: %= user.getUsername() %BR
Email: %= user.getEmail() %BR
/body/html

* Created a UserData.java file that defines a public class UserData
  with username and email fields as type String. Added public
  access methods for setUsername, getUsername, setEmail, getEmail.
  I compiled UserData.java using javac, and to produce UserData.class
  which I placed in $CATALINA_HOME/webapps/test/WEB-INF/classes. The
  UserData.java class does not define a package nor does it import
  anything (line 1 is public class UserData)

* deployed the test application using the tomcat manager and it shows
  that the application is deployed with no errors.

* Using IE 6.0, I enter the url to test.jsp and it displays the form as
  expected. I enter a name and email value into the form and press the
  submit button and I get the following:
 HTTP Status 500 -
 exception
 org.apache.jasper.JasperException: Unable to compile class for JSP
 An error occurred at line: 1 in jsp file: /savename.jsp

 Generated sevlet error:
[javac] Compiling 1 source file
.../work/Catalina/localhost/test/org/apache/jsp/savename_jsp.java:42
symbol : class UserData
location: class org.apache.jsp.savename_jsp
UserDAta user = null


I suspect this is a classpath issue but everything I read says that if you
put your classes in appdir/WEB-INF/classes, it will just work. 

There must be some basic thing I'm missing. Any help would be very much
apprciated.

Thanks in advance.
-Andy.

-- 
###
# Andy Wadsworth  #
# #
# BondMart Technologies, Inc. #
# [EMAIL PROTECTED]  #
# #
###





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



Re: Classpath problems with tomcat on Linux 9

2004-04-16 Thread Andy Wadsworth

Ah, if it was only that simple...
The capital A is a typo in the email message, not in the actual
error. I'm using IE on a WinXP box as my browser, but I sent my
email from my Linux machine and I can't copy/paste between the two.
-Andy.

On Friday 16 April 2004 03:32 pm, Caldarale, Charles R wrote:
  From: Andy Wadsworth [mailto:[EMAIL PROTECTED]
  Subject: Classpath problems with tomcat on Linux 9
 
  .../work/Catalina/localhost/test/org/apache/jsp/savename_jsp.java:42
  symbol : class UserData
  location: class org.apache.jsp.savename_jsp
  UserDAta user = null

^


 Seems awfully suspicious to have a capital A in the middle of the class
 name...

 Are you sure the .jsp doesn't have a typo in it?

  - Chuck

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

-- 
###
# Andy Wadsworth  #
# #
# BondMart Technologies, Inc. #
# [EMAIL PROTECTED]  #
# #
###
How To Make Love Endure...
Don't forget your wife's name ...
That will mess up the love.
Erin, age 8



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



RE: Unexpected tomcat 4.1.27-30 shutdown problem

2004-04-12 Thread Nocera, Andrew A (Andy), ALABS
Hi,

Would an exeception in the code cause tomcat to stop?

Andy 

---tail catalina.out  

Stopping service Tomcat-Standalone
[INFO] Http11Protocol - -Stoping http11 protocol on 8099
Catalina:type=ThreadPool,name=http8099


-tail localhost_log.2004-04-12.txt
2004-04-12 16:45:00 ApplicationDispatcher[/SCME] Servlet.service() for
servlet j
sp threw exception
org.apache.jasper.JasperException
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:254)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
95)

2004-04-12 16:46:22 StandardHost[localhost]: Removing web application at
context path /SCME
2004-04-12 16:46:23 StandardHost[localhost]: Removing web application at
context path /examples
2004-04-12 16:46:23 StandardHost[localhost]: Removing web application at
context path /webdav
2004-04-12 16:46:23 StandardHost[localhost]: Removing web application at
context path /tomcat-docs
2004-04-12 16:46:23 StandardHost[localhost]: Removing web application at
context path /manager

---
tail localhost_examples_log.2004-04-12.txt
2004-04-12 16:46:23 SessionListener: contextDestroyed()
2004-04-12 16:46:23 ContextListener: contextDestroyed()
-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Monday, April 12, 2004 8:44 AM
To: Tomcat Users List
Subject: RE: Unexpected tomcat 4.1.27-30 shutdown problem



Hi,
I am running tomcat 4.1.27/29/30 on a Solaris 5.7 or 5.8 and it
shutsdown
for no
apparent reason.   Sometimes it can go for hours without a problem,
othetimes it stops much
sooner.  There is no obvious error, just a shutdown.  The same code
built
on another Solaris box and/or HPUX runs without a problem.  Any ideas
how I
can debug this?

When it shuts down, are there files named 'core' and 'hs_err_pid'
(where  is the process ID of the server) in the working directory?
If so, what do those files contain?

The advice at this point is generic: make sure the box has the latest
Sun OS patches required for your JDK (these patches are available on the
JDK download page near the bottom), and make sure the user account
running the server has sufficient file descriptors and threads (the
ulimit settings).

Yoav Shapira



This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential,
proprietary and/or privileged.  This e-mail is intended only for the
individual(s) to whom it is addressed, and may not be saved, copied,
printed, disclosed or used by anyone else.  If you are not the(an)
intended recipient, please immediately delete this e-mail from your
computer system and notify the sender.  Thank you.


-
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]



FYI: Extra jar files under server/lib are bad!

2004-04-12 Thread Nocera, Andrew A (Andy), ALABS

Hi,

I installed a jar file under server/lib to resolve a problem and spent
the last few days trying to figure out why it did not work.  Apparently,
renaming the old jar file to 'xservlets-cgi.jar' is not good enough.
beware! 

Andy



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



Unexpected tomcat 4.1.27-30 shutdown problem

2004-04-09 Thread Nocera, Andrew A (Andy), ALABS
Hi,

I am running tomcat 4.1.27/29/30 on a Solaris 5.7 or 5.8 and it shutsdown for no 
apparent reason.   Sometimes it can go for hours without a problem, othetimes it stops 
much
sooner.  There is no obvious error, just a shutdown.  The same code built on another 
Solaris box and/or HPUX runs without a problem.  Any ideas how I can debug this?


Thanks,
Andy

Starting service Tomcat-Standalone
Apache Tomcat/4.1.29
[INFO] PropertyMessageResources - -Initializing, config='org.apache.struts.util.
LocalStrings', returnNull=true
[INFO] PropertyMessageResources - -Initializing, config='org.apache.struts.actio
n.ActionResources', returnNull=true
[INFO] PropertyMessageResources - -Initializing, config='org.apache.webapp.admin
.ApplicationResources', returnNull=true
[INFO] Http11Protocol - -Starting Coyote HTTP/1.1 on port 8080
[INFO] ChannelSocket - -JK2: ajp13 listening on 0.0.0.0/0.0.0.0:8009
[INFO] JkMain - -Jk running ID=0 time=1/51  config=/export/home/wscmeadm/jakarta
-tomcat-4.1.29/conf/jk2.properties
Stopping service Tomcat-Standalone
[INFO] Http11Protocol - -Stoping http11 protocol on 8080 Catalina:type=ThreadPoo
l,name=http8080

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



Cannot create JDBC driver of class '' for connect URL 'null'

2004-04-05 Thread Andy Grove
Hi,

I am trying to convert my Tomcat web application to use JNDI to lookup a
DataSource rather than using DriverManager directly. My application
works fine using DriverManager so I know I have my classpath set up
correctly. 

The problem I have seems to be a very common one yet I cannot find a
solution to it using Google. I am getting the following error message
when I attempt to look up a DataSource:

Cannot create JDBC driver of class '' for connect URL 'null'

This implies to me that Tomcat is recognizing my Resource declaration
in my conf/server.xml but is not loading the associated
ResourceParams. I get this problem with Tomcat 4.1 and 5.0 on Red Hat
9 with Sun JDK 1.4.2.

My web.xml contains:

  resource-ref
descriptionDB Connection/description
res-ref-namejdbc/mydb/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
  /resource-ref

My $TOMCAT_HOME/conf/server.xml contains the following (I have tried
defining this within the context of my webapp and also in the
GlobalNamingResources section).

 Resource name=jdbc/mydb auth=Container type=javax.sql.DataSource
/
   
  
ResourceParams name=jdbc/mydb
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
parameter
  namemaxActive/name
  value100/value
/parameter
parameter
  namemaxIdle/name
  value30/value
/parameter
parameter
  namemaxWait/name
  value1/value
/parameter
parameter
 nameusername/name
 valueebay/value
/parameter
parameter
 namepassword/name
 value/value
/parameter
parameter
   namedriverClassName/name
   valueorg.postgresql.Driver/value
/parameter
parameter
  nameurl/name
  valuejdbc:postgresql://localhost/mydb/value
/parameter
  /ResourceParams

Lastly, my Java code is as follows:

InitialContext initCtx = new InitialContext();
Object obj = initCtx.lookup( java:comp/env/jdbc/mydb );
DataSource ds = (DataSource) obj;
return ds.getConnection();

Does anyone have JNDI working with Tomcat? Any help would be much
appreciated!

Thanks,

Andy Grove.



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

2004-04-05 Thread Andy Grove
Thanks Harry but the problem is that it is not even trying to load the
Postgres driver - it is not getting that far. It is trying to load JDBC
driver class '' (empty string) and is trying to access JDBC URL of
'null'. It seems that the ResourceParams section is not being used. 

I do have the postgres jar deployed to common/lib.

Thanks.

On Mon, 2004-04-05 at 14:52, Harry Mantheakis wrote:

 Hello
 
 
  My web.xml contains:
 
 
 That looks the same as mine (which works) so no problem there. You do not
 actually *need* this element in the deployment descriptor if you are using
 Tomcat 5, but it makes your code portable, should you ever (God forbid!)
 switch to another servlet container.
 
 
  My $TOMCAT_HOME/conf/server.xml contains the following...
 
 
 BTW, it is $CATALINA_HOME that matters - $TOMCAT_HOME is not used.
 
 Looking at your resource definitions, this sub-element:
 
 
 parameter
  nameurl/name
  value
  jdbc:postgresql://localhost/mydb
  /value
 /parameter
 
 
 Maybe should read:
 
 
 parameter
  nameurl/name
  value
  jdbc:postgresql://localhost:5432/mydb
  /value
 /parameter
 
 
 Mine, at least, needs a port number to be specified.
 
 The rest of the resource element looks okay to me. Also, your look-up code
 looks good too, so my only guess is that you have forgotten to put the
 PostgreSQL JDBC driver under the container's classpath.
 
 You probably have the driver located under your application's 'WEB-INF/lib'
 directory.
 
 Try placing the driver in the '$CATALINA_HOME/common/lib' directory, but do
 not have it both places! (Remove it from the 'WEB-INF/lib' directory.)
 
 Also, make sure you have a driver named 'pg74.1jdbc3.jar'. The one that
 comes bundled with the PostgreSQL 7.4 RPM is out of date. You can download
 the 7.4 driver from PG's JDBC site.
 
 Good luck.
 
 Harry Mantheakis
 London, UK
 
 
 
 
  Hi,
  
  I am trying to convert my Tomcat web application to use JNDI to lookup a
  DataSource rather than using DriverManager directly. My application
  works fine using DriverManager so I know I have my classpath set up
  correctly. 
  
  The problem I have seems to be a very common one yet I cannot find a
  solution to it using Google. I am getting the following error message
  when I attempt to look up a DataSource:
  
  Cannot create JDBC driver of class '' for connect URL 'null'
  
  This implies to me that Tomcat is recognizing my Resource declaration
  in my conf/server.xml but is not loading the associated
  ResourceParams. I get this problem with Tomcat 4.1 and 5.0 on Red Hat
  9 with Sun JDK 1.4.2.
  
  My web.xml contains:
  
  resource-ref
descriptionDB Connection/description
res-ref-namejdbc/mydb/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
  /resource-ref
  
  My $TOMCAT_HOME/conf/server.xml contains the following (I have tried
  defining this within the context of my webapp and also in the
  GlobalNamingResources section).
  
  Resource name=jdbc/mydb auth=Container type=javax.sql.DataSource
  /
   
  ResourceParams name=jdbc/mydb
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
parameter
  namemaxActive/name
  value100/value
/parameter
parameter
  namemaxIdle/name
  value30/value
/parameter
parameter
  namemaxWait/name
  value1/value
/parameter
parameter
 nameusername/name
 valueebay/value
/parameter
parameter
 namepassword/name
 value/value
/parameter
parameter
   namedriverClassName/name
   valueorg.postgresql.Driver/value
/parameter
parameter
  nameurl/name
  valuejdbc:postgresql://localhost/mydb/value
/parameter
  /ResourceParams
  
  Lastly, my Java code is as follows:
  
  InitialContext initCtx = new InitialContext();
  Object obj = initCtx.lookup( java:comp/env/jdbc/mydb );
  DataSource ds = (DataSource) obj;
  return ds.getConnection();
  
  Does anyone have JNDI working with Tomcat? Any help would be much
  appreciated!
  
  Thanks,
  
  Andy Grove.
  
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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

2004-04-05 Thread Andy Grove
I found the problem.

To get it working I needed to have the Resource and ResourceParams
in the Global section and then add a ResourceLink in the context for
my webapp. This enabled Tomcat to resolve the parameters.

I've posted my config files here for anyone interested:

http://www.codefutures.com/weblog/openknowledge/archives/77.html

On Mon, 2004-04-05 at 15:08, Andy Grove wrote:

 Thanks Harry but the problem is that it is not even trying to load the
 Postgres driver - it is not getting that far. It is trying to load JDBC
 driver class '' (empty string) and is trying to access JDBC URL of
 'null'. It seems that the ResourceParams section is not being used. 
 
 I do have the postgres jar deployed to common/lib.
 
 Thanks.
 
 On Mon, 2004-04-05 at 14:52, Harry Mantheakis wrote:
 
  Hello
  
  
   My web.xml contains:
  
  
  That looks the same as mine (which works) so no problem there. You do not
  actually *need* this element in the deployment descriptor if you are using
  Tomcat 5, but it makes your code portable, should you ever (God forbid!)
  switch to another servlet container.
  
  
   My $TOMCAT_HOME/conf/server.xml contains the following...
  
  
  BTW, it is $CATALINA_HOME that matters - $TOMCAT_HOME is not used.
  
  Looking at your resource definitions, this sub-element:
  
  
  parameter
   nameurl/name
   value
   jdbc:postgresql://localhost/mydb
   /value
  /parameter
  
  
  Maybe should read:
  
  
  parameter
   nameurl/name
   value
   jdbc:postgresql://localhost:5432/mydb
   /value
  /parameter
  
  
  Mine, at least, needs a port number to be specified.
  
  The rest of the resource element looks okay to me. Also, your look-up code
  looks good too, so my only guess is that you have forgotten to put the
  PostgreSQL JDBC driver under the container's classpath.
  
  You probably have the driver located under your application's 'WEB-INF/lib'
  directory.
  
  Try placing the driver in the '$CATALINA_HOME/common/lib' directory, but do
  not have it both places! (Remove it from the 'WEB-INF/lib' directory.)
  
  Also, make sure you have a driver named 'pg74.1jdbc3.jar'. The one that
  comes bundled with the PostgreSQL 7.4 RPM is out of date. You can download
  the 7.4 driver from PG's JDBC site.
  
  Good luck.
  
  Harry Mantheakis
  London, UK
  
  
  
  
   Hi,
   
   I am trying to convert my Tomcat web application to use JNDI to lookup a
   DataSource rather than using DriverManager directly. My application
   works fine using DriverManager so I know I have my classpath set up
   correctly. 
   
   The problem I have seems to be a very common one yet I cannot find a
   solution to it using Google. I am getting the following error message
   when I attempt to look up a DataSource:
   
   Cannot create JDBC driver of class '' for connect URL 'null'
   
   This implies to me that Tomcat is recognizing my Resource declaration
   in my conf/server.xml but is not loading the associated
   ResourceParams. I get this problem with Tomcat 4.1 and 5.0 on Red Hat
   9 with Sun JDK 1.4.2.
   
   My web.xml contains:
   
   resource-ref
 descriptionDB Connection/description
 res-ref-namejdbc/mydb/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
   /resource-ref
   
   My $TOMCAT_HOME/conf/server.xml contains the following (I have tried
   defining this within the context of my webapp and also in the
   GlobalNamingResources section).
   
   Resource name=jdbc/mydb auth=Container type=javax.sql.DataSource
   /

   ResourceParams name=jdbc/mydb
 parameter
   namefactory/name
   valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 /parameter
 parameter
   namemaxActive/name
   value100/value
 /parameter
 parameter
   namemaxIdle/name
   value30/value
 /parameter
 parameter
   namemaxWait/name
   value1/value
 /parameter
 parameter
  nameusername/name
  valueebay/value
 /parameter
 parameter
  namepassword/name
  value/value
 /parameter
 parameter
namedriverClassName/name
valueorg.postgresql.Driver/value
 /parameter
 parameter
   nameurl/name
   valuejdbc:postgresql://localhost/mydb/value
 /parameter
   /ResourceParams
   
   Lastly, my Java code is as follows:
   
   InitialContext initCtx = new InitialContext();
   Object obj = initCtx.lookup( java:comp/env/jdbc/mydb );
   DataSource ds = (DataSource) obj;
   return ds.getConnection();
   
   Does anyone have JNDI working with Tomcat? Any help would be much
   appreciated!
   
   Thanks,
   
   Andy Grove.
   
   
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  


RE: [OT?] Apache Portable Runtime JK2

2004-04-01 Thread Andy Eastham
Matt,

I built it on Solaris 9.  I'd already built and installed apache 2, and all
required libraries were then installed.  Are you specifically trying to do
this without installing Apache2?

If not, here's my simple notes:
build mod_jk2:

download connector src:
jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz

gunzip and untar the distribution, then
cd jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz/jk/native2
./configure --with-apxs2=/usr/local/apache2/bin/apxs
--with-java-home=/usr/java/j2sdk1.4.2
make

Built libraries are:
jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz/jk/build/jk2/apache2/mod_jk2.
so
jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz/jk/build/jk2/apache2/jkjni.so

Copy these libraries into /usr/local/apache2/modules
cp jakarta-tomcat-connectors-jk2-2.0.2-src/jk/build/jk2/apache2/mod_jk2.so
/usr/local/apache2/modules/
cp jakarta-tomcat-connectors-jk2-2.0.2-src/jk/build/jk2/apache2/jkjni.so
/usr/local/apache2/modules/ 

Obviously, the java and apache paths may be different, but hopefully this
might help?

Andy


-Original Message-
From: Dale, Matt [mailto:[EMAIL PROTECTED] 
Sent: 01 April 2004 13:55
To: Tomcat Users List
Subject: [OT?] Apache Portable Runtime  JK2

Hi,

I need to build the JK2 connector on Solaris 9, I know that the APR
libraries are needed for building on linux and assume this to also be the
case with Solaris.

I have downloaded the source of APR from http://apr.apache.org but it states
that this is just alpha and not ready for system wide use. So my questions
are as follows.

1. Do I need APR to build JK2 on Solaris 9

2. If so where do I get APR and is the 0.9.4 version suitable?

3. If not then where do I get a suitable version.

Ta
Matt



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



RE: deploying servlets, missing application web.xml

2004-03-30 Thread Andy Eastham
I had this problem once when I deployed onto a live server and it drove me
mad.  I not absolutely sure what caused it, but it was something like I'd
called the webapp's WEB-INF directory web-inf, ie a case sensitivity
problem in the path.

Andy

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: 30 March 2004 16:40
To: Tomcat Users List
Subject: RE: deploying servlets, missing application web.xml


Hi,
Ah, a subject line ;)

The permissions are o.k as they appear to be accessible to all users
(win xp pro), and I have not altered anything in the server.xml file

OK.  So all you did was create the directory for your webapp and the
ones under it, put web.xml there, and start tomcat?  I don't know what
tomcat would say it can't find your web.xml in that case.  Do all the
tomcat examples run fine?

Yoav Shapira



This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


-
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]



Where to find mod_jk2 for redhat?

2004-03-24 Thread Andy Grove
Hi,

I'm using Apache 2.0.46 and Tomcat 4.1.29 on Red Hat Enterprise Linux
and I am looking for the correct mod_jk2.so to use. 

There are no linux binary releases on the Jakarta site and the library
that I use successfully on another redhat server gives me this error
when starting Apache:

Starting httpd: httpd: module ../../server/apache2/mod_jk2.c is not
compatible with this version of Apache (found 20020628, need 20020903).
Please contact the vendor for the correct version.

I did try downloading the source from the Jakarta site bu the build
script refers to util directory that is not in the source distribution
(does anyone know why?).

Any help would be much appreciated!

Cheers,

Andy Grove.


RE: Does anyone have a working workers2.properties file?

2004-01-19 Thread Andy Eastham
Rasmus,

This simple one works on windows and solaris.  By the way, when I changed
the shm size to 100, it didn't...

Andy

[logger.apache2]
level=DEBUG

[shm]
file=c:/Apache2/logs/jk2.shm
size=1048576

# Example socket channel, override port and host.
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1

# define the worker
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009

# Uri mapping
[uri:192.168.0.102/control/*]
worker=ajp13:localhost:8009

-Original Message-
From: Rasmus Munk [mailto:[EMAIL PROTECTED] 
Sent: 16 January 2004 23:32
To: 'Tomcat Users List'
Subject: Does anyone have a working workers2.properties file?

Hi

I am looking for a working workers2.properties file to use as a template. I
have seen a lot of examples of sections workers2.properties files, but I
would like to see a complete file.

I am running IIS 5.0 and tomcat 4.1.27 using isapi_redirector2.dll 2.0.2

Thanks,

Rasmus


-
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: using mod_rewrite with mod_jk2

2003-12-18 Thread Andy Eastham
Jon,

I'm pretty sure you can, because I once had a problem which was fixed by
swapping the order of the LoadModule statements for mod_jk2 and
mod_rewrite.

Not an exact answer, but hopefully some encouragement...

Andy

-Original Message-
From: jon yeargers [mailto:[EMAIL PROTECTED] 
Sent: 17 December 2003 18:01
To: [EMAIL PROTECTED]
Subject: using mod_rewrite with mod_jk2

In what order do the various mod_* bits interact? 
 
Can I use mod_rewrite to setup the URL for passage to mod_jk2?



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



RE: Tomcat and Log4J

2003-12-18 Thread Andy Eastham
Kent,

A gothcha to be aware of: if you put log4j.jar in common/lib, all webapps
will share the same log4j configuration.  This causes a race at server
startup - the last one to initialize log4j wins, ie gets it's own settings.
Everything else then logs into the same file.  This is a symptom of static
variables loaded by the same class loader, so all webapps share the same
instance of the static log4j variables.

I put log4j.jar in each of my webapps' WEB-INF/lib folder to avoid this,
then each webapp can configure log4j to it's own requirements.

Andy

-Original Message-
From: Kent Boogaart [mailto:[EMAIL PROTECTED] 
Sent: 18 December 2003 04:45
To: '[EMAIL PROTECTED]'
Subject: RE: Tomcat and Log4J

 Howdy, Your problem is not log4j, it's commons-logging, which is nearly
always the culprit. The issue arises if log4j is in a classloader below
commons-logging, so
 commons-logging doesn't know log4j is there. You're configuring log4j OK,
and if you used a log4j Logger rather than a commons-logging Log, you'd see
expected 
 behavior. But you're using a commons-logging Log, which uses the
commons-logging configuration, which is tied to your server and outputs to
the console. Yoav
 Shapira Millennium ChemInformatics 

Shapira,

Thanks for the advice. I tried using Log4J directly by one of my classes
and, like you said, it worked. However, I wanted to stick with commons
logging since this is (supposedly) the most flexible logging solution.
Therefore, I tried sticking log4j.jar into ${TOMCAT_HOME}/common/lib and
log4j.xml into ${TOMCAT_HOME}/common/classes. This worked for Tomcat classes
but not my own (my log output was still going to stdout). This had me
stumped.

After further stuffing around, one of my work collegues mentioned he'd
gotten around this problem by including commons-logging.jar and
commons-logging-api.jar in his web app. I tried this and it worked. I then
removed commons-logging-api.jar from my web app and it still worked.

In a way this all kind of makes sense - my web app has its own commons
logging package which finds the log4j package and the configuration.
However, I am surprised that this was all necessary. I am also surprised
that it is (I think) undocumented.

Anyways, thanks for your help.

Regards,
Kent

-
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 and a DLL

2003-11-21 Thread Andy Eastham
David,

The line

Illegal Class name jawin folder/develop/jawin/DispatchPtr)

is very suspicious - I'm pretty sure that the space in the path to your
class will cause problems.

Try renaming jawin folder to just jawin and rebuild the jar.

Andy

 -Original Message-
 From: David Sierra Fernández [mailto:[EMAIL PROTECTED]
 Sent: 21 November 2003 09:16
 To: [EMAIL PROTECTED]
 Subject: Tomcat and a DLL


 Hi all,

 I have developed a small app with jawin (a java2COM bridge). I have used
 eclipse as a development tool and I referenced the jawin libraries and all
 works ok.

 the problem is when i deploy the app to Tomcat 4 and try to use a jsp to
 invoke my classes, I get an error that I can't solve.  I think is
 a problem
 of ubication of JAWIN libraries because when I try to get other class that
 does not use JAWIN, all works perfectly. I simplified the JSP in order to
 detect the error and I let it to invoke a simple constructor but goes on
 crashing!

 I tried to put jawin.dll and jawin.jar in the same directory that
 the class,
 in the app lib directory, in the common/lib directory of tomcat, in
 system32, in lib of the JRE, in bin of the JRE. it's useless, I don't
 know how to solve the error.


 The JSP is just as this.



 **
 **
 *
 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN
 %@ page import=es.tid.coche.correo.GestorCorreo %

  %
   GestorCorreo gestor = new GestorCorreo();
 %


 html
 head
 /head
 body

 h1MAIL APPLICATION/h1

 /body
 /html
 **
 **
 *

 As you can see I only invoke the constructor but it crashes.
 I have emptied the constructor method and works pretty fine (doing
 nothing...obviously)
 but when i make a call to an object of the library it crashes.
 This does not happen when i use eclipse...

 import com.develop.jawin.*;
 import com.develop.jawin.win32.*;
 import java.util.Vector;
 import es.tid.coche.beans.CorreoBean;


 the error I get in Internet Explorer is this:

 org.apache.jasper.JasperException: com/develop/jawin/DispatchPtr (Illegal
 Class name jawin folder/develop/jawin/DispatchPtr)
   at
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrap
 per.java:2
 48)
   at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A
 pplication
 FilterChain.java:247)
   at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati
 onFilterCh
 ain.java:193)
   at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapp
 erValve.ja
 va:260)
   at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
 text.invok
 eNext(StandardPipeline.java:643)
   at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
 java:480)
   at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at
 org.apache.catalina.core.StandardContextValve.invoke(StandardConte
 xtValve.ja
 va:191)
   at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
 text.invok
 eNext(StandardPipeline.java:643)
   at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
 java:480)
   at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

 DispatchPtr is a java class of the library that I use...
 any ideas?


 David Sierra Fernández
 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: Running a Service

2003-11-19 Thread Andy Eastham
Karl,

An easy way of doing this is to call your servlet with wget from a cron job.

Andy

 -Original Message-
 From: Karl Coleman [mailto:[EMAIL PROTECTED]
 Sent: 18 November 2003 20:21
 To: Tomcat Users List
 Subject: RE: Running a Service


 I apologize for being so broad. Let me be more specific. It might
 help some.

 We are running an intranet application running on apache and
 tomcat. It's all Java, using JSP and Servlets, and Struts. One
 function of the application is scanning in faxes. After being
 scanned, these documents are stored as TIFF files on the server
 temporarily. Right now, importing these images into the database
 is a manual process. There is a JSP page that has a Start Import
 button that invokes a servlet that imports these images into the
 database. My task is to make this an automated process so that
 any images that have been scanned in will get scanned in at
 night, say 3am. In other words, this code that is in this servlet
 that imports images needs to be called automatically every night at 3am.

 I hope that helps. Thanks.

 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, November 18, 2003 3:07 PM
 To: Tomcat Users List
 Subject: RE: Running a Service



 Howdy,
 You mean like a cron job? ;)  Or the Windows Scheduler on windows, or a
 3rd party tool like 12Ghosts Timer?

 Or do you mean already have a tomcat running around the clock but you'd
 like something to happen at 3am?  A tool like Quartz (quarts.sf.net)
 would help...

 Yoav Shapira
 Millennium ChemInformatics


 -Original Message-
 From: Karl Coleman [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, November 18, 2003 3:02 PM
 To: [EMAIL PROTECTED]
 Subject: Running a Service
 
 I need to run a process at a specific time every day, say 3:00am. How
 do
 you configure Tomcat to have a service running in the background.



 This e-mail, including any attachments, is a confidential
 business communication, and may contain information that is
 confidential, proprietary and/or privileged.  This e-mail is
 intended only for the individual(s) to whom it is addressed, and
 may not be saved, copied, printed, disclosed or used by anyone
 else.  If you are not the(an) intended recipient, please
 immediately delete this e-mail from your computer system and
 notify the sender.  Thank you.


 -
 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: JK2 Build Error

2003-11-19 Thread Andy Eastham
Bill,

The problem is that the apache runtime library cannot be located.

I just found this resource that might help you out:
http://cymulacrum.net/tomcat/jk2_compile.html

Best regards,

Andy

 -Original Message-
 From: Bill R [mailto:[EMAIL PROTECTED]
 Sent: 19 November 2003 02:03
 To: [EMAIL PROTECTED]
 Subject: JK2 Build Error
 
 
 I am sure you all have heard this before, and can give me some direction
 on how to solve this problem. 
 
 When I go to 'make' the jk2 module, I get the following build error:
 
 /usr/bin/ld: cannot find -lapr-0
 collect2: ld returned 1 exit status
 
 I am running Redhat 9
 jakarta-tomcat-5.0.14
 apache 2.0.40
 
 If you need more info, please let me know.  I am still a bit new at
 compiling my own shared objects for my own purposes (but I have done
 it), so keep that in mind... I am resourceful, but I need a leg up
 here.  :-)  Any help would be appreciated.
 
 Thanks,
 
 BillR
 
 JK2 Build ErrorJK2 Build Error
 -- 
 Bill R [EMAIL PROTECTED]
 


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



RE: https -- http session problem

2003-11-17 Thread Andy Eastham
Andrew,

Couldn't agree more - I've just been round this circle myself.

I don't care if someone gets a session hijacked in my application, but I
don't want passwords transferred over plain text, because people tend to use
the same passwords in multiple applications. This application may not need
to be completely bulletproof, but you can bet your bottom dollar that some
users are using the same paswords as for stuff that does need to be
bulletproof.

Don't anyone say well they shouldn't, because they do! :-)

Andy

-Original Message-
From: Andrew Mottaz [mailto:[EMAIL PROTECTED]
Sent: 17 November 2003 05:32
To: Tomcat Users List
Subject: Re: https -- http session problem




 http://nagoya.apache.org/bugzilla.  However, there aren't very many
 developers who like the idea of allowing you to hang yourself :).




Thanks much for the tip -- I have to disagree about this not being a
necessary change.  There are plenty of apps where people browse without
  a secure connection, but have to log in to perform some functions.
Users like to bookmark pages -- why should I force them to bookmark
only non-secure pages? Giving a developer control over how session
cookies function is better than forcing a hack where you have to always
redirect to a non-secure page to establish the session.  If you are
writing an application where the session data is so sensitive that you
have to protect against session hijacking, you should know about the
difference between secure and non-secure cookies.  I've got no problem
if the default behavior uses secure cookies when ever possible, but
change the Session uses cookie parameter to have a flag that allows
session cookies to always be non-secure.

Just my two-cent rant :)

Andrew


-
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: Problem with IIS tomcat 4.1 jk2 connector

2003-11-12 Thread Andy Eastham
Stéphane,

Your English is perfect - no need to apologise.

I've looked at my config (which is for 4.0.18 with jk2) and the only obvious
difference is that I don't have a leading / in my context path,

So try:
   Context path=java docBase= debug=0 privileged=true
reloadable=true/
rather than:
   Context path=/java docBase= debug=0 privileged=true
reloadable=true/

Hope this is the solution,

Best regards,

Andy
 -Original Message-
 From: Stéphane Brogi [mailto:[EMAIL PROTECTED]
 Sent: 12 November 2003 09:35
 To: [EMAIL PROTECTED]
 Subject: Problem with IIS tomcat 4.1 jk2 connector


 Hi

 First sorry for my english.

 We have a web server with tomcat 4.1.12 running with JK2 connector
 (isapi2_redirector.dll).
 The configuration works fine except for one link redirection
 calling a jsp.
 This problem appears only when using the jk2 connector because if
 we use the
 port 8080 with the tomcat standalone web server we have not this problem.


 The page is not reachable when we use the jk2 connector here is
 the log from
 from the connector.

 --
 --
 --
 2003-11-10 12:42:13 StandardContext[/java]: Mapping
 contextPath='/java' with
 requestURI='/java/jsp/oveExport.jsp' and relativeURI='/jsp/oveExport.jsp'
 2003-11-10 12:42:13 StandardContext[/java]:  Mapped to servlet 'jsp' with
 servlet path '/jsp/oveExport.jsp' and path info 'null' and update=true

 Why we have the path info 'null'


 Here is the host we are using in server.xml

 Host name=www.adesa-cfa-sacef.asso.fr debug=0 appBase=f:\Site
 Internet\adesa\java\web unpackWARs=false
   Logger className=org.apache.catalina.logger.FileLogger
 directory=logs prefix=adesa suffix=.log timestamp=true /
   Context path=/java docBase= debug=0 privileged=true
 reloadable=true/
 /Host

 --
 --
 --
 The workers2.properties

 [logger.file:0]
 level=info
 file=C:\J2EE\jakarta-tomcat-4.1.12\logs\iis_jk2.log

 #define the shared memory file
 [shm]
 file=C:\J2EE\jakarta-tomcat-4.1.12\logs\jk2.shm

 # Define the communication channel
 [channel.socket:localhost:8009]
 tomcatId=localhost:8009

 [ajp13:localhost:8009]
 channel=channel.socket:localhost:8009

 [uri:/java/*]
 worker=ajp13:localhost:8009

 --
 --
 ---
 The only line in jk2.properties is:

 shm.file=C:\J2EE\jakarta-tomcat-4.1.12\logs\jk2.shm

 --
 --
 ---
 The jsp file is in the directory  f:\Site
 Internet\adesa\java\web\jsp so the
 root for our app is web.

 And as i say before, the problem does not appear when we use directly the
 tomcat web server org.apache.coyote.tomcat4.CoyoteConnector on a
 standalone
 port (here is 8080).

 Thank you.
 Regards.


 Object'ive - Stéphane Brogi

 Tel 01-40-09-72-83
 Fax 01 40 09 71 23


 -
 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: Obtaining JK2 binaries for Linux

2003-11-05 Thread Andy Eastham
Patrick,

I found this, but I did manage to compile them from source.

Unfortunately my notes don't seem to be that good, but here they are:
build mod_jk2:

download connector src:
jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz

gunzip and untar
cd jakarta-tomcat-connectors-jk2-2.0.2-src/jk/native2
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-java-home=/usr/j
ava/j2sdk1.4.2
make

Built libraries are:
jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz/jk/build/jk2/apache2/mod_jk2.
so
jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz/jk/build/jk2/apache2/jkjni.so

Copy these libraries into /usr/local/apache2/modules
cp jakarta-tomcat-connectors-jk2-2.0.2-src/jk/build/jk2/apache2/mod_jk2.so
/usr/local/apache2/modules/
cp jakarta-tomcat-connectors-jk2-2.0.2-src/jk/build/jk2/apache2/jkjni.so
/usr/local/apache2/modules/

Perhaps the options in configure above may be helpful?

Andy

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: 05 November 2003 12:11
 To: Tomcat Users List
 Subject: Obtaining JK2 binaries for Linux


 Hi,
 I try to set up JK2 for Apache/2.0.40 - Jakarta-Tomcat-4.1.29 on
 RedHat Linux 9.0.

 I cannot find the binary distribution for the connector, or
 cannot access it !
 The only binary distributions availables are for Solaris and Windows :(

 I am based in Switzerland and wonder if the smart mirrors
 redirection process
 head me to an incomplete mirror ? I tried directly accessing this
 URL found on
 some doc (outside Apache.org):

 http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/rele
ase/v1.2.2/bin/linux/i386/

But keep on being redirected to the official Apache binary download page.

I also tried building the connector from source
(jakarta-tomcat-connectors-jk2-2.0.2-src) but can't manage to have it done.

Any link, advice appreciated

Patrick



-
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]



Multiple virtual hosts at root context

2003-10-21 Thread Andy Hutchinson
I am using Tomcat 4.1.27 under Linux for a project where the machine is 
embedded into a pumping machine, i.e. limited memory and resources.

The 'services' are all identified by sub domains so that you would get a 
master domain of the pump site, a sub domain for each pump unit and a 
further subdomain for each reading.

For example,

http://finham - gives an overview of the site called finham
http://top-bearing.finham gives an overview of the pump called top-bearing
http://power.top-bearing.finham gives a power reading for the pump
etc.
Everything was developed with Apache fronting Tomcat and all is well. We've 
now arrived at the factory tests and I think I've shot myself in the foot. 
I had always intended to remove the Apache front end as it just will not 
fit onto the hardware.

The problem seems to be that you cannot have a standalone Tomcat supporting 
many virtual hosts where the context paths are the same. You can in Apache.

I appreciate that there are other ways to do this but this 'design' has now 
been used by other systems so any changes are bad news at this stage.

My question is, am I correct that this cannot be done using a standalone 
Tomcat and, if not, does anyone have any ideas?

Thanks.

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

Fwd: Multiple virtual hosts at root context

2003-10-21 Thread Andy Hutchinson
Oops. In the panic of thinking it wasn't possible I somehow proved to 
myself that it wasn't possible |-(

I inadvertently loaded all the contexts for all the hosts into all the hosts.

I think the previous post is what used to be known as a structured walk 
through. So thanks for that all the same.

Date: Tue, 21 Oct 2003 09:55:24 +0100
To: Tomcat Users List [EMAIL PROTECTED]
From: Andy Hutchinson [EMAIL PROTECTED]
Subject: Multiple virtual hosts at root context
I am using Tomcat 4.1.27 under Linux for a project where the machine is 
embedded into a pumping machine, i.e. limited memory and resources.

The 'services' are all identified by sub domains so that you would get a 
master domain of the pump site, a sub domain for each pump unit and a 
further subdomain for each reading.

For example,

http://finham - gives an overview of the site called finham
http://top-bearing.finham gives an overview of the pump called 
top-bearing
http://power.top-bearing.finham gives a power reading for the pump
etc.

Everything was developed with Apache fronting Tomcat and all is well. 
We've now arrived at the factory tests and I think I've shot myself in the 
foot. I had always intended to remove the Apache front end as it just will 
not fit onto the hardware.

The problem seems to be that you cannot have a standalone Tomcat 
supporting many virtual hosts where the context paths are the same. You 
can in Apache.

I appreciate that there are other ways to do this but this 'design' has 
now been used by other systems so any changes are bad news at this stage.

My question is, am I correct that this cannot be done using a standalone 
Tomcat and, if not, does anyone have any ideas?

Thanks.

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

Re: Restart automatically Tomcat

2003-10-17 Thread Andy Wagg
I have used the Java Service Wrapper to do this for JBoss (integrated 
with Tomcat) on a Tru64 UNIX platform. However, this wrapper works for 
both UNIX and Windows NT.

http://wrapper.tanukisoftware.org/doc/english/index.html

Andy

[EMAIL PROTECTED] wrote:
I'm using Tomcat 4.1.24 et i want after it fails it restarts
automatically to have a high availability.


[Assuming Unix]
Way 1 - Set $CATALINA_PID before staarting tomcat. Then have a cron
job run occasasionally to look at the value in the file pointed at
by $CATALINA_PID.  If the process doesn't exist - start tomcat.


That's a good idea.  Another option (also assuming unix, and the
willingness to do a little bit of shell scripting) would be to add a
wrapper around tomcat's scripts.
The general idea is

  while true; do
# using run because it blocks
$CATALINA_HOME/bin/catalina.sh run
if really_shutting_down; then
  # we're supposed to stop, so exit gracefully
  exit 0
fi
  done
really_shutting_down implies that you'd need a shutdown wrapper with
some provision for allowing the `loop' script to determine whether a
shutdown was accidental or intentional.  You'd also want to have some
sort of check in place to prevent an infinite loop if tomcat was
started with a bad configuration file, or something of that nature.
There are probably other little details to work out, but that's the
basic idea.




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


RE: MAC OSX and Tomcat -4.0.1

2003-10-16 Thread Andy Eastham
James,

At first glance, it looks like class javax/servlet/ServletResponse class
can't be found.

This resides in servlet.jar, which is in common/lib under my tomcat home
directory on my installation.

Andy

 -Original Message-
 From: James Snelling [mailto:[EMAIL PROTECTED]
 Sent: 16 October 2003 00:48
 To: [EMAIL PROTECTED]
 Subject: MAC OSX and Tomcat -4.0.1


 I am having big problems getting tomcat to start.
 I had been using 3.2.4 before, but this has really got me stumped!
 Any help is good! - Thanks in advance!

 Here are some details:

 Using CLASSPATH:
 /Users/system/Applications/java/jakarta/jakarta-tomcat-4.0.1/bin/b
 ootstrap.jar
 Using CATALINA_BASE:
 /Users/system/Applications/java/jakarta/jakarta-tomcat-4.0.1
 Using CATALINA_HOME:
 /Users/system/Applications/java/jakarta/jakarta-tomcat-4.0.1
 Using JAVA_HOME:
 /System/Library/Frameworks/JavaVM.framework/Versions/1.4.1/Home

 here is catalina_log

 Exception during startup processing
 java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorIm
 pl.java:39)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAc
 cessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
 Caused by: java.lang.NoClassDefFoundError: javax/servlet/ServletResponse
 at java.lang.ClassLoader.defineClass0(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
 at
 java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
 at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:140)
 at
 org.apache.catalina.util.xml.ObjectCreate.start(XmlMapper.java:616)
 at
 org.apache.catalina.util.xml.XmlMapper.matchStart(XmlMapper.java:412)
 at
 org.apache.catalina.util.xml.XmlMapper.startElement(XmlMapper.java:91)
 at
 org.xml.sax.helpers.XMLReaderAdapter.startElement(XMLReaderAdapter
 .java:333)
 at
 org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376)
 at
 org.apache.xerces.validators.common.XMLValidator.callStartElement(
 XMLValidator.java:1214)
 at
 org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocu
 mentScanner.java:1806)
 at
 org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.d
 ispatch(XMLDocumentScanner.java:1182)
 at
 org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocume
 ntScanner.java:381)
 at
 org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081)
 at
 org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
 at javax.xml.parsers.SAXParser.parse(SAXParser.java:314)
 at javax.xml.parsers.SAXParser.parse(SAXParser.java:253)
 at
 org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:228)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:725)
 at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:179)

 James Snelling

 [EMAIL PROTECTED]

 --
 -

 The views expressed here are not those of the Students'
 Association nor can they be assumed to be those of the writer. No
 liability is accepted for the accuracy or the veracity of the
 contents. You are held to accept this and any use to which you
 put any contents of this communication are entirely your responsibility.

 DISCLAIMER: This e-mail is intended solely for the
 above-mentioned recipient and it may contain confidential or
 privileged information. If you have received it in error, please
 notify us immediately and delete the e-mail. You must not copy,
 distribute, disclose or take any action in reliance on it. This
 e-mail message and any attached files have been scanned for the
 presence of computer viruses, however, you are advised that you
 open any attachments at your own risk.

 Nothing in this email shall be construed as constituting an order
 for goods or services

 www.upsa.org.uk

RE: What is a good dev-enviroment for servlet/tomcat?

2003-10-09 Thread Andy Eastham
Have you never run into a problem when multiple developers are working on
the same server, and someone crashes the server, overwrites someone else's
code, breaks something that someone else was relying on, or restarts the
server when someone was in the middle of testing a long running batch job?

I certainly have!

It's easy to ensure people in a small team have the same version.  Put up a
poster with Tomcat 4.1.18 or something written on it, or if they are
distributed around the world, email them weekly with what the approved
development environment is.  If they can't be trusted, replace them with
people who can ;-).

By all means have a single test server shared by everyone, but make sure
people only upload code that has at least been locally module tested.  That
way everyone won't tread on each others toes all the time, and if the test
server goes wrong, others can continue working in their local environments.

Andy

 -Original Message-
 From: epyonne [mailto:[EMAIL PROTECTED]
 Sent: 08 October 2003 20:45
 To: Tomcat Users List
 Subject: Re: What is a good dev-enviroment for servlet/tomcat?


 Just a precaution.  We had run into problem before when different
 developers
 have different version of Tomcat with different configuration locally.


 - Original Message -
 From: Shapira, Yoav [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Wednesday, October 08, 2003 01:55 PM
 Subject: RE: What is a good dev-enviroment for servlet/tomcat?



 Howdy,

 IMHO, instead of one instance per developer, I think you should have
 one
 development server with one instance of Tomcat shared by the 3
 developers.

 Why oh why do you think that??

 Yoav Shapira



 This e-mail, including any attachments, is a confidential business
 communication, and may contain information that is confidential,
 proprietary
 and/or privileged.  This e-mail is intended only for the individual(s) to
 whom it is addressed, and may not be saved, copied, printed, disclosed or
 used by anyone else.  If you are not the(an) intended recipient, please
 immediately delete this e-mail from your computer system and notify the
 sender.  Thank you.


 -
 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]



  1   2   3   4   >