Re: Problems with graphics on Tomcat 5.5.9

2005-10-10 Thread Viorel Dragomir
What exception ?

[ If it's not confidential. :) ]



Viorel Dragomir

.
..
---



- Original Message - 
From: Mauricio Fernandez A. 
To: Tomcat Users List 
Sent: Monday, October 10, 2005 14:42
Subject: RE: Problems with graphics on Tomcat 5.5.9



Trying again to make the graphics appear in my web app, I did a test web app
and I had been trying to start the Tomcat with -Djava.awt.headless=true
option as I read in some forums

#export CATALINA_OPTS=-Djava.awt.headless=true
#/usr/java/jakarta-tomcat/bin/startup.sh

But they do not appear either

The web test app can be found here http://www.actesoft.com:8080/Prueba/jsp/
and the wanted result after click on Graficar is something like this
http://www.actesoft.com/ejGrafico/ (static page)

Also I have try to insert in the Graficador.class constructor the next
System.set/getProperties lines


public Graficador(String Path){
super();
this.contexto = Path;
this.background = null;

//System.setProperty returns the current value before assignment
String vrPropiedad = System.setProperty(java.awt.headless, true);

// Log the before assignment value to a log file to debug
logger.debug(BEFORE = java.awt.headless =  + vrPropiedad);

//and log the after assignmet value to a log file too
vrPropiedad = System.getProperty(java.awt.headless);
logger.debug(NOW = java.awt.headless =  + vrPropiedad);
}


And these are the log file lines the app write

2005-10-10 11:18:15,996 [-t] INFO [index.jsp] - Loading form
2005-10-10 11:18:15,999 [-t] INFO [index.jsp] - Form OK !
2005-10-10 11:18:24,710 [-t] DEBUG [grafica.jsp] - loading page: grafica.jsp
2005-10-10 11:18:24,716 [-t] DEBUG [grafica.jsp] - Creating object:
Graficador
2005-10-10 11:18:24,746 [-t] DEBUG [Graficador] - BEFORE = java.awt.headless
= true -- It is True!
2005-10-10 11:18:24,746 [-t] DEBUG [Graficador] - NOW = java.awt.headless =
true -- It is True!
2005-10-10 11:18:24,747 [-t] DEBUG [grafica.jsp] - Creating Category 1 ...
OK
2005-10-10 11:18:24,747 [-t] DEBUG [grafica.jsp] - Creating Category 2 ...
OK
2005-10-10 11:18:24,748 [-t] DEBUG [grafica.jsp] - Creating Category 3 ...
OK
2005-10-10 11:18:24,748 [-t] DEBUG [grafica.jsp] - Giving the control to a
Graficador Object, it must make the chart
2005-10-10 11:18:24,769 [-t] DEBUG [Graficador] - Starting chart creation
...
2005-10-10 11:18:24,788 [-t] DEBUG [Graficador] - Data process  OK
2005-10-10 11:18:25,548 [-t] DEBUG [Graficador] - Creating Chart  OK
2005-10-10 11:18:25,549 [-t] DEBUG [Graficador] - Making a PNG image from
Chart

And here the app trhows an exception

Any idea is always welcome, thanks.

Mauricio Fernandez


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

Re: Tomcat cant see my application folder HELP!!!

2005-09-21 Thread Viorel Dragomir

Tomcat is not exactly httpd.

So, try to READ some FREE docs on the website.
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/index.html





Viorel Dragomir

.
..
---



- Original Message - 
From: Mbah Tenjoh-Okwen 
To: Tomcat Users List ; [EMAIL PROTECTED] 
Sent: Wednesday, September 21, 2005 14:19
Subject: Tomcat cant see my application folder HELP!!!


hello

Im using tomcat 5.5.9 and when i create a
folder(mine)under 
webbaps (tomcat/webapps/mine)i cant even get to its
index.html file by typing http://localhost:8080/mine;
in my browser.The container says The requested
resource (/kopie/) is not available (ie i get a 404
http error report).

on the other hand  accessing the index.html file and
servlet examples in the  servlets-examples folder does
not pose a problem. i could even duplicate this
folder, reanme it and access its index.html file
without anyproblem but as soon as i modify  the DD
(deployment descriptor) i cant view the index.html
file, let alone  access the servlets.

thanks 





___ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail 
http://uk.messenger.yahoo.com

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

Re: use php in servlet engine.

2005-09-06 Thread Viorel Dragomir
Choose 1.
But with some modifications

apache + php + mod_jk - tomcat



Viorel Dragomir

.
..
---



- Original Message - 
From: David Delbecq 
To: Tomcat Users List 
Sent: Tuesday, September 06, 2005 10:00
Subject: use php in servlet engine.


Hello,

We are facing a question here. How to integrate an old
existing php site inside a tomcat container. 
I think about 2 possible solutions:

1) run apache+php on a specific port and have tomcat
do some proxying on a url. (like http://server/php/* - apache-php)
2) create a webapplication supporting php using instruction provided on wiki:
http://wiki.apache.org/jakarta-tomcat/UsingPhp

The second one is more interesting (no need to run an additionnal apache 
process)
However, am a bit worried about this comment on php documentation:
http://be.php.net/manual/en/print/ref.java.php

PHP has a habit of changing the working directory. sapi/servlet will 
eventually 
 change it back, but while PHP is running the servlet engine may not be 
able to 
 load any classes from the CLASSPATH which are specified using a relative 
directory 
 syntax, or find the work directory used for administration and JSP 
compilation tasks.

Has anyone here already tried this and experiences issue with this servlet?

Thanks for sharing your experience.

-- 
David Delbecq
Royal Meteorological Institute of Belgium

-
Is there life after /sbin/halt -p?

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

Re: URLEncoder

2005-09-01 Thread Viorel Dragomir
Try to set a default character encoding for both app [yours and tomcat].




Viorel Dragomir

.
..
---



- Original Message - 
From: Roland Carlsson 
To: tomcat-user@jakarta.apache.org 
Sent: Thursday, September 01, 2005 16:27
Subject: URLEncoder


Hi!

Why does my standalone application encode characters different than in 
Tomcat?

The swedish letters åäö run through java.net.URLEncoder(åäö, 
ISO8859_1)  in my application i get:
%E5%E4%F6

but when i run the same code through Tomcat i get:
%C3%A5%C3%A4%C3%B6

Characterencoding is difficult enough without java being consistent.

Thanks in advance
Roland Carlsson

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

Re: Apache and Tomcat on separate hosts?

2005-08-17 Thread Viorel Dragomir

You can have the servers on different machines. Look more on mod_jk2 
configuration.
As I know, mod_jk2 project is no longer maintained so it's better to switch to 
mod_jk.



Viorel Dragomir

.
..
---



- Original Message - 
From: Jeff Schroeder 
To: tomcat-user@jakarta.apache.org 
Sent: Wednesday, August 17, 2005 15:17
Subject: Apache and Tomcat on separate hosts?


I finally got Apache2 + mod_jk2 + tomcat 4.1 working with tomcat doing vhosting 
on my laptop for development. The management said that is great that I should 
now roll it over to the dev servers before putting it into production.

I started setting up everything and was down to creating the vhost in 
httpd.conf when I realized one fatal problem, Apache and Tomcat are on 2 
separate servers. The way that I understand it, Apache finds a jsp page in it's 
docroot and if the host is in workers2.properties, it gets handed over to 
tomcat. 

If the webapp is not on the same box, how do you let apache find it to hand 
over to tomcat? My first thought was NFS, but the change control board frowns 
on any sort of filesharing among the servers. It's kind of important to get 
this properly working, is there any other way? Thanks.

Jeff Schroeder
Web Administrator
Comair, Inc.



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



Re: Tomcat 5.5.9 connection pooling

2005-07-18 Thread Viorel Dragomir
Can you attach the exception thrown ?



Viorel Dragomir

.
..
---



- Original Message - 
From: [EMAIL PROTECTED] 
To: tomcat-user@jakarta.apache.org 
Sent: Monday, July 18, 2005 13:38
Subject: Tomcat 5.5.9 connection pooling


Hi!

I am using Tomcat 5.5.9 and I have established a DataSource for
database connection pooling where I can get connections from.
But when I try to close the connection via myConnection.close(),
always an exception is thrown. Is it right to close the connection
this way or do I have to return the connection to the pool in 
another way? 

Peter

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


Re: How to Schedule a startup of Tomcat in Windows2000

2005-06-14 Thread Viorel Dragomir
net stop tomcat
net start tomcat



Viorel Dragomir

.
..
---



- Original Message - 
From: John Sorensen 
To: tomcat-user@jakarta.apache.org 
Sent: Tuesday, June 14, 2005 15:40
Subject: How to Schedule a startup of Tomcat in Windows2000


We need to restart the tomcat service each week automatically using the Windows 
2000 Scheduling Process.  I've tried running startup.bat, startup.sh with no 
luck.  The 'Service' process is 'jk_nt_service.exe Tomcat', of which I've tried 
in the 'run' process of the Scheduler.  None of these commands seems to 
'restart' the 'tomcat service'.


Re: Apache Integration

2005-05-30 Thread Viorel Dragomir
Define two workers tc4 and tc5

On httpd.conf
 
JkMount /tc4prj/*.jsp tc4JkMount /tc5prj/*.jsp 
tc5http://jakarta.apache.org/tomcat/tomcat-3.3-doc/mod_jk-howto.html

Viorel Dragomir

.
..
---



- Original Message - 
From: [EMAIL PROTECTED] 
To: tomcat-user@jakarta.apache.org 
Sent: Monday, May 30, 2005 14:28
Subject: Re: Apache Integration


Well, things got a bit more complicated lately. Now, my bos wants me to connect 
both Tomcat 4 and Tomcat 5 to the httpd server. 

 

If I use mod_jk, I have to specify the path to a tomcat installation in the 
workers.properties in the Apache2/conf/httpd.conf file. So, there's no way to 
connect both and relay to the right server using the appropriate folder alias.

 

Is there any other connector which could support two tomcat installation ? I've 
read about mod_jk, mod_jk2 but I remember seeing a third connector module. 

 

Does anyone ever succeeded in installing such a configuration ??

 

 

 

Luc Boudreau

Université du Québec

Canada



Re: Nervous about Sessions ...

2005-04-27 Thread Viorel Dragomir
Yes.
But you can set some attributes of the objects as [ transient ] to not be 
serialized. 
So you don't have to make all objects in the package serializable.




Viorel Dragomir

.
..
---



- Original Message - 
From: David Whitehurst 
To: tomcat-user@jakarta.apache.org 
Sent: Wednesday, April 27, 2005 11:31
Subject: Nervous about Sessions ...


Long ago a multi-client, multi-Oracle application was written using 
Struts.  Recently, we had a 4 in 22,000 record data integrity issue.  I 
found one client implementation that used prepared statements but the 
primary key was being used e.g. update mytable set a= ?, b=? where 
pri_key =  + pkey +  ' ; ...whoa! I said, called the developer and we 
had a talk.

Then, I also found that where we use a HashMap object it is not 
synchronized.  I suspect that was the data problem, i.e. two records 
saved by two different people, and the data was the same for the 
different records in the same Oracle second.

I'm looking for comments about the use of this HashMap on requests but 
I'm also nervous now where I use Strings in the session e.g. a 
clientname, username, etc. My concern started when I read the posts 
about the non-serializable objects in the session.  Do all java objects 
placed in the session have to be serializable? 

Thanks,

David L. Whitehurst

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


Re: java.lang.UnsupportedClassVersionError ?

2005-04-15 Thread Viorel Dragomir
Your jsp files are compiled using jdk1.5. Remove these files from tomcat's 
working directory. [ (..)tomcat/work ]




Viorel Dragomir

.
..
---



- Original Message - 
From: Pawson, David 
To: Tomcat Users List 
Sent: Friday, April 15, 2005 15:56
Subject: java.lang.UnsupportedClassVersionError ?



Been trying out java 1.5
Now back to using 1.4.2.06

When I run what was a working servlet, I'm getting 
the above error, and

'Unsupported major.minor version 49.0'

Is this Tomcat or java please?

Regards DaveP.

 snip here *

-- 
DISCLAIMER:

NOTICE: The information contained in this email and any attachments is 
confidential and may be privileged.  If you are not the intended 
recipient you should not use, disclose, distribute or copy any of the 
content of it or of any attachment; you are requested to notify the 
sender immediately of your receipt of the email and then to delete it 
and any attachments from your system.

RNIB endeavours to ensure that emails and any attachments generated by
its staff are free from viruses or other contaminants.  However, it 
cannot accept any responsibility for any  such which are transmitted.
We therefore recommend you scan all attachments.

Please note that the statements and views expressed in this email and 
any attachments are those of the author and do not necessarily represent
those of RNIB.

RNIB Registered Charity Number: 226227

Website: http://www.rnib.org.uk




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


Re: port number

2005-04-13 Thread Viorel Dragomir

Look for mod_jk how to.
It's a connector that can send .jsp or servlets requests from apache to tomcat.



Viorel Dragomir

.
..
---



- Original Message - 
From: t.n.a. 
To: Tomcat Users List 
Sent: Wednesday, April 13, 2005 16:54
Subject: port number


Hi everyone,

I host applications on a machine where both apache and tomcat are 
running. I access apache at port 80 and tomcat at 8080. Is it possible 
(using the tomcat apache connection, or some other way) to access both 
at port 80? I ask because of firewall issues: port 80 seems to be the 
Holy Grail of accessibility: everything else depends on the local 
firewall configuration.

Tomislav

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


Re: I want to install Apache+Tomcat

2005-04-06 Thread Viorel Dragomir

After you install you must run [execute] the Tomcat using startup.(sh|bat) from 
bin directory.
I guess for windows there is an application to install/run the service.



Viorel Dragomir

.
..
---



- Original Message - 
From: Victor Daniel Diaz Suarez 
To: tomcat-user@jakarta.apache.org 
Sent: Wednesday, April 06, 2005 14:30
Subject: I want to install Apache+Tomcat


Hello, I want to install Apache+Tomcat to run a java application that is 
a servlet. How I can install?
I download Tomcat ande install, but when I try to test tomcat using 
http://localhost:8080 the navigator say cann´t find web.

Thanks

-- 
##

   Víctor Daniel Díaz Suárez
Centro de Tecnología Médica-Universidad de Las Palmas de  G.C.

##


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


Re: Clustering question

2005-04-01 Thread Viorel Dragomir

Not all the objects inside your class must be serializable.
Set all the objects you don't want to persist as transient.

[ For instance, I don't want to persist a data connection [in this way] or a 
logger ]



Viorel Dragomir

.
..
---



- Original Message - 
From: Dale, Matt 
To: Tomcat Users List 
Sent: Friday, April 01, 2005 13:38
Subject: RE: Clustering question


Yes this is a problem. All objects contained within a serializable object must 
in turn be serializable themselves.

-Original Message-
From: Steven Pannell [mailto:[EMAIL PROTECTED]
Sent: 01 April 2005 12:33
To: 'tomcat-user@jakarta.apache.org'
Subject: Clustering question


Hi,

I have setup two tomcat 5.5.7 servers which are clustered.  Everything is
working and  the basic session is replication.  However, when I add my own
custom java object to the session this is not replicated.  I have made it
Serializable but this object also contains other java objects which are not
serializable. Is this a problem?  Is there anything special I need to
consider to get my custom session objects to replicate??

Thanks,
Steve.



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


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



Re: remove stack-trace from public web

2005-03-31 Thread Viorel Dragomir

Write stuff like this into your app's web.xml file.

error-page

error-code404/error-code

location/common/notFound.html/location

/error-page

error-page

error-code403/error-code

location/common/file.html/location

/error-page

error-page

error-code500/error-code

location/common/error.html/location

/error-page



Viorel Dragomir

.
..
---



- Original Message - 
From: Andreas Andersson 
To: Tomcat Users List 
Sent: Thursday, March 31, 2005 13:22
Subject: remove stack-trace from public web


Hi!

Is there anyway to make tomcat not print the stack trace when jsp fails?

-- 
Andreas Andersson
IT Dept.
Travelstart Nordic
[EMAIL PROTECTED]
http://www.travelstart.se

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


Re: Tomcat Hang on Linux (hangs the entire system)

2005-03-30 Thread Viorel Dragomir

It might be a hardware related problem.
Try to change the memory.




Viorel Dragomir

.
..
---



- Original Message - 
From: Steve Vanspall 
To: tomcat-user@jakarta.apache.org 
Sent: Thursday, March 31, 2005 09:38
Subject: Tomcat Hang on Linux (hangs the entire system)


Hi there, 

I am posting this in a few areas because I cannot pinpoint where the 

problem stems from. 

I have a standard Pentium III bases pc running linux. 

It has only 380 meg (or therabouts) of ram 

Using IBM JVM 1.4.1 and tomcat 4.1.18 (I know there are later version, but 

they all hang) 

I have 2 webapps running. One of them uses Apache to translate two 

different domain to the right ibay for it's content but uses the same code 

base. The second webapp is accessed, currently, using 

http://www.mycomapny.com:8080/MyApp style URL. 

The webapp just hangs. It will not load any pages, and when it hangs, both 

webapps hang. So I think this is a Tomcat or Java or Linux error. Once the 

hang occurs I cannot do a ps -ef as this also hangs. My only option is to 

reboot the machine. But it hangs half way and has to be physically powered 

off. We are going to put a new, more powerful computer in there, but for 

now I wanted to see if anyone else had experienced such a problem. Can 

you give me some pointers as to where to look for the source of the 

problem. 

This has happened before, and I got no information about it. I know it's a 

pretty vague explanation, but I don't know what more informationI can give 

you. 

The log files do not show any errors, and it never happens at the same 

point 

in the web application. At first I thought it happen when concurrent users 

logged in, but that's not the case either, and I have trimmed down the 

sychornicity management when accesing Singletons in my web app. 

Now I have been through all my code, and cannot find anything that should 

be causing an error. I have run the code under a number of different 

cirsumstances on my development machine (Windows 2000) and 

everything runs without a problem. 

Any help would be appreciated 

Regards 

Steve 





Re: starting the JVM with -D option in tomcat

2005-03-21 Thread Viorel Dragomir
JAVA_OPTS=-D= -Dfile.encoding=ISO-8859-1

export JAVA_OPTS

[start tomcat]

Viorel Dragomir

.
..
---



- Original Message - 
From: swetha Ranganathan 
To: tomcat-user@jakarta.apache.org 
Sent: Monday, March 21, 2005 10:48
Subject: starting the JVM with -D option in tomcat


Hi all
 
is it possible to load a java class with -D option in  tomcat ??
 
Thanks
Regards
Swetha


Regards
Swetha
Yahoo! India Matrimony: Find your life partneronline.

Re: running a thread in Tomcat

2005-03-15 Thread Viorel Dragomir


Set the thread to act like a daemon.
It's a Thread [class] thing. 

There are ten better ways to resolve the same problem without threads.



Viorel Dragomir

.
..
---



- Original Message - 
From: Mark 
To: tomcat-user@jakarta.apache.org 
Sent: Tuesday, March 15, 2005 17:31
Subject: running a thread in Tomcat


Hi,
I'm starting a new thread in my init servlet(I know it has been
discussed few time, that it's not the best idea, but anyway)
 and everyhing is fine untill I need to restart tomcat.
When I shutdown (shutdown.sh) Tomcat the java process remain active.

The question is it expected? or I need to take care about this thread
in destroy() method of my init servlet?

I have tomcat 5.0.24 on RH9.

Thanks a lot,
Mark.




__ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search. 
http://info.mail.yahoo.com/mail_250

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


Re: running a thread in Tomcat

2005-03-15 Thread Viorel Dragomir

I apologize for the previous post.
The Read Receipt was enabled [because of my boss's will] and I forgot about it.


Thank you for your understanding,


Viorel Dragomir

.
..
---



- Original Message - 
From: Mark 
To: tomcat-user@jakarta.apache.org 
Sent: Tuesday, March 15, 2005 17:31
Subject: running a thread in Tomcat


Hi,
I'm starting a new thread in my init servlet(I know it has been
discussed few time, that it's not the best idea, but anyway)
 and everyhing is fine untill I need to restart tomcat.
When I shutdown (shutdown.sh) Tomcat the java process remain active.

The question is it expected? or I need to take care about this thread
in destroy() method of my init servlet?

I have tomcat 5.0.24 on RH9.

Thanks a lot,
Mark.




__ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search. 
http://info.mail.yahoo.com/mail_250

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


Re: OutOfMemory

2005-03-01 Thread Viorel Dragomir
CATALINA_OPT=-Xmx256M -Xms256M



Viorel Dragomir

.
..
---



- Original Message - 
From: Edouard Dalla-Costa 
To: Tomcat Users List 
Sent: Tuesday, March 01, 2005 11:11
Subject: OutOfMemory


Hello,

I have some OUtOfMemory exception with my tomcat and I was wondering
how could I increase the amount of memory allocate to Tomcat. Right
now it is running the default amount of memory which is 64 MB and it
is not enought.

Thanx by advance
Edouard

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


Re: Need access to classes outside Tomcat for JSPs

2005-03-01 Thread Viorel Dragomir
You can redirect the tomcat's work directory to your classes.
That should work for you !



Viorel Dragomir

.
..
---



- Original Message - 
From: Allistair Crossley 
To: Tomcat Users List 
Sent: Tuesday, March 01, 2005 15:56
Subject: RE: Need access to classes outside Tomcat for JSPs


1. Yes people do read, and offer advice based on whether a) they can and b) how 
rude the poster is. You fall into (b) right now, so good luck.

2. Tomcat, not TomCat.

3. This is a voluntary user list and you should not expect to receive help as 
you seem to.

 -Original Message-
 From: Dan [mailto:[EMAIL PROTECTED]
 Sent: 01 March 2005 13:55
 To: Tomcat Users List
 Subject: Re: Need access to classes outside Tomcat for JSPs
 
 
 Do people read anymore?
 
 As previously stated in the original post, these classes need to be 
 available to other non-web, non TomCat applications.  I do 
 not want to have 
 to maintain two different repositories.  Also as previously 
 stated I have 
 the desired configuration running on another box but I cannot 
 duplicate the 
 setup on this box.
 
 If your only advice is to move them into TomCat, then please 
 don't even 
 bother replying.
 
 
 At 08:21 AM 3/1/2005, David wrote:
 Why do you want your classes outside of Tomcat?  Copy the 
 classes to your 
 project when you build and eliminate the dependency.  Or 
 better yet, use a 
 build environment like Ant to do the copying for you.  As a 
 bonus, it'll 
 catch errors before you get to production and the webapp 
 will be more portable.
 
 --David
 
 Dan wrote:
 
 Classpath problem.  Really frustrating.
 
 I'm trying to duplicate a setup on system A to system B and 
 can't get it 
 working.  My problem is when I access the JSP page, Tomcat 
 complains of a 
 ClassNotFound exception.  This happens with all of my 
 custom classes.  If 
 I create a simple JSP page with no custom classes the JSP 
 compiles fine.
 
 When I manually execute the class via java 
 com.xxx.MyClass it responds 
 appropriately (my environment's CLASSPATH includes the 
 custom library paths).
 
 My custom classes live outside of the Tomcat directory (see below) 
 because I use these classes in other non-web based 
 applications, so they 
 need to be available system wide.
 
 I have melted my brain today trying to figure out why 
 system A works with 
 this configuration but system B gives me the ClassNotFound 
 exception.   I 
 have even copied my entire Tomcat directory from system A 
 to system B 
 with no change.  I thought perhaps I was starting the service with 
 additional parameters but I don't see any in the registry settings.
 
 
 Does anyone have an educated guess as to why I can't get 
 this thing to 
 work the way it's working on the other system and/or how I 
 can get this 
 working with my custom classes OUTSIDE of Tomcat.
 
 
 
 Win2K SP4
 Tomcat v5.0.27 as NT Service
 
 e:\java\tomcat
 e:\java\sdk (JDK 1.4.2)
 e:\java\library\custom\  (custom libraries)
 e:\java\library\basic   (libraries from other sources)
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Developers of QuickAddress Software
a href=http://www.qas.com;www.qas.com/a
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



Re: trying with my first site on Tomcat with IIS

2005-02-23 Thread Viorel Dragomir
Try with google.
You can find an how to on jakarta.apache.org site.

Or you can ask your friends.



Viorel Dragomir

.
..
---



- Original Message - 
From: David IBARRA ROSALES 
To: Tomcat Users List 
Sent: Wednesday, February 23, 2005 16:22
Subject: trying with my first site on Tomcat with IIS


Hi everybody

I've created a folder called test on webapps and a website on IIS
(include ISAPI and virtual directory jakarta) with the same target.
when i call with  http://localhost:8080/test/test.jsp works,  but when i
call it on the browser:   http://localhost/test.jsp , does not work.
need I to do  any change in server.xml or uriworkermap.properties every time
that i add a site?


test.jsp
-
html
head
titleFirst JSP page./title
/head
body
%=Hello JSP%
/body
/html
---

thanks in advance
David


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


Re: how to print to web page instead of catalina.out

2005-02-23 Thread Viorel Dragomir
If you can't find a response [HttpServletResponse] object to use than you can't 
print.

Use throw Exception(MESSAGE)  ;)



Viorel Dragomir

.
..
---



- Original Message - 
From: Jin Wu 
To: Tomcat Users List ; Antony Paul 
Sent: Wednesday, February 23, 2005 20:38
Subject: Re: how to print to web page instead of catalina.out


I tried out.print(). The complation failed. The error is:
 
cannot resolve symbol
symbol  : variable out 

Thanks
Jin

Antony Paul [EMAIL PROTECTED] wrote:
Why not use out.print() or you are trying to do something else ?.

rgds
Antony Paul


On Tue, 22 Feb 2005 20:26:41 -0800 (PST), Jin Wu wrote:
 Hi,
 
 It seems that System.out.printlin(...) prints to catalina.out. Is there a 
 way I can print to web page?
 
 Thanks,
 James
 
 __
 Do You Yahoo!?
 Tired of spam? Yahoo! Mail has the best spam protection around
 http://mail.yahoo.com


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


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

Re: reading xml file from disk with jsp bean under tomcat

2005-02-18 Thread Viorel Dragomir

1.Code 404 appears when you can't find your jsp file. Do you correctly 
deployed it into an webapplication ?
2.You can get the file using the absolute URL to the file like 
[c:/myfile.xml] but you might want first to upload the file
to the webserver and then parseit.



Viorel Dragomir

.
..
---



- Original Message - 
From: Janvier Majirus 
To: tomcat-user@jakarta.apache.org 
Cc: tomcat-dev@jakarta.apache.org 
Sent: Friday, February 18, 2005 11:42
Subject: reading xml file from disk with jsp bean under tomcat


Hi all,
I am developing a simple module of my app that simple reads an xml file from 
disk and adds it on my database. I used tomcat-4.1.30 and jsp. My bean 
implements a method 
readFileFromDisk(String myfile).
When i try to execute my jsp page i have error message with code 404: myfile 
(file not fund).
Should anyone know where to place my xml file so that with my jsp bean i access 
to it?
I run my bean in standalone mode, all turn well. There is something in my 
servlet context configuration  that i don't know.
Any suggestion is welcome.
I thank all of you in advance.
Regards
 
Majirus


-
 Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
Créez votre Yahoo! Mail

Re: Two versions of Tomcat running on the same pc at the same time

2005-01-27 Thread Viorel Dragomir
See the server.xml and search for 8080 / 8005 / 8009
You can't execute two servers for the same port[s] so you must change this 
value for the second installation.



Viorel Dragomir

.
..
---



- Original Message - 
From: Inma Marín López 
To: tomcat-user@jakarta.apache.org 
Sent: Thursday, January 27, 2005 16:07
Subject: Two versions of Tomcat running on the same pc at the same time


Hello!!!
  
   I would like to have two versions of Tomcat (Tomcat 5.0.25 and Tomcat 
5.5.4) running on the same pc at the same time. Is it possible???
Firstly, I have tried to install Tomcat 5.0.25 first and then Tomcat 5.5.4, but 
when launching either Tomcat, Tomcat 5.5.4 is executing.
Secondly, I have tried to install Tomcat 5.0.25 first, with Start menu items 
disabled, so as to launch it manually. Then, I have installed Tomcat 5.5.4 with 
Start menu items enabled, because it has not a startup/shutdown.bat file. 
In this case, I can only have one Tomcat version executing at the same time. 
Maybe, the problem is related to the service Tomcat5 which has the same name 
in the two Tomcat versions, but only one is installed.

I am not sure if I am following the correct steps.

Could you be so kind as to help me, please?

Thanks in advance.
Cheers,
Inma Marín.

Re: [DBCP] Management of transactions...

2005-01-25 Thread Viorel Dragomir
This is the worst english I've seen so far.
It's almost worse than mine.



Viorel Dragomir

.
..
---



- Original Message - 
From: ksv 
To: tomcat-user@jakarta.apache.org 
Sent: Tuesday, January 25, 2005 17:52
Subject: [DBCP] Management of transactions... [DBCP] Management of 
transactions... [DBCP] Management of transactions... [DBCP] Management of 
transactions...


Hello ,
Interests everything, that is connected to managements of transactions at use 
DBCP...
Who Can will share experience or links? The database is not essential.
The principle of work with transactions through DBCP is necessary...

-- 
Best regards,
 ksv  mailto:[EMAIL PROTECTED]


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


Re: Re: Re: ConnectionPooling

2005-01-20 Thread Viorel Dragomir
http://logging.apache.org/log4j/docs/manual.html

You really need to read something like this.
Logging is an important step into building an app, so you have to sacrifice
now some time for learning how to do it.



Viorel Dragomir

.
..
---



- Original Message - 
From: micky none 
To: Tomcat Users List 
Sent: Thursday, January 20, 2005 16:14
Subject: Re: Re: Re: ConnectionPooling


Thanks Doug,Harry and rest of my friends,
After going thru the links ,I was able to make it work.Before I end this thread 
I just want to clarify some doubts.I am querying a database ,but I have some 
delay getting back the results.Now I want to check if the query is causing the 
delay or am I going wrong with allocating connections.So,I want to log all my 
program steps in a log file,can u just tell me what code I have to add and 
where?? Would this code help me??
Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_DBTest_log. suffix=.txt
timestamp=true/

Looking for these answers and thanks for your generous help.
cheers.



On Thu, 20 Jan 2005 Parsons Technical Services wrote :
People who have to figure out how to use other peoples work either have messy 
hair or are bald.

There are three main pages for reference:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/globalresources.html

Now the basics. There are four pieces to the puzzle.

I am going for a Global Setup.

First is the server.xml Resource and ResourceParams elements. It appears that 
you have these. Connects to the database and create a pool of connections.

Second is the web.xml entry for the resource-ref.

Third is the Resource link placed in the apps context.

Fourth is the calling of the resource from code.

When you say use to BasicDataSource to see thw no. of active connections  is 
this you application or something built into Tomcat?

Doug

- Original Message - From: micky none [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Wednesday, January 19, 2005 4:54 PM
Subject: Re: Re: ConnectionPooling


Tried that too my friend,isn't there any sure shot answer for this one..im 
like half mad after this...as of now.


On Thu, 20 Jan 2005 Harry Mantheakis wrote :
This may not help, but try swapping the order of the ResourceParams and
Resource elements in your 'server.xml' file.

Also, you seem to be declaring the DefaultContext element three times (!)
which seems wrong.

HTH

Harry Mantheakis


  Hi Friends,
  This is my first message on this list.I want to use the dbcp connection
  pooling.I set up the server.xml according to an example,but when i  
  trying to
  use to BasicDataSource to see thw no. of active connections it's  throwing
  errors.I tried searching a lot but to no use.If I go into the  
  administrator
  tool,it shows nothing there?I am using tomcat5.0..please tell me ..where  
  i am
  going wrong and if there is any other way to see the number of active
  connections.
 
 
  Here's my server.xml,please tell me if there's anything wrong with it:
 
  Logger className=org.apache.catalina.logger.FileLogger  
  directory=logs
  prefix=localhost_log. suffix=.txt timestamp=true /
  DefaultContext reloadable=true /
  DefaultContext path=/database docBase=database debug=0
  reloadable=true /
  - DefaultContext
  - ResourceParams name=jdbc/conversion
  - parameter
  nameusername/name
  value/value
  /parameter
  - parameter
  namepassword/name
  value/value
  /parameter
  - parameter
  namedriverClassName/name
  valuecom.ibm.db2.jcc.DB2Driver/value
  /parameter
  - parameter
  nameurl/name
  valuejdbc:db2j:net/value
  /parameter
  - parameter
  nameremoveAbandoned/name
  valuetrue/value
  /parameter
  - parameter
  nameremoveAbandonedTimeout/name
  value0/value
  /parameter
  - parameter
  namelogAbandoned/name
  valuetrue/value
  /parameter
  - parameter
  namemaxActive/name
  value1/value
  /parameter
  - parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter
  /ResourceParams
  Resource name=jdbc/conversion auth=Container  
  type=javax.sql.DataSource
  /
  /DefaultContext
  Loader className=org.apache.catalina.loader.WebappLoader
  loaderClass=org.apache.catalina.loader.WebappClassLoader  
  checkInterval=3
  /
  /Host
 
  please,please,please help me...its very urgent.


-
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: Consolidate webapplications

2005-01-19 Thread Viorel Dragomir
You can use apache on the server with public ip address and use

1. mod_proxy to redirect all incomings to the webservers
ProxyPass /app1/  http://serverx/app1/

or 

2. mod_jk and create a worker for each of your webapplications [if your 
webservers are
tomcats]
http://jakarta.apache.org/tomcat/connectors-doc/index.html



Viorel Dragomir

.
..
---



- Original Message - 
From: Roland Carlsson 
To: TomcatUsers 
Sent: Wednesday, January 19, 2005 10:04
Subject: Consolidate webapplications


Hi!

We have a lot of small webservers running it's own special task, from
router-admins to Outlook Web Access to the company public pages.

All these servers is in a private network with one public ip. Today we have
solved the problems with accessing these webservers from internet by
assigning them different portnumbers but its hard for the users to remember
what application is where.

So, we are looking for a way to proxy our webserver into one portal that
instead of using a filesystem can access other web-servers to get the pages
for the users.

What would be a good way of doing this? Is there any existing products for
this scenario?

Thanks in advance
Roland Carlsson


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


Re: ConnectionPooling

2005-01-19 Thread Viorel Dragomir
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html

You must set a web reference into web.xml too.
And is better that your resource params from server.xml regarding the database 
conection to be written into META-INF/context.xml



Viorel Dragomir

.
..
---



- Original Message - 
From: micky none 
To: Tomcat Users List 
Sent: Wednesday, January 19, 2005 17:35
Subject: ConnectionPooling


Hi Friends,
This is my first message on this list.I want to use the dbcp connection 
pooling.I set up the server.xml according to an example,but when i trying to 
use to BasicDataSource to see thw no. of active connections it's throwing 
errors.I tried searching a lot but to no use.If I go into the administrator 
tool,it shows nothing there?I am using tomcat5.0..please tell me ..where i am 
going wrong and if there is any other way to see the number of active 
connections. 


Here's my server.xml,please tell me if there's anything wrong with it:

Logger className=org.apache.catalina.logger.FileLogger directory=logs 
prefix=localhost_log. suffix=.txt timestamp=true / 
  DefaultContext reloadable=true / 
  DefaultContext path=/database docBase=database debug=0 
reloadable=true / 
- DefaultContext
- ResourceParams name=jdbc/conversion
- parameter
  nameusername/name 
  value/value 
  /parameter
- parameter
  namepassword/name 
  value/value 
  /parameter
- parameter
  namedriverClassName/name 
  valuecom.ibm.db2.jcc.DB2Driver/value 
  /parameter
- parameter
  nameurl/name 
  valuejdbc:db2j:net/value 
  /parameter
- parameter
  nameremoveAbandoned/name 
  valuetrue/value 
  /parameter
- parameter
  nameremoveAbandonedTimeout/name 
  value0/value 
  /parameter
- parameter
  namelogAbandoned/name 
  valuetrue/value 
  /parameter
- parameter
  namemaxActive/name 
  value1/value 
  /parameter
- parameter
  namefactory/name 
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value 
  /parameter
  /ResourceParams
  Resource name=jdbc/conversion auth=Container type=javax.sql.DataSource 
/ 
  /DefaultContext
  Loader className=org.apache.catalina.loader.WebappLoader 
loaderClass=org.apache.catalina.loader.WebappClassLoader checkInterval=3 / 
  /Host

please,please,please help me...its very urgent.

Re: Failin to start tomcat 5.0

2005-01-17 Thread Viorel Dragomir
You may have an already started instance of tomcat on port 8084
So you must check if the port is already open. Maybe somebody else already 
executed tomcat :)

check with
netstat -l
or
telnet localhost 8084



Viorel Dragomir

.
..
---



- Original Message - 
From: hicham 
To: Tomcat user mailing list 
Sent: Monday, January 17, 2005 15:43
Subject: Failin to start tomcat 5.0


Hello
  trying to get to start tomcat 5 under netbeans , I get the following 
exception
thanks for your help


-
Using CATALINA_BASE:   /home/hicham/.netbeans/4.0/jakarta-tomcat-5.0.28_base
Using CATALINA_HOME:   /opt/netbeans-4.0/nb4.0/jakarta-tomcat-5.0.28
Using CATALINA_TMPDIR: 
/home/hicham/.netbeans/4.0/jakarta-tomcat-5.0.28_base/temp
Using JAVA_HOME:   /usr/java/jdk1.5.0_01
Listening for transport dt_socket at address: 11555
Jan 17, 2005 11:57:55 AM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.net.BindException: Address already in use:8084
 at 
org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:264)
 at 
org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:137)
 at 
org.apache.coyote.tomcat5.CoyoteConnector.initialize(CoyoteConnector.java:1429)
 at 
org.apache.catalina.core.StandardService.initialize(StandardService.java:609)
 at 
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:2384)
 at org.apache.catalina.startup.Catalina.load(Catalina.java:507)
 at org.apache.catalina.startup.Catalina.load(Catalina.java:528)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:250)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:424)
Jan 17, 2005 11:57:55 AM org.apache.catalina.startup.Catalina load
SEVERE: Catalina.start
LifecycleException:  Protocol handler initialization failed: 
java.net.BindException: Address already in use:8084
 at 
org.apache.coyote.tomcat5.CoyoteConnector.initialize(CoyoteConnector.java:1431)
 at 
org.apache.catalina.core.StandardService.initialize(StandardService.java:609)
 at 
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:2384)
 at org.apache.catalina.startup.Catalina.load(Catalina.java:507)
 at org.apache.catalina.startup.Catalina.load(Catalina.java:528)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:250)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:424)
Jan 17, 2005 11:57:56 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 4261 ms
Jan 17, 2005 11:57:56 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jan 17, 2005 11:57:56 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.0.28
Jan 17, 2005 11:57:56 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jan 17, 2005 11:57:58 AM org.apache.catalina.core.StandardHost getDeployer
INFO: Create Host deployer for direct deployment ( non-jmx )
Jan 17, 2005 11:57:58 AM org.apache.catalina.core.StandardHostDeployer 
install
INFO: Processing Context configuration file URL 
file:/home/hicham/.netbeans/4.0/jakarta-tomcat-5.0.28_base/conf/Catalina/localhost/balancer.xml
Jan 17, 2005 11:57:59 AM org.apache.catalina.core.StandardHostDeployer 
install
INFO: Processing Context configuration file URL 
file:/home/hicham/.netbeans/4.0/jakarta-tomcat-5.0.28_base/conf/Catalina/localhost/manager.xml
Jan 17, 2005 11:58:00 AM org.apache.catalina.core.StandardHostDeployer 
install
INFO: Processing Context configuration file URL 
file:/home/hicham/.netbeans/4.0/jakarta-tomcat-5.0.28_base/conf/Catalina/localhost/admin.xml
Jan 17, 2005 11:58:01 AM org.apache.struts.util.PropertyMessageResources 
init
INFO: Initializing, config='org.apache.struts.util.LocalStrings', 
returnNull=true
Jan 17, 2005 11:58:01 AM org.apache.struts.util.PropertyMessageResources 
init
INFO: Initializing, config='org.apache.struts.action.ActionResources', 
returnNull=true
Jan 17, 2005 11:58:02 AM org.apache.struts.util.PropertyMessageResources 
init
INFO: Initializing, 
config='org.apache.webapp.admin.ApplicationResources', returnNull=true
Jan 17, 2005 11:58:17 AM

Re: apache + tomcat with 2 domains but same session?

2005-01-11 Thread Viorel Dragomir
Take a look at http://support.softartisans.com/kbview.aspx?ID=666
[first link that i found on google about using cookies on diff subdomains]

Basically you save a cookie unique for each user that with domain .abc.com
Retrieve session vars [the basket in your case] from database via the value of 
this cookie.

I guess there is a way to automatically save the session into database with 
tomcat,
but I don't know anything about this, and retrieve it from two subdomains.

If there is the second solution, I'm interested in more details.


Viorel Dragomir

.
..
---



- Original Message - 
From: Rajaneesh 
To: 'Tomcat Users List' 
Sent: Wednesday, January 12, 2005 07:17
Subject: RE: apache + tomcat with 2 domains but same session?


Good point.

  May be clustring helps! Have not used this concept. 

Regards
Rajaneesh

-Original Message-
From: Simon Lau [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 11, 2005 2:22 PM
To: tomcat-user@jakarta.apache.org
Subject: apache + tomcat with 2 domains but same session?



Hi,

I want to setup my apache to have 2 domains, say aaa.abc.com and
bbb.abc.com.
Both of this domain goes to the same application context, say /myapp
So when i access both
http://aaa.abc.com/myapp/index.jsp
http://bbb.abc.com/myapp/index.jsp
will give me the exact same content, no problem.

My question is how do i persist the session while i switch between
aaa.abc.com and bbb.abc.com?
For example i have a shopping basket storing with 2 products and i want to
access the basket in both aaa.abc.com and bbb.abc.com
Btw, i am using apache2.0.52 + tomcat5.0.28

any comments will be greatly appreciated.

Thanks.
Simon


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


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


Re: Tomcat 5.5 Webapp logging.

2004-12-09 Thread Viorel Dragomir
Maybe the problem is not what the log4j.properties contains but if it is found 
by the package.
Try to put this file in System.getProperties().get(user.dir) [ the package 
itself is located in WEB-INF/lib ]



Viorel Dragomir

.
..
---



- Original Message - 
From: Dale, Matt 
To: Tomcat Users List 
Sent: Thursday, December 09, 2004 18:00
Subject: RE: Tomcat 5.5 Webapp logging.


Hi,

I can't even get it to create the log file and see no log4j related messages in 
the catalina.out. Below is my log4j.properties which is in common/classes

log4j.rootLogger=debug, R
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=/usr/local/jakarta/tomcat-5.5.4/logs/tomcat.log
log4j.appender.R.MaxFileSize=100MB
log4j.appender.R.MaxBackupIndex=10
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
log4j.logger.org.apache.catalina=DEBUG, R

I have put log4j-1.2.9.jar in common lib.

I would have thought that at least the file would be created even if nothing 
was in it.

Any ideas?

Ta
Matt

-Original Message-
From: Dale, Matt 
Sent: 09 December 2004 15:41
To: Tomcat Users List
Subject: RE: Tomcat 5.5 Webapp logging.



That's the one I tried but never got too far. I'll give it a another whirl and 
it should cut down on the errors from the 3rd party app in the short term and 
as long as they aren't in catalina.out i'll be happy.

Ta
Matt


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: 09 December 2004 15:18
To: Tomcat Users List
Subject: RE: Tomcat 5.5 Webapp logging.



Hi,
The example in http://jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html is 
a decent start.  Since your goal is to reduce messages being output to the log, 
at least for this 3rd party application, add a line like
log4j.logger.rootPackageOf3rdPartyApp = WARN
to the sample file at the above URL, and you should be all set.

Yoav Shapira http://www.yoavshapira.com

-Original Message-
From: Dale, Matt [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 09, 2004 10:14 AM
To: Tomcat Users List (E-mail)
Subject: Tomcat 5.5 Webapp logging.

Hi, 
We have a 3rd party application which has a nasty habit of chucking out a load 
of messages to stdout and stderr. 
Up until tomcat 5 we used a console Logger with swallowOutput turned on to 
catch all that output so it didnt end up in catalina.out.
Obviously in 5.5 this is not possible and Log4J seems to be the way to go. I've 
tried this but not having much luck. I think it's just that I don't understand 
the log4j.properties file.
Could someone perhaps post a sample that would do roughly what I need and I can 
tweak it from there. 
Ta 
Matt 



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: JDK Logging...

2004-11-16 Thread Viorel Dragomir
Log4j does the job.

http://logging.apache.org/log4j/docs/



Viorel Dragomir

.
..
---



- Original Message - 
From: Shilpa Nalgonda 
To: Tomcat Users List 
Sent: Tuesday, November 16, 2004 17:48
Subject: JDK Logging... 


Can anyone suggest me how to write to different log files using JDK
Logging..
i.e., a logger for important info, a logger for errors, loggers for
systemerors,


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


Tomcat Listener [?]

2004-10-27 Thread Viorel Dragomir
Hi,

Can I create a service that runs every ten minutes within Tomcat ?
This class can also have to listen for messages at a specific port. [I can use a 
servlet but I am interested if I can wait for
messages at another port.]

In the mean time I'll search for a solution for this kind of app.

If you know that this specs can be done in an application server say so, and I'll 
search other realms.



Viorel Dragomir

.
..
---




Re: Tomcat Listener [?]

2004-10-27 Thread Viorel Dragomir
Yes.
And I think I'm going to stick to Frerk Meyer's solution about using cron. [Thanks for 
the link too.]
I don't know yet if a standalone server wich will listen without any help from tomcat 
to a port is more suited to this job.

The main problem is that I don't want too many requests to that servlet and will be a 
lot of requests.
The servlet is like erasing files from a folder [is not doing that, but is the same 
idea] for a request.
I don't want to try to erase the same folder 1000 times..





Viorel Dragomir

.
..
---


- Original Message - 
From: Steve Kirk 
To: 'Tomcat Users List' 
Sent: Wednesday, October 27, 2004 14:26
Subject: RE: Tomcat Listener [?]


Are you saying that you have a regular webapp on one port (e.g. 8080) and
want this service to do something for that webapp every 10 mins, as well as
listen for messages on another port?

 -Original Message-
 From: Viorel Dragomir [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday 27 October 2004 11:55
 To: [EMAIL PROTECTED]
 Subject: Tomcat Listener [?]
 
 
 Hi,
 
 Can I create a service that runs every ten minutes within Tomcat ?
 This class can also have to listen for messages at a specific 
 port. [I can use a servlet but I am interested if I can wait for
 messages at another port.]
 
 In the mean time I'll search for a solution for this kind of app.
 
 If you know that this specs can be done in an application 
 server say so, and I'll search other realms.
 
 
 
 Viorel Dragomir
 
 .
 ..
 ---
 
 
 



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


Re: JNDI DataSource GlobalResources problem

2004-10-26 Thread Viorel Dragomir
Hi

Review current docs from jakarta project regarding jndi config.
I personally disagree with your conclusion, setting server.xml is not such a good idea.

So here what I've done, maybe it will help you.

First set the webapp/[your-app]/META-INF/context.xml

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

 ResourceParams name=jdbc/postgres

 parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter

 parameter
namedriverClassName/name
valueorg.postgresql.Driver/value
/parameter

 parameter
nameurl/name
valuejdbc:postgresql://localhost/database/value
/parameter

 parameter
nameusername/name
valuepostgres/value
/parameter

 parameter
namepassword/name
value/
/parameter

 parameter
namemaxActive/name
value20/value
/parameter

 parameter
namemaxIdle/name
value10/value
/parameter

 parameter
namemaxWait/name
value-1/value
/parameter

 parameter
nameremoveAbandoned/name
valuetrue/value
/parameter

 parameter
nameremoveAbandonedTimeout/name
value60/value
/parameter

 parameter
namelogAbandoned/name
valuetrue/value
/parameter
/ResourceParams

/context

Now add to webapp/[web-app]/WEB-INF/web.xml

web-app

resource-ref
descriptionpostgreSQL Datasource example/description
res-ref-namejdbc/postgres/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref
...
/web-app

I use pg74.215.jdbc2ee.jar located in webapp/[web-app]/WEB-INF/lib/

You can get a connection through Tomcat [don't use main() to test this because it 
won't work] using this kind of code:


Context initContext = new InitialContext();
Context envContext  = (Context)initContext.lookup(java:/comp/env);
DataSource ds = (DataSource)envContext.lookup(jdbc/postgres);
conn = ds.getConnection();


I actually think is not so hard to implement it.
Hope you can use some of this..
As you can see it was for postgresql and localhost, but you can change as you need.




Viorel Dragomir




- Original Message - 
From: Roland Carlsson 
To: TomcatUsers 
Sent: Tuesday, October 26, 2004 17:55
Subject: Sv: JNDI DataSource GlobalResources problem


Thank you very much for your help. I appreciate it very much.

I feel that the GlobalNamingResources is the place to put my
DataSource-definition since there I can do it one time for all web-apps that
are going to come and go. If there are any change is our databases it is one
place to change. Thats why I ran for that alternative.

I'm looking forward to see the new documentation about DBCP in Tomcat.

Regards
Roland Carlsson


Den 04-10-26 14.58, skrev Steve Kirk [EMAIL PROTECTED]:

 
 This question illustrates (IMHO) probably the biggest issue of confusion
 with regard to DBCP - that is, there are several XML elements that you can
 potentially use, and several places that you can potentially put them.
 Specifically, the Resource, ResourceParams and ResourceLink elements
 can go in server.xml or your webapp's context config file, and
 resource-ref can go in your web.xml file.  Most people that have DBCP
 problems seem to have trouble working out elements to use, and where to put
 them.  A quick search on the web shows that this issue is widely
 misunderstood, and there is lots of misinformation out there.
 
 There are actually several possibilities that work.  I have not chosen the
 same possibility as you Roland, but hope I can help.  The how-to pages
 linked earlier by Shinobu and me are also good points of reference, and if
 you follow them _exactly_ it will work.  I belive that the simplest and
 clearest page to follow is this one:
 http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html -
 I think the JDBC page contains at least one slightly misleading instruction.
 
 To answer your question, yes you have used resource-ref correctly and your
 Resource and ResourceParams elements seem OK.
 
 However, note that you have not followed the recommended approach in the
 how-to docs ;) because your Resource and ResourceParams are under
 GlobalNamingResources rather than your webapp's Context tag.  However
 that does not make it completely wrong.  Because they are under
 GlobalNamingResources at the moment, they are not visible to your webapp.
 To fix this, either they need to be moved under Context as recommended in
 the how-to, or you need to add a ResourceLink under your webapp's
 Context that refers to them.
 
 The Context that I am referring to should be either under Host in
 server.xml as described in the how-to docs, or in your webapp's context
 config file (see my example below).
 
 Strictly speaking, according to the JNDI how-to docs, I think your
 Resource tag is not needed because you have a resource-ref, which is
 equivalent, and you do not need both.  Having said that, I have tried it
 both with and without the Resource tag, and both approaches work as long
 as resource-ref is in web.xml.
 
 For what it's worth

Re: jdbc pool

2004-10-22 Thread Viorel Dragomir
Follow 
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations
 
closely.




Viorel Dragomir

.
..
---
vioss was here


- Original Message - 
From: kangkoong Kakoong 
To: Tomcat Users List 
Sent: Friday, October 22, 2004 10:52
Subject: jdbc pool


when I compile using jdbc pool the following error
show:

javax.servlet.ServletException: Name jdbc is not bound
in this Context
VerifyLogin.doPost(Unknown Source)

javax.servlet.http.HttpServlet.service(HttpServlet.java:763)

javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

root cause

javax.naming.NameNotFoundException: Name jdbc is not
bound in this Context

org.apache.naming.NamingContext.lookup(NamingContext.java:815)

org.apache.naming.NamingContext.lookup(NamingContext.java:185)

org.apache.naming.NamingContext.lookup(NamingContext.java:826)

org.apache.naming.NamingContext.lookup(NamingContext.java:185)

org.apache.naming.NamingContext.lookup(NamingContext.java:826)

org.apache.naming.NamingContext.lookup(NamingContext.java:198)

org.apache.naming.SelectorContext.lookup(SelectorContext.java:183)

javax.naming.InitialContext.lookup(InitialContext.java:347)
VerifyLogin.doPost(Unknown Source)

javax.servlet.http.HttpServlet.service(HttpServlet.java:763)

javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

What is that mind?

Thanks in advance



___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

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


Re: accessing a database ...

2004-08-10 Thread Viorel Dragomir
Hi,

I have no ideea if this is really possible, but I want to clarify for myself.

If tomcat runs as a service, do you think that it might have permissions problem with 
reading the DSN entry?



--
viorel

- Original Message - 
From: Vassilis Atlamazoglou 
To: Tomcat Users List 
Sent: Tuesday, August 10, 2004 11:57
Subject: Re: accessing a database ...


I run it as standalone ...

and the error message was ...

java.sql.SQLException: General error
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6987)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:3074)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:323)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:174)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at DisplayServ.doPost(DisplayServ.java:55)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:700)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:683)
at java.lang.Thread.run(Thread.java:534)
BUT when I changed toClass.forName(sun.jdbc.odbc.JdbcOdbcDriver);
Connectionc=DriverManager.getConnection(jdbc:odbc:Driver={MicrosoftAccess
Driver (*.mdb)};DBQ=C:\\vatlam\\db\\odbc_exmp.mdb);IT WORKED!Is there a
similar way to bypass the problem for the case of the MS SQL server ?V


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


Re: Binary distribution for Linux?

2004-08-02 Thread Viorel Dragomir
Please see the download page from tomcat.
Tomcat is written in java, so the windows distribution works in linux too. There are 
different shell scripts to run for each platform.

google.com is free for commercial or individual use
check it out
  - Original Message - 
  From: Jérôme Duval 
  To: 'Tomcat Users List' 
  Sent: Monday, August 02, 2004 15:53
  Subject: Binary distribution for Linux?


  Is there a binary distribution for Linux (ie a Windows Installer-type
  interface)? Or do I have to build it myself?


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


Re: Stopping takes ages

2004-07-29 Thread Viorel Dragomir
Hi Christina,

Regarding the Warp connector, if you don't need that servlets can be served from an 
apache webserver you can disable it from server.xml Anyway you have to change that 
connector to jk2 (or at least jk)..
Some infos are here 
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/connectors.html

The access_log from $CATALINA_HOME/logs contains some informations regarding what 
information is exchanged. You can use this if you know when a servlet finishes without 
any output to the client.

Viorel

--
Ce mica este lumea :)
  - Original Message - 
  From: Christina Androne 
  To: Tomcat Users List 
  Sent: Thursday, July 29, 2004 18:23
  Subject: Re: Stopping takes ages


  Dale, Matt wrote:

  Yes those look like the right ones. Are you using apache as the webserver? If so 
which module are you using to send the requests to tomcat?
  

  
  The webserver is Tomcat only.

  (Apache is installed on that machine though, but I never start it)


  Christina

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


Re: can a virtual host have its own privatly used SSL certificate?

2004-07-15 Thread Viorel Dragomir
Hi,

As I know, in order to use ssl on the tomcat, or apache you must make additional 
configurations regarding the webserver. Add modules and changing webserver 
configuration files.

If you don't have the right to make this changes you can't have ssl.

If you find a example more usefull.. If you can write a cd with Nero but without the 
cd-writer I guess you can make your webserver works without ssl module but with ssl 
certificate. 

Good luck,
viorel
  - Original Message - 
  From: Guy Katz 
  To: 'Tomcat Users List' 
  Sent: Thursday, July 15, 2004 12:55
  Subject: RE: can a virtual host have its own privatly used SSL certificate?


  thanks but are you sure?
  i read some more and got the impression that when using apache+tomcat with
  ip based virtual hosting this can be achieved.
  did i misunderstood?
  thanks

  -Original Message-
  From: Graham Leggett [mailto:[EMAIL PROTECTED]
  Sent: Thursday, July 15, 2004 10:49 AM
  To: Tomcat Users List
  Subject: Re: can a virtual host have its own privatly used SSL certificate?


  Guy Katz wrote:

   i am going to put my application in  a shared hosting solution which does
   not provide any shared SSL support.
   is it possible to buy and put a SSL certificate in the scope of my virtual
   host in the hosting company. (i mean is it technically possible -
   disregarding the hosting company policy).

  Technical short answer: no.

  Regards,
  Graham
  --

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


JNDI / pooling

2004-07-09 Thread Viorel Dragomir
Hi,

I can't describe exactly the problem because I'm not familiar with all the terms... 
But the big picture is that I want to create a pool of ftp connections to work like a 
database connection and I want to get the connection from JNDI.


So far I extended BaseKeyedPoolableObjectFactory and StackKeyedObjectPool and it works 
fine like this:

FTPConnectionPool pool = new FTPConnectionPool();
String key = key;
try{
FTPClient ftp = pool.borrowClient(key);
if( ftp.sendNoOp() ){
System.out.println(OK);
}else{
System.out.println(NOPE);
}

pool.returnClient( key, ftp );
}catch(Exception ex){
ex.printStackTrace();
}

But I want to make it work from JNDI almost like a datasource
InitialContext ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup(java:comp/env/jdbc/backup);

Anyway I am completely lost if it can be done or not.
So far I get an exception when I try to start Tomcat:

GlobalResourcesLifecycleListener: Exception processing Global JNDI Resources
javax.naming.NamingException: Could not create resource factory instance, null
at 
org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:146)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
at org.apache.naming.NamingContext.lookup(NamingContext.java:834)
at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
 

regards,
viorel