Re: Fwd: Tomcat question
Zahi, On 30.4.2018. 11:09, Zahi Fail wrote: curl -X POST \ http://localhost:8080/userManagement/rest/Traffic/users2 \ -H 'Authorization: Basic dG9tY2F0OnMzY3JldA==' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json' \ -H 'Postman-Token: 71819f33-6206-02c5-5cf2-8de6347fc154' \ -d '[{"id":1, "code":2, "time":"2009-02-15", "cycleSecond":22, "programNumber":1221, "stageNumber":22, "moves":"22", "detectors":"fead","conditions":"2ddsa"}]' First, please don't top post. Read mailing list guidelines here: http://tomcat.apache.org/lists.html#tomcat-users Regarding the problem, base64 string "dG9tY2F0OnMzY3JldA==" decodes to "tomcat:s3cret", which is, according to your previously posted tomcat-users.xml file, user in the role "manager-gui". On the other hand, your web.xml auth-constraint configuration expects the user in the role "manager". -Ognjen - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Fwd: Tomcat question
This is the curl message from postman: curl -X POST \ http://localhost:8080/userManagement/rest/Traffic/users2 \ -H 'Authorization: Basic dG9tY2F0OnMzY3JldA==' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json' \ -H 'Postman-Token: 71819f33-6206-02c5-5cf2-8de6347fc154' \ -d '[{"id":1, "code":2, "time":"2009-02-15", "cycleSecond":22, "programNumber":1221, "stageNumber":22, "moves":"22", "detectors":"fead","conditions":"2ddsa"}]' On Mon, Apr 30, 2018 at 11:42 AM, Ognjen Blagojevic < ognjen.d.blagoje...@gmail.com> wrote: > Zahi, > > On 25.4.2018. 13:19, zahi.f...@gmail.com wrote: > >> I configured in my conf\server.xml file the realm as below: >>> >> > Ok, so the configuration looks fine. > > You said you are using Postman to send the request. Can you paste the > `curl` command that the postman can generate for you just to check if it > looks Ok? > > For instance, this would be the right curl command: > > curl -u admin:falcon -X POST http://your.server/webapp/ > > While those are not: > > curl -u admin:falco -X POST http://your.server/webapp/ (typo in > password, HTTP 401) > > curl -X POST http://your.server/webapp/ (no credentials specified, HTTP > 401) > > curl -u tomcat:s3cret -X POST http://your.server/webapp/ (wrong role, > HTTP 403) > > curl -u admin:falcon -X GET http://your.server/webapp/ (GET instead of > POST, HTTP status code... it depends) > > -Ognjen > > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Fwd: Tomcat question
Zahi, On 25.4.2018. 13:19, zahi.f...@gmail.com wrote: I configured in my conf\server.xml file the realm as below: Ok, so the configuration looks fine. You said you are using Postman to send the request. Can you paste the `curl` command that the postman can generate for you just to check if it looks Ok? For instance, this would be the right curl command: curl -u admin:falcon -X POST http://your.server/webapp/ While those are not: curl -u admin:falco -X POST http://your.server/webapp/ (typo in password, HTTP 401) curl -X POST http://your.server/webapp/ (no credentials specified, HTTP 401) curl -u tomcat:s3cret -X POST http://your.server/webapp/ (wrong role, HTTP 403) curl -u admin:falcon -X GET http://your.server/webapp/ (GET instead of POST, HTTP status code... it depends) -Ognjen - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Fwd: Tomcat question
Sent from my iPhone Begin forwarded message: > From: Zahi Fail <zahi.f...@gmail.com> > Date: 25 April 2018 at 12:19:20 GMT+3 > To: Ognjen Blagojevic <ognjen.d.blagoje...@gmail.com> > Subject: Re: Tomcat question > > I configured in my conf\server.xml file the realm as below: > > > resourceName="UserDatabase"/> > > and still i can't access throw basic auth. > > My full server.xml file look like that: > > > > > > > > >SSLEngine="on" /> > >className="org.apache.catalina.core.JreMemoryLeakPreventionListener" /> >className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /> >className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" /> > > > > >type="org.apache.catalina.UserDatabase" > description="User database that can be updated and saved" > factory="org.apache.catalina.users.MemoryUserDatabaseFactory" > pathname="conf/tomcat-users.xml" /> > > > > > > > > > > > connectionTimeout="2" >redirectPort="8443" /> > > > > > > > > > > > > > > > > > > > > > > > > resourceName="UserDatabase"/> > >unpackWARs="true" autoDeploy="true"> > > > > > > directory="logs" >prefix="localhost_access_log" suffix=".txt" >pattern="%h %l %u %t %r %s %b" /> > > > > > > > >> On Tue, Apr 24, 2018 at 10:35 AM, Ognjen Blagojevic >> <ognjen.d.blagoje...@gmail.com> wrote: >> Zahi, >> >>> On 23.4.2018. 16:38, Zahi Fail wrote: >>> This is the following code from my web.xml file: >> ... >>> *and in the tomcat-user.xml i have updated the code as below: * >> ... >> >> You need to configure appropriate realm. Did you do that? You can do it in >> your webapp's context.xml, or in server.xml file, but the former method is >> recommended, because of easier deployment. >> >> Take a look at: >> >> https://tomcat.apache.org/tomcat-9.0-doc/realm-howto.html >> >> If you want to keep usernames and passwords in XML file (like >> tomcat-users.xml), you should use UserDatabaseRealm, but you also have other >> options for storing credentials -- e.g. SQL database or LDAP directory. >> >> -Ognjen >
Re: Tomcat question
On 4/23/2018 11:46 AM, zahi.f...@gmail.com wrote: I used the “manager” role for basic auth. While testing the web service with postman, I entered my user name and password. Yet, I got unauthorized message (401).. I couldn’t find any explanation for this issue.. What do the log files say? -Terence On 23 Apr 2018, at 19:41, Christopher Schultzwrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Zahi, On 4/23/18 10:13 AM, zahi.f...@gmail.com wrote: I just copied my users section in the tomcat-users. There is more code - Tomcat users tag.. that shouldn’t be the problem cause I can enter to the tomcat manager page Well, if it shouldn't be a problem then why are you having a problem? - -chris On 23 Apr 2018, at 16:45, Christopher Schultz wrote: Zahi, On 4/23/18 9:38 AM, Zahi Fail wrote: I'm working with Tomcat 9.0.6 version as my servlet, Throughout my jax-rs project i have tried to create basic authentication. While i'm trying to access a post method without the basic auth. it all working well (I got the 200 message from the HTTP server). But, after adding the basic auth. my user name and password doesn't work from some reason.. This is the following code from my web.xml file: http://www.w3.org/2001/XMLSchema-instance; xmlns="http://java.sun.com/xml/ns/javaee; xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd; id="WebApp_ID" version="3.0"> User Management Jersey RESTful Application org.glassfish.jersey.servlet.ServletContainer et- class> jersey.config.server.provider.packages com.journaldev.jaxws.beans Jersey RESTful Application /rest/* simple web resource /rest/Traffic/* POST manager NONE BASIC *and in the tomcat-user.xml i have updated the code as below: * Your tomcat-user.xml file is not a valid XML document. -chris - 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 -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlreDLYACgkQHPApP6U8 pFhQJg/+MP//p9106wLrS3EG5aqkt6NpG4iZyL7btCRIb1iMQuhF0HGG/mSgtvWe 3/kyfAe81aiBxC6nfhEx9DepSAQ24/6nYLE5vEtInnKZelY7ehaH4/nDb6DVJMer 8C/onpnz7NValh+pecEj4mfhMoWc40poH+L4Ry1u8oiWzjjFW6g8QB37Ac759x7L 9GCHYK88z4fGFdDFSxVGsNMyy+FHgy3Dz+gJplAFXtIctTD7QC1Rk1Js+ioivj7F 6/fC9v0OoApqFAAKKDP/gsYhRP2KAFqgasFnLRU90ic8YLGtJ7GDayhi3EIEgNLz GZIR1VwN0IqYDZ935Bxw1p/gRu6tgSgZS8MOF4jV64RST04p1LymEdmvcR7+N8HX BYRJLYOChI2PjAfh7WmCHXSP8KK8hHA4bWKtuWB0XhLIvurHWE88x2ZwuqnabCAF 9Zh8XLpU7NLjTZGBVXYQPe0/xGVvElWSkVaX8TrIyVNY7qf9Nri+pgOLBdIz3AGy COsoP3o9pMn8CkQPpA0Fq503sUU7GuMZByuGpyWayDxen1P4Gpv5o/YdDivUnJJ2 56NBksROXNVYHDT+mJox/6v7UNya5ssrEIquUtnEzr+3ZdChWtRXzglMPPUWVcdm Ms5XDhKOUUKlHNynT7i+a3eeIOpn4UJZqJiBtp19IFPfN4XcSh4= =ch87 -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
Re: Tomcat question
Zahi, On 23.4.2018. 16:38, Zahi Fail wrote: > This is the following code from my web.xml file: ... > *and in the tomcat-user.xml i have updated the code as below: * ... You need to configure appropriate realm. Did you do that? You can do it in your webapp's context.xml, or in server.xml file, but the former method is recommended, because of easier deployment. Take a look at: https://tomcat.apache.org/tomcat-9.0-doc/realm-howto.html If you want to keep usernames and passwords in XML file (like tomcat-users.xml), you should use UserDatabaseRealm, but you also have other options for storing credentials -- e.g. SQL database or LDAP directory. -Ognjen - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat question
I used the “manager” role for basic auth. While testing the web service with postman, I entered my user name and password. Yet, I got unauthorized message (401).. I couldn’t find any explanation for this issue.. > On 23 Apr 2018, at 19:41, Christopher Schultz> wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Zahi, > >> On 4/23/18 10:13 AM, zahi.f...@gmail.com wrote: >> I just copied my users section in the tomcat-users. There is more >> code - Tomcat users tag.. that shouldn’t be the problem cause I can >> enter to the tomcat manager page > > Well, if it shouldn't be a problem then why are you having a problem? > > - -chris > >>> On 23 Apr 2018, at 16:45, Christopher Schultz >>> wrote: >>> >> Zahi, >> > On 4/23/18 9:38 AM, Zahi Fail wrote: I'm working with Tomcat > 9.0.6 version as my servlet, Throughout my jax-rs project i > have tried to create basic authentication. > > While i'm trying to access a post method without the basic > auth. it all working well (I got the 200 message from the > HTTP server). But, after adding the basic auth. my user name > and password doesn't work from some reason.. > > > This is the following code from my web.xml file: > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; > xmlns="http://java.sun.com/xml/ns/javaee; > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee > http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd; > id="WebApp_ID" version="3.0"> User > Management Jersey > RESTful Application > org.glassfish.jersey.servlet.ServletContainer et- >> > > class> > > >> > jersey.config.server.provider.packages > com.journaldev.jaxws.beans > > Jersey RESTful Application > /rest/* > > simple web resource > /rest/Traffic/* > POST > manager > > NONE > > BASIC > > > > *and in the tomcat-user.xml i have updated the code as below: > * > > rolename="manager-status"/> > password="s3cret" roles="manager-gui"/> username="admin" password="falcon" roles="manager"/> >> >> Your tomcat-user.xml file is not a valid XML document. >> >> -chris >>> >>> - >>> >>> > 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 >> > -BEGIN PGP SIGNATURE- > Comment: GPGTools - http://gpgtools.org > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlreDLYACgkQHPApP6U8 > pFhQJg/+MP//p9106wLrS3EG5aqkt6NpG4iZyL7btCRIb1iMQuhF0HGG/mSgtvWe > 3/kyfAe81aiBxC6nfhEx9DepSAQ24/6nYLE5vEtInnKZelY7ehaH4/nDb6DVJMer > 8C/onpnz7NValh+pecEj4mfhMoWc40poH+L4Ry1u8oiWzjjFW6g8QB37Ac759x7L > 9GCHYK88z4fGFdDFSxVGsNMyy+FHgy3Dz+gJplAFXtIctTD7QC1Rk1Js+ioivj7F > 6/fC9v0OoApqFAAKKDP/gsYhRP2KAFqgasFnLRU90ic8YLGtJ7GDayhi3EIEgNLz > GZIR1VwN0IqYDZ935Bxw1p/gRu6tgSgZS8MOF4jV64RST04p1LymEdmvcR7+N8HX > BYRJLYOChI2PjAfh7WmCHXSP8KK8hHA4bWKtuWB0XhLIvurHWE88x2ZwuqnabCAF > 9Zh8XLpU7NLjTZGBVXYQPe0/xGVvElWSkVaX8TrIyVNY7qf9Nri+pgOLBdIz3AGy > COsoP3o9pMn8CkQPpA0Fq503sUU7GuMZByuGpyWayDxen1P4Gpv5o/YdDivUnJJ2 > 56NBksROXNVYHDT+mJox/6v7UNya5ssrEIquUtnEzr+3ZdChWtRXzglMPPUWVcdm > Ms5XDhKOUUKlHNynT7i+a3eeIOpn4UJZqJiBtp19IFPfN4XcSh4= > =ch87 > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org >
Re: Tomcat question
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Zahi, On 4/23/18 10:13 AM, zahi.f...@gmail.com wrote: > I just copied my users section in the tomcat-users. There is more > code - Tomcat users tag.. that shouldn’t be the problem cause I can > enter to the tomcat manager page Well, if it shouldn't be a problem then why are you having a problem? - -chris >> On 23 Apr 2018, at 16:45, Christopher Schultz >>wrote: >> > Zahi, > On 4/23/18 9:38 AM, Zahi Fail wrote: I'm working with Tomcat 9.0.6 version as my servlet, Throughout my jax-rs project i have tried to create basic authentication. While i'm trying to access a post method without the basic auth. it all working well (I got the 200 message from the HTTP server). But, after adding the basic auth. my user name and password doesn't work from some reason.. This is the following code from my web.xml file: >>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xmlns="http://java.sun.com/xml/ns/javaee; xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd; id="WebApp_ID" version="3.0"> User Management Jersey RESTful Application org.glassfish.jersey.servlet.ServletContainer class> > jersey.config.server.provider.packages com.journaldev.jaxws.beans Jersey RESTful Application /rest/* simple web resource /rest/Traffic/* POST manager NONE BASIC *and in the tomcat-user.xml i have updated the code as below: * >>> rolename="manager-status"/> >>> password="s3cret" roles="manager-gui"/> >>> username="admin" password="falcon" roles="manager"/> > > Your tomcat-user.xml file is not a valid XML document. > > -chris >> >> - >> >> 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 > -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlreDLYACgkQHPApP6U8 pFhQJg/+MP//p9106wLrS3EG5aqkt6NpG4iZyL7btCRIb1iMQuhF0HGG/mSgtvWe 3/kyfAe81aiBxC6nfhEx9DepSAQ24/6nYLE5vEtInnKZelY7ehaH4/nDb6DVJMer 8C/onpnz7NValh+pecEj4mfhMoWc40poH+L4Ry1u8oiWzjjFW6g8QB37Ac759x7L 9GCHYK88z4fGFdDFSxVGsNMyy+FHgy3Dz+gJplAFXtIctTD7QC1Rk1Js+ioivj7F 6/fC9v0OoApqFAAKKDP/gsYhRP2KAFqgasFnLRU90ic8YLGtJ7GDayhi3EIEgNLz GZIR1VwN0IqYDZ935Bxw1p/gRu6tgSgZS8MOF4jV64RST04p1LymEdmvcR7+N8HX BYRJLYOChI2PjAfh7WmCHXSP8KK8hHA4bWKtuWB0XhLIvurHWE88x2ZwuqnabCAF 9Zh8XLpU7NLjTZGBVXYQPe0/xGVvElWSkVaX8TrIyVNY7qf9Nri+pgOLBdIz3AGy COsoP3o9pMn8CkQPpA0Fq503sUU7GuMZByuGpyWayDxen1P4Gpv5o/YdDivUnJJ2 56NBksROXNVYHDT+mJox/6v7UNya5ssrEIquUtnEzr+3ZdChWtRXzglMPPUWVcdm Ms5XDhKOUUKlHNynT7i+a3eeIOpn4UJZqJiBtp19IFPfN4XcSh4= =ch87 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat question
I just copied my users section in the tomcat-users. There is more code - Tomcat users tag.. that shouldn’t be the problem cause I can enter to the tomcat manager page > On 23 Apr 2018, at 16:45, Christopher Schultz> wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Zahi, > >> On 4/23/18 9:38 AM, Zahi Fail wrote: >> I'm working with Tomcat 9.0.6 version as my servlet, Throughout my >> jax-rs project i have tried to create basic authentication. >> >> While i'm trying to access a post method without the basic auth. it >> all working well (I got the 200 message from the HTTP server). But, >> after adding the basic auth. my user name and password doesn't work >> from some reason.. >> >> >> This is the following code from my web.xml file: >> >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; >> xmlns="http://java.sun.com/xml/ns/javaee; >> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee >> http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd; id="WebApp_ID" >> version="3.0"> User Management >> Jersey RESTful Application >> org.glassfish.jersey.servlet.ServletContainer class> >> >> > >> jersey.config.server.provider.packages >> com.journaldev.jaxws.beans >>Jersey >> RESTful Application >> /rest/* >> >> simple web resource >> /rest/Traffic/* >> POST >> manager >> >> NONE >> >> BASIC >> >> >> >> *and in the tomcat-user.xml i have updated the code as below: * >> >> >> > username="tomcat" password="s3cret" roles="manager-gui"/> > username="admin" password="falcon" roles="manager"/> > > Your tomcat-user.xml file is not a valid XML document. > > - -chris > -BEGIN PGP SIGNATURE- > Comment: GPGTools - http://gpgtools.org > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlrd42sACgkQHPApP6U8 > pFgd5g//RbtTrIYovq1dF9AfNcDJWD7uT7d3v3PVidCRY+Z+QRUdrRnAXjBwWy/0 > jtUcyDmOcTqSbptA9QXWn84XZFv+AlFpBDIgDHFLKZn1HOJASK3o/QHtLZJ8VOg0 > 13WQGgQJwAsMQHfpq4FW2EaPSK0YT/kUvCZq4093DxuGeCWnxc6NsBFgfSt9bOCk > gGPfcrRAosr+8QJvTZ1Q07OoBThto2gk2TolY7JUG6tnwKkJwu1djB82O6WHqfNK > TWmzaRGus6CvqXKdY90mAZQg0cV48Q/sbBZPAmR3IQaYVww0m2uRyHnuPda2f3Y4 > mzwSyrv+dDMtsFX1gzNCfIS4VdRpbLTQjagB2vhTm2Ce4e+ktDP7oOqlXK+ZY/Wv > ZiFYCYBrsFPMzS2x31giE+T5ZuXY+PQ8OdPUsyFXLcdi2BNJ82FmuYsyNqCyFQ5L > CyW5aI5heOcCME/mJ0FJzHlGbudHre8jrWgZ+/cUmQy/w9zEq9eW63oT/Vsb5ZEi > 1OTvSFZAwDbbDbQmshDQKUKTK3EtKpoN6o7NsjvPbzfSfy+j1+OUJ34zoSZ/hf20 > yF+ysF1wEeCkTMTn+4vhHmLyfQmM19VQiTXrLPdLwS/DT/Ytnoja2Uu4YXGHqQkr > mLxvHS5UNnCb3QXRZJksE8wCy1z6Nl7d4zKSPDyZI2jtL/21YOc= > =nLjE > -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
Re: Tomcat question
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Zahi, On 4/23/18 9:38 AM, Zahi Fail wrote: > I'm working with Tomcat 9.0.6 version as my servlet, Throughout my > jax-rs project i have tried to create basic authentication. > > While i'm trying to access a post method without the basic auth. it > all working well (I got the 200 message from the HTTP server). But, > after adding the basic auth. my user name and password doesn't work > from some reason.. > > > This is the following code from my web.xml file: > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; > xmlns="http://java.sun.com/xml/ns/javaee; > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee > http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd; id="WebApp_ID" > version="3.0"> User Management > Jersey RESTful Application > org.glassfish.jersey.servlet.ServletContainer > > > jersey.config.server.provider.packages > com.journaldev.jaxws.beans >Jersey > RESTful Application > /rest/* > > simple web resource > /rest/Traffic/* > POST > manager > > NONE > > BASIC > > > > *and in the tomcat-user.xml i have updated the code as below: * > > >username="tomcat" password="s3cret" roles="manager-gui"/> username="admin" password="falcon" roles="manager"/> Your tomcat-user.xml file is not a valid XML document. - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlrd42sACgkQHPApP6U8 pFgd5g//RbtTrIYovq1dF9AfNcDJWD7uT7d3v3PVidCRY+Z+QRUdrRnAXjBwWy/0 jtUcyDmOcTqSbptA9QXWn84XZFv+AlFpBDIgDHFLKZn1HOJASK3o/QHtLZJ8VOg0 13WQGgQJwAsMQHfpq4FW2EaPSK0YT/kUvCZq4093DxuGeCWnxc6NsBFgfSt9bOCk gGPfcrRAosr+8QJvTZ1Q07OoBThto2gk2TolY7JUG6tnwKkJwu1djB82O6WHqfNK TWmzaRGus6CvqXKdY90mAZQg0cV48Q/sbBZPAmR3IQaYVww0m2uRyHnuPda2f3Y4 mzwSyrv+dDMtsFX1gzNCfIS4VdRpbLTQjagB2vhTm2Ce4e+ktDP7oOqlXK+ZY/Wv ZiFYCYBrsFPMzS2x31giE+T5ZuXY+PQ8OdPUsyFXLcdi2BNJ82FmuYsyNqCyFQ5L CyW5aI5heOcCME/mJ0FJzHlGbudHre8jrWgZ+/cUmQy/w9zEq9eW63oT/Vsb5ZEi 1OTvSFZAwDbbDbQmshDQKUKTK3EtKpoN6o7NsjvPbzfSfy+j1+OUJ34zoSZ/hf20 yF+ysF1wEeCkTMTn+4vhHmLyfQmM19VQiTXrLPdLwS/DT/Ytnoja2Uu4YXGHqQkr mLxvHS5UNnCb3QXRZJksE8wCy1z6Nl7d4zKSPDyZI2jtL/21YOc= =nLjE -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat question
Hello, I'm working with Tomcat 9.0.6 version as my servlet, Throughout my jax-rs project i have tried to create basic authentication. While i'm trying to access a post method without the basic auth. it all working well (I got the 200 message from the HTTP server). But, after adding the basic auth. my user name and password doesn't work from some reason.. This is the following code from my web.xml file: http://www.w3.org/2001/XMLSchema-instance; xmlns="http://java.sun.com/xml/ns/javaee; xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd; id="WebApp_ID" version="3.0"> User Management Jersey RESTful Application org.glassfish.jersey.servlet.ServletContainer jersey.config.server.provider.packages com.journaldev.jaxws.beans Jersey RESTful Application /rest/* simple web resource /rest/Traffic/* POST manager NONE BASIC *and in the tomcat-user.xml i have updated the code as below: * On Mon, Apr 23, 2018 at 4:34 PM, Olaf Kockwrote: > > > On 23.04.2018 14:49, Zahi Fail wrote: > >> This is the following code from my web.xml file: >> >> >> >> >> > Images are the least popular medium to communicate code. And on this list, > this is actually enforced: Images are stripped. Please post the actual text > - that should be even easier than creating screenshots. > > Olaf > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Tomcat question
Hello Zahi, As it is said in http://tomcat.apache.org/lists.html "Please format your messages as plain text, not HTML. Do not send attachments, as they are likely to be removed and ignored by the mailing list server." Just copy and paste the content of your xml files should be enough :) Cheers, Luis 2018-04-23 14:49 GMT+02:00 Zahi Fail: > Hello, > > I'm working with Tomcat 9.0.6 version as my servlet, > Throughout my jax-rs project i have tried to create basic authentication. > > While i'm trying to access a post method without the basic auth. it all > working well (I got the 200 message from the HTTP server). But, after > adding the basic auth. my user name and password doesn't work from some > reason.. > > > This is the following code from my web.xml file: > > > > and in the tomcat-user.xml i have updated the code as below: > > > > thanks, > Tzahi File > -- "Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better." - Samuel Beckett
Re: Tomcat question
On 23.04.2018 14:49, Zahi Fail wrote: This is the following code from my web.xml file: Images are the least popular medium to communicate code. And on this list, this is actually enforced: Images are stripped. Please post the actual text - that should be even easier than creating screenshots. Olaf - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat question
Hello, I'm working with Tomcat 9.0.6 version as my servlet, Throughout my jax-rs project i have tried to create basic authentication. While i'm trying to access a post method without the basic auth. it all working well (I got the 200 message from the HTTP server). But, after adding the basic auth. my user name and password doesn't work from some reason.. This is the following code from my web.xml file: and in the tomcat-user.xml i have updated the code as below: thanks, Tzahi File
Re: Embedded Tomcat question
On 10/07/2014 03:13, John D. Ament wrote: Well, thanks for the helpful advice thus far.. So, now that I've added a listener properly, I get this: java.lang.UnsupportedOperationException: Section 4.4 of the Servlet 3.0 specification does not permit this method to be called from a ServletContextListener that was not defined in web.xml, a web-fragment.xml file nor annotated with @WebListener at org.apache.catalina.core.StandardContext$NoPluggabilityServletContext.addListener(StandardContext.java:7019) When I try adding my listener... Hmm. The method names in StandardContext aren't helping here. We can't change them (it would break a public API) but we could probably improve the Javadoc. Patches welcome... You haven't provided the code you used to add CdiServletContextListener to the StandardContext so I am having to do some guessing here. I think you added an instance of that class via StandardContext.addApplicationLifecycleListener(). If that is the case, try adding the listener via the class name using StandardContext.addApplicationListener(). The first method is intended to be used by the pluggability API and the exception you are running into is triggered when a listener added via the pluggability API itself tries to use the plubggability API to add a listener of its own (section 4.4 of the Servlet spec does not permit this). If you use the second method it is equivalent to adding the listener to web.xml where it is able to then able to use the pluggability API to add further listeners. Of course, all of that information isn't going to help if my guess about you using addApplicationLifecycleListener() is wrong. If I am wrong, please provide the code you use to create the context and add the listener and we can take another look. Mark @WebListener public class CdiServletContextListener implements ServletContextListener { @Override public void contextInitialized(ServletContextEvent servletContextEvent) { servletContextEvent.getServletContext().addListener(new CdiCtrlListener()); } I even tried rigging my class to have WebListener on it.. until I noticed the method just threw an exception... no questions asked. :-) On Tue, Jul 1, 2014 at 12:37 PM, Mark Thomas ma...@apache.org wrote: On 01/07/2014 17:16, John D. Ament wrote: I looked for the source code, at least on github, there's no tag for 7.0.55 defined (see [1]) Given you are using 7.0.54, why would you look for a tag for 7.0.55? How do I get access to a StandardContext? CAn I cast the Context object? Yes. It would have taken less time to try that than it did to type the question. Mark [1]: https://github.com/apache/tomcat On Mon, Jun 30, 2014 at 4:51 AM, Mark Thomas ma...@apache.org wrote: On 30/06/2014 01:27, John D. Ament wrote: I spoke a little too quickly, ServletContext is avilable from ctx (just didn't search hard enough). Adding the request listener here though results in: java.lang.NullPointerException at org.apache.catalina.core.ApplicationContext.createListener(ApplicationContext.java:1402) at org.apache.catalina.core.ApplicationContext.addListener(ApplicationContext.java:1307) at org.apache.catalina.core.ApplicationContextFacade.addListener(ApplicationContextFacade.java:636) A quick look in the source code will tell you why you are getting an NPE here. You can't add a ServletRequestListener directly. There are a couple of ways to do this. Probably the simplest is to create a ServletContextListener, add that directly to Tomcat's StandardContext with addApplicationLifecycleListener() and then from that ServletContextListener add and request and/or session listeners from the contextInitialized() event. You could also do this with a ServletContainerInitializer. Mark On Sun, Jun 29, 2014 at 8:21 PM, John D. Ament john.d.am...@gmail.com wrote: Hi, I'm on Tomcat 7.0.54, though I would hope your APIs aren't volatile enough that your internals should matter.. I tried this: Wrapper wrapper = Tomcat.addServlet(ctx,Greeter,GreeterServlet.class.getName()); wrapper.addMapping(/*); wrapper.getServlet().getServletConfig().getServletContext().addListener(MyListener.class); This results in a NPE. This makes me think I don't have access to the context yet. I would actually think it's somewhere in this chain: tomcat = new Tomcat(); tomcat.setPort(8080); File base = new File(target/webapp-runner); if(!base.exists()) { base.mkdirs(); } Context ctx = tomcat.addContext(/,base.getAbsolutePath()); however, it doesn't look like Context here is a ServletContext. On Sun, Jun 29, 2014 at 6:30 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: John D. Ament [mailto:john.d.am...@gmail.com] Subject: Embedded Tomcat question Playing around a bit with embedded tomcat. It looks like there are APIs to add all
Re: Embedded Tomcat question
Well, thanks for the helpful advice thus far.. So, now that I've added a listener properly, I get this: java.lang.UnsupportedOperationException: Section 4.4 of the Servlet 3.0 specification does not permit this method to be called from a ServletContextListener that was not defined in web.xml, a web-fragment.xml file nor annotated with @WebListener at org.apache.catalina.core.StandardContext$NoPluggabilityServletContext.addListener(StandardContext.java:7019) When I try adding my listener... @WebListener public class CdiServletContextListener implements ServletContextListener { @Override public void contextInitialized(ServletContextEvent servletContextEvent) { servletContextEvent.getServletContext().addListener(new CdiCtrlListener()); } I even tried rigging my class to have WebListener on it.. until I noticed the method just threw an exception... no questions asked. :-) On Tue, Jul 1, 2014 at 12:37 PM, Mark Thomas ma...@apache.org wrote: On 01/07/2014 17:16, John D. Ament wrote: I looked for the source code, at least on github, there's no tag for 7.0.55 defined (see [1]) Given you are using 7.0.54, why would you look for a tag for 7.0.55? How do I get access to a StandardContext? CAn I cast the Context object? Yes. It would have taken less time to try that than it did to type the question. Mark [1]: https://github.com/apache/tomcat On Mon, Jun 30, 2014 at 4:51 AM, Mark Thomas ma...@apache.org wrote: On 30/06/2014 01:27, John D. Ament wrote: I spoke a little too quickly, ServletContext is avilable from ctx (just didn't search hard enough). Adding the request listener here though results in: java.lang.NullPointerException at org.apache.catalina.core.ApplicationContext.createListener(ApplicationContext.java:1402) at org.apache.catalina.core.ApplicationContext.addListener(ApplicationContext.java:1307) at org.apache.catalina.core.ApplicationContextFacade.addListener(ApplicationContextFacade.java:636) A quick look in the source code will tell you why you are getting an NPE here. You can't add a ServletRequestListener directly. There are a couple of ways to do this. Probably the simplest is to create a ServletContextListener, add that directly to Tomcat's StandardContext with addApplicationLifecycleListener() and then from that ServletContextListener add and request and/or session listeners from the contextInitialized() event. You could also do this with a ServletContainerInitializer. Mark On Sun, Jun 29, 2014 at 8:21 PM, John D. Ament john.d.am...@gmail.com wrote: Hi, I'm on Tomcat 7.0.54, though I would hope your APIs aren't volatile enough that your internals should matter.. I tried this: Wrapper wrapper = Tomcat.addServlet(ctx,Greeter,GreeterServlet.class.getName()); wrapper.addMapping(/*); wrapper.getServlet().getServletConfig().getServletContext().addListener(MyListener.class); This results in a NPE. This makes me think I don't have access to the context yet. I would actually think it's somewhere in this chain: tomcat = new Tomcat(); tomcat.setPort(8080); File base = new File(target/webapp-runner); if(!base.exists()) { base.mkdirs(); } Context ctx = tomcat.addContext(/,base.getAbsolutePath()); however, it doesn't look like Context here is a ServletContext. On Sun, Jun 29, 2014 at 6:30 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: John D. Ament [mailto:john.d.am...@gmail.com] Subject: Embedded Tomcat question Playing around a bit with embedded tomcat. It looks like there are APIs to add all of the tomcat specific listeners, however how would I add a ServletRequestListener? Look in the servlet spec for the version of Tomcat you're using (which you didn't mention), and the JavaDoc for ServletContext (e.g., addListener). - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - 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: Embedded Tomcat question
I looked for the source code, at least on github, there's no tag for 7.0.55 defined (see [1]) How do I get access to a StandardContext? CAn I cast the Context object? [1]: https://github.com/apache/tomcat On Mon, Jun 30, 2014 at 4:51 AM, Mark Thomas ma...@apache.org wrote: On 30/06/2014 01:27, John D. Ament wrote: I spoke a little too quickly, ServletContext is avilable from ctx (just didn't search hard enough). Adding the request listener here though results in: java.lang.NullPointerException at org.apache.catalina.core.ApplicationContext.createListener(ApplicationContext.java:1402) at org.apache.catalina.core.ApplicationContext.addListener(ApplicationContext.java:1307) at org.apache.catalina.core.ApplicationContextFacade.addListener(ApplicationContextFacade.java:636) A quick look in the source code will tell you why you are getting an NPE here. You can't add a ServletRequestListener directly. There are a couple of ways to do this. Probably the simplest is to create a ServletContextListener, add that directly to Tomcat's StandardContext with addApplicationLifecycleListener() and then from that ServletContextListener add and request and/or session listeners from the contextInitialized() event. You could also do this with a ServletContainerInitializer. Mark On Sun, Jun 29, 2014 at 8:21 PM, John D. Ament john.d.am...@gmail.com wrote: Hi, I'm on Tomcat 7.0.54, though I would hope your APIs aren't volatile enough that your internals should matter.. I tried this: Wrapper wrapper = Tomcat.addServlet(ctx,Greeter,GreeterServlet.class.getName()); wrapper.addMapping(/*); wrapper.getServlet().getServletConfig().getServletContext().addListener(MyListener.class); This results in a NPE. This makes me think I don't have access to the context yet. I would actually think it's somewhere in this chain: tomcat = new Tomcat(); tomcat.setPort(8080); File base = new File(target/webapp-runner); if(!base.exists()) { base.mkdirs(); } Context ctx = tomcat.addContext(/,base.getAbsolutePath()); however, it doesn't look like Context here is a ServletContext. On Sun, Jun 29, 2014 at 6:30 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: John D. Ament [mailto:john.d.am...@gmail.com] Subject: Embedded Tomcat question Playing around a bit with embedded tomcat. It looks like there are APIs to add all of the tomcat specific listeners, however how would I add a ServletRequestListener? Look in the servlet spec for the version of Tomcat you're using (which you didn't mention), and the JavaDoc for ServletContext (e.g., addListener). - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - 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: Embedded Tomcat question
On 01/07/2014 17:16, John D. Ament wrote: I looked for the source code, at least on github, there's no tag for 7.0.55 defined (see [1]) Given you are using 7.0.54, why would you look for a tag for 7.0.55? How do I get access to a StandardContext? CAn I cast the Context object? Yes. It would have taken less time to try that than it did to type the question. Mark [1]: https://github.com/apache/tomcat On Mon, Jun 30, 2014 at 4:51 AM, Mark Thomas ma...@apache.org wrote: On 30/06/2014 01:27, John D. Ament wrote: I spoke a little too quickly, ServletContext is avilable from ctx (just didn't search hard enough). Adding the request listener here though results in: java.lang.NullPointerException at org.apache.catalina.core.ApplicationContext.createListener(ApplicationContext.java:1402) at org.apache.catalina.core.ApplicationContext.addListener(ApplicationContext.java:1307) at org.apache.catalina.core.ApplicationContextFacade.addListener(ApplicationContextFacade.java:636) A quick look in the source code will tell you why you are getting an NPE here. You can't add a ServletRequestListener directly. There are a couple of ways to do this. Probably the simplest is to create a ServletContextListener, add that directly to Tomcat's StandardContext with addApplicationLifecycleListener() and then from that ServletContextListener add and request and/or session listeners from the contextInitialized() event. You could also do this with a ServletContainerInitializer. Mark On Sun, Jun 29, 2014 at 8:21 PM, John D. Ament john.d.am...@gmail.com wrote: Hi, I'm on Tomcat 7.0.54, though I would hope your APIs aren't volatile enough that your internals should matter.. I tried this: Wrapper wrapper = Tomcat.addServlet(ctx,Greeter,GreeterServlet.class.getName()); wrapper.addMapping(/*); wrapper.getServlet().getServletConfig().getServletContext().addListener(MyListener.class); This results in a NPE. This makes me think I don't have access to the context yet. I would actually think it's somewhere in this chain: tomcat = new Tomcat(); tomcat.setPort(8080); File base = new File(target/webapp-runner); if(!base.exists()) { base.mkdirs(); } Context ctx = tomcat.addContext(/,base.getAbsolutePath()); however, it doesn't look like Context here is a ServletContext. On Sun, Jun 29, 2014 at 6:30 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: John D. Ament [mailto:john.d.am...@gmail.com] Subject: Embedded Tomcat question Playing around a bit with embedded tomcat. It looks like there are APIs to add all of the tomcat specific listeners, however how would I add a ServletRequestListener? Look in the servlet spec for the version of Tomcat you're using (which you didn't mention), and the JavaDoc for ServletContext (e.g., addListener). - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - 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 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Embedded Tomcat question
On 30/06/2014 01:27, John D. Ament wrote: I spoke a little too quickly, ServletContext is avilable from ctx (just didn't search hard enough). Adding the request listener here though results in: java.lang.NullPointerException at org.apache.catalina.core.ApplicationContext.createListener(ApplicationContext.java:1402) at org.apache.catalina.core.ApplicationContext.addListener(ApplicationContext.java:1307) at org.apache.catalina.core.ApplicationContextFacade.addListener(ApplicationContextFacade.java:636) A quick look in the source code will tell you why you are getting an NPE here. You can't add a ServletRequestListener directly. There are a couple of ways to do this. Probably the simplest is to create a ServletContextListener, add that directly to Tomcat's StandardContext with addApplicationLifecycleListener() and then from that ServletContextListener add and request and/or session listeners from the contextInitialized() event. You could also do this with a ServletContainerInitializer. Mark On Sun, Jun 29, 2014 at 8:21 PM, John D. Ament john.d.am...@gmail.com wrote: Hi, I'm on Tomcat 7.0.54, though I would hope your APIs aren't volatile enough that your internals should matter.. I tried this: Wrapper wrapper = Tomcat.addServlet(ctx,Greeter,GreeterServlet.class.getName()); wrapper.addMapping(/*); wrapper.getServlet().getServletConfig().getServletContext().addListener(MyListener.class); This results in a NPE. This makes me think I don't have access to the context yet. I would actually think it's somewhere in this chain: tomcat = new Tomcat(); tomcat.setPort(8080); File base = new File(target/webapp-runner); if(!base.exists()) { base.mkdirs(); } Context ctx = tomcat.addContext(/,base.getAbsolutePath()); however, it doesn't look like Context here is a ServletContext. On Sun, Jun 29, 2014 at 6:30 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: John D. Ament [mailto:john.d.am...@gmail.com] Subject: Embedded Tomcat question Playing around a bit with embedded tomcat. It looks like there are APIs to add all of the tomcat specific listeners, however how would I add a ServletRequestListener? Look in the servlet spec for the version of Tomcat you're using (which you didn't mention), and the JavaDoc for ServletContext (e.g., addListener). - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - 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
Embedded Tomcat question
Hi, Playing around a bit with embedded tomcat. It looks like there are APIs to add all of the tomcat specific listeners, however how would I add a ServletRequestListener? John - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Embedded Tomcat question
From: John D. Ament [mailto:john.d.am...@gmail.com] Subject: Embedded Tomcat question Playing around a bit with embedded tomcat. It looks like there are APIs to add all of the tomcat specific listeners, however how would I add a ServletRequestListener? Look in the servlet spec for the version of Tomcat you're using (which you didn't mention), and the JavaDoc for ServletContext (e.g., addListener). - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Embedded Tomcat question
Hi, I'm on Tomcat 7.0.54, though I would hope your APIs aren't volatile enough that your internals should matter.. I tried this: Wrapper wrapper = Tomcat.addServlet(ctx,Greeter,GreeterServlet.class.getName()); wrapper.addMapping(/*); wrapper.getServlet().getServletConfig().getServletContext().addListener(MyListener.class); This results in a NPE. This makes me think I don't have access to the context yet. I would actually think it's somewhere in this chain: tomcat = new Tomcat(); tomcat.setPort(8080); File base = new File(target/webapp-runner); if(!base.exists()) { base.mkdirs(); } Context ctx = tomcat.addContext(/,base.getAbsolutePath()); however, it doesn't look like Context here is a ServletContext. On Sun, Jun 29, 2014 at 6:30 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: John D. Ament [mailto:john.d.am...@gmail.com] Subject: Embedded Tomcat question Playing around a bit with embedded tomcat. It looks like there are APIs to add all of the tomcat specific listeners, however how would I add a ServletRequestListener? Look in the servlet spec for the version of Tomcat you're using (which you didn't mention), and the JavaDoc for ServletContext (e.g., addListener). - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Embedded Tomcat question
I spoke a little too quickly, ServletContext is avilable from ctx (just didn't search hard enough). Adding the request listener here though results in: java.lang.NullPointerException at org.apache.catalina.core.ApplicationContext.createListener(ApplicationContext.java:1402) at org.apache.catalina.core.ApplicationContext.addListener(ApplicationContext.java:1307) at org.apache.catalina.core.ApplicationContextFacade.addListener(ApplicationContextFacade.java:636) On Sun, Jun 29, 2014 at 8:21 PM, John D. Ament john.d.am...@gmail.com wrote: Hi, I'm on Tomcat 7.0.54, though I would hope your APIs aren't volatile enough that your internals should matter.. I tried this: Wrapper wrapper = Tomcat.addServlet(ctx,Greeter,GreeterServlet.class.getName()); wrapper.addMapping(/*); wrapper.getServlet().getServletConfig().getServletContext().addListener(MyListener.class); This results in a NPE. This makes me think I don't have access to the context yet. I would actually think it's somewhere in this chain: tomcat = new Tomcat(); tomcat.setPort(8080); File base = new File(target/webapp-runner); if(!base.exists()) { base.mkdirs(); } Context ctx = tomcat.addContext(/,base.getAbsolutePath()); however, it doesn't look like Context here is a ServletContext. On Sun, Jun 29, 2014 at 6:30 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: John D. Ament [mailto:john.d.am...@gmail.com] Subject: Embedded Tomcat question Playing around a bit with embedded tomcat. It looks like there are APIs to add all of the tomcat specific listeners, however how would I add a ServletRequestListener? Look in the servlet spec for the version of Tomcat you're using (which you didn't mention), and the JavaDoc for ServletContext (e.g., addListener). - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
tomcat question
ALL, Is it possible to remove an installation of a compiler on a production web server(tomcat)? If there is a way to remove the compiler or is it required in order for the system to function properly. Could you please send me a precise summary of why and any steps that can be taken to mitigate any potential risk associated with the compiler remaining in place.This is for s security issue on my production system. Thanks for your time and support! Maxie Wiley III
Re: tomcat question
Wiley, Maxie wrote: ALL, Is it possible to remove an installation of a compiler on a production web server(tomcat)? If there is a way to remove the compiler or is it required in order for the system to function properly. Could you please send me a precise summary of why and any steps that can be taken to mitigate any potential risk associated with the compiler remaining in place.This is for s security issue on my production system. Certainly. As soon as you tell us how much you are willing to pay for such a comprehensive analysis and report. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat question
2012/10/22 André Warnier a...@ice-sa.com: Wiley, Maxie wrote: Is it possible to remove an installation of a compiler on a production web server(tomcat)? Jasper? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: tomcat question
Hello Andre, Is it possible to remove an installation of a compiler on a production web server(tomcat?). How can/where can I find out more information on this issue? Thanks -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Monday, October 22, 2012 9:22 AM To: Tomcat Users List Subject: Re: tomcat question Wiley, Maxie wrote: ALL, Is it possible to remove an installation of a compiler on a production web server(tomcat)? If there is a way to remove the compiler or is it required in order for the system to function properly. Could you please send me a precise summary of why and any steps that can be taken to mitigate any potential risk associated with the compiler remaining in place.This is for s security issue on my production system. Certainly. As soon as you tell us how much you are willing to pay for such a comprehensive analysis and report. - 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: tomcat question
Remove the tomcat compilter? -Original Message- From: Jose María Zaragoza [mailto:demablo...@gmail.com] Sent: Monday, October 22, 2012 9:25 AM To: Tomcat Users List Subject: Re: tomcat question 2012/10/22 André Warnier a...@ice-sa.com: Wiley, Maxie wrote: Is it possible to remove an installation of a compiler on a production web server(tomcat)? Jasper? - 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: tomcat question
-Original Message- From: Wiley, Maxie [mailto:maxie.wi...@serco-na.com] Sent: Monday, October 22, 2012 8:18 AM To: users-subscr...@tomcat.apache.org; users@tomcat.apache.org Subject: tomcat question ALL, Is it possible to remove an installation of a compiler on a production web server(tomcat)? If there is a way to remove the compiler or is it required in order for the system to function properly. Could you please send me a precise summary of why and any steps that can be taken to mitigate any potential risk associated with the compiler remaining in place.This is for s security issue on my production system. Thanks for your time and support! Maxie Wiley III Try it on a test system and see what happens. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat question
On 22/10/2012 14:18, Wiley, Maxie wrote: ALL, Is it possible to remove an installation of a compiler on a production web server(tomcat)? If there is a way to remove the compiler or is it required in order for the system to function properly. Could you please send me a precise summary of why and any steps that can be taken to mitigate any potential risk associated with the compiler remaining in place.This is for s security issue on my production system. Why does this enhance security? If someone has sufficient access to the machine to use the compiler shipped with Tomcat, you are already in a lot more trouble than they will be able to inflict just by having access to Tomcat's JDT compiler. p -- [key:62590808] signature.asc Description: OpenPGP digital signature
RE: tomcat question
Maxie, You're probably referring to a DoD or similar security requirement. In the Web Server STIG, Rule ID SV-2236r8 says, Installation of compilers on production web server is prohibited. The explanation provided is, The presence of a compiler on a production server facilitates the malicious user's task of creating custom versions of programs and installing Trojan Horses or viruses. For example, the attacker's code can be uploaded and compiled on the server under attack. There are exceptions to this rule, The same STIG says, This check does not prohibit the use of the .Net Framework or the Java compiler for Oracle, and An exception is the Java Development Kit installed in conjunction with a WebSphere service or Java Server Page (JSP). You need to push back and tell your Security Auditors that the Java and Jasper compilers are required for Tomcat. Provide any documentation they require. Steve -Original Message- From: users-return-237320-STEVEN.J.ADAMUS=saic@tomcat.apache.org [mailto:users-return-237320-STEVEN.J.ADAMUS=saic@tomcat.apache.org] On Behalf Of Wiley, Maxie Sent: Monday, October 22, 2012 6:18 AM To: users-subscr...@tomcat.apache.org; users@tomcat.apache.org Subject: tomcat question ALL, Is it possible to remove an installation of a compiler on a production web server(tomcat)? If there is a way to remove the compiler or is it required in order for the system to function properly. Could you please send me a precise summary of why and any steps that can be taken to mitigate any potential risk associated with the compiler remaining in place.This is for s security issue on my production system. Thanks for your time and support! Maxie Wiley III - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: tomcat question
Steve, Thank you...!! I have been but I needed another voicethank you .. thank you and Thanks You Enjoy the day! -Original Message- From: Adamus, Steven J. [mailto:steven.j.ada...@saic.com] Sent: Monday, October 22, 2012 2:47 PM To: Tomcat Users List; users-subscr...@tomcat.apache.org Subject: RE: tomcat question Maxie, You're probably referring to a DoD or similar security requirement. In the Web Server STIG, Rule ID SV-2236r8 says, Installation of compilers on production web server is prohibited. The explanation provided is, The presence of a compiler on a production server facilitates the malicious user's task of creating custom versions of programs and installing Trojan Horses or viruses. For example, the attacker's code can be uploaded and compiled on the server under attack. There are exceptions to this rule, The same STIG says, This check does not prohibit the use of the .Net Framework or the Java compiler for Oracle, and An exception is the Java Development Kit installed in conjunction with a WebSphere service or Java Server Page (JSP). You need to push back and tell your Security Auditors that the Java and Jasper compilers are required for Tomcat. Provide any documentation they require. Steve -Original Message- From: users-return-237320-STEVEN.J.ADAMUS=saic@tomcat.apache.org [mailto:users-return-237320-STEVEN.J.ADAMUS=saic@tomcat.apache.org] On Behalf Of Wiley, Maxie Sent: Monday, October 22, 2012 6:18 AM To: users-subscr...@tomcat.apache.org; users@tomcat.apache.org Subject: tomcat question ALL, Is it possible to remove an installation of a compiler on a production web server(tomcat)? If there is a way to remove the compiler or is it required in order for the system to function properly. Could you please send me a precise summary of why and any steps that can be taken to mitigate any potential risk associated with the compiler remaining in place.This is for s security issue on my production system. Thanks for your time and support! Maxie Wiley III - 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: tomcat question
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Steve, On 10/22/12 2:47 PM, Adamus, Steven J. wrote: You need to push back and tell your Security Auditors that the Java and Jasper compilers are required for Tomcat. Provide any documentation they require. Thank you for ending the madness. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlCFsdcACgkQ9CaO5/Lv0PClnQCfTCaUv8PqfjiauS8QDBMwtgR1 30cAoK7Bs7YSsfHrlmrNAFsp2itAJ9vG =WWPs -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
TomCat question
Dear TomCat community, I need to your advice and I appreciate it very much. We are porting Sun J2SE to our platform and would like to know if TomCat can run on J2SE. Will Tomcat run with J2SE or does it require J2EE? I appreciate your input here. Thank you, Bose
Re: TomCat question
That depends on the all important version of tomcat you are using. Versions 5.5.x and 6.0.x at least should run on a j2se no problem. --David Ghanta, Bose wrote: Dear TomCat community, I need to your advice and I appreciate it very much. We are porting Sun J2SE to our platform and would like to know if TomCat can run on J2SE. Will Tomcat run with J2SE or does it require J2EE? I appreciate your input here. Thank you, Bose - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: TomCat question
From: Ghanta, Bose [mailto:[EMAIL PROTECTED] Will Tomcat run with J2SE or does it require J2EE? The ones I have here run just fine on J2SE. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: TomCat question
Dear Peter Crowther and David Smith, Thank you very much for your prompt response and I very much appreciate it. You both assured me that TomCat would run fine on J2SE. Have a nice weekend! Thank you, Bose -Original Message- From: Peter Crowther [mailto:[EMAIL PROTECTED] Sent: Friday, October 24, 2008 10:30 AM To: 'Tomcat Users List' Subject: RE: TomCat question From: Ghanta, Bose [mailto:[EMAIL PROTECTED] Will Tomcat run with J2SE or does it require J2EE? The ones I have here run just fine on J2SE. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: TomCat question
From: Peter Crowther [mailto:[EMAIL PROTECTED] Subject: RE: TomCat question From: Ghanta, Bose [mailto:[EMAIL PROTECTED] Will Tomcat run with J2SE or does it require J2EE? The ones I have here run just fine on J2SE. Tomcat must be run on J2SE, not J2EE. The J2EE download includes jars that conflict with ones provided by Tomcat itself. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: TomCat question
From: David Smith [mailto:[EMAIL PROTECTED] Subject: Re: TomCat question That depends on the all important version of tomcat you are using. Versions 5.5.x and 6.0.x at least should run on a j2se no problem. I think you're confusing the OP's question with the more typical one about JRE vs JDK. Tomcat versions prior to 5.5 required a JDK due to the dependence on javac from the JDK's tools.jar; newer Tomcat levels include a compiler. We are porting Sun J2SE to our platform and would like to know if TomCat can run on J2SE. It's Tomcat, not TomCat, and yes, it runs happily on our ported J2SE environment. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat question
A question: If I have a class / function Logger.Log (Logger.LOG_LEVEL_INFO, Test + Globals.BACKUP_STARTDIR); where will tomcat write these data out? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat-Question: Inefficient searching for jsp-files?
Hello, i am using Tomcat 5.5.23. When i request a simple jsp-file my file-monitor shows me, that tomcat is searching from root. This is a problem for website with a lot of traffic. A screenshot is attached to this mail. The Context-Entry looks like Context docBase=D:\inetpub\wwwroot\tyres4trade path= privileged=true workdir= reloadable=fals / Thanks for suggestions, Thomas - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat-Question: Inefficient searching for jsp-files?
On 5/21/07, Thomas Hoffmann (Speed4Trade) [EMAIL PROTECTED] wrote: Hello, i am using Tomcat 5.5.23. When i request a simple jsp-file my file-monitor shows me, that tomcat is searching from root. This is a problem for website with a lot of traffic. A screenshot is attached to this mail. All attachments are filtered out automatically. Please post the URL of the screen shot and/or other relevant information such as log file contents etc. The Context-Entry looks like Context docBase=D:\inetpub\wwwroot\tyres4trade path= privileged=true workdir= reloadable=fals / Thanks for suggestions, Thomas -Regards Rashmi - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Tomcat-Question: Inefficient searching for jsp-files?
Hi, my contect-configuratation looks like: Context docBase=D:\inetpub\wwwroot\tyres4trade path= privileged=true workdir= reloadable=fals / when i request e.g. test.jsp from browser my file-monitor show the following harddisc-accesses: d:\ d:\inetpub d:\inetpub\wwwroot d:\inetpub\wwwroot\tyres4trade d:\inetpub\wwwroot\tyres4trade\test.jsp d:\inetpub\wwwroot\tyres4trade\localhost\test.jsp (not found) tomcat-root\tomcat 5.5\work\org\apache\jsp\test_jsp.class i ask myself why does tomcat start to search from d:\ instead of docBase? -Ursprüngliche Nachricht- Von: Rashmi Rubdi [mailto:[EMAIL PROTECTED] Gesendet: Montag, 21. Mai 2007 19:56 An: Tomcat Users List Betreff: Re: Tomcat-Question: Inefficient searching for jsp-files? On 5/21/07, Thomas Hoffmann (Speed4Trade) [EMAIL PROTECTED] wrote: Hello, i am using Tomcat 5.5.23. When i request a simple jsp-file my file-monitor shows me, that tomcat is searching from root. This is a problem for website with a lot of traffic. A screenshot is attached to this mail. All attachments are filtered out automatically. Please post the URL of the screen shot and/or other relevant information such as log file contents etc. The Context-Entry looks like Context docBase=D:\inetpub\wwwroot\tyres4trade path= privileged=true workdir= reloadable=fals / Thanks for suggestions, Thomas -Regards Rashmi - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat-Question: Inefficient searching for jsp-files?
your docBase shouldn't include the absolute path should it? Just the relative path? Besides, that looks totally configured for running files on IIS' server, not (thru) Tomcat's servlet engine. -Original Message- From: Thomas Hoffmann (Speed4Trade) [mailto:[EMAIL PROTECTED] Sent: Monday, May 21, 2007 1:09 PM To: 'Tomcat Users List' Cc: [EMAIL PROTECTED] Subject: AW: Tomcat-Question: Inefficient searching for jsp-files? Hi, my contect-configuratation looks like: Context docBase=D:\inetpub\wwwroot\tyres4trade path= privileged=true workdir= reloadable=fals / when i request e.g. test.jsp from browser my file-monitor show the following harddisc-accesses: d:\ d:\inetpub d:\inetpub\wwwroot d:\inetpub\wwwroot\tyres4trade d:\inetpub\wwwroot\tyres4trade\test.jsp d:\inetpub\wwwroot\tyres4trade\localhost\test.jsp (not found) tomcat-root\tomcat 5.5\work\org\apache\jsp\test_jsp.class i ask myself why does tomcat start to search from d:\ instead of docBase? -Ursprüngliche Nachricht- Von: Rashmi Rubdi [mailto:[EMAIL PROTECTED] Gesendet: Montag, 21. Mai 2007 19:56 An: Tomcat Users List Betreff: Re: Tomcat-Question: Inefficient searching for jsp-files? On 5/21/07, Thomas Hoffmann (Speed4Trade) [EMAIL PROTECTED] wrote: Hello, i am using Tomcat 5.5.23. When i request a simple jsp-file my file-monitor shows me, that tomcat is searching from root. This is a problem for website with a lot of traffic. A screenshot is attached to this mail. All attachments are filtered out automatically. Please post the URL of the screen shot and/or other relevant information such as log file contents etc. The Context-Entry looks like Context docBase=D:\inetpub\wwwroot\tyres4trade path= privileged=true workdir= reloadable=fals / Thanks for suggestions, Thomas -Regards Rashmi - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Tomcat-Question: Inefficient searching for jsp-files?
Hi, Tomcat is running with iis, thats right. Tomcat is installed on c:\Programme\ websites are under d:\inetpub thats why i cant use relative paths. -Ursprüngliche Nachricht- Von: Propes, Barry L [mailto:[EMAIL PROTECTED] Gesendet: Montag, 21. Mai 2007 20:56 An: Tomcat Users List Betreff: RE: Tomcat-Question: Inefficient searching for jsp-files? your docBase shouldn't include the absolute path should it? Just the relative path? Besides, that looks totally configured for running files on IIS' server, not (thru) Tomcat's servlet engine. -Original Message- From: Thomas Hoffmann (Speed4Trade) [mailto:[EMAIL PROTECTED] Sent: Monday, May 21, 2007 1:09 PM To: 'Tomcat Users List' Cc: [EMAIL PROTECTED] Subject: AW: Tomcat-Question: Inefficient searching for jsp-files? Hi, my contect-configuratation looks like: Context docBase=D:\inetpub\wwwroot\tyres4trade path= privileged=true workdir= reloadable=fals / when i request e.g. test.jsp from browser my file-monitor show the following harddisc-accesses: d:\ d:\inetpub d:\inetpub\wwwroot d:\inetpub\wwwroot\tyres4trade d:\inetpub\wwwroot\tyres4trade\test.jsp d:\inetpub\wwwroot\tyres4trade\localhost\test.jsp (not found) tomcat-root\tomcat 5.5\work\org\apache\jsp\test_jsp.class i ask myself why does tomcat start to search from d:\ instead of docBase? -Ursprüngliche Nachricht- Von: Rashmi Rubdi [mailto:[EMAIL PROTECTED] Gesendet: Montag, 21. Mai 2007 19:56 An: Tomcat Users List Betreff: Re: Tomcat-Question: Inefficient searching for jsp-files? On 5/21/07, Thomas Hoffmann (Speed4Trade) [EMAIL PROTECTED] wrote: Hello, i am using Tomcat 5.5.23. When i request a simple jsp-file my file-monitor shows me, that tomcat is searching from root. This is a problem for website with a lot of traffic. A screenshot is attached to this mail. All attachments are filtered out automatically. Please post the URL of the screen shot and/or other relevant information such as log file contents etc. The Context-Entry looks like Context docBase=D:\inetpub\wwwroot\tyres4trade path= privileged=true workdir= reloadable=fals / Thanks for suggestions, Thomas -Regards Rashmi - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat-Question: Inefficient searching for jsp-files?
Thomas-- I see this thread from http://forum.java.sun.com/thread.jspa?threadID=571322messageID=2827943 here's what sonny says to do...keep in mind this is a TOMCAT group and not IIS group You could use the free installer, it seems to work for some people. heres the link... http://www.shiftomat.com/opensource/ - OR -- If you choose not to use the installer... Assuming IIS and tomcat is up and running. 1. download the connector: (Zip file) http://apache.roweboat.net/jakarta/tomcat-connectors/jk2/binaries/win32/ 2. Unzip the folder: you will see three folders: bin, conf, and doc 3. Move the two files in the bin directory ( install4iis.js and isapi_redirector2.dll ) TO the bin folder of the tomcat installation. 4. You may need to download this : http://www.microsoft.com/downloads/details.aspx?FamilyID=c717d943-7e4b-4622-86e b-95a22b832caadisplaylang=en from microsoft, or you may not have to. try typing cscript in you command line, and see if it recognizes it. ( if the link doesn't work for some reason: search google for scripten.exe ) 5. you can modify the workers file thats in the conf folder or use the one I have. These uri mapping are telling IIS to send these to tomcat. ( you will have to modify the uri to match your applications, and tomcat installation location). Save it as workers.properties in the conf directory of the tomcat installation. [shm] info=Scoreboard. Requried for reconfiguration and status with multiprocess servers. file=C:\Tomcat\logs\jk2.shm size=1048576 # Defines a load balancer named lb. Use even if you only have one machine. [lb:lb] # Example socket channel, override port and host. [channel.socket:localhost:8009] port=8009 host=127.0.0.1 # define the worker [ajp13:localhost:8009] channel=channel.socket:localhost:8009 group=lb [uri:/jsp-examples/*] info=JSP examples, map requests for all JSP pages to Tomcat. #context=/jsp-examples [uri:/servlets-examples/*] info=Servlet examples, map requests for all servlets to Tomcat. #context=/servlets-examples [uri:/MySite/*] info=Test Site [status:] info=Status worker, displays runtime information [uri:/jkstatus/*] info=The Tomcat /jkstatus handler group=status: 6. Open command prompt and go to the bin directory (cd to it) of the tomcat installation (where you put the two files). Your command prompt should look something like.. C:\Tomcat\bin 7. Type cscript install4iis.js This Installs the vitural directory and adds registery enteries. You can look at the vitural directory it added by opening your iis admin tool. 8. Thas all. You will have to restart IIS and tomcat. Sometimes its a good idea to know how things are actually done, because when you need to change something you know exactly where to go and how to do. ;) Thanks Sonny! HTH Martin-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Thomas Hoffmann (Speed4Trade) [EMAIL PROTECTED] To: 'Tomcat Users List' users@tomcat.apache.org Sent: Monday, May 21, 2007 3:07 PM Subject: AW: Tomcat-Question: Inefficient searching for jsp-files? Hi, Tomcat is running with iis, thats right. Tomcat is installed on c:\Programme\ websites are under d:\inetpub thats why i cant use relative paths. -Ursprüngliche Nachricht- Von: Propes, Barry L [mailto:[EMAIL PROTECTED] Gesendet: Montag, 21. Mai 2007 20:56 An: Tomcat Users List Betreff: RE: Tomcat-Question: Inefficient searching for jsp-files? your docBase shouldn't include the absolute path should it? Just the relative path? Besides, that looks totally configured for running files on IIS' server, not (thru) Tomcat's servlet engine. -Original Message- From: Thomas Hoffmann (Speed4Trade) [mailto:[EMAIL PROTECTED] Sent: Monday, May 21, 2007 1:09 PM To: 'Tomcat Users List' Cc: [EMAIL PROTECTED] Subject: AW: Tomcat-Question: Inefficient searching for jsp-files? Hi, my contect-configuratation looks like: Context docBase=D:\inetpub\wwwroot\tyres4trade path= privileged=true workdir= reloadable=fals / when i request e.g. test.jsp from browser my file-monitor show the following harddisc-accesses: d:\ d:\inetpub d:\inetpub\wwwroot d:\inetpub\wwwroot\tyres4trade d:\inetpub\wwwroot\tyres4trade\test.jsp d:\inetpub\wwwroot\tyres4trade\localhost\test.jsp (not found) tomcat-root\tomcat 5.5\work\org\apache\jsp
Re: AW: Tomcat-Question: Inefficient searching for jsp-files?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thomas, Thomas Hoffmann (Speed4Trade) wrote: when i request e.g. test.jsp from browser my file-monitor show the following harddisc-accesses: d:\ d:\inetpub d:\inetpub\wwwroot d:\inetpub\wwwroot\tyres4trade d:\inetpub\wwwroot\tyres4trade\test.jsp d:\inetpub\wwwroot\tyres4trade\localhost\test.jsp (not found) tomcat-root\tomcat 5.5\work\org\apache\jsp\test_jsp.class i ask myself why does tomcat start to search from d:\ instead of docBase? Have you tried observing any other programs when they load files? How about a non-Tomcat Java process that attempts to load a file with a specific path. It's possible that Tomcat is reading the directories to make sure they exist, so it can give you a good error message (if they don't). If you re-request the same file, does it re-check? What if you request a file that /does/ exist, and then re-request it? Does it re-check from the root? This is probably a question for the developer list. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGUhkM9CaO5/Lv0PARAi6vAJ9610+CKsRnVKIkWwxK1+M8NzL76ACffGk3 anQncmWDSPnmK3Ta14v4oHo= =0hEG -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: Tomcat-Question: Inefficient searching for jsp-files?
I don't think tomcat(explicitly) is doing this. It could be any of the following: 1) When the file is found a full path check is done to prevent sneaky people from trying ../../ tricks - so I you might see the JVM and how it implments File.getAbsolutePath) on a file 2) It could be IIS doing the checks and not tomcat 3) It could be the IIS jk plugin - but I'm not sure about that possibility. 4) ??? My vote is for #1 -Tim Thomas Hoffmann (Speed4Trade) wrote: Hi, my contect-configuratation looks like: Context docBase=D:\inetpub\wwwroot\tyres4trade path= privileged=true workdir= reloadable=fals / when i request e.g. test.jsp from browser my file-monitor show the following harddisc-accesses: d:\ d:\inetpub d:\inetpub\wwwroot d:\inetpub\wwwroot\tyres4trade d:\inetpub\wwwroot\tyres4trade\test.jsp d:\inetpub\wwwroot\tyres4trade\localhost\test.jsp (not found) tomcat-root\tomcat 5.5\work\org\apache\jsp\test_jsp.class i ask myself why does tomcat start to search from d:\ instead of docBase? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Not a Tomcat question but could use your help! Netbeans 5.5: Changing the TabSet Header Color from blue to something else
Hi All! For the Visual Web Pack in Netbeans 5.5 : Please does anyone know how to change the TabSet header color from the default blueish to something else, preferrably gray. and the Table component and Table Column component headers too. Million thanx in advance! lekan - Expecting? Get great news right away with email Auto-Check. Try the Yahoo! Mail Beta.
Re: Not a Tomcat question but could use your help! Netbeans 5.5: Changing the TabSet Header Color from blue to something else
1.. Choose Tools Options. 2.. Click Fonts Colors in the left pane of the Options window. 3.. In the right pane, click the Annotations tab. 4.. Select a Category. 5.. Select foreground and background colors from the drop-down list. To specify a color not contained in the list, choose Custom from the drop-down list to open the Select Color dialog box. 6.. Select an effect to apply to the selected category, if desired. 7.. Click OK to apply the changes. Once the color/font profile is created you can assign the characteristics of that profile to your desired IDE setting 1.. Choose Tools Options. 2.. Click Fonts Colors in the left pane of the Options window. 3.. In the right pane, select a profile from the Profiles drop-down list. I have no clue how this works on a mainframe ..you might want to ask Chuck how that would work Feel free to contact me offline as this is definitely O/T Martin -- --- This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. --- Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire. - Original Message - From: llekann [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Sunday, January 14, 2007 7:27 AM Subject: Not a Tomcat question but could use your help! Netbeans 5.5: Changing the TabSet Header Color from blue to something else Hi All! For the Visual Web Pack in Netbeans 5.5 : Please does anyone know how to change the TabSet header color from the default blueish to something else, preferrably gray. and the Table component and Table Column component headers too. Million thanx in advance! lekan - Expecting? Get great news right away with email Auto-Check. Try the Yahoo! Mail Beta.
Re: Not quite a tomcat question
Despitie writing in the db would clearly be the better idea, I'd suggest that you create a unique id (its easy using 30 random digits or something) and put the users data in a large hashmap along with a timestamp of the creation and the users data. You can include this id into the confirmation link (if you carry about security than md5-hashcoded with a secret and/or timestamp). The hashmap is held in application scope or in a static variable somewhere or in a singleton class. Whenever the user clicks the confirmation link you can lookup his data in the hashmap. To prevent the map from getting VERY large you can scan it every hour and check whether the confirmation is expired (that's why the timestamp should be included). You can further make a context listener and dump the hashmap contents to a file upon shutdown, and load from file when starting. Of course the access to the map should be synchronized. regards Leon On 12/31/06, EDMOND KEMOKAI [EMAIL PROTECTED] wrote: Happy New Year All. Does anyone use sessions to temporarily hold confirmation codes for user registrations? I have a setup where when the user registers a random confirmation code is generated and appended to a url which is emailed to the user. The user's registration data is stored in a session with the confirmation code as the key. When they click the confirmation link, the code is used to retrieve the registration information and the registration is done. Some users are having trouble because it seems they're encountering invalidated sessions. I know if the registrations is done in one browser and the link (outlook will open IE) opens up a different browser that would lead to the creation of a different session which obviously wouldn't have the registration data. I have seen implementations that enter the confirmation directly into the database but I don't want to do that since it would mean writing more code to check who's account is activated and who's hasn't, and also might lead to garbage in the database of users who never activated their accounts...Any suggestions? -- talk trash and carry a small stick. PAUL KRUGMAN (NYT) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Not quite a tomcat question
Happy New Year All. Does anyone use sessions to temporarily hold confirmation codes for user registrations? I have a setup where when the user registers a random confirmation code is generated and appended to a url which is emailed to the user. The user's registration data is stored in a session with the confirmation code as the key. When they click the confirmation link, the code is used to retrieve the registration information and the registration is done. Some users are having trouble because it seems they're encountering invalidated sessions. I know if the registrations is done in one browser and the link (outlook will open IE) opens up a different browser that would lead to the creation of a different session which obviously wouldn't have the registration data. I have seen implementations that enter the confirmation directly into the database but I don't want to do that since it would mean writing more code to check who's account is activated and who's hasn't, and also might lead to garbage in the database of users who never activated their accounts...Any suggestions? -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
RE: Newbie Tomcat question - where to store dependency DLLs?
From: AStefanS [mailto:[EMAIL PROTECTED] my DLL can be downloaded successfully (after adding application/x-msdownload MIME mapping), but the dependency DLLs are not downloaded. Turn on access logging via the access log valve and see what requests IE is making for the dependency DLLs. Put them there. If you don't see any requests because they're being requested from somewhere else, then the fun starts... at that point, a client-side request logger like http://www.blunck.info/iehttpheaders.html is your friend. If you have to install it, follow the instructions *exactly* - I've lost count of the number of times I've had a failed install through having IE open as I installed it. My own stupidity. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Newbie Tomcat question - where to store dependency DLLs?
Hi Peter Thanks for the reply. I have managed to solve the problem by turning off case-sensitivity in my DLL directory's context, as it turns out that IE sometimes sends HTTP request for *.DLL instead of *.dll (found out about that after turning on the access log valve as you suggested). Spent one whole day to solve this, phew. Thanks again! Peter Crowther wrote: From: AStefanS [mailto:[EMAIL PROTECTED] my DLL can be downloaded successfully (after adding application/x-msdownload MIME mapping), but the dependency DLLs are not downloaded. Turn on access logging via the access log valve and see what requests IE is making for the dependency DLLs. Put them there. If you don't see any requests because they're being requested from somewhere else, then the fun starts... at that point, a client-side request logger like http://www.blunck.info/iehttpheaders.html is your friend. If you have to install it, follow the instructions *exactly* - I've lost count of the number of times I've had a failed install through having IE open as I installed it. My own stupidity. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Newbie-Tomcat-question---where-to-store-dependency-DLLs--tf2456907.html#a6850855 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Newbie Tomcat question - where to store dependency DLLs?
Hi I have a .Net user control DLL that depends on other DLLs, and I am trying to deploy it on Tomcat 5.5. The problem I encountered is that my DLL can be downloaded successfully (after adding application/x-msdownload MIME mapping), but the dependency DLLs are not downloaded. I have tried putting the dependency DLLs on the same directory as the main DLL, or in the same directory as the HTML file, but to no avail. Can someone tell me what can I do to rectify this? Thanks! -- View this message in context: http://www.nabble.com/Newbie-Tomcat-question---where-to-store-dependency-DLLs--tf2456907.html#a6847791 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Servlet and Tomcat question:
Hello, Sorry to waste everyone's time with that previous question. I left a print statement in my program for a boolean variable to check its status while troubleshooting. I removed it and the DOS server screen no longer displays 'false' across the screen. Duh. Carry on.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Servlet and Tomcat question
Hello, I noticed something with Tomcat that is probably obvious to everyone but me, but I gotta ask about it. Im a total novice at programming so please be patient. After starting up Tomcat today I began writing a script to use on Tomcat without being connected to the web. The dos window was sitting in on my toolbar for a while until I finished the program. I ran the servlet via Tomcat and it appeared to work as expected. I maximized the dos window for my instance of Tomcat and noticed the screen was filled with 'false' statements. It looks like a bunch of print statements of a boolean variable that I do not think I coded in my program. Was I just programming for a while, and Tomcat is just pinging itself in a way.. or did I do something wrong? Any help would be much appreciated. Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Basic modjk + ssl + tomcat question
Because ssl only works through https:// You should really split that up though Bill Barker wrote: Ed [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi! (modjk newbie) I'm using a modjk+SSL config (I did not make myself) that is mapped to a single worker. Behind, a single AJP connector recieves everything. The question is : how do I know from my webapp that a request is using SSL or not. Httpd/IIS/SunOne sends this information to Tomcat as part of the AJP/1.3 protocol. As a result, you can just use: if(request.isSecure()) { // SSL processing } else { // non-SSL processing } I saw the secure configuration attribute to the connector, and this leads me to think I actually need 2 AJP connectors (one for each case) and thus 2 workers. Am I wrong? * What's the right way of discriminating SSL and non-SSL requests within my webapp ? Do I need to change my current Apache/modjk config? Nope, the secure configuration attribute is ignored by the AJP/1.3 connector (which causes a few complaints ;-). Any advice welcome :) cheers - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Mike Sabroff Web Services Developer [EMAIL PROTECTED] 920-568-8379 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Basic modjk + ssl + tomcat question
Hi! (modjk newbie) I'm using a modjk+SSL config (I did not make myself) that is mapped to a single worker. Behind, a single AJP connector recieves everything. The question is : how do I know from my webapp that a request is using SSL or not. I saw the secure configuration attribute to the connector, and this leads me to think I actually need 2 AJP connectors (one for each case) and thus 2 workers. Am I wrong? * What's the right way of discriminating SSL and non-SSL requests within my webapp ? Do I need to change my current Apache/modjk config? Any advice welcome :) cheers - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]