Hi,

I got the issue resolved. It seems like the my root web.xml needed the
TilesServlet declaration. It looks like the context of the web app really
matters when getting the Container object.

Thank you very much for your help.

Thanks,
Adi Saraf

On Thu, Aug 11, 2011 at 2:20 PM, Aditya Saraf <[email protected]> wrote:

> Hi,
>
> This is web.xml from the first environment that works perfectly for every
> defintion.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>  xmlns="http://java.sun.com/xml/ns/javaee"; xmlns:web="
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
>  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
>  id="WebApp_ID" version="2.5">
>  <display-name>IRMS_WEB</display-name>
>  <welcome-file-list>
>   <welcome-file>index.jsp</welcome-file>
>  </welcome-file-list>
>  <session-config>
>   <session-timeout>300</session-timeout>
>  </session-config>
>  <filter> <filter-name>UrlRewriteFilter</filter-name>
> <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
>
>   </filter> <filter-mapping> <filter-name>UrlRewriteFilter</filter-name>
> <url-pattern>/*</url-pattern>
>   </filter-mapping>
>  <servlet>
>   <description>Display chart on the end users machine.</description>
>   <servlet-name>DisplayChart</servlet-name>
>   <servlet-class>org.jfree.chart.servlet.DisplayChart</servlet-class>
>  </servlet>
>  <servlet-mapping>
>   <servlet-name>DisplayChart</servlet-name>
>   <url-pattern>/servlet/DisplayChart</url-pattern>
>  </servlet-mapping>
>  <servlet>
>   <description>Get symbol information.</description>
>   <display-name>Symbol</display-name>
>   <servlet-name>Symbol</servlet-name>
>   <servlet-class>com.irms.symbols.Symbol</servlet-class>
>  </servlet>
>  <servlet-mapping>
>   <servlet-name>Symbol</servlet-name>
>   <url-pattern>/Symbol</url-pattern>
>  </servlet-mapping>
>  <servlet>
>   <description></description>
>   <display-name>Output</display-name>
>   <servlet-name>Output</servlet-name>
>   <servlet-class>com.irms.output.Output</servlet-class>
>  </servlet>
>  <servlet-mapping>
>   <servlet-name>Output</servlet-name>
>   <url-pattern>/Output</url-pattern>
>  </servlet-mapping>
>  <servlet>
>   <servlet-name>IRMS Startup</servlet-name>
>   <servlet-class>com.irms.startup.Startup</servlet-class>
>   <load-on-startup>2</load-on-startup>
>  </servlet>
>
>  <servlet>
>   <servlet-name>tiles</servlet-name>
>
>   
> <servlet-class>org.apache.tiles.web.startup.simple.SimpleTilesInitializerServlet</servlet-class>
>   <load-on-startup>1</load-on-startup>
>  </servlet>
>  <error-page>
>   <error-code>404</error-code>
>   <location>/404.html</location>
>  </error-page>
>  <error-page>
>   <error-code>500</error-code>
>   <location>/500.html</location>
>  </error-page>
>  <resource-ref>
>   <description>DB Connection</description>
>   <res-ref-name>jdbc/accounts</res-ref-name>
>   <res-type>javax.sql.DataSource</res-type>
>   <res-auth>Container</res-auth>
>  </resource-ref>
>  <resource-ref>
>   <description>DB Connection</description>
>   <res-ref-name>jdbc/funds</res-ref-name>
>   <res-type>javax.sql.DataSource</res-type>
>   <res-auth>Container</res-auth>
>  </resource-ref>
>  <security-constraint>
>   <web-resource-collection>
>    <web-resource-name>Tool</web-resource-name>
>    <description>Protected resources.</description>
>    <url-pattern>/*</url-pattern>
>    <http-method>GET</http-method>
>    <http-method>POST</http-method>
>   </web-resource-collection>
>   <auth-constraint>
>    <description>These are the roles who have access</description>
>    <role-name>user</role-name>
>   </auth-constraint>
>  </security-constraint>
>  <login-config>
>   <auth-method>FORM</auth-method>
>   <form-login-config>
>    <form-login-page>/signin.jsp</form-login-page>
>    <form-error-page>/signin.jsp?error=1</form-error-page>
>   </form-login-config>
>  </login-config>
>  <servlet>
>   <description></description>
>   <display-name>ZoomUniverse</display-name>
>   <servlet-name>ZoomUniverse</servlet-name>
>   <servlet-class>com.irms.output.ZoomUniverse</servlet-class>
>  </servlet>
>  <servlet-mapping>
>   <servlet-name>ZoomUniverse</servlet-name>
>   <url-pattern>/ZoomUniverse</url-pattern>
>  </servlet-mapping>
> </web-app>
>
> This is the web.xml from the second environment.
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns="
> http://java.sun.com/xml/ns/javaee"; xmlns:web="
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; xsi:schemaLocation="
> http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; id="WebApp_ID"
> version="2.5">
>   <display-name>IRMS_WEB</display-name>
>   <welcome-file-list>
>     <welcome-file>index.jsp</welcome-file>
>   </welcome-file-list>
>   <session-config>
>     <session-timeout>300</session-timeout>
>   </session-config>
>    <filter>
>    <filter-name>UrlRewriteFilter</filter-name>
>
> <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
>    </filter>
>    <filter-mapping>
>     <filter-name>UrlRewriteFilter</filter-name>
>       <url-pattern>/*</url-pattern>
>   </filter-mapping>
>
>   <servlet>
>     <description>Display chart on the end users machine.</description>
>     <servlet-name>DisplayChart</servlet-name>
>     <servlet-class>org.jfree.chart.servlet.DisplayChart</servlet-class>
>   </servlet>
>   <servlet-mapping>
>     <servlet-name>DisplayChart</servlet-name>
>     <url-pattern>/servlet/DisplayChart</url-pattern>
>   </servlet-mapping>
>   <servlet>
>     <description>Get symbol information.</description>
>     <display-name>Symbol</display-name>
>     <servlet-name>Symbol</servlet-name>
>     <servlet-class>com.irms.symbols.Symbol</servlet-class>
>   </servlet>
>   <servlet-mapping>
>     <servlet-name>Symbol</servlet-name>
>     <url-pattern>/Symbol</url-pattern>
>   </servlet-mapping>
>   <servlet>
>     <description></description>
>     <display-name>Output</display-name>
>     <servlet-name>Output</servlet-name>
>     <servlet-class>com.irms.output.Output</servlet-class>
>   </servlet>
>   <servlet-mapping>
>     <servlet-name>Output</servlet-name>
>     <url-pattern>/Output</url-pattern>
>   </servlet-mapping>
>   <servlet>
>     <servlet-name>IRMS Startup</servlet-name>
>     <servlet-class>com.irms.startup.Startup</servlet-class>
>     <load-on-startup>2</load-on-startup>
>   </servlet>
>
>   <servlet>
>  <servlet-name>tiles</servlet-name>
>
>  
> <servlet-class>org.apache.tiles.web.startup.simple.SimpleTilesInitializerServlet</servlet-class>
>  <load-on-startup>1</load-on-startup>
>  </servlet>
>   <error-page>
>     <error-code>404</error-code>
>     <location>/404.html</location>
>   </error-page>
>   <error-page>
>     <error-code>500</error-code>
>     <location>/500.html</location>
>   </error-page>
>   <error-page>
>     <error-code>401</error-code>
>     <location>/401.html</location>
>   </error-page>
>   <resource-ref>
>     <description>DB Connection</description>
>     <res-ref-name>jdbc/accounts</res-ref-name>
>     <res-type>javax.sql.DataSource</res-type>
>     <res-auth>Container</res-auth>
>   </resource-ref>
>   <resource-ref>
>     <description>DB Connection</description>
>     <res-ref-name>jdbc/funds</res-ref-name>
>     <res-type>javax.sql.DataSource</res-type>
>     <res-auth>Container</res-auth>
>   </resource-ref>
>   <security-constraint>
>     <web-resource-collection>
>       <web-resource-name>Tool</web-resource-name>
>       <description>Protected Resources.</description>
>       <url-pattern>/*</url-pattern>
>       <http-method>GET</http-method>
>       <http-method>POST</http-method>
>     </web-resource-collection>
>     <auth-constraint>
>       <description>These are the roles who have access</description>
>       <role-name>user</role-name>
>     </auth-constraint>
>   </security-constraint>
>   <login-config>
>     <auth-method>FORM</auth-method>
>     <form-login-config>
>       <form-login-page>/signin.jsp</form-login-page>
>       <form-error-page>/signin.jsp?error=1</form-error-page>
>     </form-login-config>
>   </login-config>
>   <servlet>
>     <description></description>
>     <display-name>ZoomUniverse</display-name>
>     <servlet-name>ZoomUniverse</servlet-name>
>     <servlet-class>com.irms.output.ZoomUniverse</servlet-class>
>   </servlet>
>   <servlet-mapping>
>     <servlet-name>ZoomUniverse</servlet-name>
>     <url-pattern>/ZoomUniverse</url-pattern>
>   </servlet-mapping>
> </web-app>
>
> I dont think there is anything wrong with my web.xml files. Do you think I
> need to change ~/webapps/conf/web.xml and add the TilesServlet there?
>
> Thanks,
> Adi Saraf
>
> On Thu, Aug 11, 2011 at 1:50 PM, Antonio Petrelli <
> [email protected]> wrote:
>
>> 2011/8/11 Aditya Saraf <[email protected]>
>>
>> > I have an environment in which all the tiles definitions work perfectly.
>> I
>> > am trying to migrate everything to another environment. In my first
>> > environment I see the log message, but in the second I don't see this
>> > message. I guess my next question is, what should the container default
>> to
>> > and is this some how related to the context that the application is
>> being
>> > run in?
>> >
>>
>> So in fact you oave two different applications then.
>> Can you post the web.xml files of both applications?
>>
>> My only other option is to migrate all definitions to the root folder :(.
>> >
>>
>> No, the last option is to debug. Use the source Luke :-D
>>
>> Antonio
>>
>
>
>
> --
> Adi Saraf
>



-- 
Adi Saraf

Reply via email to