Hi All,
I think the root cause for this is not having global web.xml. In this file
only, the JSP page compiler and execution servlet is defined. This class is
used to convert jsp's to servlets. It turns out that if you don't have a
global web.xml and if you have jsp-file instead of a servlet-class in your
servelt configuration, then webapps are failing to get deployed in earlier
releases of tomcat(7.0.14). Below you can find the error trace for this.

This issue is also there in previous releases of AS(4.1.2). This will work
if we define those JSP page compiler servlet manually in webapp's web.xml.
But its is not the proper way to do it. But in recent releases of tomcat
and in our trunk, the webapps are getting deployed even without a global
web.xml. But in embedded mode, we still have the issue of the jsp pages are
not getting loaded with servlet mappings as mentioned above. Created a jira
to track this[1].

Mar 23, 2012 1:32:43 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive sample2.war
Mar 23, 2012 1:32:43 PM org.apache.catalina.startup.ContextConfig webConfig
INFO: No global web.xml found
Mar 23, 2012 1:32:43 PM org.apache.catalina.startup.HostConfig deployWAR
SEVERE: Error deploying web application archive sample2.war
java.lang.NullPointerException
 at
org.apache.catalina.startup.ContextConfig.convertJsp(ContextConfig.java:1360)
at
org.apache.catalina.startup.ContextConfig.convertJsps(ContextConfig.java:1339)
 at
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1330)
at
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:881)
 at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:316)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
 at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5103)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)
 at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:932)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:723)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1322)
 at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
 at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:379)
 at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:324)
at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1041)
 at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
 at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:303)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)

Thanks,
Kishanthan.
[1] https://wso2.org/jira/browse/CARBON-12709


On Fri, Mar 23, 2012 at 10:43 AM, Nuwan Bandara <[email protected]> wrote:

> There is no error. it just doesn't work. i'll check in a previous version.
>
> Regards,
> /Nuwan
>
>
> On Fri, Mar 23, 2012 at 10:37 AM, Afkham Azeez <[email protected]> wrote:
>
>> Please also check whether this worked on the previous AS release.
>>
>> On Fri, Mar 23, 2012 at 8:49 AM, Nuwan Bandara <[email protected]> wrote:
>>
>>> Hi All,
>>>
>>> I have added the following in a web.xml
>>>
>>> <servlet>
>>>     <servlet-name>foo</servlet-name>
>>>     <jsp-file>/foo.jsp</jsp-file>
>>> </servlet>
>>> <servlet-mapping>
>>>     <servlet-name>foo</servlet-name>
>>>     <url-pattern>/foo</url-pattern>
>>> </servlet-mapping>
>>>
>>> So essentially, if my request goes to http://localhost:9763/
>>> <context>/foo should be served by foo.jsp
>>>
>>> But this doesn't work in AS. I have tried the same in tomcat 7.0.5, and
>>> it works fine. Anybody has a clue about it ?
>>>
>>> --
>>> *Thanks & Regards,
>>>
>>> Nuwan Bandara
>>> Senior Software Engineer
>>> WSO2 Inc. | http://wso2.com
>>> lean . enterprise . middleware
>>>
>>> http://nuwan.bandara.co
>>> *
>>> <http://www.nuwanbando.com/>
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> *Afkham Azeez*
>> Director of Architecture; WSO2, Inc.; http://wso2.com
>> Member; Apache Software Foundation; http://www.apache.org/
>> * <http://www.apache.org/>**
>> email: **[email protected]* <[email protected]>* cell: +94 77 3320919
>> blog: **http://blog.afkham.org* <http://blog.afkham.org>*
>> twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
>> *
>> linked-in: **http://lk.linkedin.com/in/afkhamazeez*
>> *
>> *
>> *Lean . Enterprise . Middleware*
>>
>>
>
>
> --
> *Thanks & Regards,
>
> Nuwan Bandara
> Senior Software Engineer
> WSO2 Inc. | http://wso2.com
> lean . enterprise . middleware
>
> http://nuwan.bandara.co
> *
> <http://www.nuwanbando.com/>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Kishanthan Thangarajah*
Software Engineer,
Development Technologies Team,
WSO2, Inc.
lean.enterprise.middleware

Mobile - +94773426635
Blog - *http://kishanthan.wordpress.com*
Twitter - *http://twitter.com/kishanthan*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to