Re: Responsive Website for tomcat.apache.org

2018-01-26 Thread Violeta Georgieva
Hi,

2018-01-26 7:14 GMT+02:00 Igal Sapir :
>
> Please see patch at https://github.com/isapir/tomcat-site/commit/5e4d642
> which adjusts the search box alignment and adds a keyboard toggle with the
> Enter key when the hamburger menu icon has focus.

Here is what I see after applying the patch to the website:
https://github.com/violetagg/tomcat-website-screenshots/tree/master/r1822263

Regards,
Violeta

> Best,
>
>
> Igal
>
> On Thu, Jan 25, 2018 at 1:34 PM, Igal @ Lucee.org  wrote:
>
> > On 1/25/2018 1:04 PM, Konstantin Kolinko wrote:
> >
> >> 2018-01-25 20:06 GMT+03:00 Igal @ Lucee.org :
> >>
> >>> Thank you for sharing your screenshots.  I am not sure why that
happened
> >>> but
> >>> I will fix it.
> >>>
> >>> The first thing that comes to mind is a cached CSS file, so I will
rename
> >>> the file to make sure that that's not a factor.  It's a bit
challenging
> >>> that
> >>> I can't reproduce it on my system, but I will check on my Fedora
laptop
> >>> too.
> >>>
> >> That Firefox is run with a separate profile that I use for testing -
> >> it has caching disabled.
> >>
> >> Comparing eu/us mirrors, both are the same,
> >> http://tomcat.eu.apache.org/
> >> http://tomcat.us.apache.org/
> >>
> >> What happens when you zoom out?
> >>
> >> Looking for active css rules on the input element,
> >>
> >> .searchbox input[type="search"], .searchbox button {
> >>  height: 25px;
> >> }
> >>
> >> Why a "type" selector is here? Can it be more simple?
> >> It can be just #query, as this input has an id.
> >>
> > Styling by ID instead of a class has other implications, primarily
> > specificity [1], which makes projects styling harder to maintain.  I am
> > unaware of any browser that has issue with that selector.  If there is
then
> > I can modify it.
> >
> > Why the height is in pixels, not in font units?
> >>
> >> There is a css rule for height (quoted above),  but there is no rule
> >> for width of this input field.
> >> (When size attribute not specified it should default to size="20", and
> >> width depends on the actual font).
> >>
> > The width here came from the parent container.  I was unaware of any
> > issues as all 4 browsers (Chrome, Firefox, Edge, IE11) that I tested on
> > rendered it correctly in my testing.
> >
> > I will fix the known issues and submit a new patch.
> >
> > Thank you,
> >
> >
> > Igal
> >
> > [1] https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity
> >


svn commit: r1822263 - in /tomcat/site/trunk: docs/res/css/tomcat.css docs/res/js/tomcat.js xdocs/res/css/tomcat.css xdocs/res/js/tomcat.js xdocs/stylesheets/tomcat-site.xsl

2018-01-26 Thread violetagg
Author: violetagg
Date: Fri Jan 26 09:52:34 2018
New Revision: 1822263

URL: http://svn.apache.org/viewvc?rev=1822263=rev
Log:
Adjusted searchbox alignment and added menu toggle by hitting enter.
Patch by Igal Sapir.

Modified:
tomcat/site/trunk/docs/res/css/tomcat.css
tomcat/site/trunk/docs/res/js/tomcat.js
tomcat/site/trunk/xdocs/res/css/tomcat.css
tomcat/site/trunk/xdocs/res/js/tomcat.js
tomcat/site/trunk/xdocs/stylesheets/tomcat-site.xsl

Modified: tomcat/site/trunk/docs/res/css/tomcat.css
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/res/css/tomcat.css?rev=1822263=1822262=1822263=diff
==
--- tomcat/site/trunk/docs/res/css/tomcat.css (original)
+++ tomcat/site/trunk/docs/res/css/tomcat.css Fri Jan 26 09:52:34 2018
@@ -325,18 +325,22 @@ table.defaultTable th, table.defaultTabl
 
 .searchbox {
   position: relative;
+  max-width: 190px;
+  height: 2.25em;
+  overflow: hidden;
 }
 
 .searchbox form {
   margin: 0;
 }
 
-.searchbox input[type=search], .searchbox button {
-  height: 25px;
+.searchbox input, .searchbox button {
+  height: 100%;
 }
 
 .searchbox button {
   position: absolute;
+  top: 0;
   right: 0;
 }
 

Modified: tomcat/site/trunk/docs/res/js/tomcat.js
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/res/js/tomcat.js?rev=1822263=1822262=1822263=diff
==
--- tomcat/site/trunk/docs/res/js/tomcat.js (original)
+++ tomcat/site/trunk/docs/res/js/tomcat.js Fri Jan 26 09:52:34 2018
@@ -31,7 +31,6 @@ function addLiveEventListeners(selector,
 handler(evt);
 return;
 }
-
 target = target.parentElement;
 }
 }
@@ -40,6 +39,17 @@ function addLiveEventListeners(selector,
 }
 
 
+/** adds event listener to the elements that match the selector */
+function addEventListeners(selector, event, handler, useCapture){
+[].forEach.call(
+document.querySelectorAll(selector)
+   ,function(el, ix) {
+  el.addEventListener(event, handler, useCapture || false);
+}
+);
+}
+
+
 /** toggles a class for all of the nodes that match a selector akin to 
jQuery's toggleClass() */
 function toggleClass(selector, className){
 var nodes = document.querySelectorAll(selector);
@@ -51,3 +61,19 @@ function toggleClass(selector, className
 });
 }
 
+
+function toggleMenu(){
+toggleClass("#mainLeft", "opened");
+toggleClass(".menu-toggler", "opened");
+}
+
+
+addEventListeners(".menu-toggler", "click", function(evt){
+toggleMenu();
+});
+
+
+addEventListeners(".menu-toggler", "keyup", function(evt){
+if (evt.which == 13)
+toggleMenu();
+});

Modified: tomcat/site/trunk/xdocs/res/css/tomcat.css
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/res/css/tomcat.css?rev=1822263=1822262=1822263=diff
==
--- tomcat/site/trunk/xdocs/res/css/tomcat.css (original)
+++ tomcat/site/trunk/xdocs/res/css/tomcat.css Fri Jan 26 09:52:34 2018
@@ -325,18 +325,22 @@ table.defaultTable th, table.defaultTabl
 
 .searchbox {
   position: relative;
+  max-width: 190px;
+  height: 2.25em;
+  overflow: hidden;
 }
 
 .searchbox form {
   margin: 0;
 }
 
-.searchbox input[type=search], .searchbox button {
-  height: 25px;
+.searchbox input, .searchbox button {
+  height: 100%;
 }
 
 .searchbox button {
   position: absolute;
+  top: 0;
   right: 0;
 }
 

Modified: tomcat/site/trunk/xdocs/res/js/tomcat.js
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/res/js/tomcat.js?rev=1822263=1822262=1822263=diff
==
--- tomcat/site/trunk/xdocs/res/js/tomcat.js (original)
+++ tomcat/site/trunk/xdocs/res/js/tomcat.js Fri Jan 26 09:52:34 2018
@@ -31,7 +31,6 @@ function addLiveEventListeners(selector,
 handler(evt);
 return;
 }
-
 target = target.parentElement;
 }
 }
@@ -40,6 +39,17 @@ function addLiveEventListeners(selector,
 }
 
 
+/** adds event listener to the elements that match the selector */
+function addEventListeners(selector, event, handler, useCapture){
+[].forEach.call(
+document.querySelectorAll(selector)
+   ,function(el, ix) {
+  el.addEventListener(event, handler, useCapture || false);
+}
+);
+}
+
+
 /** toggles a class for all of the nodes that match a selector akin to 
jQuery's toggleClass() */
 function toggleClass(selector, className){
 var nodes = document.querySelectorAll(selector);
@@ -51,3 +61,19 @@ function toggleClass(selector, className
 });
 }
 
+
+function toggleMenu(){
+toggleClass("#mainLeft", "opened");
+toggleClass(".menu-toggler", "opened");
+}
+
+
+addEventListeners(".menu-toggler", 

svn commit: r1822283 - in /tomcat/site/trunk: docs/ xdocs/res/js/

2018-01-26 Thread kkolinko
Author: kkolinko
Date: Fri Jan 26 12:28:55 2018
New Revision: 1822283

URL: http://svn.apache.org/viewvc?rev=1822283=rev
Log:
Regenerate the site. (Touch tomcat-site.xsl and run Ant)

Modified:
tomcat/site/trunk/docs/bugreport.html
tomcat/site/trunk/docs/ci.html
tomcat/site/trunk/docs/conference.html
tomcat/site/trunk/docs/contact.html
tomcat/site/trunk/docs/download-70.html
tomcat/site/trunk/docs/download-80.html
tomcat/site/trunk/docs/download-90.html
tomcat/site/trunk/docs/download-connectors.html
tomcat/site/trunk/docs/download-native.html
tomcat/site/trunk/docs/download-taglibs.html
tomcat/site/trunk/docs/findhelp.html
tomcat/site/trunk/docs/getinvolved.html
tomcat/site/trunk/docs/heritage.html
tomcat/site/trunk/docs/index.html
tomcat/site/trunk/docs/irc.html
tomcat/site/trunk/docs/legal.html
tomcat/site/trunk/docs/lists.html
tomcat/site/trunk/docs/maven-plugin.html
tomcat/site/trunk/docs/migration-6.html
tomcat/site/trunk/docs/migration-7.html
tomcat/site/trunk/docs/migration-8.html
tomcat/site/trunk/docs/migration-85.html
tomcat/site/trunk/docs/migration-9.html
tomcat/site/trunk/docs/migration.html
tomcat/site/trunk/docs/oldnews-2010.html
tomcat/site/trunk/docs/oldnews-2011.html
tomcat/site/trunk/docs/oldnews-2012.html
tomcat/site/trunk/docs/oldnews-2013.html
tomcat/site/trunk/docs/oldnews-2014.html
tomcat/site/trunk/docs/oldnews-2015.html
tomcat/site/trunk/docs/oldnews-2016.html
tomcat/site/trunk/docs/oldnews.html
tomcat/site/trunk/docs/presentations.html
tomcat/site/trunk/docs/resources.html
tomcat/site/trunk/docs/security-3.html
tomcat/site/trunk/docs/security-4.html
tomcat/site/trunk/docs/security-5.html
tomcat/site/trunk/docs/security-6.html
tomcat/site/trunk/docs/security-7.html
tomcat/site/trunk/docs/security-8.html
tomcat/site/trunk/docs/security-9.html
tomcat/site/trunk/docs/security-impact.html
tomcat/site/trunk/docs/security-jk.html
tomcat/site/trunk/docs/security-native.html
tomcat/site/trunk/docs/security-taglibs.html
tomcat/site/trunk/docs/security.html
tomcat/site/trunk/docs/svn.html
tomcat/site/trunk/docs/taglibs.html
tomcat/site/trunk/docs/tomcat-55-eol.html
tomcat/site/trunk/docs/tomcat-60-eol.html
tomcat/site/trunk/docs/tomcat-80-eol.html
tomcat/site/trunk/docs/tools.html
tomcat/site/trunk/docs/whichversion.html
tomcat/site/trunk/docs/whoweare.html
tomcat/site/trunk/xdocs/res/js/tomcat.js

Modified: tomcat/site/trunk/docs/bugreport.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/bugreport.html?rev=1822283=1822282=1822283=diff
==
--- tomcat/site/trunk/docs/bugreport.html (original)
+++ tomcat/site/trunk/docs/bugreport.html Fri Jan 26 12:28:55 2018
@@ -12,7 +12,7 @@
 
 
 
-
+
 
 
 http://tomcat.apache.org/;>
@@ -27,11 +27,11 @@
 
 
 
-
 https://www.google.com/search; method="get">
+
 GO
-
 
+
 
 
 Apache Tomcat
@@ -995,11 +995,6 @@ See Security Rep
 Software Foundation.
   
 
-
-  addLiveEventListeners(".menu-toggler", "click", function(evt){
-toggleClass("#mainLeft", "opened");
-toggleClass(".menu-toggler", "opened");
-  });
-
+
 
 

Modified: tomcat/site/trunk/docs/ci.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/ci.html?rev=1822283=1822282=1822283=diff
==
--- tomcat/site/trunk/docs/ci.html (original)
+++ tomcat/site/trunk/docs/ci.html Fri Jan 26 12:28:55 2018
@@ -11,7 +11,7 @@
 
 
 
-
+
 
 
 http://tomcat.apache.org/;>
@@ -26,11 +26,11 @@
 
 
 
-
 https://www.google.com/search; method="get">
+
 GO
-
 
+
 
 
 Apache Tomcat
@@ -934,11 +934,6 @@ prepared and published by ASF Buildbot,
 Software Foundation.
   
 
-
-  addLiveEventListeners(".menu-toggler", "click", function(evt){
-toggleClass("#mainLeft", "opened");
-toggleClass(".menu-toggler", "opened");
-  });
-
+
 
 

Modified: tomcat/site/trunk/docs/conference.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/conference.html?rev=1822283=1822282=1822283=diff
==
--- tomcat/site/trunk/docs/conference.html (original)
+++ tomcat/site/trunk/docs/conference.html Fri Jan 26 12:28:55 2018
@@ -11,7 +11,7 @@
 
 
 
-
+
 
 
 http://tomcat.apache.org/;>
@@ -26,11 +26,11 @@
 
 
 
-
 https://www.google.com/search; method="get">
+
 GO
-
 
+
 
 
 Apache Tomcat
@@ -376,11 +376,6 @@ for speaker travel and associated expens
 Software Foundation.
   
 
-
-  addLiveEventListeners(".menu-toggler", "click", function(evt){
-toggleClass("#mainLeft", "opened");
-toggleClass(".menu-toggler", "opened");
-  });
-
+
 
 

Modified: tomcat/site/trunk/docs/contact.html
URL: 

svn commit: r1822286 - in /tomcat/trunk: java/org/apache/catalina/connector/Response.java java/org/apache/catalina/core/LocalStrings.properties java/org/apache/catalina/core/StandardHostValve.java web

2018-01-26 Thread markt
Author: markt
Date: Fri Jan 26 12:39:52 2018
New Revision: 1822286

URL: http://svn.apache.org/viewvc?rev=1822286=rev
Log:
Refactor error handling to enable errors that occur before processing is passed 
to the application to be handled by the application provided error handling 
and/or the container provided error handling (ErrorReportValve) as appropriate.

Modified:
tomcat/trunk/java/org/apache/catalina/connector/Response.java
tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties
tomcat/trunk/java/org/apache/catalina/core/StandardHostValve.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/connector/Response.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Response.java?rev=1822286=1822285=1822286=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/Response.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Response.java Fri Jan 26 
12:39:52 2018
@@ -879,12 +879,17 @@ public class Response implements HttpSer
 return;
 }
 
-String charset = getContext().getCharset(locale);
-if (charset != null) {
-try {
-getCoyoteResponse().setCharacterEncoding(charset);
-} catch (UnsupportedEncodingException e) {
-log.warn(sm.getString("coyoteResponse.encoding.invalid", 
charset), e);
+// In some error handling scenarios, the context is unknown
+// (e.g. a 404 when a ROOT context is not present)
+Context context = getContext();
+if (context != null) {
+String charset = context.getCharset(locale);
+if (charset != null) {
+try {
+getCoyoteResponse().setCharacterEncoding(charset);
+} catch (UnsupportedEncodingException e) {
+log.warn(sm.getString("coyoteResponse.encoding.invalid", 
charset), e);
+}
 }
 }
 }

Modified: tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties?rev=1822286=1822285=1822286=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties Fri Jan 
26 12:39:52 2018
@@ -186,7 +186,6 @@ standardEngine.jvmRouteFail=Failed to se
 standardEngine.noHost=No Host matches server name [{0}]
 standardEngine.notHost=Child of an Engine must be a Host
 standardEngine.notParent=Engine cannot have a parent Container
-standardHost.asyncStateError=An asynchronous request was received for 
processing that was neither an async dispatch nor an error to process
 standardHost.clientAbort=Remote Client Aborted Request, IOException: [{0}]
 standardHost.invalidErrorReportValveClass=Couldn''t load specified error 
report valve class: [{0}]
 standardHost.noContext=No Context configured to process this request

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardHostValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardHostValve.java?rev=1822286=1822285=1822286=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardHostValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardHostValve.java Fri Jan 
26 12:39:52 2018
@@ -108,8 +108,6 @@ final class StandardHostValve extends Va
 // Select the Context to be used for this Request
 Context context = request.getContext();
 if (context == null) {
-response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
- sm.getString("standardHost.noContext"));
 return;
 }
 
@@ -118,7 +116,6 @@ final class StandardHostValve extends Va
 }
 
 boolean asyncAtStart = request.isAsync();
-boolean asyncDispatching = request.isAsyncDispatching();
 
 try {
 context.bind(Globals.IS_SECURITY_ENABLED, MY_CLASSLOADER);
@@ -136,14 +133,8 @@ final class StandardHostValve extends Va
 // in error and have been routed here to check for application
 // defined error pages.
 try {
-if (!asyncAtStart || asyncDispatching) {
+if (!response.isErrorReportRequired()) {
 context.getPipeline().getFirst().invoke(request, response);
-} else {
-// Make sure this request/response is here because an error
-// report is required.
-if (!response.isErrorReportRequired()) {
-throw new 

Re: Responsive Website for tomcat.apache.org

2018-01-26 Thread Violeta Georgieva
2018-01-26 14:40 GMT+02:00 Konstantin Kolinko :
>
> 2018-01-26 13:04 GMT+03:00 Violeta Georgieva :
> > Hi,
> >
> > 2018-01-26 7:14 GMT+02:00 Igal Sapir :
> >>
> >> Please see patch at
https://github.com/isapir/tomcat-site/commit/5e4d642
> >> which adjusts the search box alignment and adds a keyboard toggle with
the
> >> Enter key when the hamburger menu icon has focus.
> >
> > Here is what I see after applying the patch to the website:
> >
https://github.com/violetagg/tomcat-website-screenshots/tree/master/r1822263
> >
> > Regards,
> > Violeta
>
> It looks OK now, after I regenerated the docs - r1822283 .

I still see odd "OK" button on Chrome and Safari, only Firefox is ok.
Regards,
Violeta

> Print view is yet to be fixed.
>
>
> Best regards,
> Konstantin Kolinko
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>


[Bug 62049] New: use of unimplemented RequestUtil method in Manager page

2018-01-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=62049

Bug ID: 62049
   Summary: use of unimplemented RequestUtil method in Manager
page
   Product: Tomcat 9
   Version: 9.0.4
  Hardware: PC
OS: Linux
Status: NEW
  Severity: regression
  Priority: P2
 Component: Util
  Assignee: dev@tomcat.apache.org
  Reporter: sylvain.cat...@dgfip.finances.gouv.fr
  Target Milestone: -

Hi,

Jasper's compilation of jsp 404 error page, in the manager app, fails.

The way : 
1/ Tomcat9 deployed on linux / openJDK8 (I think the problem is similar on
windows / oracle JVM) ;
2/ Change conf/tomcat-users.xml to allow a user to access the manger
(manager-status permission) ;
3/ Disable the RemoteAddrValve of the manager if you access it remotely
(webapps/manager/META-INF/context.xml)
4/ run tomcat server
5/ wget the url http://[ip_tomcat:port]/manager/toto 

As toto does not exist, Jasper tries to compile
webapps/manager/WEB-INF/jsp/404.jsp and fails with error "The method
filter(String) is undefined for the type RequestUtil".

Here is the code that throws the exception (404.jsp file) :
...
RequestUtil.filter((String) request.getAttribute(
"javax.servlet.error.request_uri"))
...
The class javax.servlet.http.HttpServletRequest.RequestUtil in catalina.jar
archive only mentions the getRequestURL method. In previous versions (7.*), the
filter method is well implemented. Other methods in this previous versions of
RequestUtil class are marked as 'deprecated', but not the filter method.

So, I suggest 3 solutions :
1/ Just remove the filter call in 404.jsp file ; but we have to be careful with
javascript injection by http parameters ;
2/ Re-implement the filter method in RequestUtil ;
3/ Write the 404.jsp a more static way, as 403.jsp file.

Thanks

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1822284 - in /tomcat/site/trunk: docs/res/js/tomcat.js xdocs/res/js/tomcat.js

2018-01-26 Thread kkolinko
Author: kkolinko
Date: Fri Jan 26 12:32:32 2018
New Revision: 1822284

URL: http://svn.apache.org/viewvc?rev=1822284=rev
Log:
Remove credit from recently added js file. Contributed by Igal Sapir.

The policy is to do not have any @author annotations in source files. 
Developing Tomcat is a collective effort. Contributions are credited in 
changelog, commits history etc.

Modified:
tomcat/site/trunk/docs/res/js/tomcat.js
tomcat/site/trunk/xdocs/res/js/tomcat.js

Modified: tomcat/site/trunk/docs/res/js/tomcat.js
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/res/js/tomcat.js?rev=1822284=1822283=1822284=diff
==
--- tomcat/site/trunk/docs/res/js/tomcat.js (original)
+++ tomcat/site/trunk/docs/res/js/tomcat.js Fri Jan 26 12:32:32 2018
@@ -14,9 +14,6 @@
 * limitations under the License.
 */
 
-/** Author: Igal Sapir */
-
-
 /** adds a live event handler akin to jQuery's on() */
 function addLiveEventListeners(selector, event, handler){
 document.querySelector("body").addEventListener(

Modified: tomcat/site/trunk/xdocs/res/js/tomcat.js
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/res/js/tomcat.js?rev=1822284=1822283=1822284=diff
==
--- tomcat/site/trunk/xdocs/res/js/tomcat.js (original)
+++ tomcat/site/trunk/xdocs/res/js/tomcat.js Fri Jan 26 12:32:32 2018
@@ -14,9 +14,6 @@
 * limitations under the License.
 */
 
-/** Author: Igal Sapir */
-
-
 /** adds a live event handler akin to jQuery's on() */
 function addLiveEventListeners(selector, event, handler){
 document.querySelector("body").addEventListener(



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



Re: Responsive Website for tomcat.apache.org

2018-01-26 Thread Konstantin Kolinko
2018-01-26 13:04 GMT+03:00 Violeta Georgieva :
> Hi,
>
> 2018-01-26 7:14 GMT+02:00 Igal Sapir :
>>
>> Please see patch at https://github.com/isapir/tomcat-site/commit/5e4d642
>> which adjusts the search box alignment and adds a keyboard toggle with the
>> Enter key when the hamburger menu icon has focus.
>
> Here is what I see after applying the patch to the website:
> https://github.com/violetagg/tomcat-website-screenshots/tree/master/r1822263
>
> Regards,
> Violeta

It looks OK now, after I regenerated the docs - r1822283 .

Print view is yet to be fixed.


Best regards,
Konstantin Kolinko

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



svn commit: r1822287 - in /tomcat/trunk: java/org/apache/catalina/connector/CoyoteAdapter.java webapps/docs/changelog.xml

2018-01-26 Thread markt
Author: markt
Date: Fri Jan 26 12:41:04 2018
New Revision: 1822287

URL: http://svn.apache.org/viewvc?rev=1822287=rev
Log:
Pass 404 errors triggered by a missing ROOT web application to the container 
error handling to generate the response body.

Modified:
tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=1822287=1822286=1822287=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Fri Jan 
26 12:41:04 2018
@@ -682,15 +682,11 @@ public class CoyoteAdapter implements Ad
 // If there is no context at this point, it is likely no ROOT 
context
 // has been deployed
 if (request.getContext() == null) {
-res.setStatus(404);
-res.setMessage("Not found");
-// No context, so use host
-Host host = request.getHost();
-// Make sure there is a host (might not be during shutdown)
-if (host != null) {
-host.logAccess(request, response, 0, true);
-}
-return false;
+response.sendError(404, "Not found");
+// Allow processing to continue.
+// If present, the error reporting valve will provide a 
response
+// body.
+return true;
 }
 
 // Now we have the context, we can parse the session ID from the 
URL

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1822287=1822286=1822287=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Jan 26 12:41:04 2018
@@ -75,6 +75,10 @@
 error handling and/or the container provided error handling
 (ErrorReportValve) as appropriate. (markt)
   
+  
+Pass 404 errors triggered by a missing ROOT web application to the
+container error handling to generate the response body. (markt)
+  
 
   
   



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



[Bug 61751] NIO2 connector cuts incoming request

2018-01-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=61751

Markus Dörschmidt  changed:

   What|Removed |Added

 Resolution|WORKSFORME  |---
Version|8.5.16  |8.5.24
 Status|RESOLVED|REOPENED

--- Comment #10 from Markus Dörschmidt  ---
I reopened, because I have new information about how to reproduce the bug:

The bug is reproducable with the litte web application I previously attached to
this bug report.

I got the bug in an environment with these conditions:
1. Server and client have to be in different networks with a gateway between
2. Tomcat needs NIO2 connector handling HTTPs

When I send an XML file to "/xml" of my example application using CURL, I get
an server-side error about a malformed XML document, when the XML exceeds some
random size limit.

When I send the same XML file to "/test", which simply reads and count read
bytes, I get a client-side error:

curl: (55) SSL_write() returned SYSCALL, errno = 104


The bug does not occur if:
- protocol handled by NIO2 connector is HTTP
- or client and server are in the same network

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 41007] Can't define customized 503 error page

2018-01-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=41007

--- Comment #7 from Mark Thomas  ---
A decade plus on from when this was opened I'm planning on implementing a
solution for this. The overall plan is:

- Pass errors that happen early in the processing chain to the app / the
  container to handle where we can

- Extend the ErrorReportValve to allow static pages to be defined for error
  codes and/or Exceptions.

Progress so far is (all in 9.0.x):
- I have refactoring the processing chain so we can pass errors.
- I have started to refactor the handling of individual errors to pass them
when the
  occur.

This last point is throwing up various edge cases. Currently I am working on
JSPs, TRACE and OPTIONS handling. I'm expecting the refactoring of the
individual error cases to take a little while to sort out.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: Responsive Website for tomcat.apache.org

2018-01-26 Thread Violeta Georgieva
Hi,

2018-01-26 19:07 GMT+02:00 Igal @ Lucee.org :
>
> On 1/26/2018 5:16 AM, Violeta Georgieva wrote:
>>
>> 2018-01-26 14:40 GMT+02:00 Konstantin Kolinko :
>>>
>>> It looks OK now, after I regenerated the docs - r1822283 .
>
> Right.  I do not patch the generated files, only the source ones, so docs
must be regenerated after each patch.
>
>> I still see odd "OK" button on Chrome and Safari, only Firefox is ok.
>> Regards,
>> Violeta
>
> What OS are you running?  Can you please provide the full versions of the
browsers?  Also, please ensure that
> https://tomcat.apache.org/res/css/tomcat.css is not cached.

- MacOS High Sierra
-
https://github.com/violetagg/tomcat-website-screenshots/tree/master/r1822283
- no cache
- the version is provided with every screenshot

Regards,
Violeta

>
>> 2018-01-26 14:40 GMT+02:00 Konstantin Kolinko :
>>>
>>> Print view is yet to be fixed.
>
> I provided the patch for the more urgent things since the site is live,
so I did not cover everything in that patch.
>
> The Print looked fine on Chrome ( see previous printout at
https://github.com/isapir/tomcat-site/releases/download/0.1/Apache.Tomcat.-.Welcome.pdf
), but I checked now on Firefox and I see what you mean.  Not sure why that
happens but I'll fix it.
>
> Best,
>
>
> Igal
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>


Re: Responsive Website for tomcat.apache.org

2018-01-26 Thread Igal @ Lucee.org

On 1/26/2018 5:16 AM, Violeta Georgieva wrote:

2018-01-26 14:40 GMT+02:00 Konstantin Kolinko :

It looks OK now, after I regenerated the docs - r1822283 .
Right.  I do not patch the generated files, only the source ones, so 
docs must be regenerated after each patch.



I still see odd "OK" button on Chrome and Safari, only Firefox is ok.
Regards,
Violeta
What OS are you running?  Can you please provide the full versions of 
the browsers?  Also, please ensure that

https://tomcat.apache.org/res/css/tomcat.css is not cached.


2018-01-26 14:40 GMT+02:00 Konstantin Kolinko :

Print view is yet to be fixed.
I provided the patch for the more urgent things since the site is live, 
so I did not cover everything in that patch.


The Print looked fine on Chrome ( see previous printout at 
https://github.com/isapir/tomcat-site/releases/download/0.1/Apache.Tomcat.-.Welcome.pdf 
), but I checked now on Firefox and I see what you mean.  Not sure why 
that happens but I'll fix it.


Best,


Igal

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



[Bug 41007] Can't define customized 503 error page

2018-01-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=41007

--- Comment #8 from Veit Guna  ---
After a decade, reading my posts is embarassing in terms of politeness. My
apologies. A little late - but better than never. Thanks you for finally
looking into this :)!

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1822339 - in /tomcat/trunk: java/org/apache/jasper/compiler/Generator.java java/org/apache/jasper/resources/LocalStrings.properties webapps/docs/changelog.xml

2018-01-26 Thread markt
Author: markt
Date: Fri Jan 26 19:25:23 2018
New Revision: 1822339

URL: http://svn.apache.org/viewvc?rev=1822339=rev
Log:
Improve OPTION and Allow behavior for JSPs.

Modified:
tomcat/trunk/java/org/apache/jasper/compiler/Generator.java
tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/jasper/compiler/Generator.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Generator.java?rev=1822339=1822338=1822339=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/Generator.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Generator.java Fri Jan 26 
19:25:23 2018
@@ -772,15 +772,25 @@ class Generator {
 
 // Method check
 if (!pageInfo.isErrorPage()) {
+out.printil("if 
(!javax.servlet.DispatcherType.ERROR.equals(request.getDispatcherType())) {");
+out.pushIndent();
 out.printil("final java.lang.String _jspx_method = 
request.getMethod();");
-out.printin("if (!\"GET\".equals(_jspx_method) && 
!\"POST\".equals(_jspx_method) && !\"HEAD\".equals(_jspx_method) && ");
-
out.println("!javax.servlet.DispatcherType.ERROR.equals(request.getDispatcherType()))
 {");
+out.printil("if (\"OPTIONS\".equals(_jspx_method)) {");
 out.pushIndent();
+out.printil("response.setHeader(\"Allow\",\"GET, HEAD, POST, 
OPTIONS\");");
+out.printil("return;");
+out.popIndent();
+out.printil("}");
+out.printil("if (!\"GET\".equals(_jspx_method) && 
!\"POST\".equals(_jspx_method) && !\"HEAD\".equals(_jspx_method)) {");
+out.pushIndent();
+out.printil("response.setHeader(\"Allow\",\"GET, HEAD, POST, 
OPTIONS\");");
 
out.printin("response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, ");
 out.println("\"" + 
Localizer.getMessage("jsp.error.servlet.invalid.method") + "\");");
 out.printil("return;");
 out.popIndent();
 out.printil("}");
+out.popIndent();
+out.printil("}");
 out.println();
 }
 

Modified: tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties?rev=1822339=1822338=1822339=diff
==
--- tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties Fri 
Jan 26 19:25:23 2018
@@ -379,7 +379,7 @@ jsp.error.page.conflict.trimdirectivewhi
 jsp.error.tag.conflict.trimdirectivewhitespaces=Tag directive: illegal to have 
multiple occurrences of ''trimDirectiveWhitespaces'' with different values 
(old: [{0}], new: [{1}])
 
 # JSP Servlet
-jsp.error.servlet.invalid.method=JSPs only permit GET POST or HEAD
+jsp.error.servlet.invalid.method=JSPs only permit GET, POST or HEAD. Jasper 
also permits OPTIONS
 jsp.error.servlet.destroy.failed=Exception during Servlet.destroy() for JSP 
page
 
 # JarScanner

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1822339=1822338=1822339=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Jan 26 19:25:23 2018
@@ -95,6 +95,20 @@
   
 
   
+  
+
+  
+Include an HTTP Allow header when a JSP generates a
+405 reponse due to a request with an unsupported method. (markt)
+  
+  
+Add support for the HTTP OPTION method to JSPs. The
+JSP specification explicitly states that the behaviour for this
+method is undefined for JSPs so this is a Tomcat specific
+behaviour. (markt)
+  
+
+  
 
 
   



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



buildbot failure in on tomcat-trunk

2018-01-26 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-trunk while building 
. Full details are available at:
https://ci.apache.org/builders/tomcat-trunk/builds/2993

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch tomcat/trunk] 1822339
Blamelist: markt

BUILD FAILED: failed compile_1

Sincerely,
 -The Buildbot




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



buildbot failure in on tomcat-trunk

2018-01-26 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-trunk while building 
. Full details are available at:
https://ci.apache.org/builders/tomcat-trunk/builds/2995

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch tomcat/trunk] 1822345
Blamelist: markt

BUILD FAILED: failed compile_1

Sincerely,
 -The Buildbot




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



svn commit: r1822342 - in /tomcat/trunk: java/org/apache/catalina/core/StandardWrapper.java webapps/docs/changelog.xml

2018-01-26 Thread markt
Author: markt
Date: Fri Jan 26 20:11:52 2018
New Revision: 1822342

URL: http://svn.apache.org/viewvc?rev=1822342=rev
Log:
Generate the correct allow header for a 405 response to a TRACE request to a 
JSP page.

Modified:
tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java?rev=1822342=1822341=1822342=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java Fri Jan 26 
20:11:52 2018
@@ -562,28 +562,34 @@ public class StandardWrapper extends Con
 }
 
 Set allow = new HashSet<>();
-allow.add("TRACE");
 allow.add("OPTIONS");
 
-Method[] methods = getAllDeclaredMethods(servletClazz);
-for (int i=0; methods != null && i

svn commit: r1822345 - /tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java

2018-01-26 Thread markt
Author: markt
Date: Fri Jan 26 20:29:17 2018
New Revision: 1822345

URL: http://svn.apache.org/viewvc?rev=1822345=rev
Log:
Simplify

Modified:
tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=1822345=1822344=1822345=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Fri Jan 
26 20:29:17 2018
@@ -580,13 +580,12 @@ public class CoyoteAdapter implements Ad
 if (undecodedURI.equals("*")) {
 if (req.method().equalsIgnoreCase("OPTIONS")) {
 StringBuilder allow = new StringBuilder();
-allow.append("GET, HEAD, POST, PUT, DELETE");
+allow.append("GET, HEAD, POST, PUT, DELETE, OPTIONS");
 // Trace if allowed
 if (connector.getAllowTrace()) {
 allow.append(", TRACE");
 }
 // Always allow options
-allow.append(", OPTIONS");
 res.setHeader("Allow", allow.toString());
 } else {
 res.setStatus(404);
@@ -808,11 +807,10 @@ public class CoyoteAdapter implements Ad
 }
 }
 }
-res.setStatus(405);
 res.addHeader("Allow", header);
-res.setMessage("TRACE method is not allowed");
-request.getContext().logAccess(request, response, 0, true);
-return false;
+response.sendError(405, "TRACE method is not allowed");
+// Safe to skip the remainder of this method.
+return true;
 }
 
 doConnectorAuthenticationAuthorization(req, request);



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



[Bug 41007] Can't define customized 503 error page

2018-01-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=41007

--- Comment #9 from Mark Thomas  ---
No worries. I've written far worse in my time.

Fixing this is turning up all sorts of interesting edge cases. I'm actually
quite enjoying tackling it.

This is one I've kept coming back to from time to time but hadn't - until this
time - found a way of tackling it that I was happy with. The clean up to the
connector code that we've done since this was first raised back in the days of
5.x has certainly helped.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



buildbot success in on tomcat-trunk

2018-01-26 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building . Full details are available at:
https://ci.apache.org/builders/tomcat-trunk/builds/2994

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch tomcat/trunk] 1822342
Blamelist: markt

Build succeeded!

Sincerely,
 -The Buildbot




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



[Bug 60276] upgrade HTTP/2 can't use gzip compress.

2018-01-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60276

pc8...@gmail.com changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #10 from pc8...@gmail.com ---
tomcat 8.5.27, this problem is still not fixed.

Removed 
and gzip works again.








-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 60276] upgrade HTTP/2 can't use gzip compress.

2018-01-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60276

Remy Maucherat  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

--- Comment #11 from Remy Maucherat  ---
Please do not reopen the report. Please post on the user list if you need
further assistance.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org