Re: Apache Tomcat 9

2016-05-06 Thread prashant sharma
On Fri, May 6, 2016 at 7:17 PM, Frederick PiƱa 
wrote:

> I'm having errors:
>
> /usr/local/apache-tomcat-9.0.0.M4/bin/catalina.sh run
> Configuration Error: deployment source 'SimpleJavaWebApp:war exploded' is
> not valid
> [2016-05-06 01:50:26,222] Artifact SimpleJavaWebApp:war exploded: Error
> during artifact deployment. See server log for details.
> 06-May-2016 13:50:30.839 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Server version:
>   Apache Tomcat/9.0.0.M4
> 06-May-2016 13:50:30.851 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Server built:
>   Mar 12 2016 11:39:59 UTC
> 06-May-2016 13:50:30.852 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Server number:
>  9.0.0.0
> 06-May-2016 13:50:30.852 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log OS Name:
>  Mac OS X
> 06-May-2016 13:50:30.853 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log OS Version:
>   10.11.4
> 06-May-2016 13:50:30.853 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Architecture:
>   x86_64
> 06-May-2016 13:50:30.853 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Java Home:
> /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/jre
> 06-May-2016 13:50:30.854 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log JVM Version:
>  1.8.0_91-b14
> 06-May-2016 13:50:30.855 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:
>   Oracle Corporation
> 06-May-2016 13:50:30.856 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:
> /Users/frederickpina/Library/Caches/IntelliJIdea2016.1/tomcat/Tomcat_9_0_0_M4_SimpleJavaWebApp
> 06-May-2016 13:50:30.856 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:
>  /usr/local/apache-tomcat-9.0.0.M4
> 06-May-2016 13:50:30.858 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument:
> -Djava.util.logging.config.file=/Users/frederickpina/Library/Caches/IntelliJIdea2016.1/tomcat/Tomcat_9_0_0_M4_SimpleJavaWebApp/conf/logging.properties
> 06-May-2016 13:50:30.858 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> 06-May-2016 13:50:30.858 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Dcom.sun.management.jmxremote=
> 06-May-2016 13:50:30.859 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Dcom.sun.management.jmxremote.port=1099
> 06-May-2016 13:50:30.859 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Dcom.sun.management.jmxremote.ssl=false
> 06-May-2016 13:50:30.860 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Dcom.sun.management.jmxremote.authenticate=false
> 06-May-2016 13:50:30.860 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Djava.rmi.server.hostname=127.0.0.1
> 06-May-2016 13:50:30.860 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument:
> -Dcatalina.base=/Users/frederickpina/Library/Caches/IntelliJIdea2016.1/tomcat/Tomcat_9_0_0_M4_SimpleJavaWebApp
> 06-May-2016 13:50:30.871 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Dcatalina.home=/usr/local/apache-tomcat-9.0.0.M4
> 06-May-2016 13:50:30.871 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Djava.io.tmpdir=/usr/local/apache-tomcat-9.0.0.M4/temp
> 06-May-2016 13:50:30.872 INFO [main]
> org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based
> Apache Tomcat Native library which allows optimal performance in production
> environments was not found on the java.library.path:
> /Users/frederickpina/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
> 06-May-2016 13:50:31.613 INFO [main]
> org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
> ["http-nio-8009"]
> 06-May-2016 13:50:31.679 SEVERE [main]
> org.apache.coyote.AbstractProtocol.init Failed to initialize end point
> associated with ProtocolHandler ["http-nio-8009"]
>  java.net.BindException: Address already in use

I believe that means tomcat is already running on your machine. Can you try
killing all tomcat processes and run it again?

>

at sun.nio.ch.Net.bind0(Native Method)
> at sun.nio.ch.Net.bind(Net.java:433)
> at sun.nio.ch.Net.bind(Net.java:425)
> at sun.nio.ch
> .ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
> at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
> at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:245)
> at org.apache.tomcat.ut

Re: context doesnt pick up

2016-02-20 Thread prashant sharma
On Sat, Feb 20, 2016 at 11:28 PM, Me Self  wrote:

> I already tried an empty Context tag and no Context tag, makes no
> difference. Catalina.out has not error. I tried setting logging level FINE
> to see if there were anything related to how it scans
> conf/Catalina/localhost/ but nothing.
>
> I thing you need to place the web app outside tomcat lets say in
/users/myfolder/test
And then  set docbase path in /conf/Catalina/localhost/test.xml
to 
and then stop start tomcat.


> On Sun, Feb 21, 2016 at 12:11 AM, Caldarale, Charles R <
> chuck.caldar...@unisys.com> wrote:
>
> > > From: Me Self [mailto:wmso...@gmail.com]
> > > Subject: context doesnt pick up
> >
> > > When I put the context in server.xml it works fine, but if I put the
> same
> > > context tag in a xml file under /conf/Catalina/localhost/test.xml then
> > > tomcat doesn't pick it up. I would rather want to use the latter.
> >
> > > The test.xml is
> > > 
> > > 
> >
> > > What Am I missing?
> >
> > Reading the doc, which for the docBase attribute states:
> > "The value of this field must not be set unless the Context element is
> > defined in server.xml or the docBase is not located under the Host's
> > appBase."
> >
> > http://tomcat.apache.org/tomcat-8.0-doc/config/context.html
> >
> > I suspect that if you examined the logs you would find an error message
> > related to deployment of the test webapp.
> >
> > If all you have in the  element is the docBase and your webapp
> is
> > located in the 's appBase directory, you don't need a 
> > element at all.
> >
> >  - 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: Http 403: access to requested resource denied

2016-02-03 Thread prashant sharma
Regards,
Prashant

07440456543
On 3 Feb 2016 18:07, "David kerber"  wrote:
>
> On 2/3/2016 12:50 PM, prashant sharma wrote:
>>
>> On 3 Feb 2016 17:42, "David kerber"  wrote:
>>>
>>>
>>> On 2/3/2016 12:23 PM, prashant sharma wrote:
>>>>
>>>>
>>>> On 3 Feb 2016 16:38, "Mark Eggers" 
wrote:
>>>>>
>>>>>
>>>>>
>>>>> -BEGIN PGP SIGNED MESSAGE-
>>>>> Hash: SHA1
>>>>>
>>>>> Quick note - please post at the bottom or inline.
>>>>>
>>>>> See item 6 of the Tomcat users mailing list here:
>>>>> http://tomcat.apache.org/lists.html
>>>>>
>>>>> On 2/3/2016 8:20 AM, prashant sharma wrote:
>>>>>>
>>>>>>
>>>>>> That's true. But we are not doing any authn/authz in our
>>>>>> application. Its just a simple webapp that exposes 1 endpoint (put
>>>>>> method). Any body should be able to hit that end point.
>>>>>>
>>>>>> It works fine if I place my war outside tomcat installation
>>>>>> directory and create a context from Catalina/localhost. But if I
>>>>>> place my war inside webapps then it gives http 403 when I hit my
>>>>>> endpoint.
>>>>>>
>>>>>> Regards, Prashant
>>>>>>
>>>>>> 07440456543 On 3 Feb 2016 16:11, "David kerber"
>>>>>>  wrote:
>>>>>>
>>>>>>> 403 is an authentication/authorization error, which means the
>>>>>>> logged-in user doesn't have permissions to the requested
>>>>>>> resource.
>>>>>>>
>>>>>>>
>>>>>>> On 2/3/2016 11:05 AM, prashant sharma wrote:
>>>>>>>
>>>>>>>> Hi, Can someone pls provide any inputs on below. Thanks
>>>>>>>>
>>>>>>>> Regards, Prashant
>>>>>>>>
>>>>>>>> 07440456543 On 2 Feb 2016 18:02, "prashant sharma"
>>>>>>>>  wrote:
>>>>>>>>
>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I am using apache tomcat 7.0.57 and jdk 7 on windows 7. I
>>>>>>>>> have deployed a simple web application inside tomcat webapps
>>>>>>>>> folder by placing the war file directly in webapps. This is a
>>>>>>>>> basic application which exposes an endpoint with put request
>>>>>>>>> method.
>>>>>>>>>
>>>>>>>>> When I try to access this endpoint I get 403 access forbidden
>>>>>>>>> error.
>>>>>>>>>
>>>>>>>>> However If I place war file outside tomcat  and point it by
>>>>>>>>> creating context.xml in conf/Catalina/localhost I am able to
>>>>>>>>> access my endpoint.
>>>>>>>>>
>>>>>>>>> Can someone pls tell what's wrong with the first approach and
>>>>>>>>> why its not working in that
>>>>>>>>>
>>>>>>>>> Regards, Prashant
>>>>>>>>>
>>>>>>>>> 07440456543
>>>>>
>>>>>
>>>>>
>>>>> With your put method, are you trying to write to a file within the web
>>>>> application?
>>>>>
>>>>> . . . just my two cents
>>>>
>>>>
>>>> This put method updates a record in database.
>>>> The same webapp(endpoint) works when I place war outside tomcat.
>>>
>>>
>>>
>>> Check the permissions on the directories where you are placing the .war
>>
>> file.
>> .war file is places under tomcat webapps folder.
>
>
> Yes, I know.  You need to check the permissions that are set on that
directory.
>
There are no special permissions for that directory. Its on my local
machine (localhost).
>
>
>
>>>
>>>
>>>
>>>>
>>>>> /mde/
>>>>> -BEGIN PGP SIGNATURE-
>>>>> Version: GnuPG v2
>>>>>
>>>>> iQEcBAEBAgAGBQJWsiy6AAoJEEFGbsYNeTwtQl8IAJyMU5CIE5ex3QTLbnnEzM/P
>>>>> SCPTn6yTFnMleBtKpKHpiVsc2pc3ebXaSWsWqTId6ahGbDnl6bGUewKfGU/ybeqr
>>>>> 9gxYNj75d3z2xHFaOiVZjf67zGgS7pQ+XUSlIrogrsVQ5mDopRGgdkDsUPnerdlL
>>>>> w0288AGjnh9IKMXJ3MiFK3qORImjIEINTLDpnAcdoX5fbGwkVKyIF74VNrH2xqot
>>>>> zI0fglepGn9bk8MB1r+JkRVnrFwhXjfwhCBREnf8+Uy4LrszEF8CVmvNVsAQLxm1
>>>>> 9d6cOPLO4rGv/UGBCrK596vXQOQZ+hg1NpN04Gfd5evLafI0x29bE7AYFmcxKPo=
>>>>> =ZL/3
>>>>> -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
>>>
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>


Re: Http 403: access to requested resource denied

2016-02-03 Thread prashant sharma
On 3 Feb 2016 17:42, "David kerber"  wrote:
>
> On 2/3/2016 12:23 PM, prashant sharma wrote:
>>
>> On 3 Feb 2016 16:38, "Mark Eggers"  wrote:
>>>
>>>
>>> -BEGIN PGP SIGNED MESSAGE-
>>> Hash: SHA1
>>>
>>> Quick note - please post at the bottom or inline.
>>>
>>> See item 6 of the Tomcat users mailing list here:
>>> http://tomcat.apache.org/lists.html
>>>
>>> On 2/3/2016 8:20 AM, prashant sharma wrote:
>>>>
>>>> That's true. But we are not doing any authn/authz in our
>>>> application. Its just a simple webapp that exposes 1 endpoint (put
>>>> method). Any body should be able to hit that end point.
>>>>
>>>> It works fine if I place my war outside tomcat installation
>>>> directory and create a context from Catalina/localhost. But if I
>>>> place my war inside webapps then it gives http 403 when I hit my
>>>> endpoint.
>>>>
>>>> Regards, Prashant
>>>>
>>>> 07440456543 On 3 Feb 2016 16:11, "David kerber"
>>>>  wrote:
>>>>
>>>>> 403 is an authentication/authorization error, which means the
>>>>> logged-in user doesn't have permissions to the requested
>>>>> resource.
>>>>>
>>>>>
>>>>> On 2/3/2016 11:05 AM, prashant sharma wrote:
>>>>>
>>>>>> Hi, Can someone pls provide any inputs on below. Thanks
>>>>>>
>>>>>> Regards, Prashant
>>>>>>
>>>>>> 07440456543 On 2 Feb 2016 18:02, "prashant sharma"
>>>>>>  wrote:
>>>>>>
>>>>>> Hi,
>>>>>>>
>>>>>>> I am using apache tomcat 7.0.57 and jdk 7 on windows 7. I
>>>>>>> have deployed a simple web application inside tomcat webapps
>>>>>>> folder by placing the war file directly in webapps. This is a
>>>>>>> basic application which exposes an endpoint with put request
>>>>>>> method.
>>>>>>>
>>>>>>> When I try to access this endpoint I get 403 access forbidden
>>>>>>> error.
>>>>>>>
>>>>>>> However If I place war file outside tomcat  and point it by
>>>>>>> creating context.xml in conf/Catalina/localhost I am able to
>>>>>>> access my endpoint.
>>>>>>>
>>>>>>> Can someone pls tell what's wrong with the first approach and
>>>>>>> why its not working in that
>>>>>>>
>>>>>>> Regards, Prashant
>>>>>>>
>>>>>>> 07440456543
>>>
>>>
>>> With your put method, are you trying to write to a file within the web
>>> application?
>>>
>>> . . . just my two cents
>>
>> This put method updates a record in database.
>> The same webapp(endpoint) works when I place war outside tomcat.
>
>
> Check the permissions on the directories where you are placing the .war
file.
.war file is places under tomcat webapps folder.
>
>
>
>>
>>> /mde/
>>> -BEGIN PGP SIGNATURE-
>>> Version: GnuPG v2
>>>
>>> iQEcBAEBAgAGBQJWsiy6AAoJEEFGbsYNeTwtQl8IAJyMU5CIE5ex3QTLbnnEzM/P
>>> SCPTn6yTFnMleBtKpKHpiVsc2pc3ebXaSWsWqTId6ahGbDnl6bGUewKfGU/ybeqr
>>> 9gxYNj75d3z2xHFaOiVZjf67zGgS7pQ+XUSlIrogrsVQ5mDopRGgdkDsUPnerdlL
>>> w0288AGjnh9IKMXJ3MiFK3qORImjIEINTLDpnAcdoX5fbGwkVKyIF74VNrH2xqot
>>> zI0fglepGn9bk8MB1r+JkRVnrFwhXjfwhCBREnf8+Uy4LrszEF8CVmvNVsAQLxm1
>>> 9d6cOPLO4rGv/UGBCrK596vXQOQZ+hg1NpN04Gfd5evLafI0x29bE7AYFmcxKPo=
>>> =ZL/3
>>> -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: Http 403: access to requested resource denied

2016-02-03 Thread prashant sharma
On 3 Feb 2016 16:38, "Mark Eggers"  wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Quick note - please post at the bottom or inline.
>
> See item 6 of the Tomcat users mailing list here:
> http://tomcat.apache.org/lists.html
>
> On 2/3/2016 8:20 AM, prashant sharma wrote:
> > That's true. But we are not doing any authn/authz in our
> > application. Its just a simple webapp that exposes 1 endpoint (put
> > method). Any body should be able to hit that end point.
> >
> > It works fine if I place my war outside tomcat installation
> > directory and create a context from Catalina/localhost. But if I
> > place my war inside webapps then it gives http 403 when I hit my
> > endpoint.
> >
> > Regards, Prashant
> >
> > 07440456543 On 3 Feb 2016 16:11, "David kerber"
> >  wrote:
> >
> >> 403 is an authentication/authorization error, which means the
> >> logged-in user doesn't have permissions to the requested
> >> resource.
> >>
> >>
> >> On 2/3/2016 11:05 AM, prashant sharma wrote:
> >>
> >>> Hi, Can someone pls provide any inputs on below. Thanks
> >>>
> >>> Regards, Prashant
> >>>
> >>> 07440456543 On 2 Feb 2016 18:02, "prashant sharma"
> >>>  wrote:
> >>>
> >>> Hi,
> >>>> I am using apache tomcat 7.0.57 and jdk 7 on windows 7. I
> >>>> have deployed a simple web application inside tomcat webapps
> >>>> folder by placing the war file directly in webapps. This is a
> >>>> basic application which exposes an endpoint with put request
> >>>> method.
> >>>>
> >>>> When I try to access this endpoint I get 403 access forbidden
> >>>> error.
> >>>>
> >>>> However If I place war file outside tomcat  and point it by
> >>>> creating context.xml in conf/Catalina/localhost I am able to
> >>>> access my endpoint.
> >>>>
> >>>> Can someone pls tell what's wrong with the first approach and
> >>>> why its not working in that
> >>>>
> >>>> Regards, Prashant
> >>>>
> >>>> 07440456543
>
> With your put method, are you trying to write to a file within the web
> application?
>
> . . . just my two cents
This put method updates a record in database.
The same webapp(endpoint) works when I place war outside tomcat.

> /mde/
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v2
>
> iQEcBAEBAgAGBQJWsiy6AAoJEEFGbsYNeTwtQl8IAJyMU5CIE5ex3QTLbnnEzM/P
> SCPTn6yTFnMleBtKpKHpiVsc2pc3ebXaSWsWqTId6ahGbDnl6bGUewKfGU/ybeqr
> 9gxYNj75d3z2xHFaOiVZjf67zGgS7pQ+XUSlIrogrsVQ5mDopRGgdkDsUPnerdlL
> w0288AGjnh9IKMXJ3MiFK3qORImjIEINTLDpnAcdoX5fbGwkVKyIF74VNrH2xqot
> zI0fglepGn9bk8MB1r+JkRVnrFwhXjfwhCBREnf8+Uy4LrszEF8CVmvNVsAQLxm1
> 9d6cOPLO4rGv/UGBCrK596vXQOQZ+hg1NpN04Gfd5evLafI0x29bE7AYFmcxKPo=
> =ZL/3
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>


Re: Http 403: access to requested resource denied

2016-02-03 Thread prashant sharma
That's true. But we are not doing any authn/authz in our application.
Its just a simple webapp that exposes 1 endpoint (put method). Any body
should be able to hit that end point.

It works fine if I place my war outside tomcat installation directory and
create a context from Catalina/localhost.
But if I place my war inside webapps then it gives http 403 when I hit my
endpoint.

Regards,
Prashant

07440456543
On 3 Feb 2016 16:11, "David kerber"  wrote:

> 403 is an authentication/authorization error, which means the logged-in
> user doesn't have permissions to the requested resource.
>
>
> On 2/3/2016 11:05 AM, prashant sharma wrote:
>
>> Hi,
>> Can someone pls provide any inputs on below.
>> Thanks
>>
>> Regards,
>> Prashant
>>
>> 07440456543
>> On 2 Feb 2016 18:02, "prashant sharma" 
>> wrote:
>>
>> Hi,
>>> I am using apache tomcat 7.0.57 and jdk 7 on windows 7.
>>> I have deployed a simple web application inside tomcat webapps folder by
>>> placing the war file directly in webapps.
>>> This is a basic application which exposes an endpoint with put request
>>> method.
>>>
>>> When I try to access this endpoint I get 403 access forbidden error.
>>>
>>> However If I place war file outside tomcat  and point it by creating
>>> context.xml in conf/Catalina/localhost I am able to access my endpoint.
>>>
>>> Can someone pls tell what's wrong with the first approach and why its not
>>> working in that
>>>
>>> Regards,
>>> Prashant
>>>
>>> 07440456543
>>>
>>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Http 403: access to requested resource denied

2016-02-03 Thread prashant sharma
Hi,
Can someone pls provide any inputs on below.
Thanks

Regards,
Prashant

07440456543
On 2 Feb 2016 18:02, "prashant sharma"  wrote:

> Hi,
> I am using apache tomcat 7.0.57 and jdk 7 on windows 7.
> I have deployed a simple web application inside tomcat webapps folder by
> placing the war file directly in webapps.
> This is a basic application which exposes an endpoint with put request
> method.
>
> When I try to access this endpoint I get 403 access forbidden error.
>
> However If I place war file outside tomcat  and point it by creating
> context.xml in conf/Catalina/localhost I am able to access my endpoint.
>
> Can someone pls tell what's wrong with the first approach and why its not
> working in that
>
> Regards,
> Prashant
>
> 07440456543
>


Http 403: access to requested resource denied

2016-02-02 Thread prashant sharma
Hi,
I am using apache tomcat 7.0.57 and jdk 7 on windows 7.
I have deployed a simple web application inside tomcat webapps folder by
placing the war file directly in webapps.
This is a basic application which exposes an endpoint with put request
method.

When I try to access this endpoint I get 403 access forbidden error.

However If I place war file outside tomcat  and point it by creating
context.xml in conf/Catalina/localhost I am able to access my endpoint.

Can someone pls tell what's wrong with the first approach and why its not
working in that

Regards,
Prashant

07440456543


Re: [PROPOSAL] Tomcat Webinar series

2015-11-13 Thread prashant sharma
Hi Chris,
You mentioned about Apachecon.
Does it get recorded as well.
If yes can you pls provide the link.

Thanks
On 13 Nov 2015 16:47, "Johan Compagner"  wrote:

> On 12 November 2015 at 23:29, Mark Thomas  wrote:
>
> > - HTTP/2 and Tomcat 9
>
>
> i am also interested in something for this, especially how we can configure
> it server side so that 1 request can send over a whole bunch of files at
> onces (server pusht)
>
>
> --
> Johan Compagner
> Servoy
>


Re: [PROPOSAL] Tomcat Webinar series

2015-11-12 Thread prashant sharma
Thanks Mark.
Sure that would be a very good knowledge sharing session.
Looking forward to the details.

On Thu, Nov 12, 2015 at 10:29 PM, Mark Thomas  wrote:

> All,
>
> I've been wondering if there would be any interest in a Tomcat Webinar
> series. I'm thinking ~10 minutes of presentation followed by Q&A on
> topics of interest to this community with the webinars taking place
> every 1/2/4 weeks depending on interest. The webinars would also be
> recorded and uploaded somewhere - probably youtube - and linked from
> tomcat.apache.org.
>
> My initial thoughts on possible topics are:
>
> - Intro to Tomcat 9 (the first milestone release is in progress as
>   I type this)
>
> - TLS virtual hosting with Tomcat 9
>
> - Generating TLS keys for Tomcat
>
> - HTTP/2 and Tomcat 9
>
> - Connector selection: BIO vs NIO vs NIO2 vs APR
>
> - Proxy protocol choice HTTP vs AJP
>
> Other topics as requested by the users@ community.
>
> Presenters would be one of the Tomcat committers. Obviously, I'm happy
> to do these but I hope some of my fellow committers will agree to do
> some presentations as well.
>
> Thoughts, feedback, topic suggestions welcome.
>
> Mark
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


unable to specify new context in conf\Catalina\localhost

2015-10-18 Thread prashant sharma
Hi,
This is my server details:-

Server InformationTomcat VersionJVM VersionJVM VendorOS NameOS VersionOS
ArchitectureHostnameIP AddressApache Tomcat/8.0.281.7.0_51-b13Oracle
CorporationMac OS X10.9.5x86_64
I have a web application(mytomcat-helloworld) in below
directory /Library/Tomcat/apache-tomcat-8.0.28/webapps/
Server.xml is also out of box.
 

I can access my application at below url:-
http://localhost:8080/mytomcat-helloworld/
Everything is fine till here.

I have now created a context xml in path
/Library/Tomcat/apache-tomcat-8.0.28/conf/Catalina/localhost/test.xml
as



I was hoping to access the application with url:-
http://localhost:8080/test

But instead I get this error:-
18-Oct-2015 17:41:05.994 INFO [localhost-startStop-7]
org.apache.catalina.startup.HostConfig.deployDescriptor Deploying
configuration descriptor
/Library/Tomcat/apache-tomcat-8.0.28/conf/Catalina/localhost/test.xml
18-Oct-2015 17:41:05.995 WARNING [localhost-startStop-7]
org.apache.catalina.startup.HostConfig.deployDescriptor A docBase
/Library/Tomcat/apache-tomcat-8.0.28/webapps/mytomcat-helloworld inside the
host appBase has been specified, and will be ignored
18-Oct-2015 17:41:06.000 SEVERE [localhost-startStop-7]
org.apache.catalina.core.ContainerBase.addChildInternal
ContainerBase.addChild: start:
 org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/test]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:586)
at
org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1780)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.catalina.LifecycleException: Failed to start
component [org.apache.catalina.webresources.StandardRoot@5334f6e8]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at
org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4854)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4984)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 10 more
Caused by: java.lang.IllegalArgumentException: The main resource set
specified [/Library/Tomcat/apache-tomcat-8.0.28/webapps/test] is not valid
at
org.apache.catalina.webresources.StandardRoot.createMainResourceSet(StandardRoot.java:723)
at
org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:684)
at org.apache.catalina.ut


I have followed the specs given here:-
http://tomcat.apache.org/tomcat-8.0-doc/config/context.html#Defining_a_context

Note:- I get the error with this xml as well




Max Thread/Memory problems with tomcat

2009-10-05 Thread prashant sharma
Hi,

We are using the following configuration:

Tomcat: 5.0. 
OS: Windows Server HPC edition.  
JVM: 5.0

There is one basic doubt that I have. When we load/stress our Tomcat server, we 
hit thresholds mentioned below once in a while. The root of the problem is that 
when I increase the clients, I start getting a connection refused error on the 
server side. This is because the server hits the maximum request processing 
thread limit. The other problems are connected to it:

-Max threads (tomcat): 

As mentioned above, this is the root of the problem. To solve this problem, I 
increase the max threads in server.xml. Then I get the Out of stack space 
exception. 

-Stack Memory:
 
Now for this I tried a couple of things
a) Reduce the stack size allotted per thread so that more threads can be 
spawned in the allotted stack space.I believe that the default is around 320K/ 
thread. I set it to 128K in the JVM options (Xss). 
b) Reduce the heap size. I did this because as per my understanding the memory 
alloted to a process is divided among heap and stack. So probably reducing the 
heap size makes more memory available for stack. Don't know if this is correct?

Now once in a while I get Out of memory exception for heap space.

-Heap Memory: 

Can somebody advise as to what are the solutions for these sort of problems 
other than reducing the memory/thread consumption, of our application logic. I 
mean are there techniques that can be applied on tomcat/JVM/OS level to make 
more threads/memory available to the tomcat process? 

Please advise.

Thanks!
Prashant


  

Re: splitting thread pool

2009-06-29 Thread prashant sharma
Thanks for a detailed response Chris!

I am quite new to tomcat...It would be really helpful if you could give some 
reference links to the things  you are talking about in 1 and 3 below?

Thanks!
Prashant




From: Christopher Schultz 
To: Tomcat Users List 
Sent: Monday, June 29, 2009 10:49:06 AM
Subject: Re: splitting thread pool

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Prashant,

On 6/29/2009 1:12 AM, prashant sharma wrote:
> Is there any way to configure my web application such that I have a
> separate quota of threads for webpage access and a separate quota for
> other types of accesses like webservice requests?

The only way I know of to do this is with separate connectors: you would
configure them separately so that the "webapp" one (that is, the one
that handles traditional human clients reading web pages) is separate
from the "web service" one (that is, the one that services only web
service clients).

Two have two connectors, you either need a second port number to use
(not terribly convenient, since ports other than 80 and 443 are often
blocked by firewalls, etc.) or a second IP address to use (also not
terribly convenient since your web service calls need to be coded to hit
a different host).

Another option is to use a front-controller like Apache httpd to direct
traffic:

1. Install httpd and configure it to work with your existing webapp,
configured to handle everything just as it works today. Use your choice
of mod_jk or mod_proxy_http/ajp. Make sure you have httpd configured to
accept enough requests for your expected (or observed) peak load.

2. Add a second  on a different port. Don't worry about
firewall issues as this port doesn't need to be available to the outside
world.

3. Change your httpd proxy configuration (ProxyPass or JkMount) so that
the URIs for web services are directed to the /second/ connector you
created in #2 above.

This will allow httpd to act as a traffic cop to direct web service
requests to that second connector, which can (of course!) be configured
separately and/or differently than the one for "web" clients.

Hope that helps,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkpI1GIACgkQ9CaO5/Lv0PBLXQCgroWHtSNDkvwhJP6WPbnCt3b7
BmEAoMJm80XQaCNgWMWDE29pFYAmbq8O
=rhVV
-END PGP SIGNATURE-

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


  

Re: splitting thread pool

2009-06-29 Thread prashant sharma
Thanks for your response Ronald!

Won't a filter be a part of the thread pool? I mean every incoming request 
would create a new thread and filter would be invoked on this new thread 
...right?

The solution that I am looking for is to partition the thread pool into 2 parts 

One that serves the webpage requests and the other that is allocated to the 
internal processing of the web application.

Thanks!
Prashant  




From: Ronald Klop 
To: Tomcat Users List 
Cc: prashant sharma 
Sent: Monday, June 29, 2009 4:57:53 AM
Subject: Re: splitting thread pool

You can create a filter or run on separate Tomcat instances.

NB: You are not solving the cause, but the effect. You don't have enough 
threads or cpu-power to handle the total load.

Ronald.


Op maandag, 29 juni 2009 07:12 schreef prashant sharma :
Hi,

I have the following attributes in the "server.xml" file:



The web application that I am working on exposes many webservices, which are 
invoked from other applications. The problem I am facing is that when my 
application gets a lot of webservice requests, it reaches the limit of 
"maxThreads". After this limit is reached I am not able to open the webpage for 
my web application.

Is there any way to configure my web application such that I have a separate 
quota of threads for webpage access and a separate quota for other types of 
accesses like webservice requests?

Thanks!
Prashant



  
 



  

splitting thread pool

2009-06-28 Thread prashant sharma
Hi,

I have the following attributes in the "server.xml" file:



The web application that I am working on exposes many webservices, which are 
invoked from other applications. The problem I am facing is that when my 
application gets a lot of webservice requests, it reaches the limit of 
"maxThreads". After this limit is reached I am not able to open the webpage for 
my web application.

Is there any way to configure my web application such that I have a separate 
quota of threads for webpage access and a separate quota for other types of 
accesses like webservice requests?

Thanks!
Prashant