Mark certain contexts inactive?

2005-10-06 Thread Scott Purcell
Hello,

On my development machine, I have created quite a few contexts or webapp 
instances, and due to that fact, the startup time is increasing. I do not want 
to remove any of the contexts as they all mean something to me, but I would 
like to be able to mark them so they do not start up. And then be able to 
turn them on when needed. 

Is there a clean way of doing this? 

Thanks,
Scott



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



Tomcat 5.5 where is a hard-copy dtd reference?

2005-09-01 Thread Scott Purcell
Hello,
Is there a quick reference, or somewhere one can go to get a listing of the 
element order for the 2.4 dtd?

I already have a bunch of elements in my web.xml and I want to add a 
listener but I forgot where it goes and I can't seem to google it up today?

Anyone know?

Thanks,
Scott

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



Users Can See root files

2005-08-31 Thread Scott Purcell
Hello,

I was showing someone my website the other day, and when they started playing 
with the URL, they could see the jsp files, html files, and files under the 
WEB-INF directory.

Is created a welcome-file-list in the web.xml, but I guess if someone plays 
with the url and tries to get a look at the files that does not help.

How does one shut down all access to anything from a url 

Thanks
Scott

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



Database Pooling Follow-up

2005-08-31 Thread Scott Purcell
Hello,


I want to say thanks for the links yesterday in regards to my pooling problem. 
After reading the docs, I have a better handle on how this will work.
I am ready to test, and I was able to get the following to work within a JSP 
page.

But I would really like to create a Singleton class that could hand out 
connections based upon something like: singleton.getHandle(jndiname); So in 
my business object I can hand in a name and let the busines object get the 
connection, etc.

Does that make sense. Only problem is, I cannot figure out how to transfer the 
JSP snippet below, to physical java code.

Anyone know?

Thanks,
Scott



### JSP that works correctly ... would like to do this in a class ###



%@ taglib uri=http://java.sun.com/jsp/jstl/sql; prefix=sql %
%@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %

sql:query var=rs dataSource=jdbc/TestDB
select id, foo, bar from testdata
/sql:query

html
  head
titleDB Test/title
  /head
  body

  h2Results/h2
  
c:forEach var=row items=${rs.rows}
Foo ${row.foo}br/
Bar ${row.bar}br/
/c:forEach

  /body
/html


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



Database Pooling

2005-08-30 Thread Scott Purcell
Hello,

To start off with, I hand rolled a database pooling class to handle database 
pooling for a ecommerce site I am writing. The application is web-based so of 
course I am using Tomcat 5.5 and all was going well. But in my implementation, 
I occasionally get errors when the connection has not been used for a long 
period of time. Basically mysql or tomcat may be taking themselves out of 
service and I get some java.net errors through Tomcat.

Anyway, I got frustrated and began to look through some on-line docs in regards 
to Tomcat and DatabasePooling.

Which leads me to my question:
Is pooling build-in to Tomcat 5.5?
If so, how simple is this to implement (I have read here: 
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-resources-howto.html but 
I an not familiar with JNDI.
And if it does it take care of shutting down the pool when the server gets 
reloaded or gets unloaded?

Currently my pooling solution is huge, with threads to monitor if they are 
closed, etc. I figure there has to be a better implementation, or solution for 
myself in this regards

Could anyone please help out with some sample, or explanation of how this all 
fits together.

I have created business objects, so I just need to call the database from 
business objects, not directly from tomcat.

Thanks,
Scott




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



Virtual Host Config Question

2005-08-12 Thread Scott Purcell
Hello,

I have configured two Hosts in my server.xml for two different sites.

The one I am having issues with is as follows:
 Host name=www.theuniquepear.com appBase=webapps/unique/
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false
Context path= docBase=. /

It actuall works well, but I am running struts application and with struts it 
includes the context which is unique.

So behind the scenes, (in the URL) I am getting something like this:

http://www.theuniquepear.com/welcome.do
which is really doing this
http://www.theuniquepear.com/unique/welcome.do

And things of course are getting screwed up. 

Is there a way to get around that. I took off the /unique under appBase but 
then it showed the default Tomcat page.

Anyone been here before?

Thanks
Scott


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



RE: Problems with context

2005-08-12 Thread Scott Purcell
Actually I am getting no errors. Basically some of the images and includes do 
not show up unless I take out the unique from the querystring. That is why I 
am confused.

Originally, while building the application, I did not have an entry in the 
host element. I just used something like this:
http://localhost/unique/welcome.do
and all was good. But when I got my staticIP the other night, and entered the 
host information that is when things got out of wack.

Does that help?

Thanks,
Scott





-Original Message-
From: Allistair Crossley [mailto:[EMAIL PROTECTED]
Sent: Friday, August 12, 2005 10:22 AM
To: Tomcat Users List
Subject: RE: Problems with context


And what is the error you are getting? 404? 500? Exception? What?

Allistair.

 -Original Message-
 From: Fermin Jimenez Najar [mailto:[EMAIL PROTECTED]
 Sent: 12 August 2005 08:54
 To: Tomcat Users List
 Subject: Problems with context
 
 
 Hi. I just has beginning to use the Tomcat, for programming in JSP.
 I have the 5.0 version.
 
 I make a web app that uses, in some jsp's files, the command
 response.sendRedirect.
 
 When i execute the pages locally in my computer, works fine, 
 but, i if try
 to
 test the pages from another computer, i get an error.
 
 This is the way i was executed the sendRedirect for test in 
 another machine,
 and always get an error:
 response.sendRedirect(http://localhost:8080/activation/obliga
 torios.jsp)
 response.sendRedirect(http://192.168.1.137:8080/activation/ob
 ligatorios.jsp
 )
 response.sendRedirect(http://mycomputer:8080/activation/oblig
 atorios.jsp)
 response.sendRedirect(/obligatorios.jsp)
 response.sendRedirect(activation/obligatorios.jsp)
 
 
 I think that could be some context problems because, for make 
 the webapp
 structure, i
 copied one example webapp that comes with the tomcat, then i 
 deleted and
 renamed
 those files and directories that i dont use (off course, the 
 web-inf still
 exist)
 
 What can i do ? Is there is some file where i must configure 
 the context of
 the webapp ?
 
 Thanks !!
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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


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


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



RE: Virtual Host Config Question

2005-08-12 Thread Scott Purcell
Thanks, I guess I will have to play with the configuration. But I am using 
straight Tomcat.

Thanks for all the help, I guess it is not an obvious problem, so I must have 
something stupid going on.

Sincerely
Scott

-Original Message-
From: Allistair Crossley [mailto:[EMAIL PROTECTED]
Sent: Friday, August 12, 2005 10:51 AM
To: Tomcat Users List
Subject: RE: Virtual Host Config Question


Hi,

Not sure about this one. How are you routing requests to Tomcat? Are you using 
the JK connector with a mapping of /*.do? Do you allow image to be handled by 
Apache/IIS or is Tomcat doing it? 
You may need to ensure your static resource uris like images reference the 
context name, e.g src=/unique/images/pic.gif

Allistair.

 -Original Message-
 From: Scott Purcell [mailto:[EMAIL PROTECTED]
 Sent: 12 August 2005 15:43
 To: tomcat-user@jakarta.apache.org
 Subject: Virtual Host Config Question
 
 
 Hello,
 
 I have configured two Hosts in my server.xml for two different sites.
 
 The one I am having issues with is as follows:
  Host name=www.theuniquepear.com appBase=webapps/unique/
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
 Context path= docBase=. /
 
 It actuall works well, but I am running struts application 
 and with struts it includes the context which is unique.
 
 So behind the scenes, (in the URL) I am getting something like this:
 
 http://www.theuniquepear.com/welcome.do
 which is really doing this
 http://www.theuniquepear.com/unique/welcome.do
 
 And things of course are getting screwed up. 
 
 Is there a way to get around that. I took off the /unique 
 under appBase but then it showed the default Tomcat page.
 
 Anyone been here before?
 
 Thanks
 Scott
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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


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


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



Certificates On 5.5

2005-08-10 Thread Scott Purcell
Hello,

I have the need install Verisign Certificate on my Tomcat 5.5 running on XP.

I am not that familiar with SSL, and was hoping someone may of done this, and 
could give me a high-level of the complexivity.
I would like to have this running by Friday and could use any links, help.

Thanks,
Scott

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



Virtual host, routing, problems with localhost

2005-08-09 Thread Scott Purcell
Hello,

I am running Tomcat 5.5 on a PC.
Up until a week ago, the machine was a local machine basically for my 
development. So I would hit the machine like so for sites:
http://localhost/site1
or
http://localhost/site9

On Monday, I purchased a staticIP and a DNS entry. I had register.com bind the 
DNS name with the IP.
I purchased a router and put the IP into the router. In my original local 
machine, I gave it an IP and told the router to allow 80 traffic through to the 
machine.
Then I updated my server.xml file and added a virtual host that was
http://www.unique - /webapps/unique
and all was happy.

So I felt good about all things.

But last night, I decided to create a new site, and now I cannot hit it with 
http://localhost or http://127.0.0.1
And then I cannot get into the manager app either.

I believe that the machine is trying to go out to the internet and back through 
the router? I get lost here, and am basically clueless of what I need to do?

Has anyone been through this? I would appreciate any input that I can try.

Sincerely
Scott

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



RE: Virtual host, routing, problems with localhost

2005-08-09 Thread Scott Purcell
Sorry for the latency, I was in a meeting.

No I do not have one. Do I need one, and if so, is the IP the machine IP or 
localhost, or 127.0.0.1?

Thanks 
Scott



-Original Message-
From: George Sexton [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 09, 2005 10:18 AM
To: 'Tomcat Users List'
Subject: RE: Virtual host, routing, problems with localhost


Do you have a host entry in your server.xml with the name of localhost?

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Scott Purcell [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, August 09, 2005 8:26 AM
 To: tomcat-user@jakarta.apache.org
 Subject: Virtual host, routing, problems with localhost
 
 Hello,
 
 I am running Tomcat 5.5 on a PC.
 Up until a week ago, the machine was a local machine 
 basically for my development. So I would hit the machine like 
 so for sites:
 http://localhost/site1
 or
 http://localhost/site9
 
 On Monday, I purchased a staticIP and a DNS entry. I had 
 register.com bind the DNS name with the IP.
 I purchased a router and put the IP into the router. In my 
 original local machine, I gave it an IP and told the router 
 to allow 80 traffic through to the machine.
 Then I updated my server.xml file and added a virtual host that was
 http://www.unique - /webapps/unique
 and all was happy.
 
 So I felt good about all things.
 
 But last night, I decided to create a new site, and now I 
 cannot hit it with http://localhost or http://127.0.0.1
 And then I cannot get into the manager app either.
 
 I believe that the machine is trying to go out to the 
 internet and back through the router? I get lost here, and am 
 basically clueless of what I need to do?
 
 Has anyone been through this? I would appreciate any input 
 that I can try.
 
 Sincerely
 Scott
 
 -
 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]



Logging With Tomcat 5.5

2005-08-02 Thread Scott Purcell
Hello,

I am sure this topic has been beaten to death, but I am having trouble 
understanding how the Log4J works, and how I can configure it on my localbox.

First off, I am running Tomcat 5.5 and I have created two webapp contexts. One 
is a dev site, and the other is a production site. I am using struts (I don't 
think it matters).

I would to be able to have two sets of rolling logs. One for dev, and the other 
for production. I am trying to decipher the readme at 
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html; but I am not 
truly sure if this is for all webapps, or what this is implying.

I would like to get all Tomcat messages (errors, etc) and my actual logging all 
in either one or two files per webapp.


Can someone please assist me in this? The readme just doesn't cut it, or I am 
interpreting it wrongly. Or maybe there is an example setup somewhere.

Any info would be appreciated.
Sincerely
Scott




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



RE: Logging With Tomcat 5.5

2005-08-02 Thread Scott Purcell
Allistair,

That last instruction
log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost][/webappname]=DEBUG,
 R 

What do I change the [Catalina] value to?
and that does go into the log4j.properties file under the webapp?

Thanks,
Scott







-Original Message-
From: Allistair Crossley [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 02, 2005 8:31 AM
To: Tomcat Users List
Subject: RE: Logging With Tomcat 5.5


Don't confuse not understanding with not sufficient. The instructions do 
lead to a correct configuration. However, here it is more explicitly.

Allistair.

Per-webapp logging
==

1. Add log4j's jar to both your webapp's WEB-INF/lib folders
2. Add log4j.properties to both your webapp's WEB-INF/classes folders. 
*Minimally*, add

log4j.rootCategory=debug, R
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=c:/jakarta-tomcat/logs/webapp-name.log
log4j.appender.R.MaxFileSize=1500KB
log4j.appender.R.MaxBackupIndex=1
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d - %5p (%C:%L) - %m%n

to those log4j.properties files changing the File path appropriately.

Ideally you will pick up the log4j manual and create appenders that map to 
packages.

Tomcat logging with log4j
=

I've found the best way is

1. Add log4j jar to common/lib, add commons-logging.jar to common/lib
2. Add log4j.properties to common/classes with content

log4j.rootCategory=error, R
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=c:/jakarta-tomcat/logs/tomcat.log
log4j.appender.R.MaxFileSize=1500KB
log4j.appender.R.MaxBackupIndex=1
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d - %5p (%C:%L) - %m%n

log4j.logger.org.apache.commons.modeler=INFO, R
log4j.logger.org.apache.tomcat.util.digester=ERROR, R
log4j.logger.org.apache.catalina.loader=INFO, R
log4j.logger.org.apache.catalina.session=INFO, R
log4j.logger.org.apache.catalina=DEBUG, R
log4j.logger.org.apache.commons.digester=INFO, R
log4j.logger.org.apache.commons.beanutils=INFO, R
log4j.logger.org.apache.jasper=INFO, R
log4j.additivity.org.apache.catalina=false

Tomcat logging per-webapp
=

Add to your webapp's log4j.properties files

log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost][/webappname]=DEBUG,
 R 

 -Original Message-
 From: Scott Purcell [mailto:[EMAIL PROTECTED]
 Sent: 02 August 2005 14:22
 To: tomcat-user@jakarta.apache.org
 Subject: Logging With Tomcat 5.5
 
 
 Hello,
 
 I am sure this topic has been beaten to death, but I am 
 having trouble understanding how the Log4J works, and how I 
 can configure it on my localbox.
 
 First off, I am running Tomcat 5.5 and I have created two 
 webapp contexts. One is a dev site, and the other is a 
 production site. I am using struts (I don't think it matters).
 
 I would to be able to have two sets of rolling logs. One for 
 dev, and the other for production. I am trying to decipher 
 the readme at 
 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html;
  but I am not truly sure if this is for all webapps, or what 
 this is implying.
 
 I would like to get all Tomcat messages (errors, etc) and my 
 actual logging all in either one or two files per webapp.
 
 
 Can someone please assist me in this? The readme just doesn't 
 cut it, or I am interpreting it wrongly. Or maybe there is an 
 example setup somewhere.
 
 Any info would be appreciated.
 Sincerely
 Scott
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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


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


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



Using Tomcat As Webserver Question

2005-07-28 Thread Scott Purcell
Hello,

I have created a web-site using Struts framework. I have created it on a dev 
box, and I am finally ready to deploy it to the world.


My goal is to create 3-4 web sites, and I am going to have one static IP 
address to the machine. I currently have two web sites, and dns names. I am 
using charter static IP and have registered my dns names via Register.com.

1) How, or where is the docs so I can use the one IP address and have it use 
two different names? Like I said, I have to server contexts like so:
$TOMCAT_HOME/webapps/site1
$TOMCAT_HOME/webapps/site2
each has their own web.xml.

2) These are simple e-commerce sites, where I expect low traffic. Do I need to 
wrap Tomcat around Apache? And if so, is there a how-to for this?

I am going to run Microsoft Business Server for the OS on the server.

Any input would be appreciated.

Thanks,
Scott



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



RE: Using Tomcat As Webserver Question

2005-07-28 Thread Scott Purcell
Thanks Marius,

I believe that the requests will be less than 5,000 per day as we begin.

I hate to ask, but do I need to enter the IP address anywhere in the Tomcat 
configs?



Scott



-Original Message-
From: Marius Hanganu [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 28, 2005 8:47 AM
To: Tomcat Users List
Subject: RE: Using Tomcat As Webserver Question


Hello,

1. In $TOMCAT_HOME/conf/server.xml, inside the Engine element you have
to declare two virtual hosts. I have used a configuration like the
following:

Host name=DNS_1 appBase=webapps/site1 unpackWARs=true
autoDeploy=true 
xmlValidation=false xmlNamespaceAware=false
Context path= docBase=./
/Host

Host name=DNS_2 appBase=webapps/site2 unpackWARs=true
autoDeploy=true 
xmlValidation=false xmlNamespaceAware=false
Context path= docBase=./
/Host 

2. What does low traffic mean? I've seen web apps in tomcat stress
tested with 20.000 requests per day (doing relatively complicated db
queries) and doing very well.

Regards,
Marius

-Original Message-
From: Scott Purcell [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 28, 2005 4:31 PM
To: tomcat-user@jakarta.apache.org
Subject: Using Tomcat As Webserver Question

Hello,

I have created a web-site using Struts framework. I have created it on a
dev box, and I am finally ready to deploy it to the world.


My goal is to create 3-4 web sites, and I am going to have one static IP
address to the machine. I currently have two web sites, and dns names. I
am using charter static IP and have registered my dns names via
Register.com.

1) How, or where is the docs so I can use the one IP address and have it
use two different names? Like I said, I have to server contexts like so:
$TOMCAT_HOME/webapps/site1
$TOMCAT_HOME/webapps/site2
each has their own web.xml.

2) These are simple e-commerce sites, where I expect low traffic. Do I
need to wrap Tomcat around Apache? And if so, is there a how-to for
this?

I am going to run Microsoft Business Server for the OS on the server.

Any input would be appreciated.

Thanks,
Scott



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



Tomcat For SSL

2005-05-23 Thread Scott Purcell
Hello,

I have a webapp that is running on Tomcat 5.5. I have always developed just 
using Tomcat. Now I want to take a site, and host it. The site will also run 
certificates for SSL. Should I wrap my site around Apache now. Meaning should I 
install apache and put tomcat inside? Or however this is done. Or can tomcat 
handle SSL certificates (from Verisign?) as it is. I hear of security issues, 
etc.

Any information would be appreciated.

Thanks,
Scott

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



logging per context

2005-04-22 Thread Scott Purcell
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html

Hello, 
I have just read this document about tomcat 5.5 ability to use logger. From 
the example there show putting the log4j.properties into the common/classes 
folder. But doing this of course, puts all logging here.

I really ... really would like to be able to create a separate log file for 
each context I am running.

Can this be done?

Thanks,
Scott



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



configure DataSource Question

2005-04-15 Thread Scott Purcell
Hello,
I am trying to configure a javax.sql.DataSource to work with the JDBC pooling 
stuff.
I have been screwing with this stuff quite a while now and could use some help.

In my Servlet I want to use the JNDI and something like this for a connection:
Context ctx = new InitialContext();

   DataSource ds =
(DataSource)ctx.lookup(
   java:comp/env/jdbc/strutsDB);
Connection conn = ds.getConnection();


// THIS WORKS, BUT I AM NOT USING THE BasicDataSourceFactory to create the pool.
?xml version='1.0' encoding='utf-8'?
Context displayName=strutsDB docBase=strutsDB path=/strutsDB
  reloadable=true 
  Resource name=jdbc/strutsDB auth=Container type=javax.sql.DataSource 
 maxActive=100 maxIdle=30 maxWait=1 username=javauser 
 password=javadude driverClassName=com.mysql.jdbc.Driver
 url=jdbc:mysql://localhost:3306/fritest?autoReconnect=true/
/Context



// SO I WANT TO USE THE FOLLOWING, WHICH FAILS WITH THIS ERROR
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of cla
ss '' for connect URL 'null'
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDat
aSource.java:780)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSo
urce.java:540)
at com.mb.purcell.action.QueryDispatchAction.query(QueryDispatchAction.j
ava:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchActio
n.java:280)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:

The below configuration that is causing the failure is basically the same as 
the above. Why does the above work, and the one I need fails?


I am using this example: 
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
This is basically the same as above, except for the BasicDataSourceFactory. 

Does anyone know why this does not work? I have struggled too long with this, 
and could use a hand.

Thanks,
Scott



### context.xml that fails. ###
 

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

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

  Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_FM_log. suffix=.txt
 timestamp=true/

  Resource name=jdbc/strutsDB
   auth=Container
   type=javax.sql.DataSource/

  ResourceParams name=jdbc/strutsDB
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter

!-- Maximum number of dB connections in pool. Make sure you
 configure your mysqld max_connections large enough to handle
 all of your db connections. Set to 0 for no limit.
 --
parameter
  namemaxActive/name
  value100/value
/parameter

!-- Maximum number of idle dB connections to retain in pool.
 Set to 0 for no limit.
 --
parameter
  namemaxIdle/name
  value30/value
/parameter

!-- 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.
 --
parameter
  namemaxWait/name
  value1/value
/parameter

!-- MySQL dB username and password for dB connections  --
parameter
 nameusername/name
 valuejavauser/value
/parameter
parameter
 namepassword/name
 valuejavadude/value
/parameter

!-- Class name for mm.mysql JDBC driver --
parameter
   namedriverClassName/name
   valuecom.mysql.jdbc.Driver/value
/parameter

!-- The JDBC connection url for connecting to your MySQL dB.
 The autoReconnect=true argument to the url makes sure that the
 mm.mysql JDBC Driver will automatically reconnect if mysqld closed the
 connection.  mysqld by default closes idle connections after 8 hours.
 --
parameter
  nameurl/name
  valuejdbc:mysql://localhost:3306/fritest?autoReconnect=true/value
/parameter
  /ResourceParams
/Context


Scott K Purcell | Developer | VERTIS |
555 Washington Ave. 4th Floor | St. Louis, MO 63101 |
314.588.0720 Ext:1320 | [EMAIL PROTECTED] | http://www.vertisinc.com

Vertis is the premier provider of targeted advertising, media, and 
marketing services that drive consumers to marketers more effectively. 
 

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



How to Deploy Replacement War

2005-04-13 Thread Scott Purcell
Hello,

I deployed a war file for a new project a couple of weeks back. The war 
extracted, and the manager saw it, and all is good. But now I need to replace 
that webapp, with a new war file. Now the other day, I went to the manager, 
undeployed the webapp, turned off Tomcat and deleted the webapp folder. Then I 
put the war file under webapps and restarted the server. But things got 
screwey and I had to repeat this a couple of times, and also turn Tomcat off in 
order to remove the libs.

Anyway, what is the proper protocol on how to properly replace a webapp with 
a new war.


Thanks,


Scott K Purcell

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



RE: DBCP Please Help Get Working Properly

2005-04-11 Thread Scott Purcell
Thank David for the below information.

This makes some sense, and I will try and make the changes. But this of course 
leads to a follow-up question. Why isn't there any decent documentation to get 
the DBCP running in Tomcat. I am talking about a simple example, that explains 
container versions, jsp versions, possibly better ways to use then putting the 
connection into a JSP page. Connecting in a JSP page is just plain dirty, I 
would like to connect in some class where I can call connections from. Does 
this make sense?

As I mentioned, I followed the example that comes with the documentation for my 
5.5 Tomcat that displays when you go to localhost.

So, is there any good documentation that shows how to do this, step by step?


Thanks,
Scott






-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Monday, April 11, 2005 8:18 AM
To: Tomcat Users List
Subject: Re: DBCP Please Help Get Working Properly


Ok, define 'no results'. In reality, the naming import isn't the only 
thing that changed. Your web.xml file *looks* like 2.3 spec from what I 
can see and you are using JSP 2.x spec syntax in your jsp. If you want 
the JSP 2.x spec features, you need to declare your web.xml file for 
servlet 2.4 spec. This should be up at the top of your web.xml (pasted 
from the specification for servlet 2.4):

?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

Then just put all your servlet-mappings, etc., ... after that. The 
taglib declarations need to be inside a jsp-config element for the 2.4 
spec web.xml file too. That's how I'm guessing you have a 2.3 spec 
web.xml file. The full spec can be found at 
http://www.jcp.org/en/jsr/detail?id=154

--David

Scott Purcell wrote:

Hello,

I am trying to use the DBCP features of Tomcat 5.5.7. I created a webapp named 
testDB and put it under $CATALINA_HOME/webapps/testDB. Then I created a 
testDB.xml file under $CATALINA_HOME/conf/Catalina/localhost/testDB.xml.

// here it is
Context path=/testDB docBase=testDB
debug=5 reloadable=true crossContext=true

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

I have been following the notes from: 
http://localhost/tomcat-docs/jndi-datasource-examples-howto.html

I made sure I completed the rest of the tasks.
WEB-INF has the two tag locations, and the resource ref.
eg:

taglib
taglib-uri/WEB-INF/sql.tld/taglib-uri
taglib-location/WEB-INF/sql.tld/taglib-location
/taglib


taglib
taglib-uri/WEB-INF/c.tld/taglib-uri
taglib-location/WEB-INF/c.tld/taglib-location
/taglib

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

I finally hit my jsp page which is this:
%@ taglib uri=http://java.sun.com/jsp/jstl/sql; prefix=sql %
%@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %

sql:query var=rs dataSource=jdbc/testDB
select id, foo, bar from testdata
/sql:query

html
  head
titleDB Test/title
  /head
  body

  h2Results/h2
  
c:forEach var=row items=${rs.rows}
Foo ${row.foo}br/
Bar ${row.bar}br/
/c:forEach


  /body
/html

And I get no results:

Now I am pretty sure I have all configured. Because if I use a fallback 
(Tomcat 4.1) code piece I had, I get results using the same settings:

package foo;

import javax.naming.*;
import javax.sql.*;
import java.sql.*;

public class DBTest {

  String foo = Not Connected;
  int bar = -1;

  public void init() {
try{
  Context ctx = new InitialContext();
  if(ctx == null ) 
  throw new Exception(Boom - No Context);

  DataSource ds = 
(DataSource)ctx.lookup(
   java:comp/env/jdbc/testDB);

  if (ds != null) {
Connection conn = ds.getConnection();
  
if(conn != null)  {
foo = Got Connection +conn.toString();
Statement stmt = conn.createStatement();
ResultSet rst = 
stmt.executeQuery(
  select id, foo, bar from testdata);
while(rst.next()) {
   System.out.println(next );
   foo=rst.getString(2);
   bar=rst.getInt(3);
}
conn.close();
}
  }
}catch(Exception e) {
  e.printStackTrace();
}
 }

 public String getFoo() { return foo; }
 public int getBar() { return bar;}
}

And using the above class works all day.

The only difference I see is that the class using a naming import

META-INF/context.xml question

2005-04-11 Thread Scott Purcell
Hello,
I am still configuring my Tomcat 5.5.7 on a PC. I am configuring a Context 
element and would like to put it in the META-INF/context.xml for my webapp. The 
docs say this would be fine.

My question is, so I need anytype of doctype heading for this, since it is a 
xml file?

Or do I just create the context.xml in an editor, and start with my Context 
elements?

Thanks,
Scott



 

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



Logging assistance.

2005-04-11 Thread Scott Purcell
Hello,
I am trying to get the logging to work for a webapp I am working on. I am using 
Tomcat 5.5.7 and I am here:
http://localhost/tomcat-docs/logging.html

I followed the instructions but do not get what I assume is proper behavior.

1) created the log4j.properties file and placed under common/classes.

2) then I made sure I got the latest logj.jar and commons-logging.jar and 
placed both under common/lib

Then in my JSP file I have this:
%@ page import=org.apache.log4j.Logger %
% log.debug(alive.); %


Now I see the log file that was created, named Tomcat.log, but all that is in 
there are a bunch of Catalina messages and not my alive statement?

Anyone have an idea why this is not working? Do I need to create a resource, or 
something outside the docs?

Thanks,



Scott K Purcell | Developer | VERTIS |
555 Washington Ave. 4th Floor | St. Louis, MO 63101 |
314.588.0720 Ext:1320 | [EMAIL PROTECTED] | http://www.vertisinc.com

Vertis is the premier provider of targeted advertising, media, and 
marketing services that drive consumers to marketers more effectively. 
 

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



Add Context Path, Tomcat 5.5.7

2005-04-08 Thread Scott Purcell
Hello,
 
I am following the information here to add DBCP to my application.
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html
 
I am reading to add the Context path=/DBTest ... from the above docs. The 
instructions say to .
 
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.

 

So cool, I opened up the server.xml, but do not see any existing context or 
host tags in it. Here is my server.xml file. Does anyone know where I put the 
Context for the DBCP stuff? Thanks,

'!-- Example Server Configuration File --
!-- Note that component elements are nested corresponding to their
 parent-child relationships with each other --
 
!-- A Server is a singleton element that represents the entire JVM,
 which may contain one or more Service instances.  The Server
 listens for a shutdown command on the indicated port.
 
 Note:  A Server is not itself a Container, so you may not
 define subcomponents such as Valves or Loggers at this level.
 --
 
Server port=8005 shutdown=SHUTDOWN
 
  !-- Comment these entries out to disable JMX MBeans support used for the 
   administration web application --
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener /
  Listener 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /
  Listener 
className=org.apache.catalina.storeconfig.StoreConfigLifecycleListener/
 
  !-- Global JNDI resources --
  GlobalNamingResources
 
!-- Test entry for demonstration purposes --
Environment name=simpleValue type=java.lang.Integer value=30/
 
!-- Editable user database that can also be used by
 UserDatabaseRealm to authenticate users --
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
   description=User database that can be updated and saved
   factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /
 
  /GlobalNamingResources
 
  !-- A Service is a collection of one or more Connectors that share
   a single Container (and therefore the web applications visible
   within that Container).  Normally, that Container is an Engine,
   but this is not required.
 
   Note:  A Service is not itself a Container, so you may not
   define subcomponents such as Valves or Loggers at this level.
   --
 
  !-- Define the Tomcat Stand-Alone Service --
  Service name=Catalina
 
!-- A Connector represents an endpoint by which requests are received
 and responses are returned.  Each Connector passes requests on to the
 associated Container (normally an Engine) for processing.
 
 By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
 You can also enable an SSL HTTP/1.1 Connector on port 8443 by
 following the instructions below and uncommenting the second Connector
 entry.  SSL support requires the following steps (see the SSL Config
 HOWTO in the Tomcat 5 documentation bundle for more detailed
 instructions):
 * If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or
   later, and put the JAR files into $JAVA_HOME/jre/lib/ext.
 * Execute:
 %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
 $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA  (Unix)
   with a password value of changeit for both the certificate and
   the keystore itself.
 
 By default, DNS lookups are enabled when a web application calls
 request.getRemoteHost().  This can have an adverse impact on
 performance, so you can disable it by setting the
 enableLookups attribute to false.  When DNS lookups are disabled,
 request.getRemoteHost() will return the String version of the
 IP address of the remote client.
--
 
!-- Define a non-SSL HTTP/1.1 Connector on port 8080 --
Connector
port=80   maxThreads=150 minSpareThreads=25 
maxSpareThreads=75
   enableLookups=false redirectPort=8443 acceptCount=100
   connectionTimeout=2 disableUploadTimeout=true /
!-- Note : To disable connection timeouts, set connectionTimeout value
 to 0 --
 
 !-- Note : To use gzip compression you could set the following properties :
 
  compression=on 
  compressionMinSize=2048 
  noCompressionUserAgents=gozilla, traviata 
  compressableMimeType=text/html,text/xml
 --
 
!-- Define a SSL HTTP/1.1 Connector on port 8443 --
!--
Connector port=8443 
   maxThreads=150 minSpareThreads=25 maxSpareThreads=75
   enableLookups=false disableUploadTimeout=true
   acceptCount=100 scheme=https secure=true
   

DBCP Please Help Get Working Properly

2005-04-08 Thread Scott Purcell
Hello,

I am trying to use the DBCP features of Tomcat 5.5.7. I created a webapp named 
testDB and put it under $CATALINA_HOME/webapps/testDB. Then I created a 
testDB.xml file under $CATALINA_HOME/conf/Catalina/localhost/testDB.xml.

// here it is
Context path=/testDB docBase=testDB
debug=5 reloadable=true crossContext=true

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

I have been following the notes from: 
http://localhost/tomcat-docs/jndi-datasource-examples-howto.html

I made sure I completed the rest of the tasks.
WEB-INF has the two tag locations, and the resource ref.
eg:

taglib
taglib-uri/WEB-INF/sql.tld/taglib-uri
taglib-location/WEB-INF/sql.tld/taglib-location
/taglib


taglib
taglib-uri/WEB-INF/c.tld/taglib-uri
taglib-location/WEB-INF/c.tld/taglib-location
/taglib

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

I finally hit my jsp page which is this:
%@ taglib uri=http://java.sun.com/jsp/jstl/sql; prefix=sql %
%@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %

sql:query var=rs dataSource=jdbc/testDB
select id, foo, bar from testdata
/sql:query

html
  head
titleDB Test/title
  /head
  body

  h2Results/h2
  
c:forEach var=row items=${rs.rows}
Foo ${row.foo}br/
Bar ${row.bar}br/
/c:forEach


  /body
/html

And I get no results:

Now I am pretty sure I have all configured. Because if I use a fallback (Tomcat 
4.1) code piece I had, I get results using the same settings:

package foo;

import javax.naming.*;
import javax.sql.*;
import java.sql.*;

public class DBTest {

  String foo = Not Connected;
  int bar = -1;

  public void init() {
try{
  Context ctx = new InitialContext();
  if(ctx == null ) 
  throw new Exception(Boom - No Context);

  DataSource ds = 
(DataSource)ctx.lookup(
   java:comp/env/jdbc/testDB);

  if (ds != null) {
Connection conn = ds.getConnection();
  
if(conn != null)  {
foo = Got Connection +conn.toString();
Statement stmt = conn.createStatement();
ResultSet rst = 
stmt.executeQuery(
  select id, foo, bar from testdata);
while(rst.next()) {
   System.out.println(next );
   foo=rst.getString(2);
   bar=rst.getInt(3);
}
conn.close();
}
  }
}catch(Exception e) {
  e.printStackTrace();
}
 }

 public String getFoo() { return foo; }
 public int getBar() { return bar;}
}

And using the above class works all day.

The only difference I see is that the class using a naming import and the jsp 
does not. Can anyone help.


Thanks,
Scott









-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Friday, April 08, 2005 1:14 PM
To: Tomcat Users List
Subject: Re: Add Context Path, Tomcat 5.5.7


Hi.

Take a look at this for where to put Context elements:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html

This is new with Tomcat 5.0 and is continued in Tomcat 5.5

--David

Scott Purcell wrote:

Hello,
 
I am following the information here to add DBCP to my application.
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html
 
I am reading to add the Context path=/DBTest ... from the above docs. The 
instructions say to .
 
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.

 

So cool, I opened up the server.xml, but do not see any existing context or 
host tags in it. Here is my server.xml file. Does anyone know where I put the 
Context for the DBCP stuff? Thanks,

'!-- Example Server Configuration File --
!-- Note that component elements are nested corresponding to their
 parent-child relationships with each other --
 
!-- A Server is a singleton element that represents the entire JVM,
 which may contain one or more Service instances.  The Server
 listens for a shutdown command on the indicated port.
 
 Note:  A Server is not itself a Container, so you may not
 define subcomponents such as Valves or Loggers at this level.
 --
 
Server port=8005 shutdown=SHUTDOWN
 
  !-- Comment these entries out to disable JMX MBeans support used for the 
   administration web application --
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener /
  Listener 
 className

Reload Class Does Not Kill Session in 5-5?

2005-03-28 Thread Scott Purcell
Hello,
 
I am new at using the 5-5.7 Tomcat servlet engine, and I just noticed something 
unique from the older versions. If I update a class file, I can see that the 
class gets reloaded, but my session does not expire like in previous versions. 
So my question is, is this correct and if so, where is this configured, and if 
this is not proper behavior, then I have coded something bad.
 
Thanks,
Scott
 


Tomcat 3x to 5-5.7

2005-03-25 Thread Scott Purcell
I just installed Tomcat 5-5.7 and used the installer on a PC. It installed and 
all is good. I went to the manager and poked around.
 
I need to create a new web application (it is not a war). So I have a directory 
that I am ready to drop into the /webapps directory.
 
Before I do this, I have a few questions. 
a) Can I just drop this in and restart? Or what procedure do I need here? Do I 
need to restart?
 
 
b) I need to edit the server.xml for this application and add some DBCP stuff, 
where does this live now?
 
 
c) What is the best way to start and stop this, using the interface?
 
 
d) I read that the application can live elsewhere on the disks? Was this a 
mis-read? It would be cool if I could configure my webapp to work with my CVS/
 
 
Any advice upon getting rolling would be appreciated.
 
Thanks you

Scott K Purcell | Developer | VERTIS | 
555 Washington Ave. 4th Floor | St. Louis, MO 63101 | 
314.588.0720 Ext:1320 | [EMAIL PROTECTED] | http://www.vertisinc.com 
http://www.vertisinc.com/  

Vertis is the premier provider of targeted advertising, media, and 
marketing services that drive consumers to marketers more effectively. 
 

 


Tomcat 5-5.7 make reload classes?

2005-03-25 Thread Scott Purcell
First time using the manager application. I deployed a war file into my 
webapps, and all is good. Problem is, if I update class file in newly created 
webapp, it does not recompile automatically like my old 4x did. I had to do a 
reload from the manager to see the changes.
 
If my new webapp is called lesson1 where do I set the reload=true?
 
Thanks,

Scott K Purcell | Developer | VERTIS | 
555 Washington Ave. 4th Floor | St. Louis, MO 63101 | 
314.588.0720 Ext:1320 | [EMAIL PROTECTED] | http://www.vertisinc.com 
http://www.vertisinc.com/  

Vertis is the premier provider of targeted advertising, media, and 
marketing services that drive consumers to marketers more effectively. 
 

 


Questions About jakarta-tomcat-5.0.28

2005-03-01 Thread Scott Purcell
Hello,
 
I am running Tomcat 4.1.31 at work (dev) and I have a 5.0.28 at home. I have 
been working with Tomcat for quite some time, and ran into a problem trying to 
set up a webapp. At work on my 4.1.31, when  create a new web-app, I edit the 
server.xml file and add my Context (see context below)
 
Anyway when I edit the server.xml on my 5.0.28 I noticed there is no example 
Context in which to copy, edit and duplicate. That is how I have always done 
it. Upon reading the docs, it looks like a lot is controlled by web front end. 
Am I correct on this? And if so, where and how do I edit to add Loggers, and 
Resources, etc to it?
 
Or can I just add a new Context somewhere in the server.xml like I used to, and 
if so where in that file (I couldn't find a DTD for server.xml).
 
I get a feeling from the list that I should stay current, but I am having 
trouble understanding the current setups, etc.
 
Thanks for any input.
Sincerely
Scott
 
 
 
 
Context path=/builder docBase=builder
debug=5 reloadable=true crossContext=true
 
 Logger className=org.apache.catalina.logger.FileLogger
   prefix=localhost_builder_log. suffix=.txt
   timestamp=true/
 

 Resource name=jdbc/JNDITestTwo
   auth=Container
   type=javax.sql.DataSource/
 
 ResourceParams name=jdbc/JNDITestTwo
   parameter
 nameremoveAbandoned/name
 valuetrue/value
   /parameter
 
   parameter
 nameremoveAbandonedTimeout/name
 value60/value
   /parameter
 
   parameter
 namelogAbandoned/name
 valuetrue/value
   /parameter
 
   parameter
 namefactory/name
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
   /parameter
 
   !-- Maximum number of dB connections in pool. Make sure you
   configure your mysqld max_connections large enough to handle
   all of your db connections. Set to 0 for no limit.
   --
  parameter
namemaxActive/name
value100/value
  /parameter
 
  !-- Maximum number of idle dB connections to retain in pool.
   Set to 0 for no limit.
  --
 parameter
   namemaxIdle/name
   value30/value
 /parameter
 
 !-- 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.
 --
parameter
  namemaxWait/name
  value1/value
/parameter
 
!-- MySQL dB username and password for dB connections  --
parameter
  nameusername/name
  valuespurcell/value
/parameter
 
parameter
  namepassword/name
  valuespurcell/value
/parameter
 
!-- Class name for mm.mysql JDBC driver --
parameter
  namedriverClassName/name
  valueorg.gjt.mm.mysql.Driver/value
/parameter
 
!-- The JDBC connection url for connecting to your MySQL dB.
 The autoReconnect=true argument to the url makes sure that the
 mm.mysql JDBC Driver will automatically reconnect if mysqld 
closed the
 connection.  mysqld by default closes idle connections after 8 
hours.
--
parameter
  nameurl/name
  
valuejdbc:mysql://localhost:3306/builder?autoReconnect=true/value
   /parameter
 
  /ResourceParams
/Context
 
 
 


filter question

2005-02-23 Thread Scott Purcell
Hello,
I am having trouble with a filter. Code below.
 
What I am trying to achieve is as follows: We have a current web-site, with a 
lot of jsp pages, etc. We are moving the code to a load-balanced environment, 
and I would like to put a hidden IP address into each display page. This way 
I can know which environment the page came from when debugging, etc.
 
I figured I could use a 'filter' and have each page insert the IP into itself 
in a hidden field. I am unable to achieve my goal and could use a hand if 
anyone has experience with this. Is this possible, or will I have to write into 
a header and then edit each jsp page to show the value?
 
 
 
Here is what I have, but it does not print anything on pages.
 
web.xml
filter
   filter-nameHelloWorld/filter-name
   filter-classchapter18.HelloWorldFilter/filter-class
  /filter
 
  filter-mapping
   filter-nameHelloWorld/filter-name
   url-pattern/*.jsp/url-pattern
  /filter-mapping
 
And I have the servlet code from SCWCD book
package chapter18;
 
import java.io.*;
import javax.servlet.*;
 

public class HelloWorldFilter
implements Filter
{
 
public void destroy()
{
}
 
public void doFilter(ServletRequest servletrequest, ServletResponse 
servletresponse, FilterChain filterchain)
throws ServletException, IOException
{
PrintWriter printwriter = servletresponse.getWriter();
printwriter.println();
}
 
public void init(FilterConfig filterconfig)
{
filterConfig = filterconfig;
System.out.println(Chapter 18: HelloWorldFilter initialized);
}
 
public HelloWorldFilter()
{
}
 
private FilterConfig filterConfig;
}
 
 
Thanks,
Scott


welcome-file-list

2005-02-03 Thread Scott Purcell
Hello,
 
I have a web site that I want accessed using the dns name:
eg:
http://www.purcell.com
 
I have a welcome-file entry which says go to index.jsp.
 
Of course the page loads and the url looks like this:
http://www.purcell.com/index.jsp
 
Is there anyway to remove the index.jsp, but display that page. Occasionally I 
see that when I am surfing and wonder how this is accomplished?
 
Does anyone know how to configure this to show a clean url in browser. (aside 
from JS).
 
Thanks,

Scott
 

 


Tomcat 4.0 admin url?

2005-01-05 Thread Scott Purcell
Hello,
 
A while back, I was learning Tomct 4.1.31. Anyway, back then I used a web-based 
admin tool to load war files, etc. 
I did not save my notes, and I forgot what the url was to launch this admin 
helper.
 
Could someone help me out with this?
 
Thanks,
Scott
 


jndi error configuring data source

2005-01-05 Thread Scott Purcell
 
I am trying to configure database pooling in Tomcat 4.1.31. I found some 
excellent documentation here
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
 
I followed this exactly for mysql (top article).
 
I created the DBTest web-app precisely, and all folders exist and web.xml file 
is good.
My webapp is under root/DBTest/WEB-INF/classes
  
/lib/mm.mysql-bin.jar
  web.xml
 
The server starts properly, so I know my configuration is good. The problem is 
I get an error stating that it cannot find the jar file for the mysql driver 
when I hit the test page. (ERROR_BELOW)
Anyway, I followed the article precisely, and noticed that they hit 
localhost:8080. My tomcat is running on 80 and at my IP address as you can see 
below. 
Would this be why it cannot find the jar file? I am looking at the ajp13 
listening on /0.0.0.0:8009 and wondering if there is something else that needs 
configuring?
 
Would like to get this running if possible.
 
Thank you 
Scott
 
 
 
 

INFO: Starting Coyote HTTP/1.1 on http-192.168.66.90-80
Jan 5, 2005 3:52:27 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Jan 5, 2005 3:52:27 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=15/532  config=C:\jakarta-tomcat-4.1.31\conf\jk2.prop
erties
org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'org.g
jt.mm.mysql.Driver', cause:
java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClas
sLoader.java:945)
at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClas
sLoader.java:810)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:140)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
rce.java:730)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource
.java:518)
at foo.DBTest.init(DBTest.java:23)
at org.apache.jsp.test_jsp._jspService(test_jsp.java:49)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:162)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
40)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:200)


Problems With Configuring IP

2004-12-09 Thread Scott Purcell
Tomcat Running on Win2000, Tomcat 4.1.3

 

1. Tomcat is running on port 80 independent of Apache.

2. I have changed the server.xml file as below;

!-- Define the default virtual host --

Host name=my_IP_address debug=0 appBase=webapps 

unpackWARs=true autoDeploy=true

3. When I run netstat -an I still get the results below;

Proto Local Address Foreign Address State

TCP 0.0.0.0:80 0.0.0.0:0 LISTENING

My specific IP address never shows up as listening.

 

 

Does anyone know how I can get around this?

 

Thanks,

Scott

 

 


RE: Problems With Configuring IP

2004-12-09 Thread Scott Purcell
No I am not using Apache as a front end, I am using just Tomcat.

Is this bad?

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 09, 2004 10:18 AM
To: Tomcat Users List
Subject: RE: Problems With Configuring IP



Hi,

My specific IP address never shows up as listening.





Does anyone know how I can get around this?

Assuming you're using the Coyote HTTP/1.1 connector, use its address
attribute
(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/coyote.html) to
indicate which IP address to listen on.  The Host name is not related to
this.

Yoav Shapira http://www.yoavshapira.com




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


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


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



RE: 404 capture anywhere without apache

2004-12-03 Thread Scott Purcell
The deployment descriptor will allow the following:

error-page
  error-code404/error-code
  location/errorpage.jsp/location
/error-page

Give this a try and all 404 errors caught by the context will be sent to the 
errorpage.jsp file. Also check the docs, as there are other attributes that get 
set to help diagnose the error better.

javax.servlet.error.status_code
javax.servlet.error.exception_type
javax.servlet.error.message
javax.servlet.error.exception
javax.servlet.error.request_uri
javax.servlet.error.servlet_name

Also the error-type can be a exception-type

!ELEMENT error-page( ( error-code | exception-type), location)

Good luck
Scott K Purcell




-Original Message-
From: Frank Morton [mailto:[EMAIL PROTECTED]
Sent: Friday, December 03, 2004 9:43 AM
To: Tomcat Users List
Subject: 404 capture anywhere without apache


Another view of a previous post...

I have a context currently defined in server.xml as:

 Context path=/mycity docBase=mycity debug=9 
reloadable=true crossContext=true 
 Loader checkInterval=5 /
 Logger 
className=org.apache.catalina.logger.SystemOutLogger timestamp=true 
/
 /Context

I would like to catch any 404 errors (with error-page or otherwise), 
even outside the context, and redirect to one specific url within the 
mycity context (and still be able to see the original url to redirect 
appropriately). All without running apache to do the redirecting.

So, if someone browses to http://MYHOST, since there is no root 
context, it could get redirected to a servlet within the mycity 
context.

If someone browses to http://MYHOST/something, it would also be 
rerouted and I'd be able to grab the original url with getRequestURL().

Anyone know how to do this?

Thanks.


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


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



Database Pooling

2004-11-16 Thread Scott Purcell
I am developing a mid-sized application, which will use JSP Model 2 
Architecture. Currently I have a class that does Database Pooling, but I am 
curious about some threads I see time to time.
 
I have noticed that some developers on this list refer to Tomcats Database 
Pooling. It looks like there are some hooks into the deployment file. So I 
guess my question is as follows. does Tomcat offer this type of pooling? and if 
so, is it good, and is it portable? Links, references would be great.
 
Thanks,
Scott
 


 

 


TC 4.1_05

2004-11-09 Thread Scott Purcell
I have just installed Tomcat 4.1_05 on my win2000 box and I am having trouble 
adding web Contexts.
 
Here is the original server.xml entry.
Context path=/ docBase=ROOT debug=0 reloadable=true /
 
Now, on all my old Tomcat installs, when I needed to add a new Context I would 
add another line like this:
Context path=/ docBase=ROOT debug=0 reloadable=true /
 Context path=/tagexample docBase=tagexample debug=0 reloadable=true 
/ 
 
 
But when I add another context, the server will not start. When I execute 
%CATALINA_HOME%\bin\startup another window begins to display info, then just 
exits.
 
I personally do not like using the Manager which works, and would like to know 
why this does not work anymore?
 
Thanks
Scott
 
 


RE: TC 4.1_05 sb 4.1.31

2004-11-09 Thread Scott Purcell
I am stressing and writing the wrong info. I apologize
Here is the startup info
C:\Documents and Settings\spurcell%CATALINA_HOME%\bin\startu
Using CATALINA_BASE:   C:\jakarta-tomcat-4.1.31
Using CATALINA_HOME:   C:\jakarta-tomcat-4.1.31
Using CATALINA_TMPDIR: C:\jakarta-tomcat-4.1.31\temp
Using JAVA_HOME:   C:\j2sdk1.4.1_05


So it is Tomcat 4.1.31. Does the rest hold true?






-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 09, 2004 3:25 PM
To: Tomcat Users List
Subject: RE: TC 4.1_05



Hi,

I have just installed Tomcat 4.1_05 on my win2000 box and I am having
trouble adding web Contexts.

We don't use the same version conventions as Sun, there are no
underscores in Tomcat version numbers.  So there's Tomcat 4.1.5 and
4.1.15, but no 4.1_05 exists.  Both these versions are ancient and
unstable, and there's no good reason to install them now.

Here is the original server.xml entry.
Context path=/ docBase=ROOT debug=0 reloadable=true /

Really?  It's not path= for the ROOT app?

But when I add another context, the server will not start. When I
execute
%CATALINA_HOME%\bin\startup another window begins to display info, then
just exits.

You can use catalina.bat run (instead of startup.bat, which calls
catalina.bat start) to keep the DOS window open and observe messages.

I personally do not like using the Manager which works, and would like
to
know why this does not work anymore?

I personally don't like wasting time on ancient releases.  I suggest you
try 4.1.31 if you must use Tomcat 4.x, or 5.0.28 if you want a more
actively supported Tomcat release.

Yoav



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


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


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



Tomcat Manager

2004-11-02 Thread Scott Purcell
I am running Apache Tomcat/4.1.31 on Win2000. Yesterday I tried to deploy some war 
files and had no luck. I added a 
Context path=/myapp docBase=myapp debug=0 reloadable=true /
stopped and started tomcat and it never worked.
 
Anyway, a person in the group recommended me using the Tomcat Manager. Using the 
Tomcat Manager
 I was able to deploy the war file with no problem.  So all is good.
 
Problem is, when I edited the server.xml file, I do not see an entry for the new 
myapp in there at all? I assume that it does
not write any info there? Does it put the entry somewhere I can see?
 
I would like to create a log file for this myapp and was used to doing it via 
editing the server.xml file. How can I do it in the Manager?
 
Thanks,
Scott


deploy war file

2004-11-01 Thread Scott Purcell
Hello,
 
I am using Tomcat 4.1 on Win2000. I have a web application that has been running for a 
while that has an entry in the server.xml file for reloading etc.
Anyway, I am beginning to create a .war file for the code, using ant. I have read the 
docs, and it seems easy that one should put the .war file under the webapps directory 
and restart the server. I do this, but get no luck. The war file is good, I can 
extract the components from it, and the path structure is good.
 
Am I missing a step?
 
Here is the server.xml for info:
 Context path=/merchant docBase=merchant debug=0 reloadable=true /
and
!-- Define the default virtual host --
  Host name=localhost debug=0 appBase=webapps 
   unpackWARs=true autoDeploy=true
 
So it looks like the server is configured to extract the merchant.war file?
 
Thanks,
Scott


RE: deploy war file

2004-11-01 Thread Scott Purcell
Thanks Wendy for the response.

I have removed the full directory structure under my merchant.jar so (merchant) 
directory and restarted, but it did not work either.  I am not familiar with the 
manager app, I would like to try that. I looked under programs but do not seen an 
entry for it. Do I call it from the cmd line?

Thanks,
Scott

-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED]
Sent: Monday, November 01, 2004 2:05 PM
To: Tomcat Users List
Subject: Re: deploy war file


From: Scott Purcell [EMAIL PROTECTED]
 Anyway, I am beginning to create a .war file for the code, using ant. I
have read the docs, and it seems easy that
 one should put the .war file under the webapps directory and restart the
server. I do this, but get no luck.

IME, Tomcat will not auto-expand the .war file if the directory structure
already exists.  I use the Manager app to remove the existing webapp, (which
deletes the .war file and the directory structure,) then deploy the new .war
file, which expands and starts.

-- 
Wendy Smoak


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



Increase The Heap

2003-11-17 Thread Scott Purcell
Hello,

I am running Tomcat 4.06 on Windows, and had run into an problem that I am trying to 
figure out. I have created a download application that enables end-users to gather 
images, zip them up and let them download them. Pretty simple. All is happy during 
testing if three users download at the same time. But if four users hit it at the same 
time, it appears that the JVM is running out of memory, and the downloads are failing.

As a baseline, I would like to increase the JVM memory on tomcat 4.06 (running as a 
service). I am having trouble isolating where this is done. I have searched through 
the config directory for jmx but found nothing.

Thanks
Scott K Purcell

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



enable GET within Tomcat

2003-09-30 Thread Scott Purcell
I am migrating from a IIS box to Tomcat, and we had enabled the write function to a 
designated site, so I could accept PUT data. I tried using existing code, but I am 
getting a 403, which tells me I need to somehow turn PUT on within the Tomcat.

I am running Tomcat 4.0.6 on Win2000.

Thanks,
Scott


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



enable 'PUT' followup

2003-09-30 Thread Scott Purcell
Hello,
I am still trying to figure out how to enable 'PUT' method on a webapp. I found some 
old threads, and it looks like I need to find the 'security constraints' area of 
tomcat. Here is the thread I was following:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg105102.html

Does anyone know how to enable this 'PUT'.

Thanks,
Scott

-Original Message-
From: Scott Purcell 
Sent: Tuesday, September 30, 2003 12:24 PM
To: [EMAIL PROTECTED]
Subject: enable GET within Tomcat


I am migrating from a IIS box to Tomcat, and we had enabled the write function to a 
designated site, so I could accept PUT data. I tried using existing code, but I am 
getting a 403, which tells me I need to somehow turn PUT on within the Tomcat.

I am running Tomcat 4.0.6 on Win2000.

Thanks,
Scott


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



Directory Listing

2003-09-26 Thread Scott Purcell
Hello,

I am running Tomcat 4.0.6 on Win 2000, and I have three web apps running.

I would like to turn off directory listing, but cannot figure out how. I have searched 
google, but have came up empty. Could someone please let me know how to turn 
'directory listing' off.

[eg
http://site/webapp currently shows all files in that directory
] 

Thanks
Scott

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



RE: Directory Listing

2003-09-26 Thread Scott Purcell
Thank you very much,
That has a ton of information I can use down the road. 

Sincerely
Scott

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Friday, September 26, 2003 11:25 AM
To: Tomcat Users List
Subject: RE: Directory Listing



http://jakarta.apache.org/tomcat/faq/misc.html#listing

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Scott Purcell [mailto:[EMAIL PROTECTED]
Sent: Friday, September 26, 2003 12:24 PM
To: [EMAIL PROTECTED]
Subject: Directory Listing

Hello,

I am running Tomcat 4.0.6 on Win 2000, and I have three web apps
running.

I would like to turn off directory listing, but cannot figure out how.
I
have searched google, but have came up empty. Could someone please let
me
know how to turn 'directory listing' off.

[eg
http://site/webapp currently shows all files in that directory
]

Thanks
Scott

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




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


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


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



RE: XP and session persistence

2003-03-20 Thread Scott Purcell
If Tomcat is unable to set a cookie to the browser, it should do url rewriting. Are 
you seeing that?

-scott

-Original Message-
From: Frank Diakovasilis [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 9:47 AM
To: [EMAIL PROTECTED]
Subject: XP and session persistence


I have run a web application on NT and it works fine, when installed (with
tomcat 4.0) on XP, it does not work properly.
The problem seems to be session persistence.  Under XP, when creating a
session, tomcat does not attempt to put a cookie (JSESSIONID) to the
browser.
Has anybody come across this?

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



RE: Starting a Clean-up program

2003-01-29 Thread Scott Purcell
If you create that as a servlet, you can set the startup to 1 which will call it each 
time the webserver starts.

Is that what you are looking for?

servlet
servlet-nameservletname/servlet-name
servlet-classcom.skp.someclass/servlet-class

init-param
param-namehello/param-name
param-valueworld/param-value
/init-param

load-on-startup1/load-on-startup
/servlet

When the server starts it sees this class as a startup class and immediately executes 
its init.

Scott Purcell
Vertis Corporation



-Original Message-
From: Chandra Gottipati [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 29, 2003 9:45 AM
To: Tomcat Users List
Subject: Starting a Clean-up program


I have a static method that starts a thread with a class that does some
clean-up tasks.

  public static void init(){
Thread t = new Thread( new ClearUserHashMapClient() );
t.start();
  }//init

How can I configure my webapp to call this init() method when I deploy my
war file on Tomcat.


Thanks,

Chandra.





-
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: ServletException: Servlet.init()

2003-01-14 Thread Scott Purcell
It looks like it cannot find the following:

 root cause

java.lang.NoClassDefFoundError: org/apache/jasper/compiler/JspRuntimeContext
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java, Compiled 
Code)


Which tell me it cannot find a certain class I think Denise is right, I got a 
directory listing and the file you need is in the 
$CATALINA_HOME/lib/jasper-compiler.jar

I would try adding that jar to your classpath (2000 right click my computer, go to 
properties, tab advanced and add to classpath)

good luck
Scott


-Original Message-
From: Al Cam [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 14, 2003 7:21 AM
To: [EMAIL PROTECTED]
Subject: ServletException: Servlet.init()


I've installed the Tomcat 4.1.18 on my server:
- Pentium II (333 Mhz)
- SCO OpenServer 5.0.5
- Java J2SE 1.3.0_02

When I execute the startup.sh, it seems to work fine, but when I open
the URL with 8080, it sends me the error:

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

javax.servlet.ServletException: Servlet.init() for servlet jsp threw 
exception
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java, 
Compiled Code)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java, 
Compiled Code)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java, 
Compiled Code)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java, 
Compiled Code)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java, 
Compiled Code)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java, 
Compiled Code)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java, 
Compiled Code)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java, 
Compiled Code)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java,
 
Compiled Code)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java, 
Compiled Code)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java, 
Compiled Code)
at java.lang.Thread.run(Thread.java:484)


root cause

java.lang.NoClassDefFoundError: org/apache/jasper/compiler/JspRuntimeContext
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java, Compiled 
Code)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java, 
Compiled Code)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java, 
Compiled Code)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java, 
Compiled Code)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java, 
Compiled Code)
at 

RE: Perl And Tomcat

2003-01-14 Thread Scott Purcell
Good question,

I read the docs under Tomcat and it says it supports CGI's (and Perl CGI). I really 
don't have anything to run, I just wanted to get it to work. I guess (and funny you 
mentioned that, because at bedtime I figured I would just run Apache), but I did get 
it to run on the latest nightly build.) It actually works pretty well, I was able to 
get a lot of old CGI.pm code to run, and it is pretty fast. 

After googling it for a while I found a thread that said the older Tomcats had trouble 
getting the system path from 2000. So I got the latest release and it works.

I like to hack on things to get them to work. It is like a mission.

Thanks,
Scott

-Original Message-
From: Charles Baker [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 13, 2003 5:52 PM
To: Tomcat Users List
Subject: Re: Perl And Tomcat



--- Scott Purcell [EMAIL PROTECTED] wrote:
 Hello,
 I have been beating my head on a wall all afternoon,
 trying to get Perl to work with Tomcat.
 
 I can call up the CGIServlet, and it shows that the
 tomcat side is working. The problem is in the fact
 that I cannot seem to get a perl cgi to run.
 
 Has anyone out there ever ran perl on Tomcat? If so
 does one need to call the script as param input?
 
 Any ideas, help would be appreciated.
 
 Thanks,
 Scott

I'm curious as to why you want to do it? Why use a
Java app server to call a PERL script even if it can?
Why not just use Apache httpd? These questions are
just for my personal edification, and aren't meant to
be disparaging.
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


=
[EMAIL PROTECTED]
http://www.charleshbaker.com/~chb/
If you cannot in the long run tell everyone what you have been doing,
your doing was worthless. -- Edwim Schrodinger

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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


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




RE: ServletException: Servlet.init()

2003-01-14 Thread Scott Purcell
I don't get it. I had trouble installing 4.1.18 on my Win 2000 box also. I dropped 
down to 4.0.6 and it went right up.

You may want to try removing that tomcat, and trying another ...
Wish I could be of better help. I know on the 4.0.6, I just defined the JAVA_HOME 
variable and it just worked.

Let us know
Scott

-Original Message-
From: Al Cam [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 14, 2003 9:13 AM
To: [EMAIL PROTECTED]
Subject: RE: ServletException: Servlet.init()


Ok, thanks, I added the $CATALINA_HOME/common/lib to the CLASSPATH, but now 
I have the next error:

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
[javac] Compiling 1 source file
[javac] Modern compiler not found - looking for classic compiler



at 
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
at 
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java, 
Compiled Code)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:352)
at 
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:474)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java, 
Compiled Code)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java, Compiled 
Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java,
 
Compiled Code)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java, 
Compiled Code)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java, 
Compiled Code)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java, 
Compiled Code)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java, 
Compiled Code)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java, 
Compiled Code)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java, 
Compiled Code)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java,
 
Compiled Code)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java, 
Compiled Code)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java, 
Compiled Code)
at java.lang.Thread.run(Thread.java:484)



_
Charla con tus amigos en línea mediante MSN Messenger: 
http://messenger.microsoft.com/es


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


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




Perl CGI Problem W/Tomcat Help Needed

2003-01-13 Thread Scott Purcell
Hello,

I am trying to run some CGI scripts (perl cgi's) on my Tomcat 4.0.3 under Win 2000.

I followed the documentation showing:
Rename $CATALINA_BASE/server/lib/servlets-cgi.renametojar to 
$CATALINA_BASE/server/lib/servlets-cgi.jar.
and 
Remove the XML comments from around the CGI servlet and servlet-mapping configuration 
in $CATALINA_BASE/conf/web.xml.


I went to $CATALINA_BASE/webapps/ROOT/WEB-INF and created a folder cgi
I put in a simple hello.pl file there. I started the Tomcat up and went to the 
following url 
http://localhost/cgi/hello.pl, but it says 404 not there

So then I tried
http://localhost/servlet/cgi/hello.pl and it gives me a 503 servlet invoker is 
currently unavailable.

Does anyone know where I may be going wrong?

Thanks,
Scott


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




RE: Checking if Tomcat is up

2003-01-13 Thread Scott Purcell
That sounds good, you could probably create a small app with threads which uses the 
url class to connect to your tomcat, try and read a url. If that throws a error, your 
down, else your up. I use the url class quite a bit to ensure servers are alive before 
using xml-rpc on them.


Scott

-Original Message-
From: Abhijat Thakur [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 13, 2003 1:17 PM
To: Tomcat Users List
Subject: RE: Checking if Tomcat is up


I have background threads running which keep checking if Tomcat is up or not. Lets say 
Tomcat hangs up or something then these background threads call to shutdown the 
application and tomcat clean up all the processes. This is to Monitor if my 
application is working properly.

thanks

abhijat

-Original Message-
From: Turner, John [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 13, 2003 10:57 AM
To: 'Tomcat Users List'
Subject: RE: Checking if Tomcat is up



Myabe I'm missing something, but if Tomcat is down how can your application
run to be checking that Tomcat is up?  Your application needs Tomcat to
execute.

John


 -Original Message-
 From: Abhijat Thakur [mailto:[EMAIL PROTECTED]]
 Sent: Monday, January 13, 2003 1:55 PM
 To: [EMAIL PROTECTED]
 Subject: Checking if Tomcat is up
 
 
 
 Is it pssible to check intemittently through my java 
 application if my Tomcat server is up ? What can i check for 
 to see if my Tomcat server is up. The scenaruio is that if 
 something happens to Tomcat where my it hangs up i should 
 ring my application down, for that i have to check 
 intermittently if my Tomcat is up. What is it that i can 
 check to see if Tomcat is up ?
 
 thanks
 
 abhijat
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

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


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


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




Perl And Tomcat

2003-01-13 Thread Scott Purcell
Hello,
I have been beating my head on a wall all afternoon, trying to get Perl to work with 
Tomcat.

I can call up the CGIServlet, and it shows that the tomcat side is working. The 
problem is in the fact that I cannot seem to get a perl cgi to run.

Has anyone out there ever ran perl on Tomcat? If so does one need to call the script 
as param input?

Any ideas, help would be appreciated.

Thanks,
Scott

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




Problems Starting Server

2003-01-09 Thread Scott Purcell
Hello,

I have a new box that I am configuring.

I installed java jdk1.3.1_06 and set JAVA_HOME to C:\jdk1.3.1_06. and set the path to 
its existance. I can call java or javac and all is happy.

Then I downloaded jakarta-tomcat-4.0.6 on D:\

I unzipped the application and set my path to its lib. When I tried to startup.bat it 
begins to run, then falters. I can see that it found the java_home, etc, but then the 
console just quits.

I then added a CATALINA_HOME which points to the jakarta-tomcat/bin (according to the 
docs) and tried to launch the product. At that point the black cmd window does not 
show up.

I am administrator of the win 2000 box. I looked in all the logs, but I see no errors. 
I tried to  startup and write the STDERR to a file, but it failed also.
startup.bat  C:/dead.log 21

I looked at the conf file, and it is set up to 8080 and there are no other servers on 
this box.?

Any ideas of what road I can try to resolve this?

Thanks,
Scott



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




Problem Starting More Info

2003-01-09 Thread Scott Purcell
Hello,
I am getting a little farther into my non-starting tomcat.

Here is the error I am now getting. To me it appears that there is another server 
running on port 80, but there is not.
Using CATALINA_BASE:   ..
Using CATALINA_HOME:   ..
Using CATALINA_TMPDIR: ..\temp
Using JAVA_HOME:   D:\java\jdk1.3.1_06
Starting service Tomcat-Standalone
Apache Tomcat/4.0.6
Starting service Tomcat-Apache
Apache Tomcat/4.0.6
StandardServer.await: create[80]: java.net.BindException: Address in use: JVM_Bi
nd
java.net.BindException: Address in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:447)
at java.net.ServerSocket.init(ServerSocket.java:165)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:276
)
at org.apache.catalina.startup.Catalina.start(Catalina.java:794)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)

D:\jakarta\jakarta-tomcat-4.0.6\bin

I tried also going to 8067 ... 8070 etc, but they all give me this error.

Anyone been here before?

Thanks,
Scott

PS, I am on a compaq running xeion processors? Could hardware foo things up?



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




Server Is Up, One More Question

2003-01-09 Thread Scott Purcell
I got the server up. It was a port issue. In the server.xml there is a line:
I think it is the first non-comment line
Server port=8005 shutdown=SHUTDOWN debug=0

That line messed me up. Is that stating that it is using port 8005 for the jvm 
connection? If anyone gets this, could you fill me in a little.

I changed that line to 8080 which I guess conflicted with another line that has 8080 
in it, about half way down.
connection className=org.apache.catalina.connector.http.HttpConnector
port=8080 minProcessors=5 maxProcessors=75 yada yada


I assume that line is the server? So If I want to run straight port 80, change it 
there?

Thanks for all the help
Sincerely
Scott

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




Two Questions Tomcat 4.1.12 Win2000

2002-12-06 Thread Scott Purcell

Running Tomcat 4.1.12 on Win2000.

Problem 1) I created a site under webapps in which only servlets will run. I created a 
web-xml file: (see Below): All works good.
Question: When I hit the URL http://localhost/site I see a directory listing. I do not 
want this. I thought the welcome-file-list was my solution, but maybe I am wrong. How 
is the best way to turn off any type of directory listing.?

Problem 2) I am also running a vendors software on the same box, which uses tomcat 
running on 8091. I was told not to use any of its servlet engine to run my stuff, so I 
need to run another tomcat lets say on 8080. A tomcat for use on some servlets and 
rpc-xml stuff.
Anyway, is it ok to run two tomcats on one box, as long as they have different port 
numbers? Anything I may need to be aware of in this case?


Thanks,
Sincerely
Scott



?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-nametestServlet/servlet-name
  servlet-class/servlet/testServlet/servlet-class
   /servlet

   servlet-mapping
servlet-nameinvoker/servlet-name
url-pattern/servlet/*/url-pattern
   /servlet-mapping

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

/web-app
~

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




init() block not initializing?

2002-12-06 Thread Scott Purcell
Hello,

I am trying to get a servlet Initialization block to initialize but I cannot seem to 
get it to work. I am running a new install of Tomcat 4.1.12 on win2000. 

I have created a webapp called cybrary, and I have put that into the server xml with 
the following line:
Context path=/cybrary docBase=cybrary debug=0
 reloadable=true crossContext=true /

Then I created the proper structure under webapps eg:
/webapps/cybrary/WEB-INF/classes/com/ddi/ags/rpc/CybraryRPCHandler.java

The code I am running is here, there is nothing to it, just want it to hit the init 
block.
When I run it with the following url: 
http://localhost:8080/cybrary/servlet/CybraryRPCHandler the out.println message shows, 
but no init ever. I am printing that to stdout, in which I never see any print.

Does anyone know why this would occur.

Also, in case needed the web.xml is below all of this:




package com.ddi.ags.rpc;

import java.io.*;
import java.util.*;
import java.net.*;
import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.xmlrpc.*;
public class CybraryRPCHandler extends HttpServlet {
public void init() throws ServletException {
System.out.println(IN the init);
}

public void doGet(HttpServletRequest request,
  HttpServletResponse response)
throws ServletException, IOException {
PrintWriter out = response.getWriter();
response.setContentType(text/html);
out.println(this is another attempt at the init firing up.);
}
}




 web.xml ##
?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-nameCybraryRPCHandler/servlet-name
servlet-classcom.ddi.ags.rpc.CybraryRPCHandler/servlet-class
 /servlet


   servlet-mapping
servlet-nameCybraryRPCHandler/servlet-name
url-pattern/servlet/CybraryRPCHandler/url-pattern
   /servlet-mapping

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

/web-app



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




RE: init() block not initializing?

2002-12-06 Thread Scott Purcell
I went under my $CATALINA_HOME/logs but do not see a catalina.out.log. Do I need to 
adjust something in the server.xml?



-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 1:37 PM
To: Tomcat Users List
Subject: RE: init() block not initializing?


Hi,
Did you check the $CATALINA_HOME/logs/catalina.out log?  By default, it
swallows System.out and System.err statements.  

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Scott Purcell [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 2:34 PM
To: [EMAIL PROTECTED]
Subject: init() block not initializing?

Hello,

I am trying to get a servlet Initialization block to initialize but I
cannot seem to get it to work. I am running a new install of Tomcat
4.1.12
on win2000.

I have created a webapp called cybrary, and I have put that into the
server xml with the following line:
Context path=/cybrary docBase=cybrary debug=0
 reloadable=true crossContext=true /

Then I created the proper structure under webapps eg:
/webapps/cybrary/WEB-INF/classes/com/ddi/ags/rpc/CybraryRPCHandler.java

The code I am running is here, there is nothing to it, just want it to
hit
the init block.
When I run it with the following url:
http://localhost:8080/cybrary/servlet/CybraryRPCHandler the out.println
message shows, but no init ever. I am printing that to stdout, in which
I
never see any print.

Does anyone know why this would occur.

Also, in case needed the web.xml is below all of this:




package com.ddi.ags.rpc;

import java.io.*;
import java.util.*;
import java.net.*;
import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.xmlrpc.*;
public class CybraryRPCHandler extends HttpServlet {
public void init() throws ServletException {
   System.out.println(IN the init);
}

public void doGet(HttpServletRequest request,
 HttpServletResponse response)
   throws ServletException, IOException {
   PrintWriter out = response.getWriter();
   response.setContentType(text/html);
   out.println(this is another attempt at the init firing up.);
}
}




 web.xml ##
?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-nameCybraryRPCHandler/servlet-name
   servlet-classcom.ddi.ags.rpc.CybraryRPCHandler/servlet-class
 /servlet


   servlet-mapping
   servlet-nameCybraryRPCHandler/servlet-name
   url-pattern/servlet/CybraryRPCHandler/url-pattern
   /servlet-mapping

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

/web-app



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


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


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




RE: init() block not initializing?

2002-12-06 Thread Scott Purcell
I finally found my output in the /logs/localhost_log.2002-12-06.txt, but that is kind 
of a hastle. Is there a way to get it back to stdout?

Thanks,
Scott

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 1:37 PM
To: Tomcat Users List
Subject: RE: init() block not initializing?


Hi,
Did you check the $CATALINA_HOME/logs/catalina.out log?  By default, it
swallows System.out and System.err statements.  

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Scott Purcell [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 2:34 PM
To: [EMAIL PROTECTED]
Subject: init() block not initializing?

Hello,

I am trying to get a servlet Initialization block to initialize but I
cannot seem to get it to work. I am running a new install of Tomcat
4.1.12
on win2000.

I have created a webapp called cybrary, and I have put that into the
server xml with the following line:
Context path=/cybrary docBase=cybrary debug=0
 reloadable=true crossContext=true /

Then I created the proper structure under webapps eg:
/webapps/cybrary/WEB-INF/classes/com/ddi/ags/rpc/CybraryRPCHandler.java

The code I am running is here, there is nothing to it, just want it to
hit
the init block.
When I run it with the following url:
http://localhost:8080/cybrary/servlet/CybraryRPCHandler the out.println
message shows, but no init ever. I am printing that to stdout, in which
I
never see any print.

Does anyone know why this would occur.

Also, in case needed the web.xml is below all of this:




package com.ddi.ags.rpc;

import java.io.*;
import java.util.*;
import java.net.*;
import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.xmlrpc.*;
public class CybraryRPCHandler extends HttpServlet {
public void init() throws ServletException {
   System.out.println(IN the init);
}

public void doGet(HttpServletRequest request,
 HttpServletResponse response)
   throws ServletException, IOException {
   PrintWriter out = response.getWriter();
   response.setContentType(text/html);
   out.println(this is another attempt at the init firing up.);
}
}




 web.xml ##
?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-nameCybraryRPCHandler/servlet-name
   servlet-classcom.ddi.ags.rpc.CybraryRPCHandler/servlet-class
 /servlet


   servlet-mapping
   servlet-nameCybraryRPCHandler/servlet-name
   url-pattern/servlet/CybraryRPCHandler/url-pattern
   /servlet-mapping

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

/web-app



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


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


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




localhost_log to stdout?

2002-12-06 Thread Scott Purcell
Hello,

I was just wondering if there is a way on win2000 Tomcat 4.1.12 to take the output 
that is going to the localhost_log_timestamp.txt to stdout?

Thanks,
Scott

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




Form-based authentication assistance

2002-10-25 Thread Scott Purcell
Hello,

I am trying to understand how the built-in forms validation works in tomcat 4.03 on 
win.

I believe that I have my web.xml file correct, (below). All appears good. If I put in 
a bad username and passoword, I go to the error page, but if I successed, it throws up 
an error, [Invalid direct reference to form login page].

Which makes sense, I guess it is submitting it back and the URL shows 
[http://localhost/altercast/j_security_check]

How do I forward the user to a good login page, if they pass the basic authentication?

My page is /loginpage.html
// here it is:
FORM METHOD=POST ACTION=j_security_check  
PINPUT TYPE=TEXT NAME=j_username VALUE= SIZE=15
PINPUT TYPE=PASSWORD NAME=j_password VALUE= SIZE=15  
INPUT TYPE=submit VALUE=  OK 


Thanks,

security-constraint
   web-resource-collection
  web-resource-nameSecretProtection/web-resource-name
  url-pattern/servlet/SalaryServlet/url-pattern
  url-pattern/servlet/secret/url-pattern
  http-methodGET/http-method
  http-methodPOST/http-method
   /web-resource-collection
   web-resource-collection
  web-resource-nameAuthenticationSnoop/web-resource-name
  url-pattern/servlet/AuthenticationSnoop/url-pattern
  http-methodGET/http-method
   /web-resource-collection
   web-resource-collection
  web-resource-nameloginpage.html/web-resource-name
  url-pattern/altercast/loginpage.html/url-pattern
  http-methodPOST/http-method
   /web-resource-collection
   auth-constraint
  role-namemanager/role-name
   /auth-constraint
/security-constraint

login-config
   auth-methodFORM/auth-method
   form-login-config
  form-login-page/loginpage.html/form-login-page
  form-error-page/errorpage.html/form-error-page
   /form-login-config
/login-config

security-role
   role-namemanager/role-name
/security-role


Scott Purcell | Developer | VERTIS | 555 Washington Ave. 4th Floor | St. Louis, MO 
63101 |
T 314.588.0720 | F 314.588.0735 | [EMAIL PROTECTED] | http://www.vertisinc.com

Vertis is a global powerhouse for integrated marketing and advertising solutions that 
seamlessly combine advertising, direct marketing, media, imaging and progressive 
technology. Vertis' products and services include: consumer and media research, media 
planning and placement, creative services, digital media production, targetable insert 
programs, fully integrated direct marketing programs, circulation-building newspaper 
products and eMarketing.




--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




RE: WEB-INF/classes, WEB-INF/lib

2002-10-14 Thread Scott Purcell

It works on my tomcat on NT. We use a lot of jars, but it it someties hard to 
uncompress and compress the jars with changes, so I just put the updated class in the 
classes dir and all works out well. When we go to production, I just jar them all back.



Scott

-Original Message-
From: Frank Liu [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 3:04 PM
To: [EMAIL PROTECTED]
Subject: WEB-INF/classes, WEB-INF/lib



Is it true that WEB-INF/classes overrides WEB-INF/lib in the classpath?
I have a binary jar file in WEB-INF/lib and need to overwrite on class
in the jar file, can you just put my class in the WEB-INF/classes and
tomcat will take care of it automatically?

Frank



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


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




New Install, New Question

2002-10-11 Thread Scott Purcell

Hello,

New Install of Tomcat 4.1.12 on 2000. 
Installed on D:\jakarta-tomcat-4.1.12

I need a reloadable app to run below \webapps.
I created the folder and tried to add to the server.xml, but things have changed since 
my 3.x days.

I vi'd the server.xml file and added a Context like so:
Context path= docBase=ROOT debug=0 reloadable=true /
Context path= docBase=/newapp debug=0 reloadable=true /

But it dies on startup. I cannot even find the error: The black startup screen just 
dies a quiet death. I checked typing and I do not believe it is that.

How do I add a new context?



Scott Purcell | Developer | VERTIS | 555 Washington Ave. 4th Floor | St. Louis, MO 
63101 |
T 314.588.0720 | F 314.588.0735 | [EMAIL PROTECTED] | http://www.vertisinc.com

Vertis is a global powerhouse for integrated marketing and advertising solutions that 
seamlessly combine advertising, direct marketing, media, imaging and progressive 
technology. Vertis' products and services include: consumer and media research, media 
planning and placement, creative services, digital media production, targetable insert 
programs, fully integrated direct marketing programs, circulation-building newspaper 
products and eMarketing.




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




RequestDispatcher question

2002-08-09 Thread Scott Purcell

Hello,

I am trying to send a (request, response) object to a server that lives at another IP 
(or URL). I have the need to pass parameters that are in the request object, but I 
cannot seem to forward the request to the other servlet. I keep getting a error: 
java.lang.IllegalArgumentException: Path 
http://xxx.xxx.xxx.xxx/testcode/servlet/allparams does not start with a / character 

When I try the same code on my local machine, within the same web app, all works 
great. So I think the coding is good.  So I am trying to figure how to get the request 
object from one box to another? Any ideas?

Thanks,


Test Code:
// from a method here
try {
gotoPage(http://XXX.XXX.X.XXX/testcode/servlet/allparams;, 
request, response);
response.sendRedirect(mm.getSomeURL());
}


private void gotoPage(String address,
  HttpServletRequest request,
  HttpServletResponse response)
throws ServletException, IOException {
RequestDispatcher dispatcher = 
getServletContext().getRequestDispatcher(address);
dispatcher.forward(request, response);

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




log method showing error:

2002-07-01 Thread Scott Purcell
)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:484)



Scott Purcell | Developer | VERTIS | 555 Washington Ave. 4th Floor | St. Louis, MO 
63101 |
T 314.588.0720 | F 314.588.0735 | [EMAIL PROTECTED] | http://www.vertisinc.com

Vertis is a global powerhouse for integrated marketing and advertising solutions that 
seamlessly combine advertising, direct marketing, media, imaging and progressive 
technology. Vertis' products and services include: consumer and media research, media 
planning and placement, creative services, digital media production, targetable insert 
programs, fully integrated direct marketing programs, circulation-building newspaper 
products and eMarketing.




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




tomcat to run perl cgis?

2002-06-24 Thread Scott Purcell

Hello,
I have Tomcat 4.0.3 running on my NT box. I do mostly servlet work, but I have the 
need to run a Perl CGI for a web project. I have put some .pl files and .cgi files 
into the docroot, but they do not execute properly. Is there a way to allow Perl to 
run with Tomcat? Could someone advise me of a path I could take to get them to run?

Thanks,
Scott


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




RE: Database locked by Tomcat

2002-06-12 Thread Scott Purcell

Have you updated any record using Toad?

I updated some records in toad and forgot to hit commit, and it screwed me up for 
hours. My code that worked earlier stopped working and I was getting all kinds of 
wierd problems. I went back to toad, hit commit, and all problems disappeared.





-Original Message-
From: Kevin Andryc [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 12, 2002 1:07 PM
To: Tomcat Users List
Subject: RE: Database locked by Tomcat


Hi Jeff,
Thanks for the suggestion and code. I have tried this and Tomcat still
holds the database. I know this because I have a program from Sysinternals
that lists the files held by a process and the database is one of them. But
here is the weird part. After some amount of time, the database does get
released. I am lost at this point. Any more suggestions?

Thanks,
Kevin

Kevin Andryc
Web Systems Engineer
MISER
http://www.umass.edu/miser/
Phone: (413)-545-3460
[EMAIL PROTECTED]



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 01:54 PM
To: Tomcat Users List
Subject: Re: Database locked by Tomcat


Hi, Kevin.

 Correction: Database locked by YOU!  :)

You've closed the statement but not the connection.  You need a conn.close()
after the commit.  This shouldn't lock the database by itself, although if
you
keep leaving connections open, then you will eventually hit a connection max
limit, which could be what's hanging it.  I would also recommend that you
put
all that stuff in a try block and finally close the connection, something
like
this:

Statement stmt = null;
Connection conn = DriverManager.getConnection(dbfUrl, , );
try {
 // do some stuff
 conn.commit();
}
catch(Exception e) {
 conn.rollback();
}
finally {
 if ( stmt != null ) {
  try {
   stmt.close();
  }
  catch(SQLException e) {
   // handle or ignore
  }
 }
 conn.close();
}

HTH,
Jeff




Kevin Andryc
kandryc@miser.To: Tomcat Users List
[EMAIL PROTECTED]
umass.edu cc:
   Subject: Database locked by
Tomcat
06/11/02 12:44
PM
Please respond
to Tomcat
Users List






I am Running Tomcat 4.0 on Windows 2000. I have a servlet, which calls a
program that connects to a DBF database natively (not using JDBC-ODBC) and
updates records in the database. The problem I am having is that Tomcat does
not release the database until I restart the Tomcat service. I close the
connection and even do a commit().  Has anyone else had a problem and if
so, is there a solution? Below is some sample code:

Class.forName(dbfDriverName).newInstance();
Connection conn = DriverManager.getConnection(dbfUrl, , );
Statement stmt = conn.createStatement();

// do some stuff

statement.close();
connection.commit();
Thanks,
Kevin


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






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


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


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




RE: Database locked by Tomcat

2002-06-12 Thread Scott Purcell

Toad is a terrific database tool, for Oracle:
http://www.toadsoft.com/

It is a 5 star product.




-Original Message-
From: Kevin Andryc [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 12, 2002 2:41 PM
To: Tomcat Users List
Subject: RE: Database locked by Tomcat


What is Toad?

Kevin Andryc
Web Systems Engineer
MISER
http://www.umass.edu/miser/
Phone: (413)-545-3460
[EMAIL PROTECTED]



-Original Message-
From: Scott Purcell [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 12, 2002 03:36 PM
To: Tomcat Users List
Subject: RE: Database locked by Tomcat

Have you updated any record using Toad?

I updated some records in toad and forgot to hit commit, and it screwed me
up for hours. My code that worked earlier stopped working and I was getting
all kinds of wierd problems. I went back to toad, hit commit, and all
problems disappeared.





-Original Message-
From: Kevin Andryc [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 12, 2002 1:07 PM
To: Tomcat Users List
Subject: RE: Database locked by Tomcat


Hi Jeff,
Thanks for the suggestion and code. I have tried this and Tomcat still
holds the database. I know this because I have a program from Sysinternals
that lists the files held by a process and the database is one of them. But
here is the weird part. After some amount of time, the database does get
released. I am lost at this point. Any more suggestions?

Thanks,
Kevin

Kevin Andryc
Web Systems Engineer
MISER
http://www.umass.edu/miser/
Phone: (413)-545-3460
[EMAIL PROTECTED]



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 01:54 PM
To: Tomcat Users List
Subject: Re: Database locked by Tomcat


Hi, Kevin.

 Correction: Database locked by YOU!  :)

You've closed the statement but not the connection.  You need a conn.close()
after the commit.  This shouldn't lock the database by itself, although if
you
keep leaving connections open, then you will eventually hit a connection max
limit, which could be what's hanging it.  I would also recommend that you
put
all that stuff in a try block and finally close the connection, something
like
this:

Statement stmt = null;
Connection conn = DriverManager.getConnection(dbfUrl, , );
try {
 // do some stuff
 conn.commit();
}
catch(Exception e) {
 conn.rollback();
}
finally {
 if ( stmt != null ) {
  try {
   stmt.close();
  }
  catch(SQLException e) {
   // handle or ignore
  }
 }
 conn.close();
}

HTH,
Jeff




Kevin Andryc
kandryc@miser.To: Tomcat Users List
[EMAIL PROTECTED]
umass.edu cc:
   Subject: Database locked by
Tomcat
06/11/02 12:44
PM
Please respond
to Tomcat
Users List






I am Running Tomcat 4.0 on Windows 2000. I have a servlet, which calls a
program that connects to a DBF database natively (not using JDBC-ODBC) and
updates records in the database. The problem I am having is that Tomcat does
not release the database until I restart the Tomcat service. I close the
connection and even do a commit().  Has anyone else had a problem and if
so, is there a solution? Below is some sample code:

Class.forName(dbfDriverName).newInstance();
Connection conn = DriverManager.getConnection(dbfUrl, , );
Statement stmt = conn.createStatement();

// do some stuff

statement.close();
connection.commit();
Thanks,
Kevin


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






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


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


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


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


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




log() method

2002-05-31 Thread Scott Purcell


I am running Tomcat 4.0.3 on a NT box here, and I am trying to use the log(my message 
here);
method. The log() method should put the messages into the error log, but I am not 
seeing any activity there. In my installdir I have a logs dir and inside there there 
are Four(4) logs.
catalina.log
localhost_access_log
localhost_examples_log
localhost_log

I have been tailing each of those, but I never see my messages. Also, they do not go 
to stdout, as I am starting tomcat in a cmd window, and the log() does not go there.

Thanks,
Scott Purcell

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




RE: uploading files software

2002-05-17 Thread Scott Purcell

Check out the O'Reilly site or servlets.com. They have a multipart parser that does 
uploading, and handles anysize upload.

Scott

-Original Message-
From: pascal GEND [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 17, 2002 9:07 AM
To: [EMAIL PROTECTED]
Subject: uploading files software


Hello,

I'm using a package I found over the internet 2 years later and permitting upload of 
files through a POST on a java servlet.
But it doesn't work correctly with data files bigger than 1 megabyte.
Has anyone such a package (I use j2sdk 1.4) or where can I find it?

thanks

Pascal

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




Cocoon install tomcat4.03/cocoon 2.0.2 on NT Help

2002-05-01 Thread Scott Purcell

I have been running Tomcat 4.0.3 on my NT box for a few months, and I am pretty 
familiar with it. I set the server.xml to run on port 80 not 8080.

I tried to install cocoon 2.0.2 and ran into a problem. I read the install guide, and 
it basically said to place the cocoon.war file under my $installdir/webapps and 
restart the server.

After I restart the tomcat, the cocoon.war did decompress and now I have a cocoon 
directory with a lot of subdirectories in it. All looks correct. But when I try and 
hit the page
http://localhost/cocoon/
it blows up with the following error:
I do not have any other Cocoon 1.x jar in the lib either. I have read and re-read the 
docs.

Below is the error:
If anyone knows what this may be caused from please let me know.
Sincerely
Scott K Purcell

Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error

type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error) that 
prevented it from fulfilling this request.
exception 
javax.servlet.ServletException: Servlet.init() for servlet Cocoon2 threw exception
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:935)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:653)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:484)
root cause 
java.lang.NoClassDefFoundError: javax/xml/transform/Source
at org.apache.cocoon.Cocoon.contextualize(Cocoon.java:183)
at 
org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java:1209)
at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:407)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:916)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:653)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at 

Tomcat Upgrade question

2002-05-01 Thread Scott Purcell

Hello,

I am running Tomcat 4.0.3 on NT, and I am going to upgrade the version. Up to this 
point, when I upgraded, I basically copied my old version to a bak.version and copied 
the web-apps folder over. Is this the best way to do a upgrade, or is the sw 
intelligent enough to just upgrade on top of itself.?


I have quite a bit of sites running and was curious the best way to go from one 
version to another.

Thanks,
Scott

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: javax.servlet.ServletException: Cannot create bean of class MoniTestBean

2002-04-24 Thread Scott Purcell

I have ran into that issue many times, and my workaround has always been to put your 
bean in a class.
eg. com/MoniTestBean
and make sure you add the package statement
package com; at the top of your java file,
recompile, then change your useBean to look like this. Where you put the class was 
perfect. So All should be good.
*jsp:useBean id=formHandler scope=request class=com.MoniTestBean/

I bet that works. I talked to my teacher about it before and he believes that all 
beans have to be in a named package.
I always worked for me.

good luck
Scott Purcell
Vertis Corporation



-Original Message-
From: chuck amadi [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 7:16 AM
To: Tomcat Users List; taglibs-user-help
Subject: javax.servlet.ServletException: Cannot create bean of class
MoniTestBean 


I have a problem with the following i have created and compiled my 
JavaBeans in my Web-Inf /classes folder and everythings fine . 
Nevertheless in the stack trace i get a error 500 cannot create Bean. I 
have posted this on numerous occasions to no avail.

Can anyone lends some time and have a look as basically this is 
preventing me completing this Questionairre Web Forms  Project 
(Validation Problem).

Thus i have the useBean tag as follows:

*jsp:useBean id=formHandler scope=request class=MoniTestBean/
jsp:setProperty name=formHandler property=*/

And also the request.getParameter test but due the the non creation of 
the bean in the stack trace thus the jvm from the server is causing me 
this dilema.

Any suggestions my set-up: RHlinux v7.2 JTomcat v3.3a as Tomcat v4 
didn't function properly and Netbeans IDE 3.2.2 Text Editor Emacs.

%=request.getParameter(surName)%
%=request.getParameter(foreName)%
%=request.getParameter(monDisable)%

Thus the return value was null as the bean cannot create/intialate itself.

* Internal Servlet Error:*

javax.servlet.ServletException:  Cannot create bean of class MoniTestBean

I have posted this problem a few times and unfortunately no suggestions 
, i have gone through the usual procedures .

Cheers Chuck Amadi
Systems Programmer




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: How can I get the location of the webapps-directory?

2002-04-22 Thread Scott Purcell

I think it is servletContext now. Check out the j2ee for servletContext that may be 
what you are looking for.
my o'reilly book shows

public String ServletContext.getServerInfo()


if that don't fly, I can dig deeper, just yell

Scott




-Original Message-
From: Eichfelder, Frank [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 22, 2002 9:15 AM
To: [EMAIL PROTECTED]
Subject: AW: How can I get the location of the webapps-directory?


Hi,

thanks for the reply, but I need the webapps-directory to read the 
existent subdirectories and/or war-files in order to make a list of all
deployed web-applications.

(In older versions of the Servlet-API, there was a method called
getServletNames(), which is deprecated now and returns null)

Does anybody have another suggestion?

Thanks,

Frank

 -Ursprüngliche Nachricht-
 Von: Rajesh Nair [mailto:[EMAIL PROTECTED]]
 Gesendet am: Montag, 22. April 2002 06:42
 An: [EMAIL PROTECTED]
 Betreff: Re: How can I get the location of the webapps-directory?
 
 Hi 
 I think u can try getContextPath() which will give u the root 
 of ur web application .To get access to resources inside WAR 
 or other archive files u can use the method 
 getResource(String URIPath);
  If the context is in a different m/c u can use getContext() 
 to get the context first and then use either getResource() or 
 getResourceAsStream() methods 
 
 *** REPLY SEPARATOR  ***
 
 On 4/19/02 at 3:22 PM Eichfelder, Frank wrote:
 
 Hi,
 
 how can I get the location from the webapps-directory on my 
 filesystem?
 
 It's easy, if I use
 
 String path = getServletContext().getRealPath(/);
 
 and then cut off the last part:
 
 int index = path.lastIndexOf(System.getProperty(file.separator),
 path.length()-2 );
 
 path = path.substring(0, index);
 
 But this works only, if you have your webapplication unpacked in the
 file-system or if you have set unpackWars=true.
 
 Now, I have set unpackWars=false, and now I get null for
 getServletContext().getRealPath(/).
 
 Is there any possibility to get the name of the war-File an 
 application is
 stored in or the name of the directory the war-file is stored in?
 
 Thanks, 
 
 Frank
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 
 
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Want to grab SQL stmt from executing servlet

2002-04-12 Thread Scott Purcell

Hello,

I have the need to parse out a query from a running .jar file.
The .jar is a servlet that does some queries to a local DB. I want to grab the 
querystring that is being sent to the
DB somehow when I am running the servlet.

Is there anyway to achieve this goal??




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Want to grab SQL stmt from executing servlet

2002-04-12 Thread Scott Purcell

Thanks,
That is what I needed. I sincerely appreciate.

Scott

-Original Message-
From: Wagoner, Mark [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 12, 2002 9:25 AM
To: 'Tomcat Users List'
Subject: RE: Want to grab SQL stmt from executing servlet


If the database is Oracle there is a system table called V$SQLAREA that
holds this information.

-Original Message-
From: Scott Purcell [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 12, 2002 10:17 AM
To: [EMAIL PROTECTED]
Subject: Want to grab SQL stmt from executing servlet


Hello,

I have the need to parse out a query from a running .jar file.
The .jar is a servlet that does some queries to a local DB. I want to grab
the querystring that is being sent to the
DB somehow when I am running the servlet.

Is there anyway to achieve this goal??




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Log File Error

2002-04-01 Thread Scott Purcell

Hello,
I somehow foobared my Tomcat on NT install. I did not touch the server.xml file, but 
did play with the class path.

When I try and do a start : startup at the command line, if just begins it tries to 
start and dies.

I checked my java_home and it is good. I can't figure out why its erroring.

I went to the tomcat_home/logs and killed them out, and tried to restart, but it does 
not make a log for this problem. How can I tell what the error is?

Thanks,
Scott


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]