Password Protected

2018-01-30 Thread Vicky B
Hi ,

Can i check if (xlx,xlsx, doc )  file is password protected through apache
poi and can i use apache PDFBOX  to check if PDF file is password protected.

-- 



*Thanks & Regards Vickyb*


Re: Tomcat Xml parser issue

2017-11-16 Thread Vicky B
Thanks but the same war works fine is WebSphere and tomcat on Windows it is
just tomcat provided by  Redhat which work different i.e it throws the
exception

On Nov 16, 2017 11:39 PM, "Christopher Schultz" <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Vicky,
>
> On 11/16/17 12:24 PM, Vicky B wrote:
> > It is XML parser (DOM and SAX ) from oracle (doc
> > <https://docs.oracle.com/cd/B10501_01/appdev.920/a96609/arj_xmlparserv
> 2.htm>)
> >
> >
> .
>
> Why do you need a custom XML parser? Why not simply use the one
> bundled with the JRE?
>
> > Why is tomcat using XMLparserv2
>
> Where is the xmlparserv2.jar file? Some badly-behaved libraries
> install themselves as the "system" parser when they are used even if
> they aren't being loaded by the system or application (which doesn't
> mean YOUR application) ClassLoader. If that happens, you can get weird
> problems like this.
>
> > tomcat we have in linux machine is from redhat . Why does tomcat
> > downloaded from apache tomcat site work different form the one
> > provided by REDHat.
>
> Package managers often make adjustments that make sense for their
> environments. I suspect that this problem has less to do with RedHat's
> Tomcat package and more to do with how you deploy your application,
> its libraries, etc.
>
> > how does class loading work in tomcat.
>
> Tomcat sets up a ClassLoader for itself to work in. For each webapp, a
> separate ClassLoader is created for them to work in with the Tomcat
> server ClassLoader as the parent. But the webapp's ClassLoader is a
> "child-first" ClassLoader meaning that classes and libraries bundled
> with the application are preferred when code is executing in the
> application's context.
>
> If you had told us your Tomcat version (or anything else about your
> environment), we might have been able to help more, but you aren't
> providing much in the way of information.
>
> Assuming Tomcat 8.0 (because why not?), here is the explanation for
> how class loading works in Tomcat. Almost as if someone was /trying/
> to make that information available for people looking for it.
>
> https://tomcat.apache.org/tomcat-8.0-doc/class-loader-howto.html
>
> - -chris
>
> > On Thu, Nov 16, 2017 at 8:15 PM, Christopher Schultz <
> > ch...@christopherschultz.net> wrote:
> >
> > Vicky,
> >
> > On 11/16/17 6:53 AM, Vicky B wrote:
> >>>> Hi All,
> >>>>
> >>>> I have application which is using spring , ESAPI and oracle
> >>>> xmlparserv2.jar , this application works fine in my local
> >>>> tomcat on windows  but when i deployed in linux server with
> >>>> linux based apache tomcat i got below error when spring
> >>>> container  was trying to parse  application specific xmls
> >>>>
> >>>> org.apache.catalina.core.StandardContext.listenerStart
> >>>> Exception sending context initialized event to listener
> >>>> instance of class
> >>>> org.springframework.web.context.ContextLoaderListener
> >>>>
> >>>> org.springframework.beans.factory.BeanDefinitionStoreException:
> >>>>
> >>>>
> Parser configuration exception parsing XML from class path
> >>>> resource [spring/spring-context.xml]; nested exception is
> >>>> javax.xml.parsers.ParserConfigurationException: Unable to
> >>>> validate using XSD: Your JAXP provider
> >>>> [oracle.xml.jaxp.JXDocumentBuilderFactory@526ad194] does not
> >>>> support XML Schema. Are you running on Java 1.4 with Apache
> >>>> Crimson? Upgrade to Apache Xerces (or Java 1.5) for full XSD
> >>>> support.
> >>>>
> >>>>
> >>>> when i removed xmlparserv2.jar from my war file the
> >>>> application worked fine , what is the issue is this due to
> >>>> class loading issue or could be possible reason for this
> >>>> issue . Does tomcat provide xml parser which spring loads.
> >
> > What is xmlparserv2.jar?
> >
> > -chris
> >>
> >> -
> >>
> >>
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>
> >>
> >
> >
> -BEGIN PGP SIGNATURE-
> Comment: GPGTools - http://gpgtools.org
> Co

Re: Tomcat Xml parser issue

2017-11-16 Thread Vicky B
It is XML parser (DOM and SAX ) from oracle (doc
<https://docs.oracle.com/cd/B10501_01/appdev.920/a96609/arj_xmlparserv2.htm>)
.  Why is tomcat using XMLparserv2  , tomcat we have in linux machine is
from redhat . Why does tomcat downloaded from apache tomcat site work
different form the one provided by REDHat . how does class loading work in
tomcat.

On Thu, Nov 16, 2017 at 8:15 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Vicky,
>
> On 11/16/17 6:53 AM, Vicky B wrote:
> > Hi All,
> >
> > I have application which is using spring , ESAPI and oracle
> > xmlparserv2.jar , this application works fine in my local tomcat on
> > windows  but when i deployed in linux server with linux based
> > apache tomcat i got below error when spring container  was trying
> > to parse  application specific xmls
> >
> > org.apache.catalina.core.StandardContext.listenerStart Exception
> > sending context initialized event to listener instance of class
> > org.springframework.web.context.ContextLoaderListener
> >
> > org.springframework.beans.factory.BeanDefinitionStoreException:
> > Parser configuration exception parsing XML from class path
> > resource [spring/spring-context.xml]; nested exception is
> > javax.xml.parsers.ParserConfigurationException: Unable to validate
> > using XSD: Your JAXP provider
> > [oracle.xml.jaxp.JXDocumentBuilderFactory@526ad194] does not
> > support XML Schema. Are you running on Java 1.4 with Apache
> > Crimson? Upgrade to Apache Xerces (or Java 1.5) for full XSD
> > support.
> >
> >
> > when i removed xmlparserv2.jar from my war file the application
> > worked fine , what is the issue is this due to class loading issue
> > or could be possible reason for this issue . Does tomcat provide
> > xml parser which spring loads.
>
> What is xmlparserv2.jar?
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQJRBAEBCAA7FiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAloNpJQdHGNocmlzQGNo
> cmlzdG9waGVyc2NodWx0ei5uZXQACgkQHPApP6U8pFjMzBAAnGkUGwrItoDMyqhU
> 2Q4LEOe6/dUW1ZdixIGztY87r7e3r0Q0BAGhFD4bS6NMRjS1XwG1trUKYPiIyp1Q
> DUScFZfa3kSBnpbxHtdYTSls91LZq5C5uo/sfDh7zmJ1asWmO4WdfcdaBJIAYl1I
> XyEpLqGHKHiGBpbpAzsKiI94TBJWL5RXoOaEcXxWms1z6T+x9yO0uwdbKVGEasjY
> cMpJlmwjq7dJyglttQ+hsEUfpXyJ6BsregRQwvC2/EGrQgbZQTMpVTUTR3Qyw3NX
> sjSiU1lZyXO3gBncooqNGiR2AJG2w8OZkMVyZGh/c6qj+ZJf/1dene7DA+7VOjmZ
> 2NrqDH1mhm2S0OXrU+/poOEnUS6324J2Hqu4Fz5M5rUPaKqNaZd/BKeD8YbxgHiz
> t1Fr9mYIXkq+NVZuAkDjQdybwZ/cwdnTk73PMRX3v6StE5XDLxAkHs/djOgl8cWB
> Spv5Ri23rufbv5mcWPQep2wnR6l2OGb6w3C1v6wv93VS06Ex/dLGqxZYukllxqzW
> QSEFC1DRvYsAVLjvTM2nKSKwgFR/YAlvQ2FDuulfevE8aU0hMQ8E4AgZc/oP4SlS
> fF0EJ8LStp75ZHlFYfCGLHVmhCiZFuCJOjCyiZt87jfHDerTHoxjRZMIpAI51Lxd
> oYbq3v/0qYfAV0jqClo0SM9u/8s=
> =ivJQ
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 



*Thanks & Regards Vickyb*


Tomcat Xml parser issue

2017-11-16 Thread Vicky B
Hi All,

I have application which is using spring , ESAPI and oracle xmlparserv2.jar
, this application works fine in my local tomcat on windows  but when i
deployed in linux server with linux based apache tomcat i got below error
when spring container  was trying to parse  application specific xmls

org.apache.catalina.core.StandardContext.listenerStart Exception sending
context initialized event to listener instance of class
org.springframework.web.context.ContextLoaderListener

org.springframework.beans.factory.BeanDefinitionStoreException: Parser
configuration exception parsing XML from class path resource
[spring/spring-context.xml]; nested exception is
javax.xml.parsers.ParserConfigurationException: Unable to validate using
XSD: Your JAXP provider [oracle.xml.jaxp.JXDocumentBuilderFactory@526ad194]
does not support XML Schema. Are you running on Java 1.4 with Apache
Crimson? Upgrade to Apache Xerces (or Java 1.5) for full XSD support.


when i removed xmlparserv2.jar from my war file the application worked fine
, what is the issue is this due to class loading issue or could be possible
reason for this issue . Does tomcat provide xml parser which spring loads.
-- 



*Thanks & Regards Vickyb*


Re: tomcat 8 startup issue

2015-11-18 Thread Vicky B
Hi Christopher,

I deleted existing tomcat and re-extracted and deployed it worked.Thanks.

On Wed, Nov 18, 2015 at 2:46 AM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> Vicky,
>
> On 11/17/15 7:41 AM, Vicky B wrote:
> > I downloaded latest tomcat 8.20 version zip
>
> Latest Tomcat 8 is 8.0.28.
>
> >  and extracted in my local. I
> > have java 7 in my local machine . When i am trying to run tomecat in
> > eclipse i get below stack trace
> >
> > java.lang.NoClassDefFoundError: org/apache/tomcat/util/digester/Rule
> > at java.lang.Class.getDeclaredConstructors0(Native Method)
> > at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
> > at java.lang.Class.getConstructor0(Unknown Source)
> > at java.lang.Class.newInstance(Unknown Source)
> > at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:268)
> > at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
> > Caused by: java.lang.ClassNotFoundException:
> > org.apache.tomcat.util.digester.Rule
> > at java.net.URLClassLoader$1.run(Unknown Source)
> > at java.net.URLClassLoader$1.run(Unknown Source)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at java.net.URLClassLoader.findClass(Unknown Source)
> > at java.lang.ClassLoader.loadClass(Unknown Source)
> > at java.lang.ClassLoader.loadClass(Unknown Source)
> > ... 6 more
> >
> >
> > can anybody help me deal with this problem . I hope setting catalina_home
> > is not mandatory
>
> How are you launching Tomcat?
>
> It looks like you have broken your installation right out of the box.
>
> -chris
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 



*Thanks & Regards Vickyb*


tomcat 8 startup issue

2015-11-17 Thread Vicky B
Hi All,

I downloaded latest tomcat 8.20 version zip  and extracted in my local. I
have java 7 in my local machine . When i am trying to run tomecat in
eclipse i get below stack trace

java.lang.NoClassDefFoundError: org/apache/tomcat/util/digester/Rule
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:268)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
Caused by: java.lang.ClassNotFoundException:
org.apache.tomcat.util.digester.Rule
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 6 more


can anybody help me deal with this problem . I hope setting catalina_home
is not mandatory

-- 



*Thanks & Regards Vickyb*


Re: [OT] timeout

2014-04-08 Thread Vicky B
If you want to learn never hesitate to ask a question no mater how dumb it
is .
As long as owners of this forum have no problem with my question , i will
continue to ask .I dont have to listen to you.


On Mon, Apr 7, 2014 at 10:44 PM, Hassan Schroeder 
hassan.schroe...@gmail.com wrote:

 On Sun, Apr 6, 2014 at 9:24 PM, Vicky B vickyb2...@gmail.com wrote:

  The question i asked was generic one every firewall have some common
  fucntionality .

 For someone who previously had no clue that firewall would drop
 the connection you assert that with a great deal of certainty.

 In any case, the docs for *your firewall* remains the best place to
 find the answer to your question.

  I hope you have control on your tongue next time you reply.

 I hope you stop asking unanswerably vague questions.

 Yet I suspect disappointment lies over that horizon.

 --
 Hassan Schroeder  hassan.schroe...@gmail.com
 http://about.me/hassanschroeder
 twitter: @hassan

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




-- 



*Thanks  Regards Vickyb*


Re: [OT] timeout

2014-04-06 Thread Vicky B
*May I suggest Reading The Fine Manual for your particular firewallwould
be preferable to asking random non-psychic strangers?*



The question i asked was generic one every firewall have some common
fucntionality .
I hope you have control on your tongue next time you reply.


On Sun, Apr 6, 2014 at 3:00 AM, Hassan Schroeder hassan.schroe...@gmail.com
 wrote:

 On Sat, Apr 5, 2014 at 8:35 AM, Vicky B vickyb2...@gmail.com wrote:

   The problem is solved now .

 Erm, well. Perhaps for some definition of solved...

  I had no clue that firewall would drop the connection if it does not
  recieve response within stiplulated time.
  Can i increase this timeout period ?

 May I suggest Reading The Fine Manual for your particular firewall
 would be preferable to asking random non-psychic strangers?

  if firewall was not there then my app would i worked properly ?

 Maybe, maybe not; turn it off and see what happens. Or set up a
 test environment without one and compare.

 --
 Hassan Schroeder  hassan.schroe...@gmail.com
 http://about.me/hassanschroeder
 twitter: @hassan

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




-- 



*Thanks  Regards Vickyb*


Re: [OT] timeout

2014-04-05 Thread Vicky B
HI All,

 The problem is solved now . we are have implemented a callback
functionality where after every 45 seconds we call back the same method
again .Hence making sure that there is no timeout.

 But as per identifying  the actual reason behind the problem i tried to
reproduce  the  issue,after  every time after response exceeds  1 min i
would get same internal error with same logs as I had mentioned earlier .I
got the confirmation that there is firewall between users browser and
web-server but i could not get more information about firewall . I have
read many blogs where people have faced same issue because of firewall.

I had no clue that firewall would drop the connection if it does not
recieve response within stiplulated time.
Can i increase this timeout period ? if firewall was not there then my app
would i worked properly ?


On Mon, Mar 31, 2014 at 8:29 PM, Mark Eggers its_toas...@yahoo.com wrote:

 On 3/31/2014 4:18 AM, Vicky B wrote:

 there is a firewall between browser and apache httpd and i am not sure if
 there is a firewall between apache and tomcat (mostly no).


 Mostly? Mostly? As in sometimes there's a firewall, and other times
 there's not, but mostly not?

 Or do you mean that you're supporting this application at multiple sites,
 and it's misbehaving at some sites? And that most of the sites do not have
 a firewall between Apache HTTPD and Apache Tomcat, but some do?

 Or do you mean that you're almost certain that there is no firewall
 between Apache HTTPD and Apache Tomcat, but you're not 100% certain?


  But why would this firewall drop the connection ?


 Firewalls can be configured to drop connections after a certain amount of
 inactivity. If you have a long-running process and are not sending
 information back to the user, there are many places where the connection
 could be closed.

 1. Between Apache Tomcat and Apache HTTPD

 As I mentioned earlier, if you have configured an AJP timeout (which is
 not the default configuration) and it is too short, Apache HTTPD will close
 the connection and send an error message back to the browser.

 2. Firewall between Apache Tomcat and Apache HTTPD

 A firewall can be configured to close connections after a period of
 inactivity.

 3. Firewall between Apache HTTPD and the browser

 A firewall can be configured to close connections after a period of
 inactivity. This might generate the type of error in the log extract that
 you posted earlier.

 However, that error may be completely unrelated to the problem, as well as
 all of these other musings many of us are doing.

 The short answer is that none of us know, because you have not provided
 enough information for us to be anything more than speculative.

 If you want help in resolving this problem, you need to provide us with
 answers to the questions we've asked (as a start). We can then help (mostly
 by asking more questions) narrow down the possibilities, and then possibly
 help you solve the problem.

 Or as André politely pointed out, give you enough information so that you
 can go back to the developers so that they can fix the problem. As he has
 pointed out, 90% of the time it's an application issue.

 There is no 'magic' one line answer and configuration that will fix your
 problem (most likely - but again, we don't know).

 If you do not have the answers to the questions we are asking, please go
 ask someone who does have the answers and the access for the information.

 Otherwise we're all just wasting time and bandwidth. Meanwhile your users
 are still getting errors . . .

 . . . just my (not caffeinated) two cents
 /mde/

 PS - please, please, please do not top-post. Your comments when they're
 read first make no sense until you scroll to the bottom and read the rest
 of the message.

 /mde/



 On Mon, Mar 31, 2014 at 3:16 PM, Howard W. Smith, Jr. 
 smithh032...@gmail.com wrote:

  On Mar 31, 2014 3:48 AM, André Warnier a...@ice-sa.com wrote:


 Howard W. Smith, Jr. wrote:


 On Sun, Mar 30, 2014 at 9:54 PM, Caldarale, Charles R 
 chuck.caldar...@unisys.com wrote:

  From: Howard W. Smith, Jr. [mailto:smithh032...@gmail.com]
 Subject: Re: timeout


 - and if that is not the reason, then find the person responsible
 for


 the


 in-between equipment and ask them why their junk closes the

 connection

 before your application has a chance to respond


 'junk'? please clarify the usage of the word 'junk', here. :)


 I think the definition something of poor quality would fit in this

 case,

 if the poor quality were a result of configuring equipment without

 regard

 to the requirements of the network users.

   - Chuck


 understood, thanks Chuck. :)


 Yes, what I meant precisely was thus : if after receiving numerous

 complaints from your users and your boss that your application is
 misbehaving; after an in-depth review of the Apache httpd and tomcat
 on-line documentation; after a level-headed discussion of the issue with
 a
 group of independent experts; after

Re: [OT] timeout

2014-03-31 Thread Vicky B
there is a firewall between browser and apache httpd and i am not sure if
there is a firewall between apache and tomcat (mostly no).
But why would this firewall drop the connection ?


On Mon, Mar 31, 2014 at 3:16 PM, Howard W. Smith, Jr. 
smithh032...@gmail.com wrote:

 On Mar 31, 2014 3:48 AM, André Warnier a...@ice-sa.com wrote:
 
  Howard W. Smith, Jr. wrote:
 
  On Sun, Mar 30, 2014 at 9:54 PM, Caldarale, Charles R 
  chuck.caldar...@unisys.com wrote:
 
  From: Howard W. Smith, Jr. [mailto:smithh032...@gmail.com]
  Subject: Re: timeout
 
  - and if that is not the reason, then find the person responsible for
 
  the
 
  in-between equipment and ask them why their junk closes the
 connection
  before your application has a chance to respond
 
  'junk'? please clarify the usage of the word 'junk', here. :)
 
  I think the definition something of poor quality would fit in this
 case,
  if the poor quality were a result of configuring equipment without
 regard
  to the requirements of the network users.
 
   - Chuck
 
 
  understood, thanks Chuck. :)
 
 
  Yes, what I meant precisely was thus : if after receiving numerous
 complaints from your users and your boss that your application is
 misbehaving; after an in-depth review of the Apache httpd and tomcat
 on-line documentation; after a level-headed discussion of the issue with a
 group of independent experts; after a thorough witnessed interview of a
 significant sample of the users to ascertain their professional behaviour
 in front of a browser and the absence of any problem with their mouse
 buttons; after a careful and time-consuming examination of all the
 evidence, including the access logs of both tomcat and httpd; if after all
 that thus you would come to the inescapable conclusion that it is the
 intermediate firewall/gateway that is the cause of all the trouble, then
 when you talk to the people responsible for that equipment, the word that
 might come to mind then, to qualify this equipment and its settings seen as
 a whole, is junk.
 
  Thank you for offering me the opportunity to clarify this section of my
 previous post.
 

 You're welcome, the pleasure was [almost] all mine, and thank you for the
 clarification. :-)

 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 




-- 



*Thanks  Regards Vickyb*


Re: timeout

2014-03-30 Thread Vicky B
 internal server message


 What response body, where ? in the browser ? in the logfile ?



 @Andre

 Yes apache is my front end to apache tomcat ,  i use mode_jk connector.


 Thanks. That is the first useful information that you provide.
 Now we are just missing versions..


  Regarding  error message in apache logs i see 500 as reponse code for the
 reqeust and i also see below message


 Which apache logs ?



 broken pipe : connection reset by peer : writing data to network.


 In which logfile did you find this ?
 Please copy the entire message line here.



 timeout is the direcive in apache which is set to 300 .


 Which timeout directive, in which configuration file, of which apache
 program ?
 And why did you set this to 300 ? or was this the default value ?





 On Sat, Mar 29, 2014 at 3:05 AM, André Warnier a...@ice-sa.com wrote:

  Vicky B wrote:

  HI All,

 i have configured apache and apache tomcat i.e apache is my http server
 and
 tomcat is my webserver.

  The does not seem to make much sense.  Both are HTTP servers and thus
 webservers.
 Do you mean that apache http is working as a front-end to Tomcat ?
 If so, how does one connect to the other ?


  i am having an isssue where some of request take

  1-2 min to process but i get 500 internal serer message .

  The browser does not invent this error.
 It comes to it from the server, as HTTP response with a status code 500.
 There *must* be an error message somewhere in a log on the server side.

 (You have 2 servers, so look in both logfiles).

 It can also *not* be a timeout on the client (browser) side.  If there
 was
 a timeout on the client side, it would close the connection with the
 server, and you would never see this message (because the server could
 not
 send it to the client, if the connection was closed).

 The error pages are quite different between Apache httpd and tomcat,
 easily distinguished visually.  How does the 500 error page that you get
 look like ?



  IS this something related to timeout value.

 The value of timeout in my apache is set 300.

  what timeout ? what apache ?



  what could the route cause?


  Nobody can tell you that, before you tell us what is in the logfile(s).





 -
 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




-- 



*Thanks  Regards Vickyb*


Re: timeout

2014-03-30 Thread Vicky B
The problem is i don't have access to the machines where this is deployed i
am only given access to the logs that too as a web url.
Hence i am not able to give perfect versions of these but on high level  i
have given the info.'
The actual problem i assume is when apache is waiting from response from
tomcat if waiting time cross 1 min I feel apache httpd fails the request or
timesout


On Sun, Mar 30, 2014 at 10:43 PM, Mark Eggers its_toas...@yahoo.com wrote:

 On 3/30/2014 8:44 AM, Vicky B wrote:

 HI All,

Below are the inforamtion

OS : Solaris 5
apache httpd : 2.2
tomcat : 7


 This is not nearly enough detailed information. You were given detailed
 steps on how to generate the information.

 Here's an example:

 1. What is your precise OS

 Instructions: use uname -a

 Example:
 
 [root@trident httpd]# uname -a
 Linux trident.mdeggers.org 3.13.7-200.fc20.x86_64 #1 SMP Mon Mar 24
 22:01:49 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

 2. What is your precise version of Apache HTTPD

 Instructions: use head -2 error_log (or whatever you've named your error
 log)

 Example:
 
 [root@trident httpd]# head -2 error_log
 [Sun Mar 30 03:18:07.721881 2014] [auth_digest:notice] [pid 792] AH01757:
 generating secret for digest authentication ...
 [Sun Mar 30 03:18:07.735105 2014] [mpm_prefork:notice] [pid 792] AH00163:
 Apache/2.4.7 (Fedora) OpenSSL/1.0.1e-fips mod_jk/1.2.37 PHP/5.5.10
 SVN/1.8.8 mod_perl/2.0.9-dev Perl/v5.18.2 configured -- resuming normal
 operations

 3. What is your precise version of Apache Tomcat

 Instructions: use $CATALINA_HOME/bin/version.sh

 Example:
 
 [mdeggers@trident bin]$ ./version.sh
 Using CATALINA_BASE:   /home/mdeggers/Apache/apache-tomcat-7.0.52
 Using CATALINA_HOME:   /home/mdeggers/Apache/apache-tomcat-7.0.52
 Using CATALINA_TMPDIR: /home/mdeggers/Apache/apache-tomcat-7.0.52/temp
 Using JRE_HOME:/usr/jre
 Using CLASSPATH: /home/mdeggers/Apache/apache-tomcat-7.0.52/bin/bootstrap.
 jar:/home/mdeggers/Apache/apache-tomcat-7.0.52/bin/tomcat-juli.jar
 Server version: Apache Tomcat/7.0.52
 Server built:   Feb 13 2014 10:24:25
 Server number:  7.0.52.0
 OS Name:Linux
 OS Version: 3.13.7-200.fc20.x86_64
 Architecture:   amd64
 JVM Version:1.7.0_51-b13
 JVM Vendor: Oracle Corporation

 4. What is the precise version of Java?

 Instructions: Use java -version

 Example:
 
 [mdeggers@trident bin]$ java -version
 java version 1.7.0_51
 Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
 Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

 From all of this, we can gather the following information:

 OS: 64 bit Linux with a 3.13.7 kernel (Fedora 20)
 HTTPD:  Apache/2.4.7 (Fedora) OpenSSL/1.0.1e-fips mod_jk/1.2.37
 Java:   1.7.0_51-b13 64-Bit server VM
 Tomcat: 7.0.52.0

 It's also good to note that the Apache Tomcat in question (7.0.52.0)
 generates OS and Java information that is consistent with the other
 commands.

 This is sort of the MINIMAL information needed. It sets a baseline. We may
 ask questions about your mod_jk / mod_proxy_http / mod_proxy_ajp
 configuration if you're using one of those.


   log : error.log

 message :
 [Wed Mar 26 02:24:22 2014] [debug] mod_deflate.c(616): [client
 10.32.8.135]
 Zlib: Compressed 0 to 2 : URL /pbs/cntrty/getReprots
 [Wed Mar 26 02:24:22 2014] [info] [client 10.234.9.0] (131)Connection
 reset
 by peer: core_output_filter: writing data to the network


 This is a truncated copy of an error log, and it appears to be from Apache
 HTTPD. This is the Apache Tomcat mailing list, and although many of us use
 Apache HTTPD in conjunction with Apache Tomcat, this list is focused on
 Apache Tomcat.

 A 500 internal server error (as others have pointed out) almost always
 generates much more information. For example, a null pointer exception will
 generate a 500 internal server error, and there should be logs with the
 information.

 Here's an example of an Apache HTTPD 500 error report. I've redacted the
 IP address and link to protect the guilty.

 aaa.bbb.ccc.ccc - - [27/Mar/2014:21:44:23 -0700] GET /some/page HTTP/1.1
 500 2813 - Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36
 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36

 If you look, there is the following pattern:

 GET /some/page HTTP/1.1 500 2813

 This tells you that getting /some/page using HTTP/1.1 returned a 500
 internal server error and the number of octets sent was 2813.

 Now if you look at your Apache Tomcat logs for the same time period, you
 may see the cause of the error. In this case, I get a stack trace (because
 people didn't catch errors correctly in this application), which indicates
 a null pointer exception.

 Armed with this information, I can go back to the application developers
 and tell them to fix their code.

 You will need to post the relevant portion of the Apache Tomcat logs in
 order for anyone to have any idea about what's going on. Please post

timeout

2014-03-28 Thread Vicky B
HI All,

i have configured apache and apache tomcat i.e apache is my http server and
tomcat is my webserver. i am having an isssue where some of request take
1-2 min to process but i get 500 internal serer message .

IS this something related to timeout value.

The value of timeout in my apache is set 300.

what could the route cause?


-- 



*Thanks  Regards Vickyb*


Re: timeout

2014-03-28 Thread Vicky B
I dont know if  it is client timeouting or server .

I dont see any issue on server side processing .this issue happens when my
code takes more then a minute to respond.


On Sat, Mar 29, 2014 at 12:03 AM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 Vicky,

 On 3/28/14, 2:18 PM, Vicky B wrote:
  HI All,
 
  i have configured apache and apache tomcat i.e apache is my http
  server and tomcat is my webserver. i am having an isssue where some
  of request take 1-2 min to process but i get 500 internal serer
  message .
 
  IS this something related to timeout value.
 
  The value of timeout in my apache is set 300.
 
  what could the route cause?

 Is the client timing-out (disconnecting) or is the server timing out?
 500 Internal Server Error is usually an indication that something went
 wrong on the server site. Check your log files on the server for
 anything reporting an error.

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1
 Comment: GPGTools - http://gpgtools.org
 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

 iQIcBAEBCAAGBQJTNcCVAAoJEBzwKT+lPKRYR9oP/jTLupu4DtIBHO00/lLW5zZQ
 /JIc5+pbge6Z4sWzu8MSKoGQJmAMlmuuolArV7KYnSYa+VlWxLAgn75ZoPaXSRPn
 j3Yfi3B4jWglkuh4RbL8vx66/8xy0jqlQMa9nuDiLsbX1+9xYaBd+8CgLx3y/CgE
 6H3JfXdo72VVyzskPKDNbsYBkhzd5zhslxH8I7Szs211/LWCrKTFSvs7+Dzd8JSn
 ueAreLnkxTVzio1+Tg2zYTBF44wDePpAwaDff6qsjpaRPNA2zLcB5ahHG2XI+DVA
 6UVkVlpaIWrMzrfgylw2O7aDHp1GRMQIFD6bNgH84CMEAKnQYH7QKKk2EHTCEkdw
 yfeVrqvzNK1bsKk5HbYfnjWiq0NUGItjf4cOUhGDLEt05iy2lkqAUOFjPYXmBW9r
 2gPieoVeDtcvL+IH6upU01H2TCYcjse52h+9q/WNAlgiNkGqhEtjXyj8e6wQwVM0
 3k1gMmFN1pgvmcAPyTZQVnlZUoc5oXKeg4/casUZVrqpueIA3DR/PBz4EEZARo2S
 IAlNLol2KRdx7m+gRZmbNhd7NWsJ/Y1wa1le2nuE6Cw5Z2PUB+YWH5YuikAiIyQ1
 8WYV0jwObt993iauYnFUTEVkstB44wSntIDcDsQ4Xv9aNjKh6TPko0wGP6qXTxNY
 v1PI5DGWXr8ExzZAxo0w
 =sj6N
 -END PGP SIGNATURE-

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




-- 



*Thanks  Regards Vickyb*


Re: timeout

2014-03-28 Thread Vicky B
I mean 1 min to process the request and thats due to the huge logic and
processing involved.


On Sat, Mar 29, 2014 at 12:11 AM, Weiquan weiquan.y...@gmail.com wrote:

 Why your code take one min to response? Find out the reason

 Sent from my iPhone

  On Mar 28, 2014, at 2:37 PM, Vicky B vickyb2...@gmail.com wrote:
 
  I dont know if  it is client timeouting or server .
 
  I dont see any issue on server side processing .this issue happens when
 my
  code takes more then a minute to respond.
 
 
  On Sat, Mar 29, 2014 at 12:03 AM, Christopher Schultz 
  ch...@christopherschultz.net wrote:
 
  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA256
 
  Vicky,
 
  On 3/28/14, 2:18 PM, Vicky B wrote:
  HI All,
 
  i have configured apache and apache tomcat i.e apache is my http
  server and tomcat is my webserver. i am having an isssue where some
  of request take 1-2 min to process but i get 500 internal serer
  message .
 
  IS this something related to timeout value.
 
  The value of timeout in my apache is set 300.
 
  what could the route cause?
 
  Is the client timing-out (disconnecting) or is the server timing out?
  500 Internal Server Error is usually an indication that something went
  wrong on the server site. Check your log files on the server for
  anything reporting an error.
 
  - -chris
  -BEGIN PGP SIGNATURE-
  Version: GnuPG v1
  Comment: GPGTools - http://gpgtools.org
  Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
 
  iQIcBAEBCAAGBQJTNcCVAAoJEBzwKT+lPKRYR9oP/jTLupu4DtIBHO00/lLW5zZQ
  /JIc5+pbge6Z4sWzu8MSKoGQJmAMlmuuolArV7KYnSYa+VlWxLAgn75ZoPaXSRPn
  j3Yfi3B4jWglkuh4RbL8vx66/8xy0jqlQMa9nuDiLsbX1+9xYaBd+8CgLx3y/CgE
  6H3JfXdo72VVyzskPKDNbsYBkhzd5zhslxH8I7Szs211/LWCrKTFSvs7+Dzd8JSn
  ueAreLnkxTVzio1+Tg2zYTBF44wDePpAwaDff6qsjpaRPNA2zLcB5ahHG2XI+DVA
  6UVkVlpaIWrMzrfgylw2O7aDHp1GRMQIFD6bNgH84CMEAKnQYH7QKKk2EHTCEkdw
  yfeVrqvzNK1bsKk5HbYfnjWiq0NUGItjf4cOUhGDLEt05iy2lkqAUOFjPYXmBW9r
  2gPieoVeDtcvL+IH6upU01H2TCYcjse52h+9q/WNAlgiNkGqhEtjXyj8e6wQwVM0
  3k1gMmFN1pgvmcAPyTZQVnlZUoc5oXKeg4/casUZVrqpueIA3DR/PBz4EEZARo2S
  IAlNLol2KRdx7m+gRZmbNhd7NWsJ/Y1wa1le2nuE6Cw5Z2PUB+YWH5YuikAiIyQ1
  8WYV0jwObt993iauYnFUTEVkstB44wSntIDcDsQ4Xv9aNjKh6TPko0wGP6qXTxNY
  v1PI5DGWXr8ExzZAxo0w
  =sj6N
  -END PGP SIGNATURE-
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
  --
 
 
 
  *Thanks  Regards Vickyb*

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




-- 



*Thanks  Regards Vickyb*


Re: timeout

2014-03-28 Thread Vicky B
@christopher

in response body i see the usual 500 internal server message

@Andre

Yes apache is my front end to apache tomcat ,  i use mode_jk connector.

Regarding  error message in apache logs i see 500 as reponse code for the
reqeust and i also see below message

broken pipe : connection reset by peer : writing data to network.

timeout is the direcive in apache which is set to 300 .


On Sat, Mar 29, 2014 at 3:05 AM, André Warnier a...@ice-sa.com wrote:

 Vicky B wrote:

 HI All,

 i have configured apache and apache tomcat i.e apache is my http server
 and
 tomcat is my webserver.


 The does not seem to make much sense.  Both are HTTP servers and thus
 webservers.
 Do you mean that apache http is working as a front-end to Tomcat ?
 If so, how does one connect to the other ?


  i am having an isssue where some of request take

 1-2 min to process but i get 500 internal serer message .


 The browser does not invent this error.
 It comes to it from the server, as HTTP response with a status code 500.
 There *must* be an error message somewhere in a log on the server side.

 (You have 2 servers, so look in both logfiles).

 It can also *not* be a timeout on the client (browser) side.  If there was
 a timeout on the client side, it would close the connection with the
 server, and you would never see this message (because the server could not
 send it to the client, if the connection was closed).

 The error pages are quite different between Apache httpd and tomcat,
 easily distinguished visually.  How does the 500 error page that you get
 look like ?



 IS this something related to timeout value.

 The value of timeout in my apache is set 300.


 what timeout ? what apache ?



 what could the route cause?


 Nobody can tell you that, before you tell us what is in the logfile(s).





 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




-- 



*Thanks  Regards Vickyb*


Re: Deny Put Delete

2014-01-26 Thread Vicky B
Thanks neven,mark


On Sun, Jan 26, 2014 at 4:00 PM, Neven Cvetkovic
neven.cvetko...@gmail.comwrote:

 On Sun, Jan 26, 2014 at 12:32 AM, Vicky B vickyb2...@gmail.com wrote:

  if I have a privilege to ask a question on this topic if can anyone help
 me
  on how an user fire a put request or delete request ( I am not a hacker)
  .All my life I just used post and get I never thought about these put and
  delete, so if someone helps I would appreciate
 
 
 PUT and DELETE type of requests are regularly used in RESTful applications.
 So, any REST client would be able to send these type of requests, e.g.
 POSTER extension for Firefox, POSTMAN extension for Chrome, etc...

 Also, Mark mentioned CURL command line URL client, e.g.
 curl -X DELETE http://www.somewebsite.here/page
 curl -X PUT http://www.somewebsite.here/page

 Good luck!
 Neven




-- 



*Thanks  Regards Vickyb*


Re: Deny Put Delete

2014-01-25 Thread Vicky B
if I have a privilege to ask a question on this topic if can anyone help me
on how an user fire a put request or delete request ( I am not a hacker)
.All my life I just used post and get I never thought about these put and
delete, so if someone helps I would appreciate


On Fri, Jan 24, 2014 at 4:29 PM, Johan Compagner jcompag...@servoy.comwrote:

 
 
  I've dealt with similar nonsensical compliance scans before, and
  my response was:
 
  You believe you can PUT or DELETE files on this installation?
 
  ** makes popcorn **
 
  Please proceed. I'll sit here and watch. Take your time.
 
  Morons. Bane of productive peoples' existence.
 
  Also, a special place in hell for the writers of these scanners...
  /rant
  --
 
 
 Maybe even more stupid with this scanner could be that it only test for the
 options request to see what it returns but does not do an actual test of it
 really works?
 Maybe i can have a server that only replies that it accepts a GET but
 when i actually do fire a PUT or a DELETE the code does do something...

 johan




-- 



*Thanks  Regards Vickyb*


Re: webservices deployment.

2014-01-20 Thread Vicky B
if I don't have to do anything special for soap or rest then when going for
paid app server we don't get any other advantage other then support + ejb
container?


On Sun, Jan 19, 2014 at 7:21 PM, Daniel Mikusa dmik...@gopivotal.comwrote:

 On Jan 19, 2014, at 4:34 AM, Vicky B vickyb2...@gmail.com wrote:

  HI All,
 
   If I want to deploy the webapplication which uses webservice like soap
 or
  rest do I need a soap engine or rest engine in tomcat ? or including
 libraries in the war file is enough?

 You are not required to add anything to Tomcat.  You could simply build
 your app with whatever libraries it requires and deploy to Tomcat.  I've
 done this with SOAP  REST apps using Spring Web Services  Spring MVC.
  Works great.

 Do you have a particular framework / set of libraries you're targeting?
  Perhaps someone on this list has used them with an app deployed to Tomcat.

 Dan

 
 
  --
 
 
 
  *Thanks  Regards Vickyb*


 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




-- 



*Thanks  Regards Vickyb*


webservices deployment.

2014-01-19 Thread Vicky B
HI All,

  If I want to deploy the webapplication which uses webservice like soap or
rest do I need a soap engine or rest engine in tomcat ? or including
libraries in the war file is enough?

-- 



*Thanks  Regards Vickyb*


Re: Http url connection : server returned http response code 400

2013-11-16 Thread vicky b
THanks you, can you please let me know what optimization I have to make.

  con.setRequestProperty(Referer, request.getHeader(Referer));

was the issue , since it was being set to null


On Mon, Nov 11, 2013 at 7:38 AM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 Vicky,

 On 11/11/13, 10:02 AM, vicky b wrote:
  I am  getting server returned http response code 400  when  i run
  below code from my tomcat however it works fine when i run it in
  WAS whch has proxy server   settings.
 
  URL url = new URL(reqUrl); HttpURLConnection con =
  (HttpURLConnection)url.openConnection(); con.setDoOutput(true);
  con.setRequestMethod(request.getMethod());
  if(request.getContentType() != null) {
  con.setRequestProperty(Content-Type, request.getContentType());
  } con.setRequestProperty(Referer, request.getHeader(Referer));
  int clength = request.getContentLength(); if(clength  0) {
  con.setDoInput(true); InputStream istream =
  request.getInputStream(); OutputStream os = con.getOutputStream();
  final int length = 5000; byte[] bytes = new byte[length]; int
  bytesRead = 0; while ((bytesRead = istream.read(bytes, 0, length))
   0) { os.write(bytes, 0, bytesRead); } } else {
  con.setRequestMethod(GET); } out.clear(); out =
  pageContext.pushBody(); OutputStream ostream =
  response.getOutputStream(); System.out.println( finished
  getOUTputsteram); response.setContentType(con.getContentType());
  InputStream in = con.getInputStream(); final int length = 5000;
  byte[] bytes = new byte[length]; int bytesRead = 0; while
  ((bytesRead = in.read(bytes, 0, length))  0) {
  ostream.write(bytes, 0, bytesRead); }

 So you have a quick-and-dirty proxy servlet, right?

 There are a number of optimizations, etc that you should probably
 make, but none of the above code uses any Tomcat code (other than
 fetching information from the incoming request, which presumably works
 correctly).

 It looks like you are getting a 400 from the server your code is
 contacting. Have you looked at the request that is actually being sent?

 Under what conditions do you get a 400 response? I see you are
 unconditionally setting con.setDoOutput(true) even if you don't intend
 to send any data. You conditionally call setDoInput which doens't make
 a great deal of sense. I think you have these two calls reversed in
 your head.

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.15 (Darwin)
 Comment: GPGTools - http://gpgtools.org
 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

 iQIcBAEBCAAGBQJSgPnjAAoJEBzwKT+lPKRYg7QP/2DIfwXWl/d5XTXxLwn637H7
 voM3qF26zyoObW5F/Z2TmTDnidmTb/D4PSn/ZE+1cKJcbgBWoY36fJ+MFaAXhptf
 5MQet22E7xCUWs0n9Y9QbcPA7J5ZaGDap4O3ukW5C8O4/+vPkkNnjlIycNRa/P+/
 UvfvZVxVeZR2xioar4L81gr0CgBzCALUjCPQ5pLqh14NOMzl9nfNbxmkCUvQYpGa
 YpWmVhF7QKuv08fJxNLzEzjuZS+gQZn1SdqaMWoO3ebUrWMIpNiiv/xZC/oJInIT
 qfxvDrRpRpzzbhIWUwdfj4PzXHDJz0OlUVN5UzDY0WocDMddN1QeaRuQaZQnLpsK
 Cy27E8wWJrATd4vdki7FteQCIyZBPB6A/sBy0nKSArvn13uGowcdgPpTsc+sW5hP
 GxRiohnpH9vWj2IMDSuBtnnipDp/+f7JsvjQqOQ2Pmw2Zs6BwCAG8v7ufDFil6Lj
 NDhIPJ7FFeCmso+DeWItmBQq7iQV7mQaZ9DKhS9y/1hd0ZF/kqTv5KgKzpu12BTE
 2GauCWxIt9qiCuVgNEpp4cEsV4sptxV+XI4k5DtFVB0EMcX9gGVNYjxJSQP/4efG
 tjgA6jG2Ea/YM2KU2cJu0F2mFL3qKr3Vh47K5NE+mHtFMhrygz8nH5zX+s9nvF6F
 5vrRBravwnLLOk/ZGOU2
 =Zxr5
 -END PGP SIGNATURE-

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




-- 



*Thanks  Regards Vickyb*


Http url connection : server returned http response code 400

2013-11-11 Thread vicky b
HI All,

  I am  getting server returned http response code 400  when  i run below
code from my tomcat however it works fine when i run it in WAS whch has
proxy server   settings.

URL url = new URL(reqUrl);
HttpURLConnection con = (HttpURLConnection)url.openConnection();
con.setDoOutput(true);
con.setRequestMethod(request.getMethod());
if(request.getContentType() != null) {
  con.setRequestProperty(Content-Type, request.getContentType());
}
  con.setRequestProperty(Referer, request.getHeader(Referer));
int clength = request.getContentLength();
if(clength  0) {
con.setDoInput(true);
InputStream istream = request.getInputStream();
OutputStream os = con.getOutputStream();
final int length = 5000;
  byte[] bytes = new byte[length];
  int bytesRead = 0;
  while ((bytesRead = istream.read(bytes, 0, length))  0) {
os.write(bytes, 0, bytesRead);
  }
}
  else {
con.setRequestMethod(GET);
  }
out.clear();
  out = pageContext.pushBody();
OutputStream ostream = response.getOutputStream();
System.out.println( finished getOUTputsteram);
response.setContentType(con.getContentType());
 InputStream in = con.getInputStream();
 final int length = 5000;
  byte[] bytes = new byte[length];
  int bytesRead = 0;
  while ((bytesRead = in.read(bytes, 0, length))  0) {
ostream.write(bytes, 0, bytesRead);
  }
-- 



*Thanks  Regards Vickyb*


Re: Tomcat Concurrency

2013-07-16 Thread vicky b
HI All,

 Just out of curiosity can you please let me know if there are 10 clients
who access 10 different browsers and make request at the same time what is
the expected output


On Tue, Jul 16, 2013 at 10:14 PM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 Konstantin,

 On 7/15/13 6:38 PM, Konstantin Kolinko wrote:
  2013/7/16 Mark Haroldson markharold...@msn.com:
  Hello;
 
 
 
  I am running a tomcat 6 webapp using Jersey and I am running into
  a concurrency issue. When there are multiple concurrent
  connections to tomcat only one or two are processed concurrently.
  I have increased the maxThreads on the connector and now can see
  the requests being processed  by different threads however I
  still on observe one or two threads running concurrently.
 
 
 
  Example:
 
  Given the following servlet;
 
 
 
  Servlet()
 
  {
 
  Output(Start thread);
 
  Thread.sleep(2);
 
  Output(End thread)
 
  }
 
 
 
  I would expect the following output
 
 
 
  Start Thread
 
  Start Thread
 
  Start Thread
 
  Start Thread
 
  End Thread
 
  End Thread
 
  End Thread
 
  End Thread
 
 
 
  Instead I see
 
  Start Thread
 
  Start Thread
 
  End Thread
 
  End Thread
 
  Start Thread
 
  End Thread
 
  Start Thread
 
  End Thread
 
 
 
  What are the factors that control thread concurrency in Tomcat?
  Has anyone seen behavior like this before? Should I expect a high
  number of concurrent threads or does java/tomcat gate access to
  the servlet?
 
 
  Looking at a crystal ball I would guess that your client is a web
  browser. A well-behaving browser creates no more than 2
  simultaneous connections to the same host (a limitation recommended
  by the HTTP specification).

 No longer true. Firefox and Chrome default to 6 per server:
 http://kb.mozillazine.org/Network.http.max-connections-per-server
 http://code.google.com/p/chromium/issues/detail?id=12066

  A Tomcat can certainly serve more than 2 clients simultaneously. It
  is possible to mis-configure it or create a servlet that serves no
  more than 1 client, but you must be creative (in a newbie way) to
  do so.
 
  Without seeing your actual configuration and your actual code it
  is impossible to provide any review.
 
  If congestion were at Tomcat side, as when several threads are
  waiting for the same resource, it would be easy to spot the place
  by taking a pair of thread dumps (see wiki - FAQ -
  Troubleshooting).

 Mark, you should probably print the thread id when doing your
 printlns. That will help you see what is going on. Also, you might
 want to try making more than 4 connections. What client are you using?

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
 Comment: GPGTools - http://gpgtools.org
 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

 iQIcBAEBCAAGBQJR5XhVAAoJEBzwKT+lPKRY00wP/3tOIEuEsw+4wdtZhnGYg+aI
 nQj82y7wakuLBYHKDstl/EoEAqKtLoV/hM2nWyctpylkRlZs5oj8fPVEb6xINf4r
 sqqJIwAFGomMod7H+TrQsXa4Tf6v1579iGGAPg4HgVw9MebzYz1y9eFeJ6BeODNw
 /eapZyCeQFFP3CmFQIyyvYk060EqQnaefo8wTMYVc+UZ59zPvq9NwaigerCUezYG
 nwq/GqcqRjdI+xUNkiCraldPVt7amBrUSeZsh2pvYzHvaAuzokaqHMo2kcpixyDf
 kuTwCOdZHUaMsMsHyfh5b6jGNR06DV1djRNJF46jArL4DMCh9NS/H4UgACA1PgAb
 OcW+YOn4lBzzR0lHfx3opitzn7d1i7s6NMwA7djwHRma+XusuMiZLUPahsq3/tXk
 +zwGPiAKyxMb9U68hSZSzSbrEVjdeuyfUo8RKxFvX6RGIK8PcPpkZwOYyzMjuk6u
 rVyxuSB5Ody4slGOAR/3jo6egTe6TXzqeXkL+Zlq7M5SVFVjUZlzmhc7jnb7wqBl
 ZAXIV6hJmDPek+cgsaKi990KRYeWSqtU8W33WR21hgVZBsavJ0uz7wDNaEoPo4Zs
 smA2rMVLA6yWFfOM7oaCJs0UwIfY/N2PNYmVmO8RjUzFT8533GHMKlR/oCAVsnrJ
 u8UNSi9fglS5pelSMX4Z
 =Punl
 -END PGP SIGNATURE-

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




-- 
*Thanks  Regards
 Vickyb

*


Client Side caching

2012-02-11 Thread vicky b
HI All,

  I want to enable client side cache for my http request , can any body
please let me know the configuration for this.

-- 
*Thanks  Regards
 Vickyb

*


difference in behaviour of tomcat 6 and tomcat 7 very imp

2011-05-23 Thread vicky b
Hi,

  I have done analysis on static references and found a interesting
point al;so i find a difference in behaviour in tomcat 6 andtomcat 7

I created a class (TestStatic) which has a static reference to VO(java bean)
in my servlet i declared TestStatic as member variable and initialized it
there and i deployed my app and hit my servlet and then undeployed it ... i
used eclipse MAT and saw that both TestStatic and VO objects are not getting
garbage collected

then i changed the code in my servlet and removed TestStatic from member
variable i used spring beanfactory to get TestStatic object in my service
method and repeated step of deploying hitting my servlet and undeploying ..
i used eclipse MAT and saw that only VO object are not getting garbage
collected

so what can be concluded static references are never garbage collected ? or
even objects holding static references are not GC'ed.

In tomcat static refrence are getting garbage collected but in weblogic it
is not can any body help

below is code for reference
\





*package* com.leak;
 *public* *class* TestEnum {

*private*   BeanName name;
*private*  *static*  VO vo = *new* VO();

*public* *void* printNames() {
System.out.println(name.beanName);
}}

 *package* com.leak;
 *import* org.springframework.beans.factory.BeanFactory;*import*
org.springframework.context.support.ClassPathXmlApplicationContext;

 *public* *class* UtilsN1 {

*public*  *static*   BeanFactory factory=*null*;
*public*  *static*  *void* setContext(BeanFactory factory ){
UtilsN1.factory = factory;

System.err.println( Utils.factory + factory );

}

*public*  *static* BeanFactory getFactory() {
*return* factory;
}}
 *package* com.leak;
 *import* java.io.IOException;*import* java.io.PrintWriter;
 *import* javax.security.auth.Destroyable;*import*
javax.servlet.ServletConfig;*import*
javax.servlet.ServletException;*import*
javax.servlet.http.HttpServlet;*import*
javax.servlet.http.HttpServletRequest;*import*
javax.servlet.http.HttpServletResponse;
 *import* org.springframework.beans.factory.BeanFactory;*import*
org.springframework.beans.factory.xml.XmlBeanFactory;*import*
org.springframework.core.io.ClassPathResource;*import*
org.springframework.core.io.Resource;
 *public* *class* Leak *extends* HttpServlet {
*private* *static* *final* *long* serialVersionUID = 1L;
TestEnum a = *new* TestEnum();

@Override
*public* *void* init(ServletConfig config) *throws* ServletException {
super.init(config);

Resource res = *new* 
ClassPathResource(applicationContext.xml);
BeanFactory factory = *new* XmlBeanFactory(res);
System.out.println(factory::: + factory.getBean(test));

UtilsN1.setContext(factory);

}

*protected* *void* doGet(HttpServletRequest request,
HttpServletResponse response) *throws* 
ServletException, IOException {
response.setContentType(text/html;charset=UTF-8);
PrintWriter out = response.getWriter();
out.println(htmlbodypre);

Test t = (Test) UtilsN1.getFactory().getBean(
BeanName.TEST.getBeanName());
System.out.println( test  + t);
//TestEnum a = (TestEnum) 
UtilsN1.getFactory().getBean(testEnum);
a.printNames();

out.println(/pregg/body/html);
out.close();
}

*protected* *void* doPost(HttpServletRequest request,
HttpServletResponse response) *throws* 
ServletException, IOException {
}

*public* *void* destroy() {
UtilsN1.factory = *null*;
}
 }

 *package* com.leak;
 *public* *class* VO {
 String  name;
 *public* String getName() {
*return* name;}
 *public* *void* setName(String name) {
this.name = name;}
 }


-- 
*Thanks  Regards
 Vickyb

*


GC algorithm

2011-05-23 Thread vicky b
HI,

  How can i come to know the GC algorithm used in tomcat... and all GC
configuarations..

-- 
*Thanks  Regards
 Vickyb

*


Re: GC algorithm

2011-05-23 Thread vicky b
then why do i see a difference in behaviour for tomcat 6 and tomcat 7 when i
undeploy my app the objects that are collected in tomcat6 are not collected
in tomcat7?

On Mon, May 23, 2011 at 7:19 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: vicky b [mailto:vickyb2...@gmail.com]
  Subject: GC algorithm

  How can i come to know the GC algorithm used in tomcat...

 That's easy: none.  GC algorithms are the province of the JVM, not Tomcat.

  and all GC configuarations..

 Read the JVM doc.

  - 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




-- 
*Thanks  Regards
 Vickyb

*


Re: GC algorithm

2011-05-23 Thread vicky b
Both tomcat 6 and tomcat are running on the same machine using same JVM and
as you said
GC algorithms are the province of the JVM  which according to my
understanding means depends upon JVM then why the difference.

On Mon, May 23, 2011 at 7:30 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: vicky b [mailto:vickyb2...@gmail.com]
  Subject: Re: GC algorithm

  then why do i see a difference in behaviour for tomcat 6
  and tomcat 7 when i undeploy my app the objects that are
  collected in tomcat6 are not collected in tomcat7?

 Because the objects are no longer reachable in your Tomcat 6 environment
 but are in Tomcat 7.  Nothing to do with the GC algorithm employed.  Analyze
 the heap and find out what references to the objects of interest are still
 around.

  - 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




-- 
*Thanks  Regards
 Vickyb

*