Re: Clusterning tomcat app server for production use

2012-09-11 Thread Ashish Kulkarni
HI
Which one is better for clustering tomcat in production environment


   - mod_jk the classic Apache/Tomcat module
   - mod_proxy another Apache module


On Tue, Sep 11, 2012 at 9:07 AM, Mark Thomas  wrote:

>
>
> Ashish Kulkarni  wrote:
>
> >Hi
> >I was looking into clusterning 2 instances of tomcat with apache server
> >for
> >production use, i ran into this blog and was able to configure tomcat
> >and
> >apache and is working fine,
> >
> >Can you please go through this blog and let me know if this is
> >production ready
>
> Almost certainly not.
>
> > or do i need to do some thing more for production
>
> Almost certainly yes.
>
> For starters, read this:
> http://www.catb.org/esr/faqs/smart-questions.html
>
> Mark
>
> >
> http://www.richardnichols.net/2010/08/5-minute-guide-clustering-apache-tomcat/
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


Re: Error configuring JNDIRealm in tomcat 6.0.2 in eclipse, trying to connect to localhost:389

2012-02-14 Thread Ashish Kulkarni
I have another question, how can i configure in web.xml so that all roles
has authority to login, then in my application i control what is displayed
to the user?

Ashish

On Tue, Feb 14, 2012 at 5:11 PM, Ashish Kulkarni <
ashish.kulkarn...@gmail.com> wrote:

> Hi
> Thanks very much, as i removed extra n it worked fine,
>
>
>
> On Tue, Feb 14, 2012 at 4:48 PM, Konstantin Kolinko <
> knst.koli...@gmail.com> wrote:
>
>> 2012/2/15 Ashish Kulkarni :
>> > I am trying to configure JNDIRealm in tomcat running as eclipse plugin,
>> so
>> > i copied ldap.jar in to lib folder, then modified server.xml in my
>> eclipse
>> > like below
>> >
>> > > >>  connnectionURL="ldap://myldap.com:389";
>> >>  alternateURL="ldap://myldap.com:389";
>> >>  connectionName="CN=user,OU=Enterprise Users,DC=tauck,DC=com"
>> >>  connectionPassword="password"
>> >>  userBase="OU=All Objects,DC=tauck,DC=com"
>> >>  userSearch="(name={0})"
>> >>  userSubtree="true"
>> >>  roleBase="OU=roles,OU=Application Roles,DC=tauck,DC=com"
>> >>  roleName="cn"
>> >>  roleSearch="(member={0})"
>> >>  roleSubtree="true"
>> >> />
>> >
>> >
>> > In my log file i see it is trying to connect to localhost:389, i dont
>> > understand what i am missing
>>
>> Verify that all attributes that you are use are spelled exactly as in
>> documentation.
>>
>> There is no attribute named "connnectionURL" (with three 'n' characters).
>>
>> There should be a warning in the logs about failing to assign value to
>> an attribute. Recent versions of Tomcat 6 would print one when parsing
>> server.xml, but I do not know what version of 6.0.x you are using.
>>
>>
>> >
>> > Feb 14, 2012 4:17:01 PM org.apache.catalina.realm.JNDIRealm open
>> >> WARNING: Exception performing authentication
>> >> javax.naming.CommunicationException: localhost:389 [Root exception is
>> >> java.net.ConnectException: Connection refused: connect]
>>
>> Best regards,
>> Konstantin Kolinko
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
>
>
> --
> Ashish
> www.ayurwellness.com
> www.mysoftwareneeds.com
>



-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


Re: Error configuring JNDIRealm in tomcat 6.0.2 in eclipse, trying to connect to localhost:389

2012-02-14 Thread Ashish Kulkarni
Hi
Thanks very much, as i removed extra n it worked fine,



On Tue, Feb 14, 2012 at 4:48 PM, Konstantin Kolinko
wrote:

> 2012/2/15 Ashish Kulkarni :
> > I am trying to configure JNDIRealm in tomcat running as eclipse plugin,
> so
> > i copied ldap.jar in to lib folder, then modified server.xml in my
> eclipse
> > like below
> >
> >  >>  connnectionURL="ldap://myldap.com:389";
> >>  alternateURL="ldap://myldap.com:389";
> >>  connectionName="CN=user,OU=Enterprise Users,DC=tauck,DC=com"
> >>  connectionPassword="password"
> >>  userBase="OU=All Objects,DC=tauck,DC=com"
> >>  userSearch="(name={0})"
> >>  userSubtree="true"
> >>  roleBase="OU=roles,OU=Application Roles,DC=tauck,DC=com"
> >>  roleName="cn"
> >>  roleSearch="(member={0})"
> >>  roleSubtree="true"
> >> />
> >
> >
> > In my log file i see it is trying to connect to localhost:389, i dont
> > understand what i am missing
>
> Verify that all attributes that you are use are spelled exactly as in
> documentation.
>
> There is no attribute named "connnectionURL" (with three 'n' characters).
>
> There should be a warning in the logs about failing to assign value to
> an attribute. Recent versions of Tomcat 6 would print one when parsing
> server.xml, but I do not know what version of 6.0.x you are using.
>
>
> >
> > Feb 14, 2012 4:17:01 PM org.apache.catalina.realm.JNDIRealm open
> >> WARNING: Exception performing authentication
> >> javax.naming.CommunicationException: localhost:389 [Root exception is
> >> java.net.ConnectException: Connection refused: connect]
>
> Best regards,
> Konstantin Kolinko
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


Re: Certificate issued by GeoTrust Global CA is not appearing at client browser's side

2011-11-17 Thread Ashish Kulkarni
I had to deal with this issue in Websphere, got Thwate certificate and no
matter what i was not able to get the primary and secondary certificate to
work in IE browser, only in Firefox and chrome, finally i got a certificate
from Verisign and it works well in IE and chrome but not in firefox, this
certificate business is very murky with these companies making deals with
browser companies and making our life difficult,
I bet If you add the primary and intermediate certificate to IE browser it
will work fine, if there is another web service who needs to call this then
that web service must know all the 3 certificates to authenticate your
certificate



On Thu, Nov 17, 2011 at 9:26 AM, Daniel Mikusa  wrote:

>
> On Thu, 2011-11-17 at 05:02 -0800, rosiere wrote:
> > Hello,
> >
> > Of course I restarted my Tomcat.
>
> No offense meant, had to ask.  Can't assume anything.
>
> >
> > This is the SSL portion of my server.xml and it has noting wrong.
> >
> >
> >  >maxThreads="150" scheme="https" secure="true"
> >keystoreFile="$pathToMyKeystoreFile"
> >keyAlias="tomcat"
> >keystorePass="tomcat"
> >clientAuth="false" sslProtocol="TLS" />
> >
>
> Yes, agreed.  Looks fine assuming that "$pathToMyKeystoreFile" points to
> the correct keystore file.
>
>
> What do you see in the output of "keytool -list -v -keystore
> $pathToMyKeystoreFile"?  In particular, what is listed for "Alias
> name:", "Entry type:" and "Certificate chain length" for each entry?
>
>
> Dan
>



-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


Re: ODBC jar files

2011-10-20 Thread Ashish Kulkarni
If there are common classes it will be very hard to tell which one will be
loaded by class loader

check this document,
http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html



On Thu, Oct 20, 2011 at 3:00 PM, Propes, Barry L wrote:

> Sorry for any confusion there - I meant tomcat/lib, not WEB-INF/lib.
>
> Ok, I imagine that is a problem  then. I haven't perused both jars, but I
> imagine there's some redundancy in there!
>
> Thanks.
>
> -Original Message-
> From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
> Sent: Thursday, October 20, 2011 12:46 PM
> To: Tomcat Users List
> Subject: RE: ODBC jar files
>
> > From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
> > Subject: ODBC jar files
>
> > Will it hurt to have two different odbc jar files in the lib folder?
>
> Which lib folder are you referring to?  Tomcat's lib folder, or WEB-INF/lib
> of the webapp?
>
> If any class names are common to both jars, you *will* run into trouble.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


Re: calling HTTPS URL from tomcat in eclipse fails with unable to find valid certification path to requested target Error

2011-09-09 Thread Ashish Kulkarni
Hi
It worked, i added following lines in tomcat configuration

-Djavax.net.ssl.trustStore=C://mypath_to_keystore/keys.jks


Ashish


On Fri, Sep 9, 2011 at 3:25 PM, Ashish Kulkarni  wrote:

> Hello
>
> I have an web application which i am running in tomcat in eclipse, this web
> application calls a Web Service to get data, recently we moved these Web
> services to use HTTPS, but when i try to call this HTTPS URL from web
> service i get following error
>
> I have created a key store, added it to tomcat and then added this
> certificate to this key store in tomcat, but it is not working
>
> Any ideas, about how can i get this certificate imported in tomcat, or do i
> have to import it in java, how do i do it
>
> Caused by: sun.security.validator.ValidatorException: PKIX path building
> failed: sun.security.provider.certpath.SunCertPathBuilderException: unable
> to find valid certification path to requested target
>  at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:221)
> at
> sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:145)
>  at sun.security.validator.Validator.validate(Validator.java:203)
> at
> com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:172)
>  at
> com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(SSLContextImpl.java:320)
> at
> com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:841)
>  ... 68 more
> Caused by: sun.security.provider.certpath.SunCertPathBuilderException:
> unable to find valid certification path to requested target
>  at
> sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:236)
> at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:194)
>  at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:216)
>
>
> --
> Ashish
> www.ayurwellness.com
> www.mysoftwareneeds.com
>



-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


calling HTTPS URL from tomcat in eclipse fails with unable to find valid certification path to requested target Error

2011-09-09 Thread Ashish Kulkarni
Hello

I have an web application which i am running in tomcat in eclipse, this web
application calls a Web Service to get data, recently we moved these Web
services to use HTTPS, but when i try to call this HTTPS URL from web
service i get following error

I have created a key store, added it to tomcat and then added this
certificate to this key store in tomcat, but it is not working

Any ideas, about how can i get this certificate imported in tomcat, or do i
have to import it in java, how do i do it

Caused by: sun.security.validator.ValidatorException: PKIX path building
failed: sun.security.provider.certpath.SunCertPathBuilderException: unable
to find valid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:221)
at
sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:145)
at sun.security.validator.Validator.validate(Validator.java:203)
at
com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:172)
at
com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(SSLContextImpl.java:320)
at
com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:841)
... 68 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target
at
sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:236)
at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:194)
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:216)


-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


Re: Save session information in Memory database

2011-09-09 Thread Ashish Kulkarni
Hi
I will look into Ehcache, but will this manage data we save in session,
because i dont have time to change code, but try to move the session data
out of tomcat, and into a database,

Ashish

On Fri, Sep 9, 2011 at 2:52 PM, Bob Hall  wrote:

>
> 
> From: Ashish Kulkarni 
> To: Tomcat Users List 
> Sent: Friday, September 9, 2011 11:38 AM
> Subject: Re: Save session information in Memory database
>
> Hi
> I have inherited this application, and it was developed this way, i dont
> have time and resources to analyze this application to start removing data
> from session, so i am looking for ways to get it working without having to
> go through this process of removing data from session,
> I thought if i could save session information in a database instead of in
> heap it would work, and so in memory database and it would be faster to
> access then regular DB2 database
> So any ideas
> Ashish
>
> --
>
> Ashish,
>
> Have you considered ehcache?   http://ehcache.org/
>
> - Bob
>



-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


Re: Save session information in Memory database

2011-09-09 Thread Ashish Kulkarni
Hi
I have inherited this application, and it was developed this way, i dont
have time and resources to analyze this application to start removing data
from session, so i am looking for ways to get it working without having to
go through this process of removing data from session,
I thought if i could save session information in a database instead of in
heap it would work, and so in memory database and it would be faster to
access then regular DB2 database
So any ideas
Ashish

On Fri, Sep 9, 2011 at 12:46 PM, Pid  wrote:

> On 09/09/2011 15:58, Ashish Kulkarni wrote:
> > Hi
> >
> > The problem is we are running on 32 bit system and cannot go beyond 1.5
> GB
> > or ram, because of some clients limitations.
> >
> > Is it possible to save session in database, instead of heap memory which
> > would help us, the speed is ok if it slows down a little,
> > That is why i was looking at in memory database instead or conventional
> > database
>
> Do you *really* need to save all of that data in the session?
>
>
> p
>
>
> > Regards
> > Ashish
> >
> > On Fri, Sep 9, 2011 at 10:50 AM, Caldarale, Charles R <
> > chuck.caldar...@unisys.com> wrote:
> >
> >>> From: Ashish Kulkarni [mailto:ashish.kulkarn...@gmail.com]
> >>> Subject: Re: Save session information in Memory database
> >>
> >>> What do you mean it will slow down?
> >>
> >> You would be making requests across a wire rather than reads and writes
> to
> >> memory.
> >>
> >>> we go about 1 GB of ram and Tomcat starts running out
> >>> of heap memory
> >>
> >> So what stops you from configuring a larger heap?  RAM is cheap and
> 64-bit
> >> operating environments are plentiful.
> >>
> >>  - Chuck
> >>
> >>
> >> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> >> MATERIAL and is thus for use only by the intended recipient. If you
> received
> >> this in error, please contact the sender and delete the e-mail and its
> >> attachments from all computers.
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>
> >>
> >
> >
>
>
>


-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


Re: Save session information in Memory database

2011-09-09 Thread Ashish Kulkarni
Hi

The problem is we are running on 32 bit system and cannot go beyond 1.5 GB
or ram, because of some clients limitations.

Is it possible to save session in database, instead of heap memory which
would help us, the speed is ok if it slows down a little,
That is why i was looking at in memory database instead or conventional
database


Regards
Ashish

On Fri, Sep 9, 2011 at 10:50 AM, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:

> > From: Ashish Kulkarni [mailto:ashish.kulkarn...@gmail.com]
> > Subject: Re: Save session information in Memory database
>
> > What do you mean it will slow down?
>
> You would be making requests across a wire rather than reads and writes to
> memory.
>
> > we go about 1 GB of ram and Tomcat starts running out
> > of heap memory
>
> So what stops you from configuring a larger heap?  RAM is cheap and 64-bit
> operating environments are plentiful.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


Re: Save session information in Memory database

2011-09-09 Thread Ashish Kulkarni
What do you mean it will slow down?

We have an application which saves about 5 MB of data in session when user
is working with some portion of application, so when about 200 users login
we go about 1 GB of ram and Tomcat starts running out of heap memory, as all
the session data goes in heap memory,

So i was hoping if i can persist the data in database, then i can free up
some heap memory from tomcat.

Will this work? or tomcat will have session in Heap Memory only even if i
prefer to persist to write it in database

Ashish

On Thu, Sep 8, 2011 at 5:16 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Ashish,
>
> On 9/8/2011 2:17 PM, Ashish Kulkarni wrote:
> > Has anyone configured tomcat to save session information in memory
> > database like java DB or hsqldb,
>
> I'm sure it can be done, as Tomcat provides
> org.apache.catalina.session.JDBCStore for use with the PersistentManager.
>
> On the other hand, if you're going to use an in-memory database, why
> bother configuring it at all? It will just slow you down IMO.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk5pMKcACgkQ9CaO5/Lv0PCaTQCgsd2LFfmaa5MhhlDexq9UXBfZ
> l0oAniPxSwQRV5L0l65QH0sNsaJ91CeX
> =H3ho
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


Re: How to set start up sequence of application in tomcat

2010-09-15 Thread Ashish Kulkarni
Hi
So there is no way of doing it through tomcat, how can i do it?

Ashish

On Wed, Sep 15, 2010 at 3:47 PM, Mark Thomas  wrote:

> On 15/09/2010 20:43, Ashish Kulkarni wrote:
> > Hi
> > I have deployed 3 applications in tomcat, is there a way to setup startup
> > sequence of these applications in tomcat, for example if i have test,
> test1,
> > test2 as application then i would like to start test2 first, test1 second
> > and test last, as test needs some information from test1.
> >
> > Any ideas
>
> The only pure configuration way to do this is to define the Context
> elements in server.xml. Contexts will be deployed in the order you
> define them.
>
> Defining Context elements in server.xml has some significant down sides
> that have been discussed plenty of times in the past.
>
> Mark
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


How to set start up sequence of application in tomcat

2010-09-15 Thread Ashish Kulkarni
Hi
I have deployed 3 applications in tomcat, is there a way to setup startup
sequence of these applications in tomcat, for example if i have test, test1,
test2 as application then i would like to start test2 first, test1 second
and test last, as test needs some information from test1.

Any ideas

-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


Re: How to retrieve persisted session

2010-07-20 Thread Ashish Kulkarni
Hi
I am using the default, how do i set session expiry time, i can think of
only 1 place that is in web.xml


   -1
  

Is there any other way


On Tue, Jul 20, 2010 at 10:25 AM, Pid  wrote:

> On 20/07/2010 14:58, Ashish Kulkarni wrote:
> > Hi
> > Where do i set this max age for session? i dont see any thing in document
> > http://tomcat.apache.org/tomcat-6.0-doc/config/manager.html
>
> Have you manually set the session expiry time or are you using the default?
>
>
> p
>
> > Ashish
> >
> > On Mon, Jul 19, 2010 at 6:03 PM, Christopher Schultz <
> > ch...@christopherschultz.net> wrote:
> >
> > Ashish,
> >
> > On 7/19/2010 4:48 PM, Ashish Kulkarni wrote:
> >>>> Is there a way i can save this session cookie, so i can access it
> later?
> > is
> >>>> it possible
> >
> > Set the maxAge of the session to something other than -1 (the default,
> > which means "this cookie will die when the browser shuts down").
> >
> >>>> How does yahoo or gmail keep me signed on for 2-3 days
> >
> > See above.
> >
> > -chris
> >>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>
> >>
>
>
>


-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


Re: How to retrieve persisted session

2010-07-20 Thread Ashish Kulkarni
Hi
Where do i set this max age for session? i dont see any thing in document
http://tomcat.apache.org/tomcat-6.0-doc/config/manager.html

Ashish

On Mon, Jul 19, 2010 at 6:03 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Ashish,
>
> On 7/19/2010 4:48 PM, Ashish Kulkarni wrote:
> > Is there a way i can save this session cookie, so i can access it later?
> is
> > it possible
>
> Set the maxAge of the session to something other than -1 (the default,
> which means "this cookie will die when the browser shuts down").
>
> > How does yahoo or gmail keep me signed on for 2-3 days
>
> See above.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkxEy5YACgkQ9CaO5/Lv0PAZhACfTxY8EWC5c1yhNbwA64AgLPRH
> 9NQAoKxsfFPaqiX/2WHLpZkcg6VAjAAw
> =4ABC
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


Re: How to retrieve persisted session

2010-07-19 Thread Ashish Kulkarni
Hi
Is there a way i can save this session cookie, so i can access it later? is
it possible

How does yahoo or gmail keep me signed on for 2-3 days
Ashish

On Mon, Jul 19, 2010 at 4:43 PM, Mark Thomas  wrote:

> On 19/07/2010 20:48, Ashish Kulkarni wrote:
> > Hi
> > I have configured my tomcat to save session in database as per
> > documentation, and it works as expected i can see the session is saved in
> > database,
> > Now if the user closes the browser, and then reopens i dont want to show
> the
> > login screen but get the session from database and go to the last visited
> > page,
> > how can i retrieve this session from database,
>
> You can't. Once the browser is closed, the session cookie is removed
> from the browser.
>
> Mark
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


How to retrieve persisted session

2010-07-19 Thread Ashish Kulkarni
Hi
I have configured my tomcat to save session in database as per
documentation, and it works as expected i can see the session is saved in
database,
Now if the user closes the browser, and then reopens i dont want to show the
login screen but get the session from database and go to the last visited
page,
how can i retrieve this session from database,
Normally our application checks for session, and a flag in session, if the
flag is on then user id logged in, but in my current application if i open
new browser window, it creates a new session,

any ideas

-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


Re: tomcat datasource, find active connections

2010-07-12 Thread Ashish Kulkarni
Hi
Where do i specify data source factory? i have following setup





On Fri, Jul 9, 2010 at 5:42 PM, Pid  wrote:

> On 09/07/2010 20:03, Ashish Kulkarni wrote:
> > Hi
> > I have following in context.xml, and it works fine.
> > But i would like to find how many active connections are there in data
> > source or how many total connections are there?
> > 1 is it possible to do so?
> >
> > 2 Can i change type javax.sql.DataSource
> > to com.ibm.as400.access.AS400JDBCDataSource, as this has methods to find
> > active connections etc?
>
> Nope.
>
> If you use an appropriate DataSourceFactory that creates a
> AS400JDBCDataSource then you can cast the DataSource that results from
> the calls to JNDI to the one you want.
>
> Or you can use JMX to examine the running Tomcat.
>
>
> p
>
> >  >  type="javax.sql.DataSource"
> >   maxActive="2"
> >   maxIdle="2"
> >   maxWait="3000"
> >   username="user"
> >   password="pass"
> >   driverClassName="com.ibm.as400.access.AS400JDBCDriver"
> >   url="jdbc:as400://1mysystem;date format=iso;time
> > format=iso;errors=basic;trace=false;"
> >   validationQuery="select * from   mytable" />
> >
> >
>
>
>


-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


tomcat datasource, find active connections

2010-07-09 Thread Ashish Kulkarni
Hi
I have following in context.xml, and it works fine.
But i would like to find how many active connections are there in data
source or how many total connections are there?
1 is it possible to do so?

2 Can i change type javax.sql.DataSource
to com.ibm.as400.access.AS400JDBCDataSource, as this has methods to find
active connections etc?




-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


Re: Configure tomcat in my development environment, and save session across restart

2010-02-17 Thread Ashish Kulkarni
Hi
There is no SESSIONS.ser created under, but there is tldCache.ser

C:\App\apache-tomcat-5.5.25\work\Catalina\localhost\[webapp]

I have created a myapp.xml file
under C:\App\apache-tomcat-5.5.25\conf\Catalina\localhost folder, and this
xml file looks like below







On Wed, Feb 17, 2010 at 4:03 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Ashish,
>
> On 2/17/2010 3:32 PM, Ashish Kulkarni wrote:
> > Is it possible to find from log files or some where, what is preventing
> from
> > tomcat not able to persist sessions
>
> I would check logs/catalina.out, logs/localhost_*.log, and anything else
> in the logs/ directory.
>
> > all the classes saved in tomcat
> > are serialized, they implement implements Serializable.
>
> Don't forget that, in order to be serializable, a class must do more
> than merely implement the Serializable interface. All fields must be
> Serializable or transient, or you have to implement the serialization
> methods yourself. Finally, the seralVersionID of the class comes into
> play if you change the structure of the class (members, methods, or
> class name).
>
> > where does tomcat save this serialized data file on PC, i want to see if
> > this is created
>
> CATALINA_BASE/work/[service]/[host]/[webapp]/SESSIONS.ser
>
> > I have switched from tomcat plugin and using tomcat directly and still
> have
> > this error, i created a JSP which simply dumps all the objects in session
> on
> > webpage, before saving any class i have 2 objects in session, as soon as
> i
> > save the class and tomcat restarts and i refresh this jsp page, there are
> no
> > objects in session class.
>
> If you're looking for a more fully-features session snooping JSP, you
> could try mine:
>
> http://www.christopherschultz.net/projects/java/
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkt8WbEACgkQ9CaO5/Lv0PB2xACfY8S19BEjct9bwyln5WbY/Mlq
> aPkAoIUw2Odj2GwaqdxSAzIn9jfRu+2H
> =QRhB
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


Re: Configure tomcat in my development environment, and save session across restart

2010-02-17 Thread Ashish Kulkarni
Hi
Is it possible to find from log files or some where, what is preventing from
tomcat not able to persist sessions, all the classes saved in tomcat
are serialized, they implement implements Serializable.
where does tomcat save this serialized data file on PC, i want to see if
this is created
I have switched from tomcat plugin and using tomcat directly and still have
this error, i created a JSP which simply dumps all the objects in session on
webpage, before saving any class i have 2 objects in session, as soon as i
save the class and tomcat restarts and i refresh this jsp page, there are no
objects in session class.

Ashish

On Tue, Feb 16, 2010 at 4:44 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Ashish,
>
> On 2/16/2010 4:35 PM, Ashish Kulkarni wrote:
> > I use tomcat 5.5.28 for my development in eclipse, when ever i change any
> > class it restarts my tomcat and i loose my session, so i have to go
> through
> > login process to get the session.
> > Is it possible to save this session across restarts, it would be great
> and
> > save me a lot of time in development
>
> The problem isn't that your session isn't being persisted across
> restarts: it's that your session contents are incompatible after the
> restart.
>
> What happens is this:
>
> 1. Your webapp creates an object of a class, say, MyBean v1, and stuffs
> it into the session.
>
> 2. You modify MyBean.java, recompile, and redeploy
>
> 3. Tomcat detects the updated class, saves the sessions to the disk,
>   re-deploys your webapp, and re-loads the sessions from the disk
>
> 4. During re-loading, the object from MyBean v1 tries to load into an
> environment where only MyBean v2 is available, and an exception occurs,
> so the session is not recovered
>
> Possible solutions are to (a) set the serialVersionId of your class or
> (b) write your own serialization methods (see Java serialization howtos
> for that)
>
> The other possibility is that you've got non-serializable objects in the
> session, which will prevent your session from persisting in the first
> place.
>
> Session is persistence is enabled by default, and should work. It's very
> possible that your webapp is interfering with the process.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkt7EaMACgkQ9CaO5/Lv0PALtQCgkfJuYvzGSFK35H1mpG8du0ph
> dlMAoIWeRf32GgPOFteRgEQMm6WhzUoi
> =5ciA
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


Configure tomcat in my development environment, and save session across restart

2010-02-16 Thread Ashish Kulkarni
Hi
I use tomcat 5.5.28 for my development in eclipse, when ever i change any
class it restarts my tomcat and i loose my session, so i have to go through
login process to get the session.
Is it possible to save this session across restarts, it would be great and
save me a lot of time in development

I was reading about manager in tomcat, but did not figure out how to do it,
is there any document or example of configuring this manager,

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

I have
configure tomcat so i can start and stop from eclipse

-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


Re: how to configure tomcat 5.5.28 or tomcat 6.0 and apache 2.2

2010-02-09 Thread Ashish Kulkarni
Thanks, got it working

On Tue, Feb 9, 2010 at 3:32 PM, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:

> > From: Ashish Kulkarni [mailto:ashish.kulkarn...@gmail.com]
> > Subject: how to configure tomcat 5.5.28 or tomcat 6.0 and apache 2.2
> >
> > Is there any document showing how to configure apache 2.2 with tomcat
> > 5.5.28 or tomcat 6.0
>
> Hmmm... I wonder what the Documentation link on the Tomcat home page for
> "Tomcat Connectors" might be...
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


how to configure tomcat 5.5.28 or tomcat 6.0 and apache 2.2

2010-02-09 Thread Ashish Kulkarni
Hi
Is there any document showing how to configure apache 2.2 with tomcat 5.5.28
or tomcat 6.0

-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


Re: save session information

2010-02-03 Thread Ashish Kulkarni
Hi
Is there any document which explains how to do so

Ashish

On Wed, Feb 3, 2010 at 1:49 AM, Mark Thomas  wrote:

> On 03/02/2010 05:28, Ashish Kulkarni wrote:
> > Hi
> > Is it possible with tomcat to save session information in database or
> some
> > where which can be retrieved after restart, for example raisin
> > provides symmetrical
> > session which can be saved to database or file system
>
> Hi. Yes.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


Re: Error starting static Resources, With Network drive

2008-04-09 Thread Ashish Kulkarni
Hi
I did try docBase as //mydrive/test/myproject/WebRoot
where k drive is mapped to //mydrive/test,
but i still get the same error
Is there a specific way to define UNC path in docbase?

Ashish
On 4/9/08, Mark Thomas <[EMAIL PROTECTED]> wrote:
>
> Ashish Kulkarni wrote:
>
> > What may be the reason, is it possible to do so or not?#
> >
>
> http://wiki.apache.org/tomcat/FAQ/Windows
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Error starting static Resources, With Network drive

2008-04-09 Thread Ashish Kulkarni
Hi
I am running tomcat on Windows XP, i have mapped a network drive to this PC
running Tomcat.
Under \conf\Catalina\localhost i created a xml file for specifying document
root
This XML file contains following code




WhereK:\\myproject\WebRoot\\ is the network drive,
I am getting following error when i start tomcat
EVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base K:\myproject\WebRoot does
not exist or is not a readable directory
at
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:140)
at
org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:3848)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4019)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608)
at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535)

If i have the same docBase to local drive like C:\\myproject\WebRoot\\
Then it works,
What may be the reason, is it possible to do so or not?


Ashish


Re: Run multiple instances of tomcat on windows

2007-06-24 Thread Ashish Kulkarni

Hi
The problem i am having is, when i installed second instance of tomcat it
replaced the windows service for the first tomcat, so i have only one tomcat
service in windows,
can i install one more service in tomcat now for the first installed tomcat,
if so how

Ashish

On 6/24/07, Cartman <[EMAIL PROTECTED]> wrote:


On 6/23/07, Ashish Kulkarni <[EMAIL PROTECTED]> wrote:
>
> Hi
> I want to run 2 instance of tomcat on windows server, both of them are
> 5.5.20,
> 1. Is it possible to have them as 2 services so i can stop and start
them
> independently?



yes, each instance run its own service.

2. Do i have to install it twice?


yes, you have

3. Can i use java 1.4.2 for one and java 1.5.0 for other


ok

4. I can setup one tomcat as startup job in windows, but then how do i
make
> sure that all the log files go to stdout.log and stderr.log instead of
on
> the dos window.


you can configure when tomcat write the log, but by default it is the
same.

Is there any step by step document of doing this


I don't think, there are some information but is not explicit.

Ashish
>



--
Gracias.
Atentamente,
Carlos Arturo Trujillo Silva
Ingeniero de Sistemas



Run multiple instances of tomcat on windows

2007-06-23 Thread Ashish Kulkarni

Hi
I want to run 2 instance of tomcat on windows server, both of them are
5.5.20,
1. Is it possible to have them as 2 services so i can stop and start them
independently?
2. Do i have to install it twice?
3. Can i use java 1.4.2 for one and java 1.5.0 for other
4. I can setup one tomcat as startup job in windows, but then how do i make
sure that all the log files go to stdout.log and stderr.log instead of on
the dos window.

Is there any step by step document of doing this

Ashish