Re: TomcatCon Meetup

2017-05-16 Thread Coty Sutherland
\o/

On May 16, 2017 10:35 PM, "Christopher Schultz" <
ch...@christopherschultz.net> wrote:

> All,
>
> For those of you at ApacheCon in Miami, here are the details for the
> Tomcat Meetup. Come and meet fellow members of the community, committers,
> and new friends.
>
> Time: 18:00 EDT
> Place: Escorial Conference Room (where all TomcatCon sessions are being
> held)
>
> All are welcome to the meetup, and also the inevitable dinner and drinks
> to follow.
>
> Thanks,
> -chris
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


TomcatCon Meetup

2017-05-16 Thread Christopher Schultz
All,

For those of you at ApacheCon in Miami, here are the details for the Tomcat 
Meetup. Come and meet fellow members of the community, committers, and new 
friends.

Time: 18:00 EDT
Place: Escorial Conference Room (where all TomcatCon sessions are being held)

All are welcome to the meetup, and also the inevitable dinner and drinks to 
follow.

Thanks,
-chris


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



Re: What jar files do I need to have a java ee website to connect to the databse

2017-05-16 Thread Hassan Schroeder
On Tue, May 16, 2017 at 3:07 PM, Yosef Fastow  wrote:
> Here is the information from my WEB_INF folder on the database
>
> 

Uh, it looks like your project uses MySQL, eh?

Searching for "mysql jdbc driver" might turn something up 😀

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote

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



Re: What jar files do I need to have a java ee website to connect to the databse

2017-05-16 Thread Yosef Fastow
Here is the information from my WEB_INF folder on the database








On Tue, May 16, 2017 at 3:32 PM, Igal @ Lucee.org  wrote:

> On 5/16/2017 12:15 PM, Yosef Fastow wrote:
>
>> The server version is not supported. The target server must be SQL Server
>> 2000 or later.
>>
>
> Well, what version is the SQL Server that you are trying to connect to?
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: What jar files do I need to have a java ee website to connect to the databse

2017-05-16 Thread Igal @ Lucee.org

On 5/16/2017 12:15 PM, Yosef Fastow wrote:

The server version is not supported. The target server must be SQL Server 2000 
or later.


Well, what version is the SQL Server that you are trying to connect to?


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



What jar files do I need to have a java ee website to connect to the databse

2017-05-16 Thread Yosef Fastow
 Hi, I am running apache Tomcat 7 for a java spring project on eclipse java
ee. I installed sqljbc.jar file and put it in the resource Library and the
WEB_INF/lib folders. When I run the server I get a:HTTP
Status 500 - Request processing failed; nested exception is
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get
JDBC Connection; nested exception is
org.apache.commons.dbcp.SQLNestedException:
Cannot create PoolableConnectionFactory (The server version is not
supported. The target server must be SQL Server 2000 or later.)

I installed sqljbc.jar but I am sure I need another version maybe
sqldbc.jar4. So if anyone knows what jar file I need or a way for me to
find out please answer back

Thanks in advance,
Yosef


Re: Can't get over 100 client connections?

2017-05-16 Thread tomcat

On 16.05.2017 19:57, john.e.gr...@wellsfargo.com.INVALID wrote:

All,

I'm using Tomcat 7.0.75.

I cannot get my connection or thread count over 100 no matter how much load I throw at 
the server.  Currently I just have a dummy app deployed that doesn't do much except sleep 
for about 500ms and return a canned response.  Initially I had maxThreads=20 with no 
explicit maxConnections.  I could get the "current threads busy" metric to 20 
easily.  Then I raised it to 100 and was able to reach that number easily.  Additionally, 
netstat told me I had 100 incoming connections to port 5114.  However raising the 
maxThreads higher doesn't make any difference, nor does explicitly specifying 
maxConnections=200.  In either case, I can only get 100 busy threads and 100 active 
connections.  Once I reach that limit, the response times on the client start going up.  
The Tomcat server itself isn't stressed at all.  CPU and GC are low.  The client is on a 
different server in the same data center.

I'm not going through a load balancer.  I'm going directly to the connector 
below:


 



Hi.
I do not know with what you are testing (as a client).
But be aware of the following :

1) >  keepAliveTimeout="1"
means 10 seconds.
It means that, after the last request which one particular client sends on its connection 
to Tomcat, and Tomcat has responded to it, Tomcat will keep that connection open for an 
additional 10 s., just waiting to see if that same client has anything more to request.
Since you are not using an Executor, keeping the connection open will also mean keeping 
the corresponding Tomcat thread alive, also waiting.
Only once this time is over, will Tomcat close this connection, and "recycle" the thread 
to serve another client connection.
2) there may be a limit in the server OS, as to how many connections a process can have 
open at the same time. If that limit is reached at some point, that may either crash the 
process that wants an additional one, or put it in some wait queue until one is available 
again.
3) when a client opens a connection to a server (or tries to), and the server process does 
not immediately respond to the "open connection" request, the TCP/IP stack on the server 
will place the connection-open request in a wait queue. The size of that queue is an 
adjustable TCP/IP parameter.
From the client side, if its connection is not accepted immediately (but not rejected 
right away), the client will just wait, until it is accepted. There is usually a timeout 
for this also, on the client side.


Some combination of the above may explain what you see.



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



Can't get over 100 client connections?

2017-05-16 Thread John.E.Gregg
All,

I'm using Tomcat 7.0.75.

I cannot get my connection or thread count over 100 no matter how much load I 
throw at the server.  Currently I just have a dummy app deployed that doesn't 
do much except sleep for about 500ms and return a canned response.  Initially I 
had maxThreads=20 with no explicit maxConnections.  I could get the "current 
threads busy" metric to 20 easily.  Then I raised it to 100 and was able to 
reach that number easily.  Additionally, netstat told me I had 100 incoming 
connections to port 5114.  However raising the maxThreads higher doesn't make 
any difference, nor does explicitly specifying maxConnections=200.  In either 
case, I can only get 100 busy threads and 100 active connections.  Once I reach 
that limit, the response times on the client start going up.  The Tomcat server 
itself isn't stressed at all.  CPU and GC are low.  The client is on a 
different server in the same data center.

I'm not going through a load balancer.  I'm going directly to the connector 
below:




Thanks

John



Re: AW: how to upgrade tomcat 8.5.x?

2017-05-16 Thread Igal @ Lucee.org

On 5/16/2017 8:27 AM, Kreuser, Peter wrote:


I'd say a more robust (and the documented way) is to use a Tomcat-Home 
directory and a Tomcat-Base Directory.

$CATALINA_HOME holds the actual distributed Tomcat-"Binaries" (ZIP/TGZ),
$CATALINA_BASE holds your adapted config, libs and webapps.

This way you can just exchange the CATALINA_HOME with a new version (say 
8.5.15) and restart Tomcat. In case there are differences in configs between 
versions, adapt your conf using 
https://tomcat.apache.org/migration-85.html#Tomcat_8.5.x_configuration_file_differences


I agree that separating the CATALINA_HOME from CATALINA_BASE is a much 
better setup, but if Tomcat was not set up like that already then for a 
minor upgrade this complicates the process.


The simplest way to upgrade is the one I documented.

Regards,

Igal Sapir
Lucee Core Developer
Lucee.org 



AW: how to upgrade tomcat 8.5.x?

2017-05-16 Thread Kreuser, Peter
Igal,

-Ursprüngliche Nachricht-
> Von: Igal @ Lucee.org [mailto:i...@lucee.org] 
> Gesendet: Dienstag, 16. Mai 2017 16:44
> An: Tomcat Users List; modjkl...@comcast.net
> Betreff: Re: how to upgrade tomcat 8.5.x?
> 
> On 5/16/2017 6:37 AM, modjkl...@comcast.net wrote:
> > I assume I need to shutdown Tomcat. Then, is there a set of directories I 
> > should just replace to perform the update? Are these directories listed 
> > somewhere? Then do I just restart Tomcat to finalize the update? Any advice 
> > much appreciated (the more specific the better).
> 
> A minor update, i.e. from 8.5.9 to 8.5.15 should be as simple as:
> 
> 1) Shut down Tomcat
> 2) Make a backup of {tomcat}/lib directory (cause you never know, right?)
> 3) Copy the lib directory from 8.5.15 to the {tomcat}/lib overwriting 
> the old jar files
> 4) Start up Tomcat
> 
> 
> Igal Sapir
> 
> Lucee Core Developer
> Lucee.org 
> 
>

I would disagree to do it this way.

I'd say a more robust (and the documented way) is to use a Tomcat-Home 
directory and a Tomcat-Base Directory.

$CATALINA_HOME holds the actual distributed Tomcat-"Binaries" (ZIP/TGZ),
$CATALINA_BASE holds your adapted config, libs and webapps.

This way you can just exchange the CATALINA_HOME with a new version (say 
8.5.15) and restart Tomcat. In case there are differences in configs between 
versions, adapt your conf using 
https://tomcat.apache.org/migration-85.html#Tomcat_8.5.x_configuration_file_differences
 

https://tomcat.apache.org/tomcat-8.5-doc/introduction.html#Directories_and_Files
https://tomcat.apache.org/tomcat-8.5-doc/RUNNING.txt

Just my 2cts

Peter




Re: JSP compilation 65535 bytes limit

2017-05-16 Thread Mohammed Manna
Hi Vidyadhar,

Some points to note here:

1) Setting those parameters in Web.xml file (CATALINA_HOME/conf) doesn't
guarantee that it won't happen. Tomcat 8.0.43 onwards have got this relaxed
out by using a more efficient error handling code. But you will have this
error if the code is truly hitting near the limit.
2) The issue occurs with Tomcat 8.0.39 onwards. Try to see if the issue
happens for tomcat 8.0.29. I can vouch for 8.0.29 where it didn't happen.
3) Did you try and follow my suggestion on point 3 (last email) about
checking the method sizes of the precompiled JSPs using apache commons BCEL
(bcel-5.4.1.jar) library? If yes, what did you find?


You also haven't mentioned what sort of JSPs you have that yields into such
error. Are you having legacy scriptlets which are quite heavy and uses lots
of custom tags? Try to use the following too:


trimSpaces
true


The above is having some inconsistency reported in a different email
thread, but I assume it should be fine in most of the cases. Try to see if
you can provide some results on the above points.


KR,

On 16 May 2017 at 15:29, Vidyadhar  wrote:

> Hello KR,
>
> On Fri, May 12, 2017 at 12:37 PM, Mohammed Manna 
> wrote:
>
> > I have two things which you might want to try out:
> >
> > 1) You will lose your JSP debugging capability - but if that's not your
> > concern, then in your CATALINA_HOME\conf folder append this for
> > "JspServlet"
> >
> > 
> > mappedfile
> > false
> > 
> > 
> > suppressSmap
> > true
> > 
> >
> We already tried this option. We included these lines in tomcat's web.xml
> file and restarted the services, but still it is giving the same error.
>
> >
> >  This will stop generating JSR45 debug info and Symbol Maps for JSP
> > pages ( I think I have said technical things right here, otherwise please
> > correct me!).
> >
> > 2) I sincerely recommend moving scriptlet code out of your JSP and remove
> > all unwanted/commented code, newline/carriages from your JSP. Even with
> the
> > config above, this might fail since the code is genuinely too large for
> > __jspService().
> >
> > 3) If possible, try to use Ant and precompile your JSP and iterate
> through
> > the .class files to check which method size is larger or close to 90% or
> > the 64k footprint. You can write a short program by leveraging java.io
> and
> > Apache commons BCEL library. Ant has a strange behaviour which doesn't
> > throw any exceptions if the Jsp method size exceeds the limit. But the
> > compilation occurs anyway. So you can go through those compiled files
> using
> > your custom tool and print the size of the methods.
> >
> >
> > I hope this helps you.
> >
> > Further to above we tried various tomcat version and as per our
> observation we are not seeing this error on 8.0.29 version. Note that the
> same error is still there in latest version i.e. 8.5.15.
>
> > KR,
> >
> > On 12 May 2017 at 07:58, Vidyadhar  wrote:
> >
> > > Hello Sagar,
> > >
> > > On Fri, 12 May 2017 at 12:26 PM, sagar kohli 
> > > wrote:
> > >
> > > > Try adding following init parameter in /conf/web.xml
> > > >
> > > > 
> > > >  mappedfile
> > > >  false
> > > > 
> > >
> > >
> > > We already tried it but no success.
> > >
> > > >
> > > >
> > > > On Fri, May 12, 2017 at 10:28 AM, Vidyadhar <
> techienote@gmail.com>
> > > > wrote:
> > > >
> > > > > Hello Team,
> > > > >
> > > > > Recently we did a upgrade existing tomcat from 7.0.42 to 7.0.76 on
> > > > windows
> > > > > box. Post the up gradation we are seeing following error in couple
> of
> > > > JSPs
> > > > >
> > > > > org.apache.jasper.JasperException: Unable to compile class for
> JSP:
> > > > >
> > > > > An error occurred at line: [231] in the generated java file:
> > > [C:\Program
> > > > > Files\Apache\Tomcat\work\Catalina\localhost\app\org\
> apache\jsp\jsp\
> > > > > applicationChange\applicationChangeMain_jsp.java]
> > > > > The code of method _jspService(HttpServletRequest,
> > > HttpServletResponse)
> > > > is
> > > > > exceeding the 65535 bytes limit
> > > > >
> > > > > Stacktrace:
> > > > > org.apache.jasper.compiler.DefaultErrorHandler.javacError(
> > > > > DefaultErrorHandler.java:103)
> > > > > org.apache.jasper.compiler.ErrorDispatcher.javacError(
> > > > > ErrorDispatcher.java:366)
> > > > >
> > > > org.apache.jasper.compiler.JDTCompiler.generateClass(
> > > JDTCompiler.java:490)
> > > > > org.apache.jasper.compiler.Compiler.compile(Compiler.java:379)
> > > > > org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
> > > > > org.apache.jasper.compiler.Compiler.compile(Compiler.java:341)
> > > > > I have checked the various threads on tomcat support archive and
> did
> > > try
> > > > > following solution which did not work on 7.0.76 as well as on
> 7.0.77.
> > > > >
> > > > > 1. Following changes in conf/web.xml
> > > > > 
> > > > > mappedfile
> > > > > false
> > > > > 
> > > > > 
> > > > > compiler
>

Re: how to upgrade tomcat 8.5.x?

2017-05-16 Thread Igal @ Lucee.org

On 5/16/2017 6:37 AM, modjkl...@comcast.net wrote:

I assume I need to shutdown Tomcat. Then, is there a set of directories I 
should just replace to perform the update? Are these directories listed 
somewhere? Then do I just restart Tomcat to finalize the update? Any advice 
much appreciated (the more specific the better).


A minor update, i.e. from 8.5.9 to 8.5.15 should be as simple as:

1) Shut down Tomcat
2) Make a backup of {tomcat}/lib directory (cause you never know, right?)
3) Copy the lib directory from 8.5.15 to the {tomcat}/lib overwriting 
the old jar files

4) Start up Tomcat


Igal Sapir

Lucee Core Developer
Lucee.org 



Re: JSP compilation 65535 bytes limit

2017-05-16 Thread Vidyadhar
Hello KR,

On Fri, May 12, 2017 at 12:37 PM, Mohammed Manna  wrote:

> I have two things which you might want to try out:
>
> 1) You will lose your JSP debugging capability - but if that's not your
> concern, then in your CATALINA_HOME\conf folder append this for
> "JspServlet"
>
> 
> mappedfile
> false
> 
> 
> suppressSmap
> true
> 
>
We already tried this option. We included these lines in tomcat's web.xml
file and restarted the services, but still it is giving the same error.

>
>  This will stop generating JSR45 debug info and Symbol Maps for JSP
> pages ( I think I have said technical things right here, otherwise please
> correct me!).
>
> 2) I sincerely recommend moving scriptlet code out of your JSP and remove
> all unwanted/commented code, newline/carriages from your JSP. Even with the
> config above, this might fail since the code is genuinely too large for
> __jspService().
>
> 3) If possible, try to use Ant and precompile your JSP and iterate through
> the .class files to check which method size is larger or close to 90% or
> the 64k footprint. You can write a short program by leveraging java.io and
> Apache commons BCEL library. Ant has a strange behaviour which doesn't
> throw any exceptions if the Jsp method size exceeds the limit. But the
> compilation occurs anyway. So you can go through those compiled files using
> your custom tool and print the size of the methods.
>
>
> I hope this helps you.
>
> Further to above we tried various tomcat version and as per our
observation we are not seeing this error on 8.0.29 version. Note that the
same error is still there in latest version i.e. 8.5.15.

> KR,
>
> On 12 May 2017 at 07:58, Vidyadhar  wrote:
>
> > Hello Sagar,
> >
> > On Fri, 12 May 2017 at 12:26 PM, sagar kohli 
> > wrote:
> >
> > > Try adding following init parameter in /conf/web.xml
> > >
> > > 
> > >  mappedfile
> > >  false
> > > 
> >
> >
> > We already tried it but no success.
> >
> > >
> > >
> > > On Fri, May 12, 2017 at 10:28 AM, Vidyadhar 
> > > wrote:
> > >
> > > > Hello Team,
> > > >
> > > > Recently we did a upgrade existing tomcat from 7.0.42 to 7.0.76 on
> > > windows
> > > > box. Post the up gradation we are seeing following error in couple of
> > > JSPs
> > > >
> > > > org.apache.jasper.JasperException: Unable to compile class for JSP:
> > > >
> > > > An error occurred at line: [231] in the generated java file:
> > [C:\Program
> > > > Files\Apache\Tomcat\work\Catalina\localhost\app\org\apache\jsp\jsp\
> > > > applicationChange\applicationChangeMain_jsp.java]
> > > > The code of method _jspService(HttpServletRequest,
> > HttpServletResponse)
> > > is
> > > > exceeding the 65535 bytes limit
> > > >
> > > > Stacktrace:
> > > > org.apache.jasper.compiler.DefaultErrorHandler.javacError(
> > > > DefaultErrorHandler.java:103)
> > > > org.apache.jasper.compiler.ErrorDispatcher.javacError(
> > > > ErrorDispatcher.java:366)
> > > >
> > > org.apache.jasper.compiler.JDTCompiler.generateClass(
> > JDTCompiler.java:490)
> > > > org.apache.jasper.compiler.Compiler.compile(Compiler.java:379)
> > > > org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
> > > > org.apache.jasper.compiler.Compiler.compile(Compiler.java:341)
> > > > I have checked the various threads on tomcat support archive and did
> > try
> > > > following solution which did not work on 7.0.76 as well as on 7.0.77.
> > > >
> > > > 1. Following changes in conf/web.xml
> > > > 
> > > > mappedfile
> > > > false
> > > > 
> > > > 
> > > > compiler
> > > > modern
> > > > 
> > > > 2. Increased the buffer size.
> > > >
> > > > Can some one suggest some ways to resolve this error, without
> > downgrading
> > > > to 7.0.42
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Regards,
> > > > Vidyadhar
> > > >
> > >
> > >
> > >
> > > --
> > > Regards,
> > > sagar kohli
> > >
> > --
> > Regards,
> > Vidyadhar
> >
>



-- 
Regards,
Vidyadhar


how to upgrade tomcat 8.5.x?

2017-05-16 Thread modjklist
First-time Tomcat user here. I installed 8.5.9months ago, and would like to 
upgrade to the latest 8.5.15. I see there's some documentation for updating the 
8.5.x branch here, 


http://tomcat.apache.org/migration-85.html#Upgrading_8.5.x


but I'm missing some context. I have a fairly simple install/application, and 
wonder what the conventional wisdom is how to perform the update.


I assume I need to shutdown Tomcat. Then, is there a set of directories I 
should just replace to perform the update? Are these directories listed 
somewhere? Then do I just restart Tomcat to finalize the update? Any advice 
much appreciated (the more specific the better). Thanks in advance, Gerry

Re: [ANN] Apache Tomcat 8.5.15 available

2017-05-16 Thread Violeta Georgieva
Hi,

2017-05-16 13:59 GMT+03:00 Tobias Brennecke :
>
> Hi everyone,
> will there also be a release of Tomcat 7.78?

Tomcat 7.0.78 will be available in the next days.

Regards,
Violeta

>
> > The Apache Tomcat team announces the immediate availability of Apache
> > Tomcat 8.5.15.
> >
> > - Review those places where Tomcat re-encodes a URI or URI component
> >   and ensure that the correct encoding is consistently applied.
> >
> I would appreciate to have the URI encoding fix available in Tomcat 7,
too.
>
>
> Regards,
>
> Tobias
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>


Re: [ANN] Apache Tomcat 8.5.15 available

2017-05-16 Thread Tobias Brennecke
Hi everyone,
will there also be a release of Tomcat 7.78?

> The Apache Tomcat team announces the immediate availability of Apache
> Tomcat 8.5.15.
>
> - Review those places where Tomcat re-encodes a URI or URI component
>   and ensure that the correct encoding is consistently applied.
>
I would appreciate to have the URI encoding fix available in Tomcat 7, too.


Regards,

Tobias



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



Re: Tomcat 8.5.15 Released?

2017-05-16 Thread Lulseged Zerfu
Hi


It is wrong link.


Use instead:

http://tomcat.apache.org/tomcat-8.5-doc/changelog.html#Tomcat_8.5.15_(markt)


BR

Lulseged



From: Adam Rauch 
Sent: Tuesday, May 16, 2017 3:58 AM
To: users@tomcat.apache.org
Subject: Tomcat 8.5.15 Released?

Is Tomcat 8.5.15 officially released? The home page
(http://tomcat.apache.org/index.html) seems to indicate that it was released
Apache Tomcat® - Welcome!
tomcat.apache.org
The Apache Tomcat Project is proud to announce the release of version 9.0.0.M20 
(alpha) of Apache Tomcat. The is a milestone release of the 9.0.x branch and 
has been ...



2017-05-10. however, the text of the section references the "release of
version 8.5.14" and "notable changes compared to 8.5.13." And the changelog
link hits the 8.5.14 anchor. Also, the archives show no 8.5.15 post to the
tomcat-announce list.



Perhaps the release is still in progress, but the page has been in this
state for a few days.



Thanks,

Adam



Re: Tomcat 8.5.15 Released?

2017-05-16 Thread Violeta Georgieva
Hi,

2017-05-16 6:58 GMT+03:00 Adam Rauch :
>
> Is Tomcat 8.5.15 officially released?

Yes it is released. The home page was corrected.
You should receive also an announcement mail.

Regards,
Violeta

> The home page
> (http://tomcat.apache.org/index.html) seems to indicate that it was
released
> 2017-05-10. however, the text of the section references the "release of
> version 8.5.14" and "notable changes compared to 8.5.13." And the
changelog
> link hits the 8.5.14 anchor. Also, the archives show no 8.5.15 post to the
> tomcat-announce list.
>
>
>
> Perhaps the release is still in progress, but the page has been in this
> state for a few days.
>
>
>
> Thanks,
>
> Adam
>


[ANN] Apache Tomcat 8.5.15 available

2017-05-16 Thread Violeta Georgieva
The Apache Tomcat team announces the immediate availability of Apache
Tomcat 8.5.15.

Tomcat 8.x users should normally be using 8.5.x releases in preference
to 8.0.x releases.

Apache Tomcat 8 is an open source software implementation of the Java
Servlet, JavaServer Pages, Java Unified Expression Language, Java
WebSocket and Java Authentication Service Provider Interface for
Containers technologies.

Apache Tomcat 8.5.x is intended to replace 8.0.x and includes new
features pulled forward from the 9.0.x branch. The notable changes since
8.5.14 include:


- Various improvements to the handling of static custom error pages

- Update to Eclipse JDT Compiler 4.6.3

- Review those places where Tomcat re-encodes a URI or URI component
  and ensure that the correct encoding is consistently applied.



Please refer to the change log for the complete list of changes:
http://tomcat.apache.org/tomcat-8.5-doc/changelog.html

Downloads:
http://tomcat.apache.org/download-80.cgi

Migration guides from Apache Tomcat 5.x, 6.x, 7.x and 8.0.x:
http://tomcat.apache.org/migration.html

Enjoy!

- The Apache Tomcat team


RE: How to monitor Tomcat connectors?

2017-05-16 Thread Pesonen, Harri
I looked at Tomcat code, and it seems that it is not possible. Bootstrap has 
private static instance:

public final class Bootstrap {

/**
 * Daemon object used by main.
 */
private static Bootstrap daemon = null;

And it is not possible to get this.
If it was, then still it would not possible to get the Catalina instance, which 
is also private:

private Object catalinaDaemon = null;

But if I would get the Catalina instance somehow, then I probably could get 
Server and connectors and everything.

I wonder if it would be possible to add such static method to Bootstrap:

public static Object getCatalina() {
if (daemon != null) {
return daemon.catalinaDaemon;
}
return null;
}

But I have a feeling that there must be some better way of doing this.

-Harri

-Original Message-
From: Pesonen, Harri [mailto:harri.peso...@sap.com] 
Sent: 15. toukokuuta 2017 18:10
To: Tomcat Users List 
Subject: How to monitor Tomcat connectors?

Hello, what would be the best way to find out if any of Tomcat connectors have 
failed to initialize at startup?
They could fail for many reasons, like when the port is already in use, or 
keystore is missing etc.
Now Tomcat prints the error in log, but I would like to find out 
programmatically if any of the connectors have failed.
Or alternatively, fail the Tomcat and shutdown it if any connectors fail.

I see that Connector has getState():

https://tomcat.apache.org/tomcat-8.5-doc/api/org/apache/catalina/util/LifecycleBase.html#getState()

public LifecycleState getState()
Obtain the current state of the source component.
Specified by:
getState in interface Lifecycle
Returns:
The current state of the source component.

DESTROYED
DESTROYING
FAILED
INITIALIZED
INITIALIZING
NEW
STARTED
STARTING
STARTING_PREP
STOPPED
STOPPING
STOPPING_PREP

If the state is any of (DESTROYED, DESTROYING, FAILED) then I think that it has 
failed.
Then question is, how to get the connectors? Is there some static method to get 
Tomcat server instance and then connectors?

I am starting Tomcat using static Bootstrap method main:
https://tomcat.apache.org/tomcat-8.5-doc/api/org/apache/catalina/startup/Bootstrap.html#main(java.lang.String[])

I wonder how to get the started Tomcat instance?

-Harri

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