Re: Tomcat 9 throws exception when sending unencoded charecters in QueryString

2018-12-18 Thread Melvin
Hi Christopher Schultz,

I did not mean that the browser is throwing an error. My problem is that in
9.0.13 tomcat's error page is shown instead of my error page. I have given
error page location in web.xml. error.jsp is located in the root of my
webapp.

I know that if I add '^' in relaxedquerychars there will be no error thrown
by the server. I have no characters in my relaxedquerychars. In 8.5.35 the
requested is rejected and tomcat's error page with exception is not shown,
but it does in 9.0.13.

I will attach both the screenshots of 9.0.13 and 8.5.35. You kindly check
and let me know.

Regards,
Melvin A


On Tue, Dec 18, 2018 at 8:48 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Melvin,
>
> On 12/18/18 04:21, Melvin wrote:
> > Tomcat 9.0.13 I switched from tomcat 8.5.35 to 9.0.13. In 8.5 when
> > I send an unencoded character in queryString it throws 400 error in
> > the browser itself and no Exception is thrown or seen explicitly.
>
> That doesn't make any sense. Browsers don't throw HTTP errors.
>
> > After I switched to tomcat 9, when I send an unencoded character
> > in queryString it throws Exception and tomcat error page is shown.
> As it should be.
>
> > I configured error-page in both the servers.
>
> How/where?
>
> > I know that these characters can be relaxed by adding them in
> > relaxedquerychars in server.xml. But still it is a 400 error and
> > ideally it must redirect me to the configured error page.
> Are you saying that configuring relaxedquerychars does not work? If
> so, please post that configuration.
>
> > Also when the response.setStatus(400) is called, error page is not
> > redirected in both the servers.
>
> Where are you configuring your error page. This isn't unambiguous:
>
> > web.xml   400
> > /error.jsp  
> > 500 /error.jsp
> >  
>
>
> > URL=http://localhost:9013/app1/paramTest.jsp?name=^ Tomcat 8.5.32
> > - 'This page isn’t working' is shown in browser. Tomcat 9.0.13 -
> > java.lang.IllegalArgumentException: Invalid character found in the
> > request target. The valid characters are defined in RFC 7230 and
> > RFC 3986
> > org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11Inpu
> tBuffer.java:467)
> >
> >
> org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:29
> 4)
> > org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLigh
> t.java:66)
> >
> >
> org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractPro
> tocol.java:791)
> > org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoi
> nt.java:1417)
> >
> >
> org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.j
> ava:49)
> > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.j
> ava:1149)
> >
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
> va:624)
> > org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThr
> ead.java:61)
> >
> >
> java.lang.Thread.run(Thread.java:748) is thrown and tomcat error page is
> > shown. I have attached the screenshot of the exception thrown.
>
> Attachments are stripped, but presumably, it's just a screenshot of
> the above.
>
> Please explain where you have configured that error page, and show
> your relaxedquerychars setting (if you have one).
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlwZD7oACgkQHPApP6U8
> pFg+1xAAsK6do1HFtdhQG4uNczRo/NgHOvDF0Z4yWolntEEZdDb+dzsqqtUZhRNg
> 5n3q9o3hL2bLBjy+zetuuIVBg7ZxmgcC0QnlhLW+zgOScvGRRSwFi/NOieBgEOe4
> fite15CdaSd9OSv/jVTDqkgL0LEGVnioGgzYaXlzmGWEI/6BpEbBwmLJpqofQ6ij
> EFVbDis2tPc/kwP8JPYll2ihFpPNUacEE+SB/BQyAzOXR1OzAGRYqMFZlfpwfpZ4
> cwCsTwWZeWmKX7PLQjyhE2lCT5a3tioLRAbIyw3P92WJTy4Iwn65EBnf6BcXLF0f
> zuYZYwV1VXut81g8nBcby08si2R+qFHyJ2nIQ2oJWurtf+W4FiQ6Sh4fF7pSN9aI
> FSEknFeFiAYgP/tNDCi40uRVe+HfRczMnYWScR7QmO0U5Ir6/5gM3I6hUOaOYQpl
> s1uL6Tqq7+/7HxSP5PKjxgYg6sJVk8qo7nHuUH/kvJP/gbEQtghJUhQ/xIrZq/e8
> Gg1xTmm4DGZ9xFl9RLHQQqvlbHVQuVfYYVsbfC3pHz2SSevIye+ZAg0CnyXCzFGs
> Ywgsf8VJ/yVbOp80wLd95zsbvmZ/7qK1mtx8aeeLzE8gCrOVr0yYagFsV+AiyQU7
> iGfckuRXbztZ33oJK1fY4Y+QELFuUD3ceAYTy+/L/Exw6NQg8Kc=
> =0by1
> -END PGP SIGNATURE-
>
> -
> 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

tomcat logs

2018-12-18 Thread Adlet Azhibek
hello. dear tomcat users!

My web application is named "Auction". I've been looking for any log info
in "auction.log" file in {cataline_base}/logs

At some moment my app stopped to logging to that file. I'm just wondering
what went wrong. What pushed my app to stop logging. That file is empty
now, it has all rights given by "chmod 777"


what could have gone wrong


Re: [EXTERNAL] Re: tomcat Finding!

2018-12-18 Thread Maxim Solodovnik
You have to add Valve under Server/Service/Engine/Host/
Works for us as expected

On Wed, 19 Dec 2018 at 03:17,  wrote:

> Added following to the Server.xml, still showing in the latest scan.
>
>  showReport=false" showServerInfo="false" />
>
> Thank you,
> Danyaal
>
> -Original Message-
> From: John Palmer [mailto:johnpalm...@gmail.com]
> Sent: Friday, December 14, 2018 6:26 PM
> To: Tomcat Users List
> Subject: [EXTERNAL] Re: tomcat Finding!
>
>  WARNING:This is an external email that originated outside of our email
> system. DO NOT CLICK links or open attachments unless you recognize the
> sender and know that the content is safe!
>
> I found this to be easier to accomplish (and maintain):
>
> add to the Host section of server.xml:
>  showReport=false" showServerInfo="false" />
>
> (this will disable the tomcat version number and the stacktrace  - the
> defaults for these are "true")
>
>
> On Fri, Dec 14, 2018 at 10:18 AM  wrote:
>
> > Good Morning,
> > I'm encountering following scan finding errors and couldn't find way to
> > mitigate this.
> >
> > Tomcat 8.5.32
> > 12085
> > Apache Tomcat Default Files
> > The following default files were found
> > :/nessus-check/default-404-error-page.html
> > Delete the default index page and remove the example JSP and servlets.
> > Follow the Tomcat or OWASP instructions to replace or modify the default
> > error page.
> >
> > Thank you,
> > Danyaal
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> >
>


-- 
WBR
Maxim aka solomax


Re: Tomcat 8 runs under Java 7, but not Java 8

2018-12-18 Thread James H. H. Lampert

On 12/18/18, 2:49 PM, Caldarale, Charles R wrote:

The above indicates you have a Tomcat (or something much like it) already
running...


You would think so, and yet if I switch the JAVA_HOME line in setenv.sh 
to Java 7, it launches just fine. . . .


WAIT A SECOND!

Port 443 is open, and the Tomcat server is responding on it, even after 
I do a "service tomcat8 stop"!


I suddenly remember how much reconfiguring I had to do on the production 
servers, with the pre-installed Tomcat, to get it to front-end itself, 
rather than the default of running through Apache. And I'm also starting 
to remember how hard it is to find where things are in Apache, which is 
WHY I switched to the Tomcat front-ending itself configuration I was 
already familiar with on AS/400s.


It looks like Tomcat isn't running independently on this box, but rather 
running behind/under Apache!


But that doesn't explain why, if I set the JAVA_HOME line in setenv.sh 
to Java 7, "service tomcat8 start" seems to work fine, but if I set it 
to Java 8, it produces error messages.


Can anybody point me in the right direction?

--
JHHL

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



RE: Tomcat 8 runs under Java 7, but not Java 8

2018-12-18 Thread Caldarale, Charles R
> From: James H. H. Lampert [mailto:jam...@touchtonecorp.com] 
> Subject: Re: Tomcat 8 runs under Java 7, but not Java 8

> Excerpt from the relevant time period, catalina.2018-12-18.log:

> > 18-Dec-2018 20:18:55.419 SEVERE [main]
org.apache.catalina.core.StandardServer.await 
> > StandardServer.await: create[localhost:8005]:
> >  java.net.BindException: Address already in use (Bind failed)

> > 18-Dec-2018 20:31:12.604 SEVERE [main]
org.apache.coyote.AbstractProtocol.init Failed 
> > to initialize end point associated with ProtocolHandler
["https-jsse-nio-443"]
> >  java.net.BindException: Address already in use

> > 18-Dec-2018 20:31:55.545 SEVERE [main]
org.apache.catalina.core.StandardServer.await 
> > StandardServer.await: create[localhost:8005]:
> >  java.net.BindException: Address already in use (Bind failed)

The above indicates you have a Tomcat (or something much like it) already
running...

  - 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.



smime.p7s
Description: S/MIME cryptographic signature


Re: Tomcat 8 runs under Java 7, but not Java 8

2018-12-18 Thread James H. H. Lampert

On 12/18/18, 12:50 PM, Mark Thomas wrote:

They don't appear to be very helpful.

They certainly didn't suggest anything to me.


What do the Tomcat logs show? catalina.-mm-dd.log is likely to be
the most useful but check them all.


Dear Mr. Thomas, et al:

Excerpt from the relevant time period, catalina.2018-12-18.log:

18-Dec-2018 20:18:55.419 SEVERE [main] 
org.apache.catalina.core.StandardServer.await StandardServer.await: 
create[localhost:8005]:
 java.net.BindException: Address already in use (Bind failed)
at java.net.PlainSocketImpl.socketBind(Native Method)
at 
java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:376)
at java.net.ServerSocket.bind(ServerSocket.java:375)
at java.net.ServerSocket.(ServerSocket.java:237)
at 
org.apache.catalina.core.StandardServer.await(StandardServer.java:440)
at org.apache.catalina.startup.Catalina.await(Catalina.java:744)
at org.apache.catalina.startup.Catalina.start(Catalina.java:690)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)

18-Dec-2018 20:18:55.420 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing 
ProtocolHandler ["https-jsse-nio-443"]
18-Dec-2018 20:18:55.426 INFO [main] 
org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina
18-Dec-2018 20:18:55.590 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping 
ProtocolHandler ["https-jsse-nio-443"]
18-Dec-2018 20:18:55.590 INFO [main] org.apache.coyote.AbstractProtocol.destroy 
Destroying ProtocolHandler ["https-jsse-nio-443"]
18-Dec-2018 20:31:11.502 WARNING [main] 
org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with 
directory [/var/lib/tomcat8/common/classes], exists: [false], isDirectory: 
[false], canRead: [false]
18-Dec-2018 20:31:11.509 WARNING [main] 
org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with 
directory [/var/lib/tomcat8/common], exists: [false], isDirectory: [false], 
canRead: [false]
18-Dec-2018 20:31:11.509 WARNING [main] 
org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with 
directory [/usr/share/tomcat8/common/classes], exists: [false], isDirectory: 
[false], canRead: [false]
18-Dec-2018 20:31:11.510 WARNING [main] 
org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with 
directory [/usr/share/tomcat8/common], exists: [false], isDirectory: [false], 
canRead: [false]
18-Dec-2018 20:31:11.513 WARNING [main] 
org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with 
directory [/var/lib/tomcat8/server/classes], exists: [false], isDirectory: 
[false], canRead: [false]
18-Dec-2018 20:31:11.515 WARNING [main] 
org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with 
directory [/var/lib/tomcat8/server], exists: [false], isDirectory: [false], 
canRead: [false]
18-Dec-2018 20:31:11.515 WARNING [main] 
org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with 
directory [/usr/share/tomcat8/server/classes], exists: [false], isDirectory: 
[false], canRead: [false]
18-Dec-2018 20:31:11.515 WARNING [main] 
org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with 
directory [/usr/share/tomcat8/server], exists: [false], isDirectory: [false], 
canRead: [false]
18-Dec-2018 20:31:11.516 WARNING [main] 
org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with 
directory [/var/lib/tomcat8/shared/classes], exists: [false], isDirectory: 
[false], canRead: [false]
18-Dec-2018 20:31:11.516 WARNING [main] 
org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with 
directory [/var/lib/tomcat8/shared], exists: [false], isDirectory: [false], 
canRead: [false]
18-Dec-2018 20:31:11.516 WARNING [main] 
org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with 
directory [/usr/share/tomcat8/shared/classes], exists: [false], isDirectory: 
[false], canRead: [false]
18-Dec-2018 20:31:11.517 WARNING [main] 
org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with 
directory [/usr/share/tomcat8/shared], exists: [false], isDirectory: [false], 
canRead: [false]
18-Dec-2018 20:31:12.212 WARNING [main] 
org.apache.catalina.startup.SetAllPropertiesRule.begin 
[SetAllPropertiesRule]{Server/Service/Connector} Setting property 'bufferSize' 
to '1024' did not find a matching property.
18-Dec-2018 20:31:12.360 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Server version:
Apache Tomcat/8.5.14 (Debian)
18-Dec-2018 20:31:12.361 INFO [main] 

Re: Tomcat 8 runs under Java 7, but not Java 8

2018-12-18 Thread Emmanuel Bourg
Hi James,

Le 18/12/2018 à 21:40, James H. H. Lampert a écrit :
> I just installed Java 8 (not as the default JRE) on a Google Compute
> Debian 8 instance that has been running Tomcat 8 under Java 7.

I assume you are using the tomcat8 package from the distribution. Tomcat
on Debian 8 Jessie is a bit old (but still receives security fixes), I
recommend upgrading to Debian 9 where you'll be able to use the latest
8.5 version from the stretch-backports repository (and soon tomcat9 too).


> If I change setenv.sh to add
>> JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/"

Note that on Debian the JAVA_HOME variable is typically set in the
/etc/defaut/tomcat8 file.


> and I try to "service tomcat8 start," I get
> 
>> Job for tomcat8.service failed because the control process exited with
>> error code.
>> See "systemctl status tomcat8.service" and "journalctl -xe" for details.

This version of the Tomcat package doesn't have really useful
information in the systemd log unfortunately. This changed with the
version 8.5.32-2 of the package which now provides a proper systemd
service file. So in your case you should look into
/var/log/tomcat8/catalina.out instead.


> If I leave the JAVA_HOME in there, but change it to refer to the Java 7
> directory, it works fine.
> 
> What am I doing wrong? Tomcat 8 runs just fine on our other Google
> Compute instances, and they *only* have Java 8.

How did you install Java 8? From the jessie-backports repository?

Emmanuel Bourg

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



Tomcat JMS Setup

2018-12-18 Thread Rajendra
Hi,

I am trying to integrate ActiveMQ with Tomcat. I have defined a queue, Topic 
and Connection Factory in Tomcat server.xml and Context.xml file as below. 

Server.xml
===










Context.xml:




Do I need to create the JMS resources using ActiveMQ console as well in order 
to use the JMS resources? Please let me know.

Thanks !

Rajendra



Re: Tomcat 8 runs under Java 7, but not Java 8

2018-12-18 Thread Mark Thomas
On 18/12/2018 20:40, James H. H. Lampert wrote:
> I just installed Java 8 (not as the default JRE) on a Google Compute
> Debian 8 instance that has been running Tomcat 8 under Java 7.
> 
> If I change setenv.sh to add
>> JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/"
> 
> and I try to "service tomcat8 start," I get
> 
>> Job for tomcat8.service failed because the control process exited with
>> error code.
>> See "systemctl status tomcat8.service" and "journalctl -xe" for details.

They don't appear to be very helpful.

What do the Tomcat logs show? catalina.-mm-dd.log is likely to be
the most useful but check them all.

Mark

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



Tomcat 8 runs under Java 7, but not Java 8

2018-12-18 Thread James H. H. Lampert
I just installed Java 8 (not as the default JRE) on a Google Compute 
Debian 8 instance that has been running Tomcat 8 under Java 7.


If I change setenv.sh to add

JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/"


and I try to "service tomcat8 start," I get


Job for tomcat8.service failed because the control process exited with error 
code.
See "systemctl status tomcat8.service" and "journalctl -xe" for details.


and then

# systemctl status tomcat8.service
● tomcat8.service - LSB: Start Tomcat.
   Loaded: loaded (/etc/init.d/tomcat8; generated; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2018-12-18 20:31:16 UTC; 13s ago
 Docs: man:systemd-sysv-generator(8)
  Process: 32227 ExecStop=/etc/init.d/tomcat8 stop (code=exited, 
status=0/SUCCESS)
  Process: 32259 ExecStart=/etc/init.d/tomcat8 start (code=exited, 
status=1/FAILURE)
   CGroup: /system.slice/tomcat8.service
   ├─30767 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 
-Djava.util.logging.config.file=/var/lib/tomcat8/conf/logging.properties
   └─32285 /usr/lib/jvm/java-8-openjdk-amd64//bin/java 
-Djava.util.logging.config.file=/var/lib/tomcat8/conf/logging.properties -D

Dec 18 20:31:11 bitnami-trac-dm-87ea systemd[1]: Starting LSB: Start Tomcat
Dec 18 20:31:16 bitnami-trac-dm-87ea tomcat8[32259]: Starting Tomcat servlet 
engine: tomcat8 failed!
Dec 18 20:31:16 bitnami-trac-dm-87ea systemd[1]: tomcat8.service: Control 
process exited, code=exited status=1
Dec 18 20:31:16 bitnami-trac-dm-87ea systemd[1]: Failed to start LSB: Start 
Tomcat..
Dec 18 20:31:16 bitnami-trac-dm-87ea systemd[1]: tomcat8.service: Unit entered 
failed state.
Dec 18 20:31:16 bitnami-trac-dm-87ea systemd[1]: tomcat8.service: Failed with 
result 'exit-code'.

# journalctl -xe
Dec 18 20:29:26 bitnami-trac-dm-87ea sshd[32138]: lastlog_openseek: Couldn't 
stat /var/log/lastlog: No such file or directory
Dec 18 20:29:26 bitnami-trac-dm-87ea sshd[32138]: lastlog_openseek: Couldn't 
stat /var/log/lastlog: No such file or directory
Dec 18 20:29:36 bitnami-trac-dm-87ea sudo[32174]: jamesl : TTY=pts/2 ; 
PWD=/home/jamesl ; USER=root ; COMMAND=/bin/bash
Dec 18 20:29:36 bitnami-trac-dm-87ea sudo[32174]: pam_unix(sudo:session): 
session opened for user root by jamesl(uid=0)
Dec 18 20:29:45 bitnami-trac-dm-87ea sshd[32194]: Disconnecting: Too many 
authentication failures for root from 162.156.168.156 port 42965
Dec 18 20:29:52 bitnami-trac-dm-87ea sshd[32197]: Invalid user jzapata from 
186.15.24.34
Dec 18 20:29:52 bitnami-trac-dm-87ea sshd[32197]: input_userauth_request: 
invalid user jzapata [preauth]
Dec 18 20:29:52 bitnami-trac-dm-87ea sshd[32197]: Received disconnect from 
186.15.24.34: 11: Bye Bye [preauth]
Dec 18 20:30:21 bitnami-trac-dm-87ea sshd[32202]: reverse mapping checking 
getaddrinfo for static.201.20.36.4.datacenter1.com.br [201.20.3
Dec 18 20:30:21 bitnami-trac-dm-87ea sshd[32202]: Invalid user ftp from 
201.20.36.4
Dec 18 20:30:21 bitnami-trac-dm-87ea sshd[32202]: input_userauth_request: 
invalid user ftp [preauth]
Dec 18 20:30:21 bitnami-trac-dm-87ea sshd[32202]: Received disconnect from 
201.20.36.4: 11: Bye Bye [preauth]
Dec 18 20:30:35 bitnami-trac-dm-87ea systemd[1]: Stopping LSB: Start Tomcat
-- Subject: Unit tomcat8.service has begun shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit tomcat8.service has begun shutting down.
Dec 18 20:30:35 bitnami-trac-dm-87ea tomcat8[32227]: Stopping Tomcat servlet 
engine: tomcat8 Tomcat servlet engine is not running but pid
Dec 18 20:30:35 bitnami-trac-dm-87ea systemd[1]: Stopped LSB: Start Tomcat..
-- Subject: Unit tomcat8.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit tomcat8.service has finished shutting down.
Dec 18 20:31:11 bitnami-trac-dm-87ea systemd[1]: Starting LSB: Start Tomcat
-- Subject: Unit tomcat8.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit tomcat8.service has begun starting up.
Dec 18 20:31:16 bitnami-trac-dm-87ea tomcat8[32259]: Starting Tomcat servlet 
engine: tomcat8 failed!
Dec 18 20:31:16 bitnami-trac-dm-87ea systemd[1]: tomcat8.service: Control 
process exited, code=exited status=1
Dec 18 20:31:16 bitnami-trac-dm-87ea systemd[1]: Failed to start LSB: Start 
Tomcat..
-- Subject: Unit tomcat8.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit tomcat8.service has failed.
--
-- The result is failed.
Dec 18 20:31:16 bitnami-trac-dm-87ea systemd[1]: tomcat8.service: Unit entered 
failed state.
Dec 18 20:31:16 bitnami-trac-dm-87ea systemd[1]: tomcat8.service: Failed with 
result 'exit-code'.
Dec 18 20:31:50 bitnami-trac-dm-87ea sshd[32355]: Invalid user webmaster from 
78.36.7.170
Dec 18 20:31:50 bitnami-trac-dm-87ea sshd[32355]: 

RE: [EXTERNAL] Re: tomcat Finding!

2018-12-18 Thread DANYAAL.HANIF
Added following to the Server.xml, still showing in the latest scan.



Thank you,
Danyaal 

-Original Message-
From: John Palmer [mailto:johnpalm...@gmail.com] 
Sent: Friday, December 14, 2018 6:26 PM
To: Tomcat Users List
Subject: [EXTERNAL] Re: tomcat Finding!

 WARNING:This is an external email that originated outside of our email system. 
DO NOT CLICK links or open attachments unless you recognize the sender and know 
that the content is safe!

I found this to be easier to accomplish (and maintain):

add to the Host section of server.xml:


(this will disable the tomcat version number and the stacktrace  - the
defaults for these are "true")


On Fri, Dec 14, 2018 at 10:18 AM  wrote:

> Good Morning,
> I'm encountering following scan finding errors and couldn't find way to
> mitigate this.
>
> Tomcat 8.5.32
> 12085
> Apache Tomcat Default Files
> The following default files were found
> :/nessus-check/default-404-error-page.html
> Delete the default index page and remove the example JSP and servlets.
> Follow the Tomcat or OWASP instructions to replace or modify the default
> error page.
>
> Thank you,
> Danyaal
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: log4j app logging

2018-12-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Michael,

On 12/18/18 13:53, Lemke, Michael  ST/HZA-ZIC2 wrote:
> Thanks, Ryan, this JULI thing actually is what worries me. I don't
> care about tomcat's logging at the moment. It is my webapp's
> logging I can't figure out. It worked on other containers.

Oh, good: you are trying just to manage your own application's logging.

I have this class running as a ServletContextListener:

package xxx;

import javax.servlet.ServletContextListener;
import javax.servlet.ServletContextEvent;

import org.apache.log4j.PropertyConfigurator;
import org.apache.log4j.Logger;
import org.apache.log4j.LogManager;

/**
 * A listener to initialize log4j.
 *
 * @author Chris Schultz
 * @version $Revision: 17834 $ $Date: 2015-12-16 11:03:13 -0500 (Wed,
16 Dec 2015) $
 */
public class Log4jListener
implements ServletContextListener
{
private Logger logger;

@SuppressWarnings("unused")
public void contextInitialized(ServletContextEvent e)
{
// Trigger loading of the log4j.properties file from the
classpath.
new PropertyConfigurator();

logger = Logger.getLogger(this.getClass());

logger.info("Log4j initialized");
}

public void contextDestroyed(ServletContextEvent e)
{
if(LogManager.class.getClassLoader()
   .equals(this.getClass().getClassLoader()))
{
if(null != logger)
logger.info("Log4j was loaded by application
classloader; shutting down.");

LogManager.shutdown();
}
else
{
if(null != logger)
logger.info("Log4j was loaded by some other
ClassLoader; not shutting down.");
}
}
}

Calling the PropertyConfigurator constructor causes that class to look
for log4j.properties in various places, including (due to the way the
WebappClassLoader works), WEB-INF/classes. It should also look in the
"top-level" of any application JAR files that are in WEB-INF/lib.

You said that "your JAR file contains log4j.properties". Usually
applications are packaged as WAR files (or exploded WAR directories).
Are you using embedded Tomcat or Spring Boot or anything like that?
Where is your JAR file located?

- -chris

> -Original Message- From: Ryan Palmer Sent: Tuesday,
> December 18, 2018 7:49 PM
> 
> Michael,
> 
> Tomcat uses JULI internally. Have you taken necessary steps to
> redirect JULI to log4j?
> 
> Thanks, Ryan
> 
>  From: Lemke, Michael ST/HZA-ZIC2
>  Sent: Tuesday, December 18, 2018 10:20
> AM To: Tomcat Users List Subject: RE: log4j app logging
> 
> On December 18, 2018 6:59 PM Ryan Palmer wrote:
>> 
>> The file needs to be named
>> log4j.properties (or .xml, .json, etc.)
>> and needs to be in the classpath. You ommitted the 'j'.
> 
> Thanks for spotting this. Unfortunately, this typo was only in the
> email:
> 
> pc# ls src/main/resources/ com  log4j.properties
> 
> 
> So for being in the classpath it is sufficient to have it packaged
> in the jar, isn't it?
> 
> Archive:  myapp-1.1.0-SNAPSHOT.jar Length   MethodSize  Cmpr
> DateTime   CRC-32   Name   --  --- 
> -- -    0  Stored0   0% 12-18-2018
> 16:56   META-INF/ 98  Defl:N   91   7% 12-18-2018 16:56
> 48730e36  META-INF/MANIFEST.MF 0  Stored0   0% 12-18-2018
> 16:56   META-INF/maven/ ... 0  Stored0   0%
> 12-18-2018 16:56   com/ ... 1123  Defl:N  451  60%
> 12-18-2018 16:56 eea5d81a  log4j.properties
> 
> It ought to be something simple but before further digging into my
> setup details I want to make sure there isn't something special for
> tomcat. Something in ${catalina.base}/conf or conflicts with
> tomcat's logging system.
> 
> 
>> On Dec 18, 2018, at 9:42 AM, "Lemke, Michael ST/HZA-ZIC2" wrote:
>> 
>> I have an old webapp that uses log4j 1.2 and which I am trying to
>> deploy on tomcat. For the heck of it I can't get tomcat to use
>> the log4.properties file. What am I doing
>> wrong?
>> 
>> tomcat 9.0.6 is installed as a Windows service and does serve my
>> webapp, so the app is working fine. The project is mavenized, I
>> put log4.properties to src/main/resources
>> and it ends up in the jar file of my application. Is there
>> anything special that needs to be done?
>> 
>> 
>> 
>> 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
> 
> 
> -
>
> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: 

Re: log4j app logging

2018-12-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Michael,

On 12/18/18 12:42, Lemke, Michael  ST/HZA-ZIC2 wrote:
> I have an old webapp that uses log4j 1.2 and which I am trying to 
> deploy on tomcat. For the heck of it I can't get tomcat to use the 
> log4.properties file. What am I doing wrong?

Are you trying to get Tomcat to use the log4j.properties file from
your application? If so, that's not going to work, because Tomcagt
starts up long before your application is loaded, and so the log4j.jar
file and log4j.properties file are not used at all.

Your *application* should be able to use log4j without any problems as
long as the log4j.jar file is in WEB-INB/lib and your log4j.properties
file is in (usually) WEB-INF/classes/log4j.properties.

> tomcat 9.0.6 is installed as a Windows service and does serve my 
> webapp, so the app is working fine. The project is mavenized, I
> put log4.properties to src/main/resources and it ends up in the jar
> file of my application. Is there anything special that needs to be
> done?

How are you initializing log4j?

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlwZT8kACgkQHPApP6U8
pFjhkxAAi2N30jbKuENmuYhCVq6mlN2N0r8BQcNBhS6fx36DqLQd8V4/BRMQ3Y7+
o/mD1iG+2oGyovocdjspYgFD98dPoL4crUkhrWdc+FUJU7+M64zs7pwfvEnEpdQo
XXp4H15XYOfUT3IyqWuuxoOuX7AHwKfGvUoKSapiGxCWWGsW8LUVcWpec+Ow+oKu
7jd6Tc7xPMqvWpMHKJ/MoamU0BaxpE774BJSz7QJKu7tb/flSykc08vUVxGPg/9X
tfqbiQ8RbzP8Y7UFdDmbySPhK/+VpbwU7ljx5/detNshxZZrEwjKSU3udS/A9bxi
pHkM3gPbtyN/L9VLwaAF1LlxqYolkOqJRuGrw9hRtU5ihydyd7C3Du7T6CpWLSRn
WQ2UTEVwSMJl2y+FF+nKs2o/svPaNNyiwdRq6A1VuEfZBTgb4pG2XDkggOtgqYX0
KuzYwtvKvPU/VWJsRYZkEtQ4yCiHUKiKoGz4AiZSHqxLQ4oSAetMx1SUtCTRllb9
bOHaMJkiTh+Iez1t1JRSQtYloW+z2i9w4H/CDwU6YDWOkmvp5URbEtIxUzpAcl3f
E4o9FHcYZKG8KUYobkeSNDD5mo19QDbRUbnLx0TzvtYCbzrg+Ol60yd+8A9lzAz7
6Rz6EePOYXCPjQD3i8OCpbTt1UCGQJB0M6nXr9qNBO5uoBQYMXw=
=uBKg
-END PGP SIGNATURE-

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



RE: log4j app logging

2018-12-18 Thread Lemke, Michael ST/HZA-ZIC2
Thanks, Ryan, this JULI thing actually is what worries me. I don't care about 
tomcat's logging at the moment. It is my webapp's logging I can't figure out. 
It worked on other containers.

-Original Message-
From: Ryan Palmer
Sent: Tuesday, December 18, 2018 7:49 PM

Michael,

Tomcat uses JULI internally. Have you taken necessary steps to redirect JULI to 
log4j?

Thanks,
Ryan


From: Lemke, Michael ST/HZA-ZIC2 
Sent: Tuesday, December 18, 2018 10:20 AM
To: Tomcat Users List
Subject: RE: log4j app logging

On December 18, 2018 6:59 PM
Ryan Palmer wrote:
>
>The file needs to be named log4j.properties (or .xml, 
>.json, etc.) and needs to be in the classpath. You ommitted the 'j'.

Thanks for spotting this. Unfortunately, this typo was only in the email:

pc# ls src/main/resources/
com  log4j.properties


So for being in the classpath it is sufficient to have it packaged in the jar, 
isn't it?

Archive:  myapp-1.1.0-SNAPSHOT.jar
 Length   MethodSize  CmprDateTime   CRC-32   Name
  --  ---  -- -   
   0  Stored0   0% 12-18-2018 16:56   META-INF/
  98  Defl:N   91   7% 12-18-2018 16:56 48730e36  META-INF/MANIFEST.MF
   0  Stored0   0% 12-18-2018 16:56   META-INF/maven/
...
   0  Stored0   0% 12-18-2018 16:56   com/
...
1123  Defl:N  451  60% 12-18-2018 16:56 eea5d81a  log4j.properties

It ought to be something simple but before further digging into my setup 
details I want to make sure there isn't something special for tomcat. Something 
in ${catalina.base}/conf or conflicts with tomcat's logging system.


>On Dec 18, 2018, at 9:42 AM, "Lemke, Michael ST/HZA-ZIC2" wrote:
>
>I have an old webapp that uses log4j 1.2 and which I am trying to deploy on 
>tomcat. For the heck of it I can't get tomcat to use the 
>log4.properties file. What am I doing wrong?
>
>tomcat 9.0.6 is installed as a Windows service and does serve my webapp, so 
>the app is working fine. The project is mavenized, I put 
>log4.properties to src/main/resources and it ends up 
>in the jar file of my application. Is there anything special that needs to be 
>done?
>
>
>
>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


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



Re: log4j app logging

2018-12-18 Thread Ryan Palmer
Michael,

Tomcat uses JULI internally. Have you taken necessary steps to redirect JULI to 
log4j?

Thanks,
Ryan


From: Lemke, Michael ST/HZA-ZIC2 
Sent: Tuesday, December 18, 2018 10:20 AM
To: Tomcat Users List
Subject: RE: log4j app logging

On December 18, 2018 6:59 PM
Ryan Palmer wrote:
>
>The file needs to be named log4j.properties (or .xml, 
>.json, etc.) and needs to be in the classpath. You ommitted the 'j'.

Thanks for spotting this. Unfortunately, this typo was only in the email:

pc# ls src/main/resources/
com  log4j.properties


So for being in the classpath it is sufficient to have it packaged in the jar, 
isn't it?

Archive:  myapp-1.1.0-SNAPSHOT.jar
 Length   MethodSize  CmprDateTime   CRC-32   Name
  --  ---  -- -   
   0  Stored0   0% 12-18-2018 16:56   META-INF/
  98  Defl:N   91   7% 12-18-2018 16:56 48730e36  META-INF/MANIFEST.MF
   0  Stored0   0% 12-18-2018 16:56   META-INF/maven/
...
   0  Stored0   0% 12-18-2018 16:56   com/
...
1123  Defl:N  451  60% 12-18-2018 16:56 eea5d81a  log4j.properties

It ought to be something simple but before further digging into my setup 
details I want to make sure there isn't something special for tomcat. Something 
in ${catalina.base}/conf or conflicts with tomcat's logging system.


>On Dec 18, 2018, at 9:42 AM, "Lemke, Michael ST/HZA-ZIC2" wrote:
>
>I have an old webapp that uses log4j 1.2 and which I am trying to deploy on 
>tomcat. For the heck of it I can't get tomcat to use the 
>log4.properties file. What am I doing wrong?
>
>tomcat 9.0.6 is installed as a Windows service and does serve my webapp, so 
>the app is working fine. The project is mavenized, I put 
>log4.properties to src/main/resources and it ends up 
>in the jar file of my application. Is there anything special that needs to be 
>done?
>
>
>
>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: log4j app logging

2018-12-18 Thread Lemke, Michael ST/HZA-ZIC2
On December 18, 2018 6:59 PM
Ryan Palmer wrote:
>
>The file needs to be named log4j.properties (or .xml, 
>.json, etc.) and needs to be in the classpath. You ommitted the 'j'.

Thanks for spotting this. Unfortunately, this typo was only in the email:

pc# ls src/main/resources/
com  log4j.properties


So for being in the classpath it is sufficient to have it packaged in the jar, 
isn't it?

Archive:  myapp-1.1.0-SNAPSHOT.jar
 Length   MethodSize  CmprDateTime   CRC-32   Name
  --  ---  -- -   
   0  Stored0   0% 12-18-2018 16:56   META-INF/
  98  Defl:N   91   7% 12-18-2018 16:56 48730e36  META-INF/MANIFEST.MF
   0  Stored0   0% 12-18-2018 16:56   META-INF/maven/
...
   0  Stored0   0% 12-18-2018 16:56   com/
...
1123  Defl:N  451  60% 12-18-2018 16:56 eea5d81a  log4j.properties

It ought to be something simple but before further digging into my setup 
details I want to make sure there isn't something special for tomcat. Something 
in ${catalina.base}/conf or conflicts with tomcat's logging system.


>On Dec 18, 2018, at 9:42 AM, "Lemke, Michael ST/HZA-ZIC2" wrote:
>
>I have an old webapp that uses log4j 1.2 and which I am trying to deploy on 
>tomcat. For the heck of it I can't get tomcat to use the 
>log4.properties file. What am I doing wrong?
>
>tomcat 9.0.6 is installed as a Windows service and does serve my webapp, so 
>the app is working fine. The project is mavenized, I put 
>log4.properties to src/main/resources and it ends up 
>in the jar file of my application. Is there anything special that needs to be 
>done?
>
>
>
>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: log4j app logging

2018-12-18 Thread Ryan Palmer
Michael,

The file needs to be named log4j.properties (or .xml, 
.json, etc.) and needs to be in the classpath. You ommitted the 'j'.

Sent from BlueMail
On Dec 18, 2018, at 9:42 AM, "Lemke, Michael ST/HZA-ZIC2" 
mailto:lemke...@schaeffler.com>> wrote:

I have an old webapp that uses log4j 1.2 and which I am trying to deploy on 
tomcat. For the heck of it I can't get tomcat to use the 
log4.properties file. What am I doing wrong?

tomcat 9.0.6 is installed as a Windows service and does serve my webapp, so the 
app is working fine. The project is mavenized, I put 
log4.properties to src/main/resources and it ends up in 
the jar file of my application. Is there anything special that needs to be done?



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



log4j app logging

2018-12-18 Thread Lemke, Michael ST/HZA-ZIC2
I have an old webapp that uses log4j 1.2 and which I am trying to deploy on 
tomcat. For the heck of it I can't get tomcat to use the log4.properties file. 
What am I doing wrong?

tomcat 9.0.6 is installed as a Windows service and does serve my webapp, so the 
app is working fine. The project is mavenized, I put log4.properties to 
src/main/resources and it ends up in the jar file of my application. Is there 
anything special that needs to be done?

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



Re: why can't i login to tomcat7 status page from clean install zip

2018-12-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Bo,

On 12/18/18 00:49, Bo wrote:
> here is screenshot
> 
> I just tried again still no working
> 
> 
> https://i.imgur.com/8bQH2YB.png

Your XML is invalid and can't be loaded. The log file should confirm
this. Unfortunately, Notepad++ makes it look (via syntax highlighting)
like your XML file is properly-formed but it is not.

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlwZEMEACgkQHPApP6U8
pFgV8w/9GfZaU8HaYv5N/xN512qUhensuJfjsXM8SCBM6SWUTbKPL9TOsUq6gzSB
DMP4NkGH9q9nMXjoM1y9oz+IpmkTeuO1B8FBZq+pMfFANpUfUGvNHI9jtM/fANmT
HJDV5U6LiTbsgyZHeGe7TW6YoiLNhniSji5F+5jlPM5aFJURgTwvufUyduzVfDLb
eCi3CBlpb20ETlNWHaYlxPkBXiAPCOhyIxIEkszW34aZxxt01/VYvPnOI4igbYlQ
WHKhly5tHu1Vup2GUcnjKy1VPWQjCfynfZOBFOeUosGqzXbRovBTSNCo48dSJd6O
M+yElR5//fGOsdv5PjEn9Wz29j/VIBCCfnneA+2wS9BflchCcPwFH2IToDTfbT8j
tYdY7ux3clHJ5QN/pJt5bkdggwKq0VdIIOBLucDmNGGoFHURA/0IrmlfY4/F7VM0
PropnJvbrHi6MF6aSxPtxZtJeCxAwfASwOpDyKKv3wNQ1VYjLOdzkpT/+0sD6mq8
03d29Ecvywuiq7VGhzdWvK8oSSj3PoIggJtLql6h3ohurRwqXZrPUV0PU9rDRhfs
2b76pk6we+xJLbA7yyA1zftgH8iNBvIc6Q6HnYjcnxHTeiVi1SU6OAaJeRvRUsUE
as8CaRonVjvwBMWcsWLyH8Y3K5ehfOoUuMpFNGrJg9HspyWIhNs=
=u6nK
-END PGP SIGNATURE-

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



Re: Tomcat 9 throws exception when sending unencoded charecters in QueryString

2018-12-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Melvin,

On 12/18/18 04:21, Melvin wrote:
> Tomcat 9.0.13 I switched from tomcat 8.5.35 to 9.0.13. In 8.5 when
> I send an unencoded character in queryString it throws 400 error in
> the browser itself and no Exception is thrown or seen explicitly.

That doesn't make any sense. Browsers don't throw HTTP errors.

> After I switched to tomcat 9, when I send an unencoded character
> in queryString it throws Exception and tomcat error page is shown.
As it should be.

> I configured error-page in both the servers.

How/where?

> I know that these characters can be relaxed by adding them in 
> relaxedquerychars in server.xml. But still it is a 400 error and 
> ideally it must redirect me to the configured error page.
Are you saying that configuring relaxedquerychars does not work? If
so, please post that configuration.

> Also when the response.setStatus(400) is called, error page is not 
> redirected in both the servers.

Where are you configuring your error page. This isn't unambiguous:

> web.xml   400
> /error.jsp  
> 500 /error.jsp
>  


> URL=http://localhost:9013/app1/paramTest.jsp?name=^ Tomcat 8.5.32
> - 'This page isn’t working' is shown in browser. Tomcat 9.0.13 - 
> java.lang.IllegalArgumentException: Invalid character found in the 
> request target. The valid characters are defined in RFC 7230 and
> RFC 3986 
> org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11Inpu
tBuffer.java:467)
>
> 
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:29
4)
> org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLigh
t.java:66)
>
> 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractPro
tocol.java:791)
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoi
nt.java:1417)
>
> 
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.j
ava:49)
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.j
ava:1149)
>
> 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
va:624)
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThr
ead.java:61)
>
> 
java.lang.Thread.run(Thread.java:748) is thrown and tomcat error page is
> shown. I have attached the screenshot of the exception thrown.

Attachments are stripped, but presumably, it's just a screenshot of
the above.

Please explain where you have configured that error page, and show
your relaxedquerychars setting (if you have one).

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlwZD7oACgkQHPApP6U8
pFg+1xAAsK6do1HFtdhQG4uNczRo/NgHOvDF0Z4yWolntEEZdDb+dzsqqtUZhRNg
5n3q9o3hL2bLBjy+zetuuIVBg7ZxmgcC0QnlhLW+zgOScvGRRSwFi/NOieBgEOe4
fite15CdaSd9OSv/jVTDqkgL0LEGVnioGgzYaXlzmGWEI/6BpEbBwmLJpqofQ6ij
EFVbDis2tPc/kwP8JPYll2ihFpPNUacEE+SB/BQyAzOXR1OzAGRYqMFZlfpwfpZ4
cwCsTwWZeWmKX7PLQjyhE2lCT5a3tioLRAbIyw3P92WJTy4Iwn65EBnf6BcXLF0f
zuYZYwV1VXut81g8nBcby08si2R+qFHyJ2nIQ2oJWurtf+W4FiQ6Sh4fF7pSN9aI
FSEknFeFiAYgP/tNDCi40uRVe+HfRczMnYWScR7QmO0U5Ir6/5gM3I6hUOaOYQpl
s1uL6Tqq7+/7HxSP5PKjxgYg6sJVk8qo7nHuUH/kvJP/gbEQtghJUhQ/xIrZq/e8
Gg1xTmm4DGZ9xFl9RLHQQqvlbHVQuVfYYVsbfC3pHz2SSevIye+ZAg0CnyXCzFGs
Ywgsf8VJ/yVbOp80wLd95zsbvmZ/7qK1mtx8aeeLzE8gCrOVr0yYagFsV+AiyQU7
iGfckuRXbztZ33oJK1fY4Y+QELFuUD3ceAYTy+/L/Exw6NQg8Kc=
=0by1
-END PGP SIGNATURE-

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



Re: why can't i login to tomcat7 status page from clean install zip

2018-12-18 Thread Mark Thomas
On 18/12/2018 13:46, Bo wrote:
> apologize for what? 

Your statement that "tomcat is horribly broken and buggy"

who did i insult

Everyone who has contributed to Tomcat.

Which, by the way, is provided to you free of charge. As is the support
you are receiving on this list.

> i stand by my claim,

Really? You haven't looked at the catalina.-mm-dd.log file yet then.
I strongly suggest that you do so. After all, what is the point of
asking for help (even if you aren't very polite when you do so) if you
aren't going to then take the help when it is offered?

> seems thousands people having this issue, if it was
> intuitively and well designed, this wouldnt be a thing now would it
> https://www.centos.org/forums/viewtopic.php?t=46150

As that thread makes clear, some folks don't read instructions. Those
instructions are:
- in the file that needs to be edited
- right next to the part that needs to be edited
- in a dedicated comment block to separate them from other comments
  in the file.

And when those instructions aren't followed, there will be a nice
message in the log file explaining what the problem is. As you will find
when you look at the log files on your system.

Still waiting for that apology...

Mark


> 
> 
> On Tue, Dec 18, 2018, at 7:15 AM, Mark Thomas wrote:
>> On 18/12/2018 12:55, Bo wrote:
>>> i tested every possible combination.
>>>
>>> anyone can try it themselves
>>> i listed the steps to duplicate this already
>>> its 100 percent generic
>>>
>>> tomcat is horribly broken and buggy
>>> it wont even allow me to login
>>
>> When things go wrong it is usually a good idea to assume that you have> made 
>> the error rather than throwing around insults - especially
>> when you> are relying on the people you are insulting to help you.
>>
>> I suggest you take a look at the logs.
>> catalina.-mm-dd.log should be illuminating.
>>
>> The error message for the first stack trace that appears in that file> after 
>> Tomcat starts should be sufficient.
>>
>> When you are ready to apologise for the "tomcat is horribly broken and> 
>> buggy" comment, an apology on this thread will be fine.
>>
>> Mark
>>
>>
>>
>>>
>>>
>>> On Tue, Dec 18, 2018, at 1:00 AM, Bob Hall wrote:
 Bo,
 On Monday, December 17, 2018, 9:49:34 PM PST, Bo 
 wrote:>> here is screenshot
>
> I just tried again still no working\
>
> . https://i.imgur.com/8bQH2YB.png

 At the risk of stating the obvious, your screenshot shows: - a tomcat->>> 
 users.xml file with three usernames: dog, god, and role1.> - a
 Tomcat login page with username admin>>> Did you try logging in with 
 username god or adding a user with
 username admin?> - Bob


>>>
>>>
>>
>>
>> -> 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: why can't i login to tomcat7 status page from clean install zip

2018-12-18 Thread Bo
apologize for what? who did i insult

i stand by my claim, seems thousands people having this issue, if it was
intuitively and well designed, this wouldnt be a thing now would it
https://www.centos.org/forums/viewtopic.php?t=46150


On Tue, Dec 18, 2018, at 7:15 AM, Mark Thomas wrote:
> On 18/12/2018 12:55, Bo wrote:
>> i tested every possible combination.
>> 
>> anyone can try it themselves
>> i listed the steps to duplicate this already
>> its 100 percent generic
>> 
>> tomcat is horribly broken and buggy
>> it wont even allow me to login
> 
> When things go wrong it is usually a good idea to assume that you have> made 
> the error rather than throwing around insults - especially
> when you> are relying on the people you are insulting to help you.
> 
> I suggest you take a look at the logs.
> catalina.-mm-dd.log should be illuminating.
> 
> The error message for the first stack trace that appears in that file> after 
> Tomcat starts should be sufficient.
> 
> When you are ready to apologise for the "tomcat is horribly broken and> 
> buggy" comment, an apology on this thread will be fine.
> 
> Mark
> 
> 
> 
>> 
>> 
>> On Tue, Dec 18, 2018, at 1:00 AM, Bob Hall wrote:
>>> Bo,
>>> On Monday, December 17, 2018, 9:49:34 PM PST, Bo 
>>> wrote:>> here is screenshot
 
 I just tried again still no working\
 
 . https://i.imgur.com/8bQH2YB.png
>>> 
>>> At the risk of stating the obvious, your screenshot shows: - a tomcat->>> 
>>> users.xml file with three usernames: dog, god, and role1.> - a
>>> Tomcat login page with username admin>>> Did you try logging in with 
>>> username god or adding a user with
>>> username admin?> - Bob
>>> 
>>> 
>> 
>> 
> 
> 
> -> To 
> unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 



Re: why can't i login to tomcat7 status page from clean install zip

2018-12-18 Thread Mark Thomas
On 18/12/2018 12:55, Bo wrote:
> i tested every possible combination.
> 
> anyone can try it themselves
> i listed the steps to duplicate this already
> its 100 percent generic
> 
> tomcat is horribly broken and buggy
> it wont even allow me to login

When things go wrong it is usually a good idea to assume that you have
made the error rather than throwing around insults - especially when you
are relying on the people you are insulting to help you.

I suggest you take a look at the logs.
catalina.-mm-dd.log should be illuminating.

The error message for the first stack trace that appears in that file
after Tomcat starts should be sufficient.

When you are ready to apologise for the "tomcat is horribly broken and
buggy" comment, an apology on this thread will be fine.

Mark



> 
> 
> On Tue, Dec 18, 2018, at 1:00 AM, Bob Hall wrote:
>> Bo,
>> On Monday, December 17, 2018, 9:49:34 PM PST, Bo  wrote:>  
>>>  > here is screenshot
>>>  
>>> I just tried again still no working\
>>>  
>>> . https://i.imgur.com/8bQH2YB.png
>>
>> At the risk of stating the obvious, your screenshot shows: - a tomcat-
>> users.xml file with three usernames: dog, god, and role1.> - a Tomcat login 
>> page with username admin
>> Did you try logging in with username god or adding a user with
>> username admin?> - Bob
>>
>>  
> 
> 


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



Re: why can't i login to tomcat7 status page from clean install zip

2018-12-18 Thread Bo
i tested every possible combination.

anyone can try it themselves
i listed the steps to duplicate this already
its 100 percent generic

tomcat is horribly broken and buggy
it wont even allow me to login 


On Tue, Dec 18, 2018, at 1:00 AM, Bob Hall wrote:
> Bo,
> On Monday, December 17, 2018, 9:49:34 PM PST, Bo  wrote:>  
> >  > here is screenshot
>>  
>> I just tried again still no working\
>>  
>> . https://i.imgur.com/8bQH2YB.png
> 
> At the risk of stating the obvious, your screenshot shows: - a tomcat-
> users.xml file with three usernames: dog, god, and role1.> - a Tomcat login 
> page with username admin
> Did you try logging in with username god or adding a user with
> username admin?> - Bob
> 
>  



Re: How to use server.xml with embedded Tomcat 9?

2018-12-18 Thread Rémy Maucherat
On Tue, Dec 18, 2018 at 7:33 AM Ryan Palmer  wrote:

> Hello,
>
> I'm using the Tomcat class to embed the container in my application. I
> have configured the CATLINA_HOME and _BASE properties, and I know those are
> working because the 'work' folder gets generated there as expected. However
> if I put a server.xml file in a 'conf' folder in the same directory, it
> does not seem to be loaded when calling Tomcat.init().
>
> Documentation is very sparse on the Tomcat class so I am unsure how to
> configure it the "standard" way.
>

I very recently refactored Tomcat embedded (in Tomcat 9.0.14) to be more
flexible, with the main assumption that trying to replicate a complex
server.xml with Java code while keeping good configurability was a waste of
resources.

As for using it, there's "big jar" packaging (but with the important note
that it remains EE webapp based, rather than proprietary):
https://github.com/apache/tomcat/tree/trunk/res/tomcat-maven
Or you can do it yourself, you need to use
Tomcat.init(ConfigurationSource). You can use
startup.CatalinaBaseConfigurationSource to replicate the default Tomcat
behavior, or implement ConfigurationSource and have more flexibility. A few
components don't use that abstraction because they persist configs (JASPIC,
storeconfig).

Rémy


Tomcat 9 throws exception when sending unencoded charecters in QueryString

2018-12-18 Thread Melvin
Tomcat 9.0.13

I switched from tomcat 8.5.35 to 9.0.13. In 8.5 when I send an
unencoded character in queryString it throws 400 error in the browser
itself and no Exception is thrown or seen explicitly.

After I switched to tomcat 9, when I send an unencoded character in
queryString it throws Exception and tomcat error page is shown. I
configured error-page in
both the servers.

I know that these characters can be relaxed by adding them in
relaxedquerychars in server.xml. But still it is a 400 error and
ideally it must redirect me to the configured error page.

Also when the response.setStatus(400) is called, error page is not
redirected in both the servers.

web.xml -


  
400
/error.jsp
  
  
500
/error.jsp
  



URL=http://localhost:9013/app1/paramTest.jsp?name=^
Tomcat 8.5.32 - 'This page isn’t working' is shown in browser.
Tomcat 9.0.13 - java.lang.IllegalArgumentException: Invalid character
found in the request target. The valid characters are defined in RFC
7230 and RFC 3986

org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:467)

org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:294)

org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)

org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:791)

org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1417)

org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:748)

is thrown and tomcat error page is shown. I have attached the
screenshot of the exception thrown. Do the needful.

Regards,
Melvin A

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