Re: Wish: add a header in mail subject

2005-10-08 Thread Kyle



Seak, Teng-Fong wrote:


   Sure, this can be used, but it's not always appropriate.  You see,
my address is at Yahoo and I receive mails in Thunderbird at home.  When
I'm not at home, I read mails in Yahoo mail, of course.  But then I
can't apply any filter (or could I?) because I need them all in the
Inbox so that Thunderbird could fetch them all later on when I'm back
home.  Well, you see the problem?  When I'm using Yahoo mail, if the
mailing-list messages contain the header, I could click on the subject
to sort them.  But now without the header, I've to read through all
message subject to see if there's anything important.

 


Surely Yahoo mail allows you to click on and sort by recipient too?


Set up a Tomcat-User contact in your Yahoo Address Book and all mail 
coming in from Tomcat should display that just like it does in 
Thunderbird, shouldn't it?


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



mod_jk + context don't work ?

2005-10-08 Thread gianni dalmasso
i configured several  html virtual hosts sites with jsps ; (apache 2.0 + 
mod_jk.+ tomcat 5.5.)
- virtual hosting managed by apache (name based virtual host)
- connector ajp13 for all jsps
- if a i create in server.xml : an host www.aaa.com + context infos -- 
everythink works but it's no longer good 
- if i put the site under localhost (i.e adding anything to default server.xml) 
and the context in a $CATALINA_HOME/conf/Catalina/localhost/ file , then : 
1: under the tomcat manager (pure tomcat space) -- it works 

2: if managed by apache -- the jsp cannot be reached.

it seems that the jsp managing passed by apache to tomcat have the bad context.

thanks in advance;

gianni

 

here is the configuration that DON'T work:

--

HTTPD.CONF 

 

Include /var/jakarta-tomcat-5.5.9/conf/mod_jk.conf 

 

MOD_JK.CONF 

. 

NameVirtualHost xx.yy.zz.kk:80

VirtualHost xx.yy.zz.kk:80

Directory /var/www/html/aaa 

DirectoryIndex index.htm index.html index.jsp

/Directory

ServerName www.aaa.com

DocumentRoot /var/www/html/aaa

JkMount /*.jsp ajp13

JkMount /servlet/* ajp13

/VirtualHost

 

SERVER.XML 

the default (appBase is $CATALINA_HOME/conf/webapps)

 

the file : $CATALINA_HOME/conf/Catalina/locahost/aaa.xml 

Context path=aaa(or /aaa)

docBase=/var/www/html/aaa

debug=0

reloadable=true 

/Context

 
 
 


-
Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3

Re: Wish: add a header in mail subject

2005-10-08 Thread Seak, Teng-Fong
Kyle wrote:

 Surely Yahoo mail allows you to click on and sort by recipient too?

Nope.

 Set up a Tomcat-User contact in your Yahoo Address Book and all mail
 coming in from Tomcat should display that just like it does in
 Thunderbird, shouldn't it?

And nope.  You're just guessing it should be, but it's not like
that.  And even if it's like this for Yahoo, the same problem exists for
other users.  Many other ML are using this, so it proves to be a good
solution.  So why not adopting it???

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



hot redeploy now work. locked jsf-impl.jar

2005-10-08 Thread dean
I deploy xsoft.war in webapps directory.  It creates a diretory xsoft and
deploy works.

NEXT, I drop xsoft.war in the webapps directory again.  Tomcat starts
deleting all files from previous deployment but can't delete jsf-impl.jar.
 Because of this, tomcat does not deploy xsoft.war and the xsoft directory
is left empty except this one file.

This was hard to figure out as tomcat logs say nothing about what
happened.  They don't tell you that redeploy failed because tomcat did not
succeed in deleting the first deployment.  It took me forever to figure
out what was going on.

Anyone know why jsf-impl.jar would be locked.  I try to manually delete it
and can't until I shutdown tomcat.  Is tomcat not unlocking the file
correctly after it reads it into the classloader for this app?

thanks for any help on this,  Temporarily I just created an ant script
that stops tomcat, deletes previous xsoft directory, redeploys app and
restarts tomcat but this takes forever.
dean



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



RE: hot redeploy now work. locked jsf-impl.jar

2005-10-08 Thread Mark Thomas
Take a look at http://issues.apache.org/bugzilla/show_bug.cgi?id=10026. It may
be related.

Mark

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Saturday, October 08, 2005 5:20 PM
 To: tomcat-user@jakarta.apache.org
 Subject: hot redeploy now work. locked jsf-impl.jar 
 
 I deploy xsoft.war in webapps directory.  It creates a 
 diretory xsoft and
 deploy works.
 
 NEXT, I drop xsoft.war in the webapps directory again.  Tomcat starts
 deleting all files from previous deployment but can't delete 
 jsf-impl.jar.
  Because of this, tomcat does not deploy xsoft.war and the 
 xsoft directory
 is left empty except this one file.
 
 This was hard to figure out as tomcat logs say nothing about what
 happened.  They don't tell you that redeploy failed because 
 tomcat did not
 succeed in deleting the first deployment.  It took me forever 
 to figure
 out what was going on.
 
 Anyone know why jsf-impl.jar would be locked.  I try to 
 manually delete it
 and can't until I shutdown tomcat.  Is tomcat not unlocking the file
 correctly after it reads it into the classloader for this app?
 
 thanks for any help on this,  Temporarily I just created an ant script
 that stops tomcat, deletes previous xsoft directory, redeploys app and
 restarts tomcat but this takes forever.
 dean
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Anti-Virus.
 Version: 7.0.344 / Virus Database: 267.11.13/124 - Release 
 Date: 07/10/2005
 
 


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



Multipart Request

2005-10-08 Thread Dhiren Bhatia
Hi all,
 I'm having trouble with the HttpServletRequest object if my post contains
multipart data. The request object loses all the parameters set from the
html form.
i.e. request.getParameter(myParam); always returns null. If I remove the
multipart encoding from my form, I see the parameter values.
 If I use the OReilly MultipartRequest, the constructor needs me to set the
directory to save the file in so I cannot make that value dynamic by
receiving it from the HTTP post. I want to receive the dir name where the
file will be saved from the HTML form.
 Any ideas? Hope this makes sense.
 Thanks,
-D


RE: hot redeploy now work. locked jsf-impl.jar

2005-10-08 Thread dean
I am confused.  It looks like they found a way to make tomcat so if the
jars had that problem, tomcat could still handle it, but only put this in
4.x.  It is not in 5.0(ie. the last post in the message).

The weird thing is a friend had the same version but not the same problem.
 I upgraded my jvm to match his also.  Could not figure out what was
wrong?

thanks,
dean

 Take a look at http://issues.apache.org/bugzilla/show_bug.cgi?id=10026. It
 may
 be related.

 Mark

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Saturday, October 08, 2005 5:20 PM
 To: tomcat-user@jakarta.apache.org
 Subject: hot redeploy now work. locked jsf-impl.jar

 I deploy xsoft.war in webapps directory.  It creates a
 diretory xsoft and
 deploy works.

 NEXT, I drop xsoft.war in the webapps directory again.  Tomcat starts
 deleting all files from previous deployment but can't delete
 jsf-impl.jar.
  Because of this, tomcat does not deploy xsoft.war and the
 xsoft directory
 is left empty except this one file.

 This was hard to figure out as tomcat logs say nothing about what
 happened.  They don't tell you that redeploy failed because
 tomcat did not
 succeed in deleting the first deployment.  It took me forever
 to figure
 out what was going on.

 Anyone know why jsf-impl.jar would be locked.  I try to
 manually delete it
 and can't until I shutdown tomcat.  Is tomcat not unlocking the file
 correctly after it reads it into the classloader for this app?

 thanks for any help on this,  Temporarily I just created an ant script
 that stops tomcat, deletes previous xsoft directory, redeploys app and
 restarts tomcat but this takes forever.
 dean



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



 --
 No virus found in this incoming message.
 Checked by AVG Anti-Virus.
 Version: 7.0.344 / Virus Database: 267.11.13/124 - Release
 Date: 07/10/2005




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



SessionListener invoked sometimes and not others

2005-10-08 Thread dean
So after a restart of tomcat, I login and it appears the session is still
valid, so it does not go through my session listener.

I need to be aware of the web application lifecycle and want to grab a
resource when the webapp starts and release when the web app goes away. 
How do I do that?

I was doing this in the SessionListener upon creation of the first session
and releasing when the last session went away.  But since tomcat may be
saving session, I am getting a request and getting a nullpointerexception
now since the resource had not been allocated in web app startup.

How does one deal with this kind of problem?
thanks,
dean


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



RE: Tomcat 5.5.12 and user-agent header

2005-10-08 Thread Richard Mixon
I am just using the standard HTTP connector. This is on my development
workstation so I don't normally run JK and Apache, except for final testing.

On the developer list I did see one mention of user-agent header, but on
closer inspection it appeared to be for a completely different issue.

Thanks - Richard 

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Bill Barker
Sent: Friday, October 07, 2005 10:13 PM
To: tomcat-user@jakarta.apache.org
Subject: Re: Tomcat 5.5.12 and user-agent header


Richard Mixon [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I tested out my application on 5.5.12 yesterday and noticed one small  
anomally. I had a JSP in my sitemesh decorator default.jsp that ends 
up  wrapping the login page for container managed authentication. This 
page  had  a statement
String  _userAgent = request.getHeader(user-agent).toLowerCase();

 It gets a null-pointer exception in 5.5.12, but under 5.5.9 it runs fine. 
 In
 5.5.12, after the login succeeds then the user-agent headers appear to 
 be there just fine, but not on the initial login page.

 Is this a known issue?


It's certainly not a known issue.  It would help a lot if you could tell us
which Connector you are using at the time (e.g. HTTP/1.1, HTTP/1.1-APR,
AJP/1.3, AJP/1.3-APR).

 Thank you - Richard
 




-
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: hot redeploy now work. locked jsf-impl.jar

2005-10-08 Thread Mark Thomas
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 
 I am confused.  It looks like they found a way to make tomcat 
 so if the
 jars had that problem, tomcat could still handle it, but only 
 put this in
 4.x.  It is not in 5.0(ie. the last post in the message).

The functionality has been in 5.5.x for a while. It wasn't back ported to the
5.0.x branch. Development on the 5.0.x branch stopped shortly after the first
stable 5.5.x so it is very unlikely that it ever will. If you are using 5.0.x at
the moment, now might be a good time to move to 5.5.x. You should also note that
there are two anti-locking options, antiJARLocking and antiResourceLocking. Make
sure you read the docs before trying to use them.

Mark


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



RE: SessionListener invoked sometimes and not others

2005-10-08 Thread Mark Thomas
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 So after a restart of tomcat, I login and it appears the 
 session is still
 valid, so it does not go through my session listener.
 
 I need to be aware of the web application lifecycle and want to grab a
 resource when the webapp starts and release when the web app 
 goes away. 
 How do I do that?

Use a ServletContextListener.

Mark


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



Re: SessionListener invoked sometimes and not others

2005-10-08 Thread Dean Hiller
My web app has two servlets. One JSF Faces servlet and another servlet 
for processing AJAX requests from javascript. I want to know when the 
app starts and when the app is done. Is the only way to do this is to 
have a ServletContextListener listening to both those servlets? On the 
first one, I get resources and on the last one being cleaned up, I 
destroy the resources. I guess this works. I just wish I had access to 
the app lifecycle.

thanks,
dean

Mark Thomas wrote:

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
So after a restart of tomcat, I login and it appears the 
session is still

valid, so it does not go through my session listener.

I need to be aware of the web application lifecycle and want to grab a
resource when the webapp starts and release when the web app 
goes away. 
How do I do that?
   



Use a ServletContextListener.

Mark


-
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: SessionListener invoked sometimes and not others

2005-10-08 Thread Dean Hiller

whoops, nevermind.  stupid question I found out after poking around.
dean

Dean Hiller wrote:

My web app has two servlets. One JSF Faces servlet and another servlet 
for processing AJAX requests from javascript. I want to know when the 
app starts and when the app is done. Is the only way to do this is to 
have a ServletContextListener listening to both those servlets? On the 
first one, I get resources and on the last one being cleaned up, I 
destroy the resources. I guess this works. I just wish I had access to 
the app lifecycle.

thanks,
dean

Mark Thomas wrote:

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] So after a 
restart of tomcat, I login and it appears the session is still

valid, so it does not go through my session listener.

I need to be aware of the web application lifecycle and want to grab a
resource when the webapp starts and release when the web app goes 
away. How do I do that?
  



Use a ServletContextListener.

Mark


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

 




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




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



Re: Multipart Request

2005-10-08 Thread James Black
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dhiren Bhatia wrote:
 Hi all,
  I'm having trouble with the HttpServletRequest object if my post contains
 multipart data. The request object loses all the parameters set from the
 html form.
 i.e. request.getParameter(myParam); always returns null. If I remove the
 multipart encoding from my form, I see the parameter values.
  If I use the OReilly MultipartRequest, the constructor needs me to set the
 directory to save the file in so I cannot make that value dynamic by
 receiving it from the HTTP post. I want to receive the dir name where the
 file will be saved from the HTML form.
  Any ideas? Hope this makes sense.

  I had that problem recently, but when I used apache's commons
fileupload class, I got it to work.

  This page may help you.
http://jakarta.apache.org/commons/fileupload/using.html


- --
Corruptisima republica plurimae leges. [The more corrupt a republic, the
more laws.]
Tacitus from Annals III, 116AD
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (MingW32)

iD8DBQFDSI6LJ/zyYkX46joRAl83AJ4nmgA07+ymdRfbDbsrqRsoR3E2ngCfZYVD
9iX9/Z0s1+gfceD7xKDEWP0=
=O9S/
-END PGP SIGNATURE-

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



PoolConnection always build new Connection

2005-10-08 Thread NoKideen
HI, currently I use Pool Connection like this bottom here,
And Works.

Only one Connection is made for every COnnection made
then ...

I tried to recompile for a code changes,

a new connection is built again,
so every recompile DataSource is built, so the old connection is leak, and the 
new code use new connection

what should I do ?
I use tomcat 5.5

thanks ?



Jdbc3PoolingDataSource source = new Jdbc3PoolingDataSource();
source.setDataSourceName(DataSource);
source.setServerName(localhost);
source.setDatabaseName(test);
source.setUser(testuser);
source.setPassword(testpassword);
source.setMaxConnections(10);
new InitialContext().rebind(DataSource, source);

Connection con = null;
try {
DataSource source = (DataSource)new InitialContext().lookup(DataSource);
con = source.getConnection();
// use connection
} catch (SQLException e) {
// log error
} catch (NamingException e) {
// DataSource wasn't found in JNDI
} finally {
if (con != null) {
try { con.close(); } catch (SQLException e) {}
}
}

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



OutOfMemoryException in Tomcat 5.0.28 (when using Thread / ThreadLocal)

2005-10-08 Thread Binildas C
Hi,

We are building a high volume site in Tomcat5.0.28.
Our single Tomcat5.0.28 instance in the Web Farm is
having 10 HTTP Threads. Each HTTP Thread collects
request events in a ThreadLocal. At every 1000
requests (in a particular HTTP Thread) the HTTP Thread
will collect events from the ThreadLocal, sets them in
it's deamon thread (There is one-to-one
correspondance between the number of Tomcat HTTP
Threads and Deamon threads, hence we have 10 Deamon
threads), notifies the deamon thread, and clears the
ThreadLocal. The Deamon thread will pushes the events
to a seperate single process through RMI.

Everything works fine (functional and otherwise) for
the first 1 or 2 hours or so, and then we can see the
Tomcat 5.0.28 Process taking lot of memory and
ultimately we are getting either an
OutOfMemoryException or The Tomcat process stalls!

Our Question is: 
1. Is Tomcat 5.0.28 having a memory problem? 
2. If so, what about other versions of Tomcat?
3. Is this memory problem somehow related to Thread
and/or ThreadLocal Usage?
4. Any work around for this.

Reference:
http://forum.java.sun.com/thread.jspa?messageID=3900219

Thankx in advance

Regards
Binildas C. A.
[ binil_christudasatinfosysdotcom ]
[ Birenjith_Sasidharanatinfosysdotcom ]



__ 
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com

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