Re: Tomcat 8.5.15 Released?

2017-05-15 Thread Maxim Solodovnik
It is in Maven:
http://repo1.maven.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/8.5.15/
So I guess it is released

On Tue, May 16, 2017 at 10:58 AM, Adam Rauch  wrote:

> Is Tomcat 8.5.15 officially released? 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
>
>


-- 
WBR
Maxim aka solomax


Tomcat 8.5.15 Released?

2017-05-15 Thread Adam Rauch
Is Tomcat 8.5.15 officially released? 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



Re: MaxThread Configurations Issue

2017-05-15 Thread Mark Eggers
Shailesh,

On 5/15/2017 8:22 AM, Shailesh Jain wrote:
> We have updated the maxThread configuration to 10 at below place in
> server.xml of DEV environment. However I was able to see more than 10
> threads. I have also attached the server.xml
> 
> I need your help to understand if I am doing something wrong or it is an
> expected behaviour?
> 
> 
>  redirectPort="8443" maxThreads="10"/>
> 
> 

Tomcat uses other threads besides the connector threads. This
configuration only limits the number of connector threads.

. . . just my two cents
/mde/



signature.asc
Description: OpenPGP digital signature


Tomcat 9: using static files in my servlet

2017-05-15 Thread Pranav Lal
Hi all,

I am using tomcat version 9.0.0.M20
My question is that my servlet needs to read files and write a log of what it
did. Where do I place the files to be read? Do I put then in the
C:\tomcat\webapps\cisoWeb\WEB-INF folder? 
Note:
I am using windows 10 creators update for development but will switch to Linux
when I deploy the program.
background: 
I have created a servlet using the quorum programming language.(
https://quorumlanguage.com/) The servlet is a chatbot. The program asks the user
a question, looks up the answer and then returns a response. The bot is using
AIML as a database. There is a java library I am using to handle the AIML so the
need for java to run on the server.

I am including my web.xml and the context.xml files. I am not sure what I am
doing wrong but whenever I run my servlet, I am told that a file is not found.

http://java.sun.com/xml/ns/javaee;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;>

Processor
web.servlet.Processor


Processor
/



30



Processor



Context.xml



Pranav


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



Tomcat 9: using static files in my servlet

2017-05-15 Thread Pranav Lal
Hi all,

I am using tomcat version 9.0.0.M20
My question is that my servlet needs to read files and write a log of what it
did. Where do I place the files to be read? Do I put then in the
C:\tomcat\webapps\cisoWeb\WEB-INF folder? 
Note:
I am using windows 10 creators update for development but will switch to Linux
when I deploy the program.
background: 
I have created a servlet using the quorum programming language.(
https://quorumlanguage.com/) The servlet is a chatbot. The program asks the user
a question, looks up the answer and then returns a response. The bot is using
AIML as a database. There is a java library I am using to handle the AIML so the
need for java to run on the server.

I am including my web.xml and the context.xml files. I am not sure what I am
doing wrong but whenever I run my servlet, I am told that a file is not found.

http://java.sun.com/xml/ns/javaee;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;>

Processor
web.servlet.Processor


Processor
/



30



Processor



Context.xml



Pranav


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



MaxThread Configurations Issue

2017-05-15 Thread Shailesh Jain
We have updated the maxThread configuration to 10 at below place in
server.xml of DEV environment. However I was able to see more than 10
threads. I have also attached the server.xml

I need your help to understand if I am doing something wrong or it is an
expected behaviour?








-- 
Thanks
Shailesh





  
  
  
  
  
  
  
  
  

  
  


  

  
  
  







   









 


  
  

  
  

  
  

  
  





			 

			   

  

  


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

How to monitor Tomcat connectors?

2017-05-15 Thread Pesonen, Harri
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


Encode uri

2017-05-15 Thread Yuval Schwartz
Tomcat version: 8.0.43
java: 1.8.0_05

Hello,

On some web browsers, clients are able to enter uri's with unescaped
illegal characters (eg: "|" or pipe).
This causes an IllegalArgumentException to be thrown and a 400 response
code.
This behavior is reported here:
https://bz.apache.org/bugzilla/show_bug.cgi?id=60425

Is there anyway to encode the URI (maybe in a filter or something) so that
this exception and response code is not returned, and then a normal 404
would be returned?

I have tried placing the URIEncode attribute in the connector element of
the server.xml file but I think this only effects how the URI is decoded.

Thank you.


Re: Problem with get ROOT context in servlet on tomcat 8.0.30 (jdk 1.7.0_79)

2017-05-15 Thread mwbxtr
I believe I am having an issue with getting the ROOT context from a different
app context. This was working in 8.0.14, but no longer works in 8.0.43.

Root context exists and (includes crossContext=true in conf/context.xml) 

Within Context: /app1

public class CrossContextExample { 

private ServletContext app1Context; 

public someMethod() { 
ServletContext rootContext = this.app1Context.getContext("/"); 
// rootContext == null :( Used to be the ServletContext of ROOT 
} 
} 

I think this came as a result of  this change

  
by markt?



--
View this message in context: 
http://tomcat.10.x6.nabble.com/Problem-with-get-ROOT-context-in-servlet-on-tomcat-8-0-30-jdk-1-7-0-79-tp509p5063440.html
Sent from the Tomcat - User mailing list archive at Nabble.com.

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



Re: trimSpaces removing whitespace from html

2017-05-15 Thread David Kavanagh
Ok cool, hopefully that will reproduce so you can see for yourself.
Thanks!

On 15 May 2017 at 10:39, Mark Thomas  wrote:

> On 12/05/17 17:08, David Kavanagh wrote:
> > Yes, this is one of the .jsp files. I don't know how useful this is.
>
> Hopefully this will reproduce this. Looking at this is on my TODO list
> while I'm at ApacheCon.
>
> > Has anyone heard of a similar issue using trimSpaces before, or do you
> > think this might be something to do with the particular files being used?
>
> This isn't anything I recall seeing before. The parsing is all handled
> by the JRE. While historically the XML parsing provided by the JRE was
> fairly buggy, these days it is much better. One thing on my TODO list is
> to check the XML specs to make sure that any required escaping is not
> missing or something along those lines.
>
>
>
> >
> > Thanks
> >
> > <%@taglib prefix="dali" uri="http://dev.marfeel.com/jsp/mrf/dali; %>
> > <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core; %>
> >
> > <%@page pageEncoding="UTF-8" %>
> >
> > 
> >  >   imageClass="l"
> >   size="xs"
> >   layout="${layout}"
> >   defaultLayoutName="author"
> >   item="${currentItem}"
> >   articleTemplate="articleTemplates/author.jsp"
> >   extended="false"/>
> >
> > On 11 May 2017 at 18:35, Mark Thomas  wrote:
> >
> >> On 11 May 2017 15:34:32 BST, David Kavanagh  >
> >> wrote:
> >>> Yes, the problem happens in the class attribute string.
> >>> They are some examples but it happened throughout the files in many
> >>> cases.
> >>>
> >>> I am using .jsp files
> >>>
> >>> Also, in the second example that i gave, you can see that mrf-video was
> >>> removed as well as mrf-m and mrf-image being joined.
> >>> This was the strangest one to me, and it only happened once in the
> >>> file.
> >>>
> >>>
> >>> On 11 May 2017 at 15:33, Torsten Krah  wrote:
> >>>
>  Am Donnerstag, den 11.05.2017, 09:23 -0400 schrieb Christopher
> >>> Schultz:
> > So, removing the trailing space in the "class" attribute's value?
> 
>  That too - but have a look at:
> 
>  mrf-mmrf-image
> 
>  it was before / should be:
> 
>  mrf-m mrf-image
> 
>  there are missing whitespaces in the actual class attributes content.
> 
>  Torsten
> 
> 
>  -
>  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>  For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> >>
> >> Can you provide the simplest JSP that reproduces this issue?
> >>
> >> Mark
> >>
> >> -
> >> 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
>
>


Re: trimSpaces removing whitespace from html

2017-05-15 Thread Mark Thomas
On 12/05/17 17:08, David Kavanagh wrote:
> Yes, this is one of the .jsp files. I don't know how useful this is.

Hopefully this will reproduce this. Looking at this is on my TODO list
while I'm at ApacheCon.

> Has anyone heard of a similar issue using trimSpaces before, or do you
> think this might be something to do with the particular files being used?

This isn't anything I recall seeing before. The parsing is all handled
by the JRE. While historically the XML parsing provided by the JRE was
fairly buggy, these days it is much better. One thing on my TODO list is
to check the XML specs to make sure that any required escaping is not
missing or something along those lines.



> 
> Thanks
> 
> <%@taglib prefix="dali" uri="http://dev.marfeel.com/jsp/mrf/dali; %>
> <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core; %>
> 
> <%@page pageEncoding="UTF-8" %>
> 
> 
>imageClass="l"
>   size="xs"
>   layout="${layout}"
>   defaultLayoutName="author"
>   item="${currentItem}"
>   articleTemplate="articleTemplates/author.jsp"
>   extended="false"/>
> 
> On 11 May 2017 at 18:35, Mark Thomas  wrote:
> 
>> On 11 May 2017 15:34:32 BST, David Kavanagh 
>> wrote:
>>> Yes, the problem happens in the class attribute string.
>>> They are some examples but it happened throughout the files in many
>>> cases.
>>>
>>> I am using .jsp files
>>>
>>> Also, in the second example that i gave, you can see that mrf-video was
>>> removed as well as mrf-m and mrf-image being joined.
>>> This was the strangest one to me, and it only happened once in the
>>> file.
>>>
>>>
>>> On 11 May 2017 at 15:33, Torsten Krah  wrote:
>>>
 Am Donnerstag, den 11.05.2017, 09:23 -0400 schrieb Christopher
>>> Schultz:
> So, removing the trailing space in the "class" attribute's value?

 That too - but have a look at:

 mrf-mmrf-image

 it was before / should be:

 mrf-m mrf-image

 there are missing whitespaces in the actual class attributes content.

 Torsten


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


>>
>> Can you provide the simplest JSP that reproduces this issue?
>>
>> Mark
>>
>> -
>> 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