RE: New session PER REQUEST

2006-09-25 Thread Darren Hall
Thanks David,

 For using mod_proxy, have you also added proxy_name and proxy_port 
 attributes to the connector receiving proxied requests?  Those will need 
 to be set so tomcat can create the session cookie correctly.

I don't believe I'm setting any of these things. Correct me if I'm wrong,
but the changes that you're talking about need to be configured on the
Apache side? Below I've posted the relevant portion of my httpd-vhosts.conf
file. I've been looking online for a tutorial of some kind to show me how
I need to configure this, but I haven't had a lot of luck yet (other than
tutorials that go into clustering and load-balancing... neither of which I
need). Any help in getting this working would be greatly appreciated. 
(As you can see, I'm currently playing with getting the pass through
mod_proxy to use sticky_sessions, but this doesn't yet appear to be
working.)

- D

VirtualHost www.mydomain.com:80
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /var/www/mydomain/htdocs
ServerName flc3.mydomain.com
ErrorLog /var/www/flc/logs/www.mydomain.org-error_log
CustomLog /var/www/flc/logs/www.mydomain.org-access_log common
ProxyRequests Off
   # ProxyPass /flc http://localhost:8080/flc
ProxyPass /flc balancer://localhost:8080/flc stickysession=JSESSIONID
nofailover=On
Proxy balancer://localhost
  BalancerMember http://localhost:8080
/Proxy
ProxyPassreverse / http://localhost:8080/flc/
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/flc
RewriteRule ^/(.*)$ /flc/$1 [P]
/VirtualHost


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



RE: Tomcat 5.5.17 has max 40 KB / sec

2006-09-25 Thread Darren Hall
I got your message through the list, Steffen.
I don't know how to help you, though.
Sorry.

Darren


 Hi
 
 I know, reasking the same question if there was no answer, is no good 
 style. However I had problems using apache-lists earlier and I don't know 
 wether my mail made it to the list. So could anyone please respond, that 
 the mail itself made it?
 (Solutions to my problem are welcome as well :D )
 
 Sorry and regard,
   Steffen
  


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



RE: New session PER REQUEST

2006-09-25 Thread Darren Hall
 In server.xml (tomcat's config file), the Connector  / element 
 receiving proxied requests from Apache HTTPd needs 
 proxyName=www.mysite.com and proxyPort=80 to properly handle cookies 
 and writing URLs.
 
 There are commented examples of this in the original server.xml file 
 distributed with tomcat.
 
 --David

I'm still having issues with this. Based on David's suggestions, I did a
search and found the following link:
http://proteinbank.vbi.vt.edu/tomcat-docs/proxy-howto.html. I followed the
instructions detailed in the link and restarted Tomcat (with one change -
the connector port in the new connector element I specified is 8080, and I
also have the default element still uncommented also using port 8080. Will
this create a conflict?). The web app displays properly and the links work,
however, in Tomcat manager console, I can still see that each time I do a
page view it is *still* creating a new session.

What information do you need to help me with this - The server xml, the
httpd-vhost.conf? Let me know and I'll post them.

Thanks,
- D


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



RE: New session PER REQUEST

2006-09-25 Thread Darren Hall
I moved my port to 8081 and I still see the same behavior. *sigh*
I'm still getting no positive results. I'm now thinking this issue involves
one of two things. 1) Mod proxy and the way I've configured it; or 2) the
rewrite rules I do on each request to and from my domain.

This is my first time using mod proxy. I have one instance of Tomcat and one
instance of Apache serving multiple web apps. I need to be able to map any
one app to the correct container in Tomcat in a method that is seamless to
the end user. Using mod rewrite, I append an identifier to the end of each
request for a given domain (i.e. for www.abcdomian.com, I append /abc to the
end, giving me www.abcdomain.com/abc. - if the identifier is not already
present) In my httpd-vhosts.conf file I then map /abc to my Tomcat connector
using mod proxy. When the request is returned from Tomcat, the /abc is
removed from the url by mod proxy so that the user never sees the extra
identifier that was appended. Can this behavior be accomplished with mod
proxy alone (meaning I can remove mod rewrite from the picture completely)?
Could this rewrite be causing me to lose the session between Apache and
Tomcat? Do I have mod proxy configured properly and is *that* what is
causing my problems??
Here are my relevant files:

[file: httpd-vhosts.conf]
...
VirtualHost www.abcdomain.com
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /workfiles/abc/webapps/abcdomain.org/trunk/www/htdocs
ServerName abcdomain.com
ErrorLog logs/abc/www.abcdomain.com-error_log
CustomLog logs/abc/www.abcdomain.com-access_log common
ProxyRequests Off
ProxyPass /abc http://localhost:8081/abc
ProxyPassreverse / http://localhost:8081/abc/
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/abc
RewriteRule ^/(.*)$ /abc/$1 [P]
/VirtualHost
...
[file: server.xml]
...
Connector port=8081 maxHttpHeaderSize=8192
   maxThreads=150 minSpareThreads=25 maxSpareThreads=75
   enableLookups=false redirectPort=8443 acceptCount=100
   connectionTimeout=2 disableUploadTimeout=true
   proxyName=www.abcdomain.com proxyPort=80/
...


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



RE: New session PER REQUEST

2006-09-25 Thread Darren Hall
 Can this behavior be accomplished with mod proxy alone (meaning I can
 remove mod rewrite from the picture completely)? Could this rewrite be 
 causing me to lose the session between Apache and Tomcat?

*ding ding ding*
We have a winner! I removed the rewrite rules from my httpd-vhosts.conf file
and hit my web app that way, and the session is not lost! So I now know the
cause of the problem is my URL rewriting, however this creates another
problem. The client does not want to see urls with an identifier on the end
of them (i.e. www.abcdomain.com/abc), yet I need the identifier to correctly
send the request to the correct container in Tomcat (meaning the abc app
lives under the /abc folder under webapps in Tomcat). So when a request
comes in for www.abcdomain.com I need to forward that request to Tomcat with
an /abc on the end of it so that Tomcat correctly resolves it to the abc
application and then when the response is returned to the user the url still
appears as www.abcdomain.com with no /abc identifier after it. (Does this
make sense? I could be doing a bad job of explaining this.) Is there an easy
way to resolve this that I'm not aware of through Apache or Tomcat? Perhaps
using mod_proxy?

Here are my relevant files:

[file: httpd-vhosts.conf]
...
VirtualHost www.abcdomain.com
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /workfiles/abc/webapps/abcdomain.org/trunk/www/htdocs
ServerName abcdomain.com
ErrorLog logs/abc/www.abcdomain.com-error_log
CustomLog logs/abc/www.abcdomain.com-access_log common
ProxyRequests Off
ProxyPass /abc http://localhost:8081/abc
ProxyPassreverse / http://localhost:8081/abc/
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/abc
RewriteRule ^/(.*)$ /abc/$1 [P]
/VirtualHost
...
[file: server.xml]
...
Connector port=8081 maxHttpHeaderSize=8192
   maxThreads=150 minSpareThreads=25 maxSpareThreads=75
   enableLookups=false redirectPort=8443 acceptCount=100
   connectionTimeout=2 disableUploadTimeout=true
   proxyName=www.abcdomain.com proxyPort=80/
...


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



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



RE: New session PER REQUEST

2006-09-25 Thread Darren Hall
Thanks Maurice. I'll need to look into this.

 The one difficulty I have NOT seen is losing the session ID.
 I do get session ID persistence where it is permitted (across http page
 transitions, across https page transitions, and across http-https page
 transition)
 
 Maurice Yarrow

The loss of session is due to a combination of things, namely the fact that
I'm using mod_rewrite in order to add to and remove elements from the url
and the way that Tomcat binds sessions to a given context. I wanted to
filter out the app path information, so in www.abcdomain.com/abc I don't
want the user to see the last /abc portion of the url - however Tomcat needs
that to bind to the correct application context. I was adding it before the
request was sent to Tomcat using mod_rewrite and then removing it on the way
back using mod_proxy, however I was losing the session every time. Then I
found this thread from this listserv from Feb of this year:
http://mail-archives.apache.org/mod_mbox/tomcat-users/200602.mbox/%3C00b301c
[EMAIL PROTECTED]
It seems others ran into the same issue I did. The work around is setting
the attribute emptySessionPath=true in the Connector / element in
server.xml. By doing this, the session is no longer tied to the current
context based on the url (which I was losing on my rewrites) but instead it
seems to be bound to the current default context (that last statement is
actually incorrect and oversimplified, but explanation enough for me for
now). Because of the way I am using virtual hosts, this works for me. I'm
sure this will be a tremendous pain months from now if I need to make
changes, but seeing as I have a tight deadline, I'll use this work around
for now and hope for the best later.

Thanks for all the help everyone!

- Darren


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



New session PER REQUEST

2006-09-22 Thread Darren Hall
I wasn't sure if my issue was a Tomcat issue or a Struts issue, so I posted
it here just in case.

 

I have a serious problem.

I'm running a webapp built on Struts 1.2.9 running in Tomcat 5.5 and using
an Apache 2.2 http server. I've noticed that any value I put into the
session is always removed after one request/response cycle. In the Tomcat
Manager, I can see that every time I hit the webapp and view a page, the
session count increments. This is terrible, as it prevents me from
persisting values across my user's session. Any idea why this would be
happening?? (I'm looking for a starting point to trouble shoot and correct
this issue.)

 

Thanks

- Darren

 



RE: New session PER REQUEST

2006-09-22 Thread Darren Hall
Peter,
You are correct. When hitting Tomcat directly, the session remains intact.
When using mod_proxy to forward requests to Apache the session is lost.
Is this a common issue? How can I go about correcting this?

Thanks
- D

-Original Message-
From: Peter Crowther [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 22, 2006 12:04 PM
To: Tomcat Users List
Subject: RE: New session PER REQUEST

 From: Darren Hall [mailto:[EMAIL PROTECTED] 
 I'm running a webapp built on Struts 1.2.9 running in Tomcat 
 5.5 and using
 an Apache 2.2 http server. I've noticed that any value I put into the
 session is always removed after one request/response cycle. 
 In the Tomcat
 Manager, I can see that every time I hit the webapp and view 
 a page, the
 session count increments. This is terrible, as it prevents me from
 persisting values across my user's session. Any idea why this would be
 happening?? (I'm looking for a starting point to trouble 
 shoot and correct
 this issue.)

What happens if you connect directly to Tomcat (if necessary, set up a
connector) and bypass Apache?

- Peter

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



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



RE: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Darren Hall
 Have you tried
 username=myuserid password=mypassword
 instead  username=(myuserid) password=(mypassword)

Yes Jean-Claude. In fact, I don't use the parenthesis around the username
and password in my context.xml file. I just listed it that way here in the
list so people would understand the content was changed from the way it
actually appeared in my context.xml. Looking back now, perhaps not such a
good idea, huh?
 


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



RE: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Darren Hall
 can you print the contents of context.xml?

Absolutely Martin,

The parameters are there, but they are included as attributes instead of
contained as the body of an element. I'm not sure if this matters or not,
but I have it implemented a way I saw it done in a JNDI Datasource How-To
on Apache's site.

Here's the context.xml file I'm currently using -

Context path=/flc docBase=flc debug=5 reloadable=true
crossContext=true
Resource name=jdbc/flc auth=Container
  type=javax.sql.DataSource
driverClassName=oracle.jdbc.OracleDriver
  url=jdbc:oracle:thin:@devdb1.mydomain.com:1521:flcdb
  username=myuser password=mypass maxActive=20
maxIdle=10
  maxWait=-1 removeAbandoned=true
removeAbandonedTimeout=180
  logAbandoned=true/ 
/Context


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



cannot load jdbc driver??

2006-09-19 Thread Darren Hall
Great - not only is the connection pool not working locally, but the drivers
cannot be loaded in my production environment.

I've packaged ojdbc14.jar into my war and it deploys into my WEB-INF/lib
directory. When Tomcat 5.5 starts up and I point a browser at my
application, I get a Cannot load JDBC driver class
'oracle.jdbc.OracleDriver' error.

I thought this should be automatic. My connection pool (as seen from my
connection pool thread) references the oracle.jdbc.OracleDriver and the
driver seems to reside in the ojdbc.jar file AND that jar lives in my
WEB-INF/lib folder on my server under my deployed app. Where am I going
wrong??

 

Thanks,

Darren

 

[more info]

java: version 1.5

server os: solaris 10

tomcat: version 5.5



RE: cannot load jdbc driver??

2006-09-19 Thread Darren Hall
 did you not specify a JDBC connection in the Realm? server.xml in the conf
 file?

I have no Realm specified in server.xml, however I'm attempting to get
connection pooling set-up (see my connection pool thread) so I've created a
context.xml file and specified my connection information inside a Resource
element in that file. I thought that the two setups were mutually exclusive,
no?

 These jars must be accessible by tomcat to create the pool.  They should 
 be in common/lib.

Thanks Derek, I'll give this a try. But does this also mean that the drivers
cannot deploy with my war file?

-D


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



RE: cannot load jdbc driver??

2006-09-19 Thread Darren Hall
In any case, moving the ojdbc14.jar file to the common/lib directory worked.
Thanks.


-Original Message-
From: Darren Hall [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 19, 2006 12:09 PM
To: 'Tomcat Users List'
Subject: RE: cannot load jdbc driver??

 They will be accessible by your war file code.  You do not need the jar
 in both places.  Only common/lib 

No no. I understand that it will be available to my code (since the app
server will put the jar in my classpath), but it means I can't deploy
ojdbc14.jar with my war any longer. Correct?

-D


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



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



RE: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Darren Hall
More progress with this issue.
It seems that on our development server (solaris box running solaris 10) the
connection pool connects properly. However on my local box (a Windows XP SP2
box where I'm doing my development before I move it to dev) the connection
pool returns to me an invalid username/password error. Both environments
are using exactly the same web.xml, context.xml, database credentials, etc.
In fact I used the same war file compiled from my local box to get the
initial version of the code up on our dev box.

Obviously it's a configuration issue - but where? Why does it work on the
dev server and not on my local box?? I'm really scratching my head on this
one.

-D

Here's the context.xml file I'm currently using -

Context path=/flc docBase=flc debug=5 reloadable=true
crossContext=true
Resource name=jdbc/flc auth=Container
  type=javax.sql.DataSource
driverClassName=oracle.jdbc.OracleDriver
  url=jdbc:oracle:thin:@devdb1.mydomain.com:1521:flcdb
  username=myuser password=mypass maxActive=20
maxIdle=10
  maxWait=-1 removeAbandoned=true
removeAbandonedTimeout=180
  logAbandoned=true/ 
/Context


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



RE: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Darren Hall
 does your XP box give you any application log errors anywhere?

I see no errors in the event viewer in any of the logs that are related to
this issue, but it was a good idea. (I didn't think of it.)

 I wonder if Windows is looking for a domain authentication, that is a 
 domain name stapled on to the user acct prior to authenticating the user?

No, there is no domain information used currently for the database
connection process. Another good idea. I'll speak with my network admin and
see if he believes this could be causing an issue.

 Can you print out to the Tomcat logs the errors?

Curiously, Tomcats logs show no errors relating to this issue. My
application log is the only place where the error is caught and logged.
Here is the relevant output from my log including the top of the stack
trace.

flc-event-2006-09-19.log
...
2006-09-19 13:07:44,670 DEBUG org.mydomian.labs.LaboratorySearchAction -
(exeucte) Retrieving database connection from the DataSource.
2006-09-19 13:07:45,826 DEBUG
org.apache.struts.util.PropertyMessageResources -
getMessage(en_US,unhandledException)
2006-09-19 13:07:45,841 WARN  org.apache.struts.action.RequestProcessor -
Unhandled Exception thrown: class
org.apache.tomcat.dbcp.dbcp.SQLNestedException
2006-09-19 13:07:45,857 ERROR
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/flc].[primar
y-controller] - Servlet.service() for servlet primary-controller threw
exception
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (ORA-01017: invalid username/password; logon
denied
)
at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource
.java:855)
at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.ja
va:540)
at
org.mydomain.labs.LaboratorySearchAction.execute(LaboratorySearchAction.java
:94)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:431)
...


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



RE: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Darren Hall
 That SQL Nested Exception thing in general looks like the root cause...any

 way to try going to the DOS prompt and connecting to SQL Plus with that 
 username/pwd combo?

Yes, using that username and password works fine through SQL Plus, and I've
connected to the database several times through SQL Plus using those
credentials. In fact connecting to the database through my code works fine
if I don't use connection pooling! In my test java class I've tried
connecting to the DB using connection pooling, and not using connection
pooling.

This way works fine with no errors:

Connection conn;
Driver driver;
String driverUsed = oracle.jdbc.OracleDriver;
String serverAddress = jdbc:oracle:thin:@devdb1.utrs.com:1521:flcdb;
try {
driver = (Driver)Class.forName(driverUsed).newInstance();
conn = DriverManager.getConnection(serverAddress, myuser,
mypass);
}
catch (Exception e) {
log.debug(Connection to database failed!, e);
}

This way fails with invalid username/password error:

DataSource ds = null;
String dsName = jdbc/flc;
try {
Context initContext = new InitialContext();
Context envContext  = (Context)initContext.lookup(java:/comp/env);
ds = (DataSource)envContext.lookup(dsName);
if (log.isDebugEnabled()) {
log.debug((exeucte) Retrieving database connection from the
DataSource.);
}
conn = ds.getConnection();
if (log.isDebugEnabled()) {
log.debug((exeucte) Connected.);
}
}
catch(javax.naming.NamingException nex) {
log.error(Context lookup failed for DataSource ' + dsName + ',
nex);
}



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



RE: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Darren Hall
 did you try printing out the username and password variables to see what 
 credentials are coming through?

Well, yes and no. I've actually hard coded the username and password into my
code when I've tested *not* using connection pooling, so I know what they
are in that case. When using connection pooling the username and password
are stored in my context.xml file as attributes in a Resource element. I'm
not sure how to get the values of those attributes in my code to print them
out. Also, if I were more knowledgeable in Oracle, I'd love to check to the
database to verify the pool is being created, and possible to see if what
credentials are being used on the Oracle side when I attempt to connect
through the connection pool, but I'm not sure where to look to find that
information. I've looked at various logs on the db server, but none of them
seem to contain the information I'm looking for, so I'm sort of lost there.

-D


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



RE: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Darren Hall
(In reverse order)
 have you used a DB utility such as tora/toad/sqlplus to successfully 
 authenticate to your Database with the values for username and password?

Yes

 Inside struts-config.xml can you show us what you have supplied for each 
 value associated with the following properties
 data-source 
type=org.apache.commons.dbcp.BasicDataSource key=TableName
  set-property property=driverClassName value=
  set-property property=url value=
  set-property property=username value=
  set-property property=validationQuery value=
 /source

!-- = Data Source Configuration === --
data-sources /
My datasources element is empty. In my reading, I discovered that this was
no longer a preferred way to set up database connections for struts (in leiu
of other connection frameworks like Spring or custom connection layers) and
was kept in place for legacy applications. (Is this not correct?)

 make SURE commons-pooling.jar, commons-dbcp.jar and 
 commons-collections.jar are in your ./WEB-INF/lib folder

None of these jar files are in either my /WEB-INF/lib folder or my
/commons/lib folders. Are these necessary for implementing connection
pooling? They are not on my development server either, yet that connection
pool seems to be working?


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



RE: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Darren Hall
 They are, you just don't know it.  From the doc:
 
 These libraries are located in a single JAR at
 $CATALINA_HOME/common/lib/naming-factory-dbcp.jar.

Gotcha. Thanks, Chuck. 
The naming-factory-dbcp.jar is in my /commons/lib dir.

The bizarre thing about all of this is that 
A) I can connect to the database from my local machine a number of ways
using those same credentials - just not using the connection pool I've set
up through Tomcat.
And B) The connection pool - with absolutely no modifications from my local
machine - works fine in the Tomcat install on the development server.
??
I don't know where to go from here. I'm stumped.


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



RE: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Darren Hall
 Which is why I suggested Ethereal to see what was really going over the
 wire between your Windows box and the DB machine.

Yep. I think you're right. I'll get that set up and take a look.
Be back in a while. Thanks for the help.


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



Database connection pooling in Tomcat 5.5

2006-09-18 Thread Darren Hall
Hi all.

 

I'm attempting to set up database connection pool using Tomcat 5.5 and
Oracle 10g. I've been following the JNDI How To guide from Apache
(http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
). My question is - where should I define the connection pool resource?
Meaning, where should my Resource element appear. I've read two different
descriptions about how this should be done in the Apache documentation. The
first description (from the above link) states that I should modify
server.xml and add a new Context element as such Context path=/DBTest
docBase=DBTest debug=5 reloadable=true crossContext=true and in
that new context define my resource for my connection pool. However, if you
read the Context documentation linked to the above How-To (located at this
link: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html) you'll
find in there the following text - Please note that for tomcat 5, unlike
tomcat 4.x, it is NOT recommended to place Context elements directly in
the server.xml file. Instead, put them in the META-INF/context.xml directory
of your WAR file or the conf directory. So I'm wondering if I should modify
server.xml or create a context.xml file. Currently I'm trying the
context.xml file route, but it is not working (although this could be
because I'm configuring things incorrectly). Can anyone point me in the
right direction here?
 
Thanks,
Darren

 



RE: Database connection pooling in Tomcat 5.5

2006-09-18 Thread Darren Hall
Here it is. The items in parenthesis have been removed.
Thanks for the help.


Context path=/flc docBase=flc
debug=5 reloadable=true crossContext=true

!-- maxActive: Maximum number of dB connections in pool. Make sure you
 configure your oracle max_connections large enough to handle
 all of your db connections. Set to 0 for no limit.
 --

!-- maxIdle: Maximum number of idle dB connections to retain in pool.
 Set to -1 for no limit.  See also the DBCP documentation on this
 and the minEvictableIdleTimeMillis configuration parameter.
 --

!-- maxWait: Maximum time to wait for a dB connection to become
available
 in ms, in this example 10 seconds. An Exception is thrown if
 this timeout is exceeded.  Set to -1 to wait indefinitely.
 --

!-- username and password: Oracle dB username and password for dB
connections  --

!-- driverClassName: Class name for the official Oracle thin driver is 
 oracle.jdbc.OracleDriver.
 --

!-- url: The JDBC connection url for connecting to your Oracle dB.
 --

Resource name=jdbc/flc auth=Container
  type=javax.sql.DataSource
driverClassName=oracle.jdbc.OracleDriver
  url=jdbc:oracle:thin:@(dbserver.domain.com):1521:(mysid)
  username=(user) password=(passwd) maxActive=20
maxIdle=10
  maxWait=-1 removeAbandoned=true
removeAbandonedTimeout=180
  logAbandoned=true/ 
/Context




-Original Message-
From: Pid [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 18, 2006 11:16 AM
To: Tomcat Users List
Subject: Re: Database connection pooling in Tomcat 5.5

post your context.xml




Darren Hall wrote:
 Hi all.
 
  
 
 I'm attempting to set up database connection pool using Tomcat 5.5 and
 Oracle 10g. I've been following the JNDI How To guide from Apache

(http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
 ). My question is - where should I define the connection pool resource?
 Meaning, where should my Resource element appear. I've read two
different
 descriptions about how this should be done in the Apache documentation.
The
 first description (from the above link) states that I should modify
 server.xml and add a new Context element as such Context path=/DBTest
 docBase=DBTest debug=5 reloadable=true crossContext=true and in
 that new context define my resource for my connection pool. However, if
you
 read the Context documentation linked to the above How-To (located at
this
 link: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html) you'll
 find in there the following text - Please note that for tomcat 5, unlike
 tomcat 4.x, it is NOT recommended to place Context elements directly in
 the server.xml file. Instead, put them in the META-INF/context.xml
directory
 of your WAR file or the conf directory. So I'm wondering if I should
modify
 server.xml or create a context.xml file. Currently I'm trying the
 context.xml file route, but it is not working (although this could be
 because I'm configuring things incorrectly). Can anyone point me in the
 right direction here?
  
 Thanks,
 Darren
 
  
 
 


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



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



RE: Database connection pooling in Tomcat 5.5

2006-09-18 Thread Darren Hall
Yes, I did. Here is the web.xml

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
  PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN
  http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;

web-app
  display-nameMy Web Application/display-name
  description
Web Application.
  /description 

  !-- Action Servlet Configuration --
  servlet
servlet-nameprimary-controller/servlet-name
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
init-param
  param-nameconfig/param-name
  param-value/WEB-INF/struts-config.xml/param-value
/init-param
init-param
  param-namedebug/param-name
  param-value2/param-value
/init-param
init-param
  param-namedetail/param-name
  param-value2/param-value
/init-param
load-on-startup1/load-on-startup
  /servlet

  !-- Action Servlet Mapping --
  servlet-mapping
servlet-nameprimary-controller/servlet-name
url-pattern//url-pattern
  /servlet-mapping

  !-- The Welcome File List --
  welcome-file-list
welcome-fileindex.jsp/welcome-file
welcome-fileindex.html/welcome-file
  /welcome-file-list

  resource-ref
descriptionOracle Datasource connection pool/description
res-ref-namejdbc/flc/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
  /resource-ref

/web-app




-Original Message-
From: Mark Barnes [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 18, 2006 11:30 AM
To: Tomcat Users List
Subject: Re: Database connection pooling in Tomcat 5.5

Do you include a resource-ref in your WEB-INF/web.xml file?

You might also want to post your web.xml


Pid wrote:
 post your context.xml
 
 
 
 
 Darren Hall wrote:
 Hi all.

  

 I'm attempting to set up database connection pool using Tomcat 5.5 and
 Oracle 10g. I've been following the JNDI How To guide from Apache

(http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
 ). My question is - where should I define the connection pool resource?
 Meaning, where should my Resource element appear. I've read two
different
 descriptions about how this should be done in the Apache documentation.
The
 first description (from the above link) states that I should modify
 server.xml and add a new Context element as such Context path=/DBTest
 docBase=DBTest debug=5 reloadable=true crossContext=true and in
 that new context define my resource for my connection pool. However, if
you
 read the Context documentation linked to the above How-To (located at
this
 link: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html) you'll
 find in there the following text - Please note that for tomcat 5, unlike
 tomcat 4.x, it is NOT recommended to place Context elements directly in
 the server.xml file. Instead, put them in the META-INF/context.xml
directory
 of your WAR file or the conf directory. So I'm wondering if I should
modify
 server.xml or create a context.xml file. Currently I'm trying the
 context.xml file route, but it is not working (although this could be
 because I'm configuring things incorrectly). Can anyone point me in the
 right direction here?
  
 Thanks,
 Darren

  


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


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



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



RE: Database connection pooling in Tomcat 5.5

2006-09-18 Thread Darren Hall
The issue could be the path attribute or docbase attribute in the
context.xml. I'm not sure what values should appear for these.


-Original Message-
From: Darren Hall [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 18, 2006 11:26 AM
To: 'Tomcat Users List'
Subject: RE: Database connection pooling in Tomcat 5.5

Here it is. The items in parenthesis have been removed.
Thanks for the help.


Context path=/flc docBase=flc
debug=5 reloadable=true crossContext=true

!-- maxActive: Maximum number of dB connections in pool. Make sure you
 configure your oracle max_connections large enough to handle
 all of your db connections. Set to 0 for no limit.
 --

!-- maxIdle: Maximum number of idle dB connections to retain in pool.
 Set to -1 for no limit.  See also the DBCP documentation on this
 and the minEvictableIdleTimeMillis configuration parameter.
 --

!-- maxWait: Maximum time to wait for a dB connection to become
available
 in ms, in this example 10 seconds. An Exception is thrown if
 this timeout is exceeded.  Set to -1 to wait indefinitely.
 --

!-- username and password: Oracle dB username and password for dB
connections  --

!-- driverClassName: Class name for the official Oracle thin driver is 
 oracle.jdbc.OracleDriver.
 --

!-- url: The JDBC connection url for connecting to your Oracle dB.
 --

Resource name=jdbc/flc auth=Container
  type=javax.sql.DataSource
driverClassName=oracle.jdbc.OracleDriver
  url=jdbc:oracle:thin:@(dbserver.domain.com):1521:(mysid)
  username=(user) password=(passwd) maxActive=20
maxIdle=10
  maxWait=-1 removeAbandoned=true
removeAbandonedTimeout=180
  logAbandoned=true/ 
/Context




-Original Message-
From: Pid [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 18, 2006 11:16 AM
To: Tomcat Users List
Subject: Re: Database connection pooling in Tomcat 5.5

post your context.xml




Darren Hall wrote:
 Hi all.
 
  
 
 I'm attempting to set up database connection pool using Tomcat 5.5 and
 Oracle 10g. I've been following the JNDI How To guide from Apache

(http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
 ). My question is - where should I define the connection pool resource?
 Meaning, where should my Resource element appear. I've read two
different
 descriptions about how this should be done in the Apache documentation.
The
 first description (from the above link) states that I should modify
 server.xml and add a new Context element as such Context path=/DBTest
 docBase=DBTest debug=5 reloadable=true crossContext=true and in
 that new context define my resource for my connection pool. However, if
you
 read the Context documentation linked to the above How-To (located at
this
 link: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html) you'll
 find in there the following text - Please note that for tomcat 5, unlike
 tomcat 4.x, it is NOT recommended to place Context elements directly in
 the server.xml file. Instead, put them in the META-INF/context.xml
directory
 of your WAR file or the conf directory. So I'm wondering if I should
modify
 server.xml or create a context.xml file. Currently I'm trying the
 context.xml file route, but it is not working (although this could be
 because I'm configuring things incorrectly). Can anyone point me in the
 right direction here?
  
 Thanks,
 Darren
 
  
 
 


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



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



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



RE: Database connection pooling in Tomcat 5.5

2006-09-18 Thread Darren Hall
Here's another question...
If the database pool is not created properly, will it fail silently, or will
an error be displayed in a log file? And if an error is output to a log
file, which one will it be?


-Original Message-
From: Darren Hall [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 18, 2006 12:31 PM
To: 'Tomcat Users List'
Subject: RE: Database connection pooling in Tomcat 5.5

The issue could be the path attribute or docbase attribute in the
context.xml. I'm not sure what values should appear for these.


-Original Message-
From: Darren Hall [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 18, 2006 11:26 AM
To: 'Tomcat Users List'
Subject: RE: Database connection pooling in Tomcat 5.5

Here it is. The items in parenthesis have been removed.
Thanks for the help.


Context path=/flc docBase=flc
debug=5 reloadable=true crossContext=true

!-- maxActive: Maximum number of dB connections in pool. Make sure you
 configure your oracle max_connections large enough to handle
 all of your db connections. Set to 0 for no limit.
 --

!-- maxIdle: Maximum number of idle dB connections to retain in pool.
 Set to -1 for no limit.  See also the DBCP documentation on this
 and the minEvictableIdleTimeMillis configuration parameter.
 --

!-- maxWait: Maximum time to wait for a dB connection to become
available
 in ms, in this example 10 seconds. An Exception is thrown if
 this timeout is exceeded.  Set to -1 to wait indefinitely.
 --

!-- username and password: Oracle dB username and password for dB
connections  --

!-- driverClassName: Class name for the official Oracle thin driver is 
 oracle.jdbc.OracleDriver.
 --

!-- url: The JDBC connection url for connecting to your Oracle dB.
 --

Resource name=jdbc/flc auth=Container
  type=javax.sql.DataSource
driverClassName=oracle.jdbc.OracleDriver
  url=jdbc:oracle:thin:@(dbserver.domain.com):1521:(mysid)
  username=(user) password=(passwd) maxActive=20
maxIdle=10
  maxWait=-1 removeAbandoned=true
removeAbandonedTimeout=180
  logAbandoned=true/ 
/Context




-Original Message-
From: Pid [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 18, 2006 11:16 AM
To: Tomcat Users List
Subject: Re: Database connection pooling in Tomcat 5.5

post your context.xml




Darren Hall wrote:
 Hi all.
 
  
 
 I'm attempting to set up database connection pool using Tomcat 5.5 and
 Oracle 10g. I've been following the JNDI How To guide from Apache

(http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
 ). My question is - where should I define the connection pool resource?
 Meaning, where should my Resource element appear. I've read two
different
 descriptions about how this should be done in the Apache documentation.
The
 first description (from the above link) states that I should modify
 server.xml and add a new Context element as such Context path=/DBTest
 docBase=DBTest debug=5 reloadable=true crossContext=true and in
 that new context define my resource for my connection pool. However, if
you
 read the Context documentation linked to the above How-To (located at
this
 link: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html) you'll
 find in there the following text - Please note that for tomcat 5, unlike
 tomcat 4.x, it is NOT recommended to place Context elements directly in
 the server.xml file. Instead, put them in the META-INF/context.xml
directory
 of your WAR file or the conf directory. So I'm wondering if I should
modify
 server.xml or create a context.xml file. Currently I'm trying the
 context.xml file route, but it is not working (although this could be
 because I'm configuring things incorrectly). Can anyone point me in the
 right direction here?
  
 Thanks,
 Darren
 
  
 
 


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



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



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



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



RE: Database connection pooling in Tomcat 5.5

2006-09-18 Thread Darren Hall

I've made some progress on this. I'm now receiving a SQLNestedException:
Cannot create PoolableConnectionFactory error when calling getConnection on
the DataSource object retrieved from my connection pool. Here is the satck
trace:

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (ORA-01017: invalid username/password; logon
denied
)
at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource
.java:855)
at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.ja
va:540)
at
org.federallabs.labs.LaboratorySearchAction.execute(LaboratorySearchAction.j
ava:99)

Problem is - I know the username and password are correct. Anyone have any
ideas what could be causing my issue? I need to get this connection pool
issue working by the end of work today.

Thanks,
Darren


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



RE: Database connection pooling in Tomcat 5.5

2006-09-18 Thread Darren Hall
 You are likely connecting to the wrong catalog.  Is the pool parameter
 defaultCatalog set?

That's specified in my Context, correct? If so, then no, I don't have my
defaultCatalog parameter set.

Here is my context.xml file (comments removed, as well as domain uname and
passwd)

Context path=/flc docBase=flc
debug=5 reloadable=true crossContext=true

   Resource name=jdbc/flc auth=Container
  type=javax.sql.DataSource 
  driverClassName=oracle.jdbc.OracleDriver
  url=jdbc:oracle:thin:@devdb1.(mydomain).com:1521:flcdb
  username=(uname) password=(passwd) 
  maxActive=20 maxIdle=10
  maxWait=-1 removeAbandoned=true 
  moveAbandonedTimeout=180
  logAbandoned=true/ 
/Context


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



RE: Database connection pooling in Tomcat 5.5

2006-09-18 Thread Darren Hall
Is there any other information I can supply to help people help me
understand why I'm getting this error (below)?

 I've made some progress on this. I'm now receiving a SQLNestedException: 
 Cannot create PoolableConnectionFactory error when calling getConnection 
 on the DataSource object retrieved from my connection pool. Here is the 
 stack trace:

 org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
 PoolableConnectionFactory (ORA-01017: invalid username/password; logon 
 denied)
 at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSourc
e.java:855)
 at 

org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.ja
va:540)
 at 

org.federallabs.labs.LaboratorySearchAction.execute(LaboratorySearchAction.j
ava:99)
 


 You are likely connecting to the wrong catalog.  Is the pool parameter
 defaultCatalog set?

That's specified in my Context, correct? If so, then no, I don't have my
defaultCatalog parameter set.

Here is my context.xml file (comments removed, as well as domain uname and
passwd)

Context path=/flc docBase=flc
debug=5 reloadable=true crossContext=true

   Resource name=jdbc/flc auth=Container
  type=javax.sql.DataSource 
  driverClassName=oracle.jdbc.OracleDriver
  url=jdbc:oracle:thin:@devdb1.(mydomain).com:1521:flcdb
  username=(uname) password=(passwd) 
  maxActive=20 maxIdle=10
  maxWait=-1 removeAbandoned=true 
  moveAbandonedTimeout=180
  logAbandoned=true/ 
/Context


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



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



RE: Database connection pooling in Tomcat 5.5

2006-09-18 Thread Darren Hall
Further progress...
When I connect to the database directly (not using a connection pool) and
specify the same username and password below, the code executes fine. When I
try to do the context lookup and connect to the database via the connection
pool, I get the invalid username/password; logon denied error. This leads
me to believe the error is in my configuration (or my code).
What am I doing wrong here??

Thanks,
Darren


-Original Message-
From: Darren Hall [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 18, 2006 2:45 PM
To: 'Tomcat Users List'
Subject: RE: Database connection pooling in Tomcat 5.5

 You are likely connecting to the wrong catalog.  Is the pool parameter
 defaultCatalog set?

That's specified in my Context, correct? If so, then no, I don't have my
defaultCatalog parameter set.

Here is my context.xml file (comments removed, as well as domain uname and
passwd)

Context path=/flc docBase=flc
debug=5 reloadable=true crossContext=true

   Resource name=jdbc/flc auth=Container
  type=javax.sql.DataSource 
  driverClassName=oracle.jdbc.OracleDriver
  url=jdbc:oracle:thin:@devdb1.(mydomain).com:1521:flcdb
  username=(uname) password=(passwd) 
  maxActive=20 maxIdle=10
  maxWait=-1 removeAbandoned=true 
  moveAbandonedTimeout=180
  logAbandoned=true/ 
/Context


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



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



simple connection pooling

2006-09-11 Thread Darren Hall

Hi all.
I'm using Oracle 10g with Tomcat 5.5 and Struts 1.2.9.
I'd like to set up connection pooling for my application. I've read the
Tomcat HOW-TO on setting up a JNDI Datasource for connection pooling, but
one thing confuses me -
In the how-to, it states Configure the JNDI DataSource in Tomcat by adding
a declaration for your resource to $CATALINA_HOME/conf/server.xml.

Add this in between the /Context tag of the examples context and the
/Host tag closing the localhost definition. If there is no such tag, you
can add one as illustrated in the Context and Host configuration
references...
However, in The Context Container documentation referenced in the above
article it states Please note that for tomcat 5, unlike tomcat 4.x, it is
NOT recommended to place Context elements directly in the server.xml file.
Instead, put them in the META-INF/context.xml directory of your WAR file or
the conf directory
So where do I place this Context element containing my resource that
describes the datasource?

Also, if the datasource is set up through Tomcat - is it then visible in
Struts? I'd imagine in would be through the JNDI, but I want to make sure
it's not in some other context that struts can't see.

Thanks,

Darren



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



connection pooling question (posted correctly)

2006-09-11 Thread Darren Hall
Hi all.

I'm using Oracle 10g with Tomcat 5.5 and Struts 1.2.9.

I'd like to set up connection pooling for my application. I've read the
Tomcat HOW-TO on setting up a JNDI Datasource for connection pooling, but
one thing confuses me - In the how-to, it states Configure the JNDI
DataSource in Tomcat by adding a declaration for your resource to
$CATALINA_HOME/conf/server.xml.

 

Add this in between the /Context tag of the examples context and the
/Host tag closing the localhost definition. If there is no such tag, you
can add one as illustrated in the Context and Host configuration
references... However, in The Context Container documentation referenced
in the above article it states Please note that for tomcat 5, unlike tomcat
4.x, it is NOT recommended to place Context elements directly in the
server.xml file. Instead, put them in the META-INF/context.xml directory of
your WAR file or the conf directory So where do I place this Context
element containing my resource that describes the datasource?

 

Thanks,

 

Darren

 



RE: connection pooling question (posted correctly)

2006-09-11 Thread Darren Hall
Thanks David.
The context element I'm using is taken directly from the examples.
If you can tell just by looking, can you see if this looks correct for
Tomcat 5.5 (otherwise I'll just use trial and error and web searching to
figure it out).

Thanks,

Darren

Context path=/flc docBase=flc
debug=5 reloadable=true crossContext=true

Resource name=jdbc/flc auth=Container
  type=javax.sql.DataSource
driverClassName=oracle.jdbc.OracleDriver
  url=jdbc:oracle:thin:@127.0.0.1:1521:flc
  username=scott password=tiger maxActive=20 maxIdle=10
  maxWait=-1 removeAbandoned=true
removeAbandonedTimeout=180
  logAbandoned=true/ 
/Context


-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 11, 2006 10:03 PM
To: Tomcat Users List
Subject: Re: connection pooling question (posted correctly)

META-INF is if you pack your web app to be a .war file.   Create the 
file in conf/Catalina/localhost but name it after the webapp. If your 
webapp is in the folder foo in the webapps directory, the file would be 
foo.xml. Also be sure your instructions are for tomcat 5.5 as the way 
the JNDI resource definition is written is different from previous versions.

-David

Darren Hall wrote:
 Hi all.

 I'm using Oracle 10g with Tomcat 5.5 and Struts 1.2.9.

 I'd like to set up connection pooling for my application. I've read the
 Tomcat HOW-TO on setting up a JNDI Datasource for connection pooling,
but
 one thing confuses me - In the how-to, it states Configure the JNDI
 DataSource in Tomcat by adding a declaration for your resource to
 $CATALINA_HOME/conf/server.xml.

  

 Add this in between the /Context tag of the examples context and the
 /Host tag closing the localhost definition. If there is no such tag, you
 can add one as illustrated in the Context and Host configuration
 references... However, in The Context Container documentation
referenced
 in the above article it states Please note that for tomcat 5, unlike
tomcat
 4.x, it is NOT recommended to place Context elements directly in the
 server.xml file. Instead, put them in the META-INF/context.xml directory
of
 your WAR file or the conf directory So where do I place this Context
 element containing my resource that describes the datasource?

  

 Thanks,

  

 Darren

  


   


-- 
David Smith
Network Operations Supervisor
Department of Entomology
Cornell University
2132 Comstock Hall
Ithaca, NY 14853
Phone: (607) 255-9571
Fax: (607) 255-0940


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



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



RE: connection pooling question (posted correctly)

2006-09-11 Thread Darren Hall
 And the filename for the  ROOT  app  ( / )  would beROOT.xml  ?

I don't know the answer, Lionel, but the logic seems to stand to reason.
*wink*


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



ClassNotFound - Is WEB-INF/lib in my app's classpath?

2006-07-24 Thread Darren Hall
Ok, I've deployed my application in Tomcat 5.5 on Solaris using the war
deploy feature in the manager.

The application (lets call it 'foo') shows up in the manager as '/foo', so I
know that it deploys. When I look in catalina.log, I see a ClassNotFound
exception, alerting me that the ClassLoader wasn't able to find my
ControllerServlet class. Here is the error from Catalina.log:

2006-07-24 09:38:46,987 DEBUG
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/foo] -
Sending application start events
2006-07-24 09:38:46,987 DEBUG
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/foo] -
Starting filters
2006-07-24 09:38:47,002 INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/foo] -
Marking servlet controller as unavailable
2006-07-24 09:38:47,002 ERROR
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/foo] - Error
loading WebappClassLoader
  delegate: false
  repositories:
/WEB-INF/classes/
-- Parent Classloader:
[EMAIL PROTECTED]
 com.abc.framework.controller.ControlServlet
java.lang.ClassNotFoundException:
com.abc.framework.controller.ControlServlet

My ControlServlet class is located in this jar file
webapps/foo/WEB-INF/lib/abc.jar in the package
com.abc.framework.controller;.

Are the jar files in WEB-INF/lib included in my application's classpath by
default? Do I need to make a classpath change somewhere? Is the fact that
WEB-INF/lib not show up in the repositories listing above meaningful?

Why can't Tomcat's classloader find my ControlServlet class?

Thanks,

Darren


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



Setting the classpath for my application

2006-07-24 Thread Darren Hall
Is the fact that I'm receiving a ClassNotFound error from Tomcat's
ClassLoader for a class that I've created indicative of a bad classpath?
Are jar files stored in WEB-INF/lib automatically included in Tomcat's
classpath for my application?

If so, how do I set the classpath for my application in Tomcat?

Thanks,

Darren

-Original Message-
From: Darren Hall [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 24, 2006 11:19 AM
To: 'Tomcat Users List'
Subject: ClassNotFound - Is WEB-INF/lib in my app's classpath?

Ok, I've deployed my application in Tomcat 5.5 on Solaris using the war
deploy feature in the manager.

The application (lets call it 'foo') shows up in the manager as '/foo', so I
know that it deploys. When I look in catalina.log, I see a ClassNotFound
exception, alerting me that the ClassLoader wasn't able to find my
ControllerServlet class. Here is the error from Catalina.log:

2006-07-24 09:38:46,987 DEBUG
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/foo] -
Sending application start events

2006-07-24 09:38:46,987 DEBUG
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/foo] -
Starting filters

2006-07-24 09:38:47,002 INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/foo] -
Marking servlet controller as unavailable

2006-07-24 09:38:47,002 ERROR
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/foo] - Error
loading WebappClassLoader
  delegate: false
  repositories:
/WEB-INF/classes/
-- Parent Classloader:
[EMAIL PROTECTED]
 com.abc.framework.controller.ControlServlet
java.lang.ClassNotFoundException:
com.abc.framework.controller.ControlServlet

My ControlServlet class is located in this jar file
webapps/foo/WEB-INF/lib/abc.jar in the package
com.abc.framework.controller;.

Are the jar files in WEB-INF/lib included in my application's classpath by
default? Do I need to make a classpath change somewhere? Is the fact that
WEB-INF/lib not show up in the repositories listing above meaningful?

Why can't Tomcat's classloader find my ControlServlet class?

Thanks,

Darren


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



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



RE: Setting the classpath for my application

2006-07-24 Thread Darren Hall
I wanted to confirm that jar files in the WEB-INF/lib  directory were
included in the classpath for my application. In reading through the online
documentation for Tomcat I found the following:

WebappX - A class loader is created for each web application that is
deployed in a single Tomcat 5 instance. All unpacked classes and resources
in the /WEB-INF/classes directory of your web application archive, plus
classes and resources in JAR files under the /WEB-INF/lib directory of your
web application archive, are made visible to the containing web application,
but to no others.

I am doing exactly this. My jar file (foo.jar) is in the
webapps/abc/WEB-INF/lib directory for my 'abc' application. However, in the
Catalina log file, when Tomcat starts, I get a ClassNotFound -
com.abc.framework.ControlServlet error. Why can my servlet not be found if
it resides in the jar under the WEB-INF/lib directory???

Any help would be appreciated.

Thanks,

Darren



-Original Message-
From: Darren Hall [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 24, 2006 1:59 PM
To: 'Tomcat Users List'
Subject: Setting the classpath for my application

Is the fact that I'm receiving a ClassNotFound error from Tomcat's
ClassLoader for a class that I've created indicative of a bad classpath?
Are jar files stored in WEB-INF/lib automatically included in Tomcat's
classpath for my application?

If so, how do I set the classpath for my application in Tomcat?

Thanks,

Darren

-Original Message-
From: Darren Hall [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 24, 2006 11:19 AM
To: 'Tomcat Users List'
Subject: ClassNotFound - Is WEB-INF/lib in my app's classpath?

Ok, I've deployed my application in Tomcat 5.5 on Solaris using the war
deploy feature in the manager.

The application (lets call it 'foo') shows up in the manager as '/foo', so I
know that it deploys. When I look in catalina.log, I see a ClassNotFound
exception, alerting me that the ClassLoader wasn't able to find my
ControllerServlet class. Here is the error from Catalina.log:

2006-07-24 09:38:46,987 DEBUG
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/foo] -
Sending application start events

2006-07-24 09:38:46,987 DEBUG
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/foo] -
Starting filters

2006-07-24 09:38:47,002 INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/foo] -
Marking servlet controller as unavailable

2006-07-24 09:38:47,002 ERROR
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/foo] - Error
loading WebappClassLoader
  delegate: false
  repositories:
/WEB-INF/classes/
-- Parent Classloader:
[EMAIL PROTECTED]
 com.abc.framework.controller.ControlServlet
java.lang.ClassNotFoundException:
com.abc.framework.controller.ControlServlet

My ControlServlet class is located in this jar file
webapps/foo/WEB-INF/lib/abc.jar in the package
com.abc.framework.controller;.

Are the jar files in WEB-INF/lib included in my application's classpath by
default? Do I need to make a classpath change somewhere? Is the fact that
WEB-INF/lib not show up in the repositories listing above meaningful?

Why can't Tomcat's classloader find my ControlServlet class?

Thanks,

Darren


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



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



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



RE: Setting the classpath for my application

2006-07-24 Thread Darren Hall
*sigh*

Apologies to the group. There is no need to respond to my posts.
I knew it had to be something easy that I was overlooking.

The problem was caused by the fact that my build.xml was not including my
compiled code in the jar file I was creating, so my jar was essentially
empty, and thus the controller servet was not deployed with the war file.

Darren


-Original Message-
From: Darren Hall [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 24, 2006 3:07 PM
To: 'Tomcat Users List'
Subject: RE: Setting the classpath for my application

I wanted to confirm that jar files in the WEB-INF/lib  directory were
included in the classpath for my application. In reading through the online
documentation for Tomcat I found the following:

WebappX - A class loader is created for each web application that is
deployed in a single Tomcat 5 instance. All unpacked classes and resources
in the /WEB-INF/classes directory of your web application archive, plus
classes and resources in JAR files under the /WEB-INF/lib directory of your
web application archive, are made visible to the containing web application,
but to no others.

I am doing exactly this. My jar file (foo.jar) is in the
webapps/abc/WEB-INF/lib directory for my 'abc' application. However, in the
Catalina log file, when Tomcat starts, I get a ClassNotFound -
com.abc.framework.ControlServlet error. Why can my servlet not be found if
it resides in the jar under the WEB-INF/lib directory???

Any help would be appreciated.

Thanks,

Darren



-Original Message-
From: Darren Hall [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 24, 2006 1:59 PM
To: 'Tomcat Users List'
Subject: Setting the classpath for my application

Is the fact that I'm receiving a ClassNotFound error from Tomcat's
ClassLoader for a class that I've created indicative of a bad classpath?
Are jar files stored in WEB-INF/lib automatically included in Tomcat's
classpath for my application?

If so, how do I set the classpath for my application in Tomcat?

Thanks,

Darren

-Original Message-
From: Darren Hall [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 24, 2006 11:19 AM
To: 'Tomcat Users List'
Subject: ClassNotFound - Is WEB-INF/lib in my app's classpath?

Ok, I've deployed my application in Tomcat 5.5 on Solaris using the war
deploy feature in the manager.

The application (lets call it 'foo') shows up in the manager as '/foo', so I
know that it deploys. When I look in catalina.log, I see a ClassNotFound
exception, alerting me that the ClassLoader wasn't able to find my
ControllerServlet class. Here is the error from Catalina.log:

2006-07-24 09:38:46,987 DEBUG
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/foo] -
Sending application start events

2006-07-24 09:38:46,987 DEBUG
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/foo] -
Starting filters

2006-07-24 09:38:47,002 INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/foo] -
Marking servlet controller as unavailable

2006-07-24 09:38:47,002 ERROR
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/foo] - Error
loading WebappClassLoader
  delegate: false
  repositories:
/WEB-INF/classes/
-- Parent Classloader:
[EMAIL PROTECTED]
 com.abc.framework.controller.ControlServlet
java.lang.ClassNotFoundException:
com.abc.framework.controller.ControlServlet

My ControlServlet class is located in this jar file
webapps/foo/WEB-INF/lib/abc.jar in the package
com.abc.framework.controller;.

Are the jar files in WEB-INF/lib included in my application's classpath by
default? Do I need to make a classpath change somewhere? Is the fact that
WEB-INF/lib not show up in the repositories listing above meaningful?

Why can't Tomcat's classloader find my ControlServlet class?

Thanks,

Darren


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



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



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



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



RE: The requested resource is not available

2006-07-19 Thread Darren Hall
Thanks for the response Hassan.

 But if the above url-pattern is in a Context with path '/abc', then you're
 telling it to give everything that looks like 
 'http://localhost:8080/abc/abc'
 to your control servlet, which probably isn't what you want...  :-)

No, you are exactly right. This is *not* what I want. I want the servlet to
get everything from 'http://localhost:8080/abc'. Would you mind explaining
where I went wrong?

 The Context configuration would be helpful, though.

As for Context, I don't have any context information in my web.xml file (I
don't believe... at least I have no Context element present in the file).
What I posted before was nearly the entire web.xml. I can post the whole
file if you'd like.

Thanks,

Darren


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



The requested resource is not available

2006-07-18 Thread Darren Hall
Simple problem (hopefully) and I've been here before, but for some reason I
can't find my way through this error.

Here's the scenario:

I've written a servlet which I'm deploying in Tomcat 5.5 using Apache 2.2 as
the web server. The servlet is a controller for one domain I have on my
server (lets call it the 'abc' domain.) The servlet is bundled into a war
file and deploys into Tomcat with no errors. The servlet-mapping in the
web.xml file defines the following:

!-- Controller Servlet Configuration --
servlet
servlet-namecontroller/servlet-name
servlet-classcom.abc.framework.controller.ControlServlet/servlet-class
/servlet

!-- Controller Servlet Mapping --
servlet-mapping
servlet-namecontroller/servlet-name
url-pattern/abc/url-pattern
/servlet-mapping

I've configured my httpd-vhosts.conf file to do a proxy pass through as
follows:

VirtualHost www.abc.com
DocumentRoot /work/abc/abc-app/deploy/var/www/htdocs/abc
ServerName www.abc.com
ServerPath /abc
ErrorLog logs/abc/www.abc.com-error_log
CustomLog logs/abc/www.abc.org-access_log common

ProxyRequests Off
ProxyPass / http://localhost:8080/abc
ProxyPassreverse / http://localhost:8080/abc
/VirtualHost

When I point my browser at http://www.abc.com/, I get a Tomcat error The
requested resource (/abc) is not available.

This indicates to me that the proxy pass through is working properly in
Apache, but that Tomcat is not handing off the request to my serlvet.
Also I've tried hitting the servlet directly by pointing my browser
to http://localhost:8080/abc and I get the same The requested resource
(/abc) is not available error.

What have I done wrong? 
Everything looks good to me...

Thanks for the help.

Darren Hall


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



RE: problems with unsubscribing

2006-06-14 Thread Darren Hall
Johnnie,

To remove your address from the list, send an empty message to:
   [EMAIL PROTECTED]

Hope this helps,

Darren


-Original Message-
From: Johnnie Chang [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 14, 2006 11:05 AM
To: 'Tomcat Users List'
Subject: RE: problems with unsubscribing

Apparently, nobody cares.  I am tiring to unsubscribe from the list for a
about a year.  I am still getting tons to email related to Tomcat.  Hope you
have better luck.

Johnnie Chang   
Network Administrator   
Phone:  909-305-2332
Fax:909-305-2180
[EMAIL PROTECTED]   
Alsaleh Project Management, Inc.

This email message has been sent in confidence and may contain privileged
information and is intended for the use of the individual or entity
addressed above. If you are not the intended recipient of this email
message, or an authorized agent of the recipient, you are hereby notified
that any reproduction of this communication is strictly prohibited. If you
have received this information in error, please return to the sender
immediately. Thank you.

-Original Message-
From: Kris Reese [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 13, 2006 10:53 PM
To: users@tomcat.apache.org
Subject: problems with unsubscribing


OK -- I've been trying to unsubscribe from the mailing list, many many many 
many times now by sending a blank e-mail to 
[EMAIL PROTECTED] but it's not working.  Can anybody tell 
me what is going on here?

Thank you.



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




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





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



Default install of Tomcat not working properly

2006-05-08 Thread Darren Hall
I'm having a problem getting tomcat 5.5.17 running on Solaris 10. I
preformed a default install of all the binary files and set my JAVA_HOME
variable to my install of jdk1.5  (/opt/jdk1.5/)

The problem I am running into is when I try to view my servlets-examples
page I get a 404 error from tomcat saying it can't find the resource.

When I click on the JSP examples the page appears but none of my JSP
examples function properly. I get an exception error as follows.

javax.servlet.ServletException: Wrapper cannot find servlet class
org.apache.jsp.jsp2.el.basic_002darithmetic_jsp or a class it depends on
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:432)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processC
onnection(Http11BaseProtocol.java:664)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:527)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
rkerThread.java:80)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:684)
java.lang.Thread.run(Thread.java:595)
root cause 
java.lang.ClassNotFoundException:
org.apache.jsp.jsp2.el.basic_002darithmetic_jsp
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1352)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1198)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:432)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processC
onnection(Http11BaseProtocol.java:664)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:527)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
rkerThread.java:80)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:684)
java.lang.Thread.run(Thread.java:595)

Let me know if anyone has run into this. Thanks.



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



RE: Blank page after tomcat install

2006-04-27 Thread Darren Hall
Steven,

What web server are you running, and have you correctly connected the web
server to your app server? Check your web server access logs to verify that
the web server is receiving your browser request.

Darren



-Original Message-
From: Steven Peacock [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 27, 2006 3:05 PM
To: users@tomcat.apache.org
Subject: Blank page after tomcat install

After successfully installing tomcat on a server a couple of weeks ago,
I decided I wanted a local copy to play with. 
So I downloaded the tar, extracted it and started tomcat,
When I go to localhost:8080 I get a blank page. Absolutely nothing but
white space. As a matter of fact, I can type anything I want after and
get the same result (http://localhost:8080/helpmeout)

My start up yields:
Using CATALINA_BASE:   /usr/local/apache-tomcat-5.5.17
Using CATALINA_HOME:   /usr/local/apache-tomcat-5.5.17
Using CATALINA_TMPDIR: /usr/local/apache-tomcat-5.5.17/temp
Using JRE_HOME:   /usr/lib/j2sdk1.5-sun/

java -version yields
java version 1.5.0_05
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)

I am running on Linux

Thanks, 

Steven Peacock


-
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: mod_jk weirdness

2006-02-06 Thread Darren Hall
Chris,

Not sure if this is helpful but it appears the next step that is failing is
the actual connection to tomcat from apache (unless you've left this part of
your mod_jk.log out of your post).

Here's the mod_jk.log output of a test I did on my local machine. The first
worker 'testworker' connects successfully; while the second 'newworker'
fails at about the same point you appear to be failing. In the below case,
'newworker' fails because it can't resolve the tomcat address after it sets
the contact for 'newworker'. Don't know if this helps or not...

Darren


[Mon Feb 06 09:49:03 2006] [2756:3108] [debug] jk_worker.c (141): about to
create instance testworker of ajp13
[Mon Feb 06 09:49:03 2006] [2756:3108] [debug] jk_worker.c (154): about to
validate and init testworker
[Mon Feb 06 09:49:03 2006] [2756:3108] [debug] jk_ajp_common.c (1806):
worker testworker contact is 'localhost:8009'
[Mon Feb 06 09:49:03 2006] [2756:3108] [debug] jk_ajp_common.c (1895):
setting socket keepalive to 0
[Mon Feb 06 09:49:03 2006] [2756:3108] [debug] jk_ajp_common.c (1934):
setting socket timeout to -1
[Mon Feb 06 09:49:03 2006] [2756:3108] [debug] jk_ajp_common.c (1938):
setting socket buffer size to 0
[Mon Feb 06 09:49:03 2006] [2756:3108] [debug] jk_ajp_common.c (1942):
setting connection recycle timeout to 0
[Mon Feb 06 09:49:03 2006] [2756:3108] [debug] jk_ajp_common.c (1946):
setting cache timeout to 0
[Mon Feb 06 09:49:03 2006] [2756:3108] [debug] jk_ajp_common.c (1950):
setting connect timeout to 0
[Mon Feb 06 09:49:03 2006] [2756:3108] [debug] jk_ajp_common.c (1954):
setting reply timeout to 0
[Mon Feb 06 09:49:03 2006] [2756:3108] [debug] jk_ajp_common.c (1958):
setting prepost timeout to 0
[Mon Feb 06 09:49:03 2006] [2756:3108] [debug] jk_ajp_common.c (1962):
setting recovery opts to 0
[Mon Feb 06 09:49:03 2006] [2756:3108] [debug] jk_ajp_common.c (1966):
setting number of retries to 3
[Mon Feb 06 09:49:03 2006] [2756:3108] [debug] jk_ajp_common.c (1843):
setting connection cache size to 250
[Mon Feb 06 09:49:03 2006] [2756:3108] [debug] jk_worker.c (248): removing
old testworker worker
[Mon Feb 06 09:49:03 2006] [2756:3108] [debug] jk_worker.c (236): creating
worker newworker
[Mon Feb 06 09:49:03 2006] [2756:3108] [debug] jk_worker.c (141): about to
create instance newworker of ajp13
[Mon Feb 06 09:49:03 2006] [2756:3108] [debug] jk_worker.c (154): about to
validate and init newworker
[Mon Feb 06 09:49:03 2006] [2756:3108] [debug] jk_ajp_common.c (1806):
worker newworker contact is 'www.local.org:8009'
[Mon Feb 06 09:49:03 2006] [2756:3108] [error] jk_ajp_common.c (1815): can't
resolve tomcat address localhost
[Mon Feb 06 09:49:03 2006] [2756:3108] [error] jk_ajp_common.c (1818):
invalid host and port www.local.org 8009
[Mon Feb 06 09:49:03 2006] [2756:3108] [debug] jk_ajp_common.c (2012): up to
0 endpoints to close
[Mon Feb 06 09:49:03 2006] [2756:3108] [error] jk_worker.c (158): validate
failed for newworker
[Mon Feb 06 09:49:03 2006] [2756:3108] [error] jk_worker.c (256): failed to
create worker newworker
[Mon Feb 06 09:49:03 2006] [2756:3108] [debug] jk_worker.c (212):
close_workers will destroy worker testworker


-Original Message-
From: Chris Pat [mailto:[EMAIL PROTECTED] 
Sent: Saturday, February 04, 2006 9:23 AM
To: Tomcat
Subject: mod_jk weirdness

Hello 
Attached is the full trace, but can anyone please
explain  second below.  The workers.properties file is
immediately below.  It eventually does some type of
core dump.  The site is up, working on the specified
ip, just not working with the mod_jk.  Any help much
appreciated.

workers.properties
workers.tomcat_home e:\Program\Tomcat 5.5
workers.java_home=$JAVA_HOME
ps\
worker.list=connect_op, connect_sb

worker.connect_op.port=12345
worker.connect_op.host=localhost
worker.connect_op.type=ajp13

worker.connect_sb.port=12346
worker.connect_sb.host=localhost
worker.connect_sb.type=ajp13


from mod_jk.log
[Sat Feb 04 07:54:00 2006] [8196:8192] [debug]
jk_worker.c (236): creating worker connect_op
[Sat Feb 04 07:54:00 2006] [8196:8192] [debug]
jk_worker.c (141): about to create instance connect_op
of ajp13
[Sat Feb 04 07:54:00 2006] [8196:8192] [debug]
jk_worker.c (154): about to validate and init
connect_op
[Sat Feb 04 07:54:00 2006] [8196:8192] [debug]
jk_ajp_common.c (1806): worker connect_op contact is
'localhost:12345'
...
[Sat Feb 04 07:54:01 2006] [8196:8192] [debug]
jk_worker.c (248): removing old connect_op worker

__
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: Betr.: Re: The Future of Tomcat

2006-02-02 Thread Darren Hall
Those evil people at Sun with their weird and often difficult to use
javascript!! *shakes fist*

Now ECMAScript THAT'S a different story...
=P


-Original Message-
From: Roel De Nijs [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 02, 2006 10:52 AM
To: users@tomcat.apache.org
Subject: Betr.: Re: The Future of Tomcat

or they think coffee and/or island :-)

 [EMAIL PROTECTED] 2/02/2006 16:50:03 
 True, but the HTTP server is still what most people think of when they
 hear the name Apache.

Probably same people, that think of Applets or Javascript when they
hear the word Java?


 Dave

Leon :-)

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




**
Disclaimer: zie www.aquafin.be



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



RE: (newb) Tomcat servlet mapping problem

2006-01-24 Thread Darren Hall

 Hmm, you're mixing up that /servlet story.
 Better remove everything named servlet from
 your environment... It is only confusing.
 
 Create app.xml, put the Context path /
 or /app, and then /FCLxyzServlet or
 /app/FCLxyzServlet are the correct URLs.
 
 Does that make any sense?
 
 Georg

Yes it does, and thanks for the help Georg. 
=}




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



RE: (newb) Tomcat servlet mapping problem

2006-01-23 Thread Darren Hall
 Not sure if your first sentence meant you found the problem, but just to
 make sure it's clear, the current Servlet Spec does require that servlet
 classes be in a package.
 
  - Chuck

Doh!

That's not good. Could that be the cause of the ClassDefNotFound error I'm
getting? I've inherited this code, and we will be designing a new site, and
I *will* be using packages - but that doesn't change the current situation,
which is, I need to keep the existing site running while the new site is
being developed. I need to find out how to get the old code deployed on
tomcat 5.0 and get the servlet mappings working properly so that we no
longer need to use the invoker servlet to keep the site functioning. Is
there a way I can map these servlets (in the web.xml file) so that Tomcat
can see them and execute them?




-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 22, 2006 9:19 PM
To: Tomcat Users List
Subject: RE: (newb) Tomcat servlet mapping problem

 From: Darren Hall [mailto:[EMAIL PROTECTED] 
 Subject: RE: (newb) Tomcat servlet mapping problem
 
 I have. The servlets I am trying to deploy (err, map?) do not 
 have a package associated with them.

Not sure if your first sentence meant you found the problem, but just to
make sure it's clear, the current Servlet Spec does require that servlet
classes be in a package.

 - Chuck


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

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





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



RE: (newb) Tomcat servlet mapping problem

2006-01-23 Thread Darren Hall
 On 1/23/06, Darren Hall [EMAIL PROTECTED] wrote:
From: Darren Hall [mailto:[EMAIL PROTECTED]
Subject: RE: (newb) Tomcat servlet mapping problem
   
Is there a way I can map these servlets (in the web.xml file) so
that Tomcat can see them and execute them?
  
 
 As far as I can see, it just works. Whether it's correct or not, it
 does seem work in Tomcat 5.5.12 and I know it worked in 5.0.28 too. So
 this is probably not the cause of your problem. Try putting one
 servlet in a package to see if that makes a difference, before you try
 to change them all.
 
 Here's a servlet declaration that I just tested:
 servlet
   servlet-nameTest/servlet-name
   servlet-classTest/servlet-class
 /servlet
 servlet-mapping
   servlet-nameTest/servlet-name
   url-pattern/test/url-pattern
 /servlet-mapping
 
 --
 Len

ok, the start of this thread got lost... let me try and do a brief
refresher...

I'm working with Tomcat 5.0, Apache 2, and a whole bunch of servlets that I
inherited. The website is a combination of static HTML and java. 95% of the
java code is implemented in servlets (that write out the dynamic HTML) and
NONE of the Java code is in packages.

The HTML on the site, when referring to servlets, uses relative paths like
form action=../servlet/servlet-name. In order to remove the invoker
servlet, I need to map all the servlets on the site through a web.xml file.

Initially, I was getting a resource unavailable error from Tomcat, but it
now appears as if my servlet mapping was wrong. (my app lived in the
${catalina.home}/webapp/servlet directory, and my web.xml was mapping a
servlet to url-mapping/servlet/[servlet-name]/url-mapping.

I fixed this by removing the '/servlet' in the url-mapping tag, and I now
get a stack trace with a ClassDefNotFound [servlet-name] error. This error
occurs when I point at Tomcat directly, so I know the error has nothing to
do with Apache. I now have a stripped down web.xml file that looks like this
(minus the xml and DOCTYPE directives):
...
web-app
  servlet
servlet-nameFLCUpEvDisplayServlet/servlet-name
servlet-classFLCUpEvDisplayServlet/servlet-class
  /servlet
  servlet-mapping
servlet-nameFLCUpEvDisplayServlet/servlet-name
url-pattern/FLCUpEvDisplayServlet/url-pattern
  /servlet-mapping
/web-app

Now everytime I hit the servlet, I get the ClassDefNotFound error, and
after that I see an entry in the log file:

2006-01-23 11:35:53 StandardContext[/servlet]Marking servlet
FLCUpEvDisplayServlet as unavailable
2006-01-23 11:35:53 StandardContext[/servlet]Error loading WebappClassLoader
  delegate: false
  repositories:
/WEB-INF/classes/

after which I get a resource is not available error again, until I stop
and restart Tomcat.

So, my question is... why am I getting the ClassDefNotFound error, and how
do I correct it (or can I, given my current configuration)?

Thanks

Darren



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



RE: (newb) Tomcat servlet mapping problem

2006-01-23 Thread Darren Hall
As an add-on -
I successfully mapped the Tomcat servlet example HelloWorldServlet to my
/servlet directory successfully through my web.xml file. I did this to make
sure that a servlet with no package could be deployed the way I am
attempting (HelloWorldExample has no package). The ONLY error I encountered
while deploying the HelloWorldExample, was it complained that the
ResourceBundle the code was looking for couldn't be found. I recompiled the
servlet without the ResourceBundle code and the servlet worked correctly.
(I wasn't sure how to configure the ResourceBundle in the code. I copied all
the files the resource bundle seemed to be referring to into my /servlet
directory along with the compiled HelloWorldServlet code, but it still
complained on execution that it couldn't locate the resource, so it was
easier for me to comment it out.)

This tells me I can definitely deploy a servlet the way I am trying to, but
it also raises questions about why the resource bundle couldn't be located.
Is all of this really a classpath or class loader issue in some way?


-Original Message-
From: Darren Hall [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 23, 2006 2:46 PM
To: 'Tomcat Users List'
Subject: RE: (newb) Tomcat servlet mapping problem

 On 1/23/06, Darren Hall [EMAIL PROTECTED] wrote:
From: Darren Hall [mailto:[EMAIL PROTECTED]
Subject: RE: (newb) Tomcat servlet mapping problem
   
Is there a way I can map these servlets (in the web.xml file) so
that Tomcat can see them and execute them?
  
 
 As far as I can see, it just works. Whether it's correct or not, it
 does seem work in Tomcat 5.5.12 and I know it worked in 5.0.28 too. So
 this is probably not the cause of your problem. Try putting one
 servlet in a package to see if that makes a difference, before you try
 to change them all.
 
 Here's a servlet declaration that I just tested:
 servlet
   servlet-nameTest/servlet-name
   servlet-classTest/servlet-class
 /servlet
 servlet-mapping
   servlet-nameTest/servlet-name
   url-pattern/test/url-pattern
 /servlet-mapping
 
 --
 Len

ok, the start of this thread got lost... let me try and do a brief
refresher...

I'm working with Tomcat 5.0, Apache 2, and a whole bunch of servlets that I
inherited. The website is a combination of static HTML and java. 95% of the
java code is implemented in servlets (that write out the dynamic HTML) and
NONE of the Java code is in packages.

The HTML on the site, when referring to servlets, uses relative paths like
form action=../servlet/servlet-name. In order to remove the invoker
servlet, I need to map all the servlets on the site through a web.xml file.

Initially, I was getting a resource unavailable error from Tomcat, but it
now appears as if my servlet mapping was wrong. (my app lived in the
${catalina.home}/webapp/servlet directory, and my web.xml was mapping a
servlet to url-mapping/servlet/[servlet-name]/url-mapping.

I fixed this by removing the '/servlet' in the url-mapping tag, and I now
get a stack trace with a ClassDefNotFound [servlet-name] error. This error
occurs when I point at Tomcat directly, so I know the error has nothing to
do with Apache. I now have a stripped down web.xml file that looks like this
(minus the xml and DOCTYPE directives):
...
web-app
  servlet
servlet-nameFLCUpEvDisplayServlet/servlet-name
servlet-classFLCUpEvDisplayServlet/servlet-class
  /servlet
  servlet-mapping
servlet-nameFLCUpEvDisplayServlet/servlet-name
url-pattern/FLCUpEvDisplayServlet/url-pattern
  /servlet-mapping
/web-app

Now everytime I hit the servlet, I get the ClassDefNotFound error, and
after that I see an entry in the log file:

2006-01-23 11:35:53 StandardContext[/servlet]Marking servlet
FLCUpEvDisplayServlet as unavailable
2006-01-23 11:35:53 StandardContext[/servlet]Error loading WebappClassLoader
  delegate: false
  repositories:
/WEB-INF/classes/

after which I get a resource is not available error again, until I stop
and restart Tomcat.

So, my question is... why am I getting the ClassDefNotFound error, and how
do I correct it (or can I, given my current configuration)?

Thanks

Darren



-
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: (newb) Tomcat servlet mapping problem

2006-01-23 Thread Darren Hall
Georg,

 if I look at your original configuration
 
  servlet-mapping
  servlet-nameSimpleServlet/servlet-name
  url-pattern/simple-servlet/url-pattern
  /servlet-mapping
 ---snip---
  Context path=/simple-servlet docBase=SimpleServlet 
 reloadable=true debug=99
 
 then, if I am not overlooking something,
 the correct URL to invoke the servlet is
 
 http://localhost/simple-servlet/simple-servlet
 
 because the first simple-servlet is the
 Context path where the webapp resides, and
 the second simple-servlet is the URL for
 the servlet inside the webapp, like correctly
 configured in the webapp descriptor.
 
You are correct. I realized this yesterday while playing with this problem.
I've since removed my servlet.xml file that contains the Context tag
specifying the docBase and path. 

I've gotten over this hurdle and immediately gotten hung up on the next one.
=P The only file I'm using for mapping the servlet now is the web.xml file
in the ${catalina.home}/webapps/servlet/WEB-INF directory.

The new issue is ClassDefNotFound that occurs when I point my browser at
the servlet (see last message, because I'm not retyping that 'brief' recap
again).

Thanks, though. I do appreciate the help.

Darren



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



RE: (newb) Tomcat servlet mapping problem

2006-01-22 Thread Darren Hall
Thanks for your help Warren.
I think I've made some progress on this problem, but I've encountered
another error. Here's where I am now...

I commented out all references to JK2 and downloaded
mod_jk-apache-2.0.55.so. I've set up mod_jk in apache's httpd.conf, and I am
now connecting to Tomcat successfully that way (example servlets have been
mapped successfully).

It looks like my original problem was caused by a simple mapping error. My
httpd.conf file now has a Location tag that forwards all requests for
'/servlet', as such
# Send servlet for context /servlet to 'worker1'
Location /servlet/*
  JkMount worker1
/Location

Under webapps, I've created a 'servlet' directory, and my
webapps/servlet/WEB-INF/web.xml file looks like this (note, I removed the
'/servlet' from the url-pattern, and this fixed my 'resource not found'
issue) -

?xml version=1.0 encoding=ISO-8859-1?
!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;
web-app
servlet
servlet-nameFLCUpEvDisplayServlet/servlet-name
servlet-classFLCUpEvDisplayServlet/servlet-class
/servlet
servlet-mapping
servlet-nameFLCUpEvDisplayServlet/servlet-name
url-pattern/FLCUpEvDisplayServlet/url-pattern
/servlet-mapping
/web-app 

So, I've made some progress (I think), but now I'm getting a new error -

2006-01-22 19:21:01 StandardWrapperValve[FLCUpEvDisplayServlet]: Allocate
exception for servlet FLCUpEvDisplayServlet
javax.servlet.ServletException: Wrapper cannot find servlet class
FLCUpEvDisplayServlet or a class it depends on

So did I hit my servlet, or did the classloader fail to locate it??

Thanks.



-Original Message-
From: Warren Pace [mailto:[EMAIL PROTECTED] 
Sent: Saturday, January 21, 2006 9:34 AM
To: Tomcat Users List
Subject: Re: (newb) Tomcat servlet mapping problem


 
 From: Darren Hall [EMAIL PROTECTED]
 Date: 2006/01/20 Fri PM 02:28:22 EST
 To: users@tomcat.apache.org
 Subject: (newb) Tomcat servlet mapping problem
 
 I'm running Tomcat 5.0.30 and Apache 2.0 (both are running fine and
without
 errors).
 
 I've connected them using mod_jk2, and I can see that apache is correctly
 forwarding URLs specified in the workers2.properties file correctly.
 
 
 I am now attempting to map a test servlet called SimpleServlet to an
URL.
 
 I've deployed the servlet in the directory SimpleServlet. In the
 webapps/SimpleServlet/WEB-INF directory I've added the following web.xml
 file:
 
  
 
 ?xml version=1.0 encoding=ISO-8859-1?
 
 web-app xmlns=http://java.sun.com/xml/ns/j2ee;
 
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 
 xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
 
 version=2.4
 
  
 
 servlet
 
 servlet-nameSimpleServlet/servlet-name
 
 servlet-classus.souther.simple.SimpleServlet/servlet-class
 
 /servlet
 
 
 servlet-mapping
 
 servlet-nameSimpleServlet/servlet-name
 
 url-pattern/simple-servlet/url-pattern
 
 /servlet-mapping
 
  
 
 /web-app
 
  
 
 In the ${catalina.home}/conf/Catalina/localhost directory, I've added the
 following SimpleServlet.xml file:
 
  
 
 ?xml version='1.0' encoding='utf-8'?
 
 !-- Make the servlet reloadable --
 
 Context path=/simple-servlet docBase=SimpleServlet reloadable=true
 debug=99
 
   Logger className=org.apache.catalina.logger.FileLogger
 
   directory=logs  prefix=simple. suffix=.log
 
   timestamp=true/
 
 /Context
 
  
 
 In the workers2.properties file (on the Apache side), I've added the
 following entry:
 
  
 
 [uri:localhost/simple-servlet/*]
 
 worker=ajp13:localhost:8009
 
 debug=99
 
  
 
 When I try to hit the URL http://localhost/simple-servlet I get back this
 response from Tomcat:
 
  
 
 HTTP Status 404 -/simple-servlet
 
 type Status report
 
 message /simple-servlet
 
 description The requested resource (/simple-servlet) is not available.
 
 Apache Tomcat / 5.0.30
 
  
 
 Can anyone please tell me why my servlet is not mapped to the URL
properly?
 
  
 
 Thanks.
 
  
 
 Darren
 
 
Darren,
 I'm pretty new to this as well.  Here are a couple of things I do know.
mod_jk2 is deprecated.  That doesn't mean it won't work but all development
effort has been re-focusted to mod_jk.  It's simple enough to download and
build.
 1)  Is your servlet in a package (us.souther.simple)?  Did it compile
without error?
 2)  Generally the directory tree for servlets in packages =
WEB-INF/classes/us/souther/simple (which is where your web.xml is telling
tomcat to look for the class file).
 3)  Double-check the path entry in your context tag.  I moved from tomcat 4
to tomcat 5.5, skipping the 5.0 releases so I can't provide any insight on
the context directives (in 5.5 you don't specify a context path).  Just make
sure it's pointing tomcat to something real.
 4) Some good resources are Jayson Falkner  Kevin Jones book Servlets

RE: (newb) Tomcat servlet mapping problem

2006-01-22 Thread Darren Hall
 
 Have you tried accessing the servlet directly via tomcat yet?
 If going through tomcat itself gives an error then work on fixing that 
 error first before worrying 
 about mod_jk.
 
 -Steve O.
 

I had not, but that was an excellent idea (kinda upset I didn't think of
that one myself =P).

I get the same error when trying to execute the servlet directly through
Tomcat. The same information is repeated in the log files. Unfortunately, I
don't have great logging (I may have it configured wrong - everything goes
to localhost.log and catalina.log, nothing goes to stdout.log or stderr.log
at all) so it makes fixing this problem that much more fun/challenging!


-Original Message-
From: Steve Ochani [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 22, 2006 8:37 PM
To: Darren Hall; 'Tomcat Users List'
Subject: RE: (newb) Tomcat servlet mapping problem

Date sent:  Sun, 22 Jan 2006 19:55:36 -0500
From:   Darren Hall [EMAIL PROTECTED]
Subject:RE: (newb) Tomcat servlet mapping problem
To: 'Tomcat Users List' users@tomcat.apache.org
Send reply to:  Tomcat Users List users@tomcat.apache.org

 
 So, I've made some progress (I think), but now I'm getting a new error
 -
 
 2006-01-22 19:21:01 StandardWrapperValve[FLCUpEvDisplayServlet]:
 Allocate exception for servlet FLCUpEvDisplayServlet
 javax.servlet.ServletException: Wrapper cannot find servlet class
 FLCUpEvDisplayServlet or a class it depends on
 
 So did I hit my servlet, or did the classloader fail to locate
 it??

Have you tried accessing the servlet directly via tomcat yet?
If going through tomcat itself gives an error then work on fixing that error
first before worrying 
about mod_jk.

-Steve O.



-
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: (newb) Tomcat servlet mapping problem

2006-01-22 Thread Darren Hall
 
 Have you tried accessing the servlet directly via tomcat yet?
 If going through tomcat itself gives an error then work on fixing that 
 error first before worrying 
 about mod_jk.
 
 -Steve O.


So, is this a simple classpath error? It looks like the classloader was
unable to find my servlet, but since the class lives in the
webapps/servlet/WEB-INF/classes directory, I thought it was included in the
classpath of the app server (or more specifically, my applications
classpath) by default. Is this not correct? And, if it's not correct...
where do I specify the classpath for the classloader for this app?

(Please forgive my Tomcat classloading ignorance.)

Darren

-Original Message-
From: Darren Hall [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 22, 2006 8:44 PM
To: 'Tomcat Users List'; [EMAIL PROTECTED]
Subject: RE: (newb) Tomcat servlet mapping problem

 
 Have you tried accessing the servlet directly via tomcat yet?
 If going through tomcat itself gives an error then work on fixing that 
 error first before worrying 
 about mod_jk.
 
 -Steve O.
 

I had not, but that was an excellent idea (kinda upset I didn't think of
that one myself =P).

I get the same error when trying to execute the servlet directly through
Tomcat. The same information is repeated in the log files. Unfortunately, I
don't have great logging (I may have it configured wrong - everything goes
to localhost.log and catalina.log, nothing goes to stdout.log or stderr.log
at all) so it makes fixing this problem that much more fun/challenging!


-Original Message-
From: Steve Ochani [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 22, 2006 8:37 PM
To: Darren Hall; 'Tomcat Users List'
Subject: RE: (newb) Tomcat servlet mapping problem

Date sent:  Sun, 22 Jan 2006 19:55:36 -0500
From:   Darren Hall [EMAIL PROTECTED]
Subject:RE: (newb) Tomcat servlet mapping problem
To: 'Tomcat Users List' users@tomcat.apache.org
Send reply to:  Tomcat Users List users@tomcat.apache.org

 
 So, I've made some progress (I think), but now I'm getting a new error
 -
 
 2006-01-22 19:21:01 StandardWrapperValve[FLCUpEvDisplayServlet]:
 Allocate exception for servlet FLCUpEvDisplayServlet
 javax.servlet.ServletException: Wrapper cannot find servlet class
 FLCUpEvDisplayServlet or a class it depends on
 
 So did I hit my servlet, or did the classloader fail to locate
 it??

Have you tried accessing the servlet directly via tomcat yet?
If going through tomcat itself gives an error then work on fixing that error
first before worrying 
about mod_jk.

-Steve O.



-
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: (newb) Tomcat servlet mapping problem

2006-01-22 Thread Darren Hall
 
 Have u checked ur web.xml configuration?
 The error sounds like Tomcat facing problem finding ur servlet class 
 file...


I have. The servlets I am trying to deploy (err, map?) do not have a package
associated with them. My class files live in the
${catalina.home}/webapps/servlet/WEB-INF/classes directory.
My ${catalina.home}/webapps/servlet/WEB-INF/web.xml looks like this (minus
the xml identifier and DOCTYPE tags at the top) -

web-app
servlet
servlet-nameFLCUpEvDisplayServlet/servlet-name
servlet-classFLCUpEvDisplayServlet/servlet-class
/servlet
servlet-mapping
servlet-nameFLCUpEvDisplayServlet/servlet-name
url-pattern/FLCUpEvDisplayServlet/url-pattern
/servlet-mapping
/web-app

-Original Message-
From: foo shyn [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 22, 2006 8:52 PM
To: Tomcat Users List
Subject: Re: (newb) Tomcat servlet mapping problem

Have u checked ur web.xml configuration?
The error sounds like Tomcat facing problem finding ur servlet class file...


- Original Message - 
From: Darren Hall [EMAIL PROTECTED]
To: 'Tomcat Users List' users@tomcat.apache.org; [EMAIL PROTECTED]
Sent: Monday, January 23, 2006 9:43 AM
Subject: RE: (newb) Tomcat servlet mapping problem



 Have you tried accessing the servlet directly via tomcat yet?
 If going through tomcat itself gives an error then work on fixing that 
 error first before worrying
 about mod_jk.

 -Steve O.


I had not, but that was an excellent idea (kinda upset I didn't think of
that one myself =P).

I get the same error when trying to execute the servlet directly through
Tomcat. The same information is repeated in the log files. Unfortunately, I
don't have great logging (I may have it configured wrong - everything goes
to localhost.log and catalina.log, nothing goes to stdout.log or stderr.log
at all) so it makes fixing this problem that much more fun/challenging!


-Original Message-
From: Steve Ochani [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 22, 2006 8:37 PM
To: Darren Hall; 'Tomcat Users List'
Subject: RE: (newb) Tomcat servlet mapping problem

Date sent:  Sun, 22 Jan 2006 19:55:36 -0500
From:   Darren Hall [EMAIL PROTECTED]
Subject:RE: (newb) Tomcat servlet mapping problem
To: 'Tomcat Users List' users@tomcat.apache.org
Send reply to:  Tomcat Users List users@tomcat.apache.org


 So, I've made some progress (I think), but now I'm getting a new error
 -

 2006-01-22 19:21:01 StandardWrapperValve[FLCUpEvDisplayServlet]:
 Allocate exception for servlet FLCUpEvDisplayServlet
 javax.servlet.ServletException: Wrapper cannot find servlet class
 FLCUpEvDisplayServlet or a class it depends on

 So did I hit my servlet, or did the classloader fail to locate
 it??

Have you tried accessing the servlet directly via tomcat yet?
If going through tomcat itself gives an error then work on fixing that error
first before worrying
about mod_jk.

-Steve O.



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



(newb) Tomcat servlet mapping problem

2006-01-20 Thread Darren Hall
I'm running Tomcat 5.0.30 and Apache 2.0 (both are running fine and without
errors).

I've connected them using mod_jk2, and I can see that apache is correctly
forwarding URLs specified in the workers2.properties file correctly.

 

I am now attempting to map a test servlet called SimpleServlet to an URL.

I've deployed the servlet in the directory SimpleServlet. In the
webapps/SimpleServlet/WEB-INF directory I've added the following web.xml
file:

 

?xml version=1.0 encoding=ISO-8859-1?

web-app xmlns=http://java.sun.com/xml/ns/j2ee;

xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;

xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;

version=2.4

 

servlet

servlet-nameSimpleServlet/servlet-name

servlet-classus.souther.simple.SimpleServlet/servlet-class

/servlet

 

servlet-mapping

servlet-nameSimpleServlet/servlet-name

url-pattern/simple-servlet/url-pattern

/servlet-mapping

 

/web-app

 

In the ${catalina.home}/conf/Catalina/localhost directory, I've added the
following SimpleServlet.xml file:

 

?xml version='1.0' encoding='utf-8'?

!-- Make the servlet reloadable --

Context path=/simple-servlet docBase=SimpleServlet reloadable=true
debug=99

  Logger className=org.apache.catalina.logger.FileLogger

  directory=logs  prefix=simple. suffix=.log

  timestamp=true/

/Context

 

In the workers2.properties file (on the Apache side), I've added the
following entry:

 

[uri:localhost/simple-servlet/*]

worker=ajp13:localhost:8009

debug=99

 

When I try to hit the URL http://localhost/simple-servlet I get back this
response from Tomcat:

 

HTTP Status 404 -/simple-servlet

type Status report

message /simple-servlet

description The requested resource (/simple-servlet) is not available.

Apache Tomcat / 5.0.30

 

Can anyone please tell me why my servlet is not mapped to the URL properly?

 

Thanks.

 

Darren