"Can you post your web.xml, particularly the section that defines the
Struts filters? "

my web.xml:

<web-app xmlns="http://java.sun.com/xml/ns/j2ee";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
        version="2.4">
                                
        <display-name>TestApp</display-name>
        <description>TestApp.</description>
        
        <welcome-file-list>
                <welcome-file>/pages/index.jsp</welcome-file>
        </welcome-file-list>
        
        <error-page>
                <exception-type>java.lang.Exception</exception-type>
                <location>/WEB-INF/jsp/Error.jsp</location>
        </error-page>
        
        <context-param>
                <description>This context parameter specifies the name and 
location 
                of the Spring root application context file.</description>
                <param-name>contextConfigLocation</param-name>
                <param-value>classpath*:applicationContext*.xml</param-value>
        </context-param>

        <context-param>
                <description>This context parameter specifies the name and 
location 
                of the Tiles Definitions file.</description>
                <param-name>org.apache.tiles.DEFINITIONS_CONFIG</param-name>
                <param-value>/WEB-INF/classes/tiles-defs.xml</param-value>
        </context-param>

     <session-config>
      <session-timeout>20</session-timeout> 
    </session-config>   
  
    <filter>
                <filter-name>encodingFilter</filter-name>
        
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
     
                <init-param>
                        <param-name>encoding</param-name>
                        <param-value>UTF-8</param-value>
                </init-param>   
                <init-param>
                        <param-name>forceEncoding</param-name>
                        <param-value>true</param-value>
                </init-param>
        </filter>
        <filter>
                <filter-name>openSessionInViewFilter</filter-name>
        
<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
        </filter>

        <filter>
                <filter-name>filterDispatcher</filter-name>
        
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
        </filter>

        <filter-mapping>
       <filter-name>encodingFilter</filter-name>
       <url-pattern>/*</url-pattern>
    </filter-mapping>
        
        <filter-mapping>
                <filter-name>openSessionInViewFilter</filter-name>
                <url-pattern>/*</url-pattern>
        </filter-mapping>
        
        <filter-mapping>
                <filter-name>filterDispatcher</filter-name>
                <url-pattern>/*</url-pattern>
        </filter-mapping>

        <listener>
    
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
        </listener>
        <listener>
        
<listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
        </listener>
        

</web-app>

"Also, can you post the configuration of this
global error result?"

struts.xml global-results:

              <global-results>
                   <result name="accessDenied" 
type="dispatcher">accessDenied.jsp</result>
                    <result name="loginLimit"
type="dispatcher">loginLimitCheck.jsp</result>
                    <result name="loginExpiered"
type="dispatcher">loginExpiered.jsp</result>
                    <result name="loginDisabled"
type="dispatcher">loginDisabled.jsp</result>
                    <result name="loginIncorrect"
type="dispatcher">loginIncorrect.jsp</result>
                    <result name="notloggedin" 
type="dispatcher">/login.jsp</result>
                    <result name="notloggedintype2"
type="dispatcher">/logintemplate2.jsp</result>
                        <result name="error" 
type="dispatcher">/WEB-INF/jsp/Error.jsp</result>
                        <result name="success" 
type="redirectAction">default</result>
                </global-results>
        
                <global-exception-mappings>
                        <exception-mapping exception="java.lang.Throwable" 
result="error"/> 
                </global-exception-mappings>


On Wed, Dec 30, 2009 at 7:49 PM, bberken <bberken...@mainstreamdata.com>
wrote:
>
> I've attempted to update our application from struts 2.0.6 to 2.1.6 (also
> using tiles 2.0.6) and am running into problems - I have a global error
> result defined as a jsp inside my WEB-INF dir:
>
>
>  ....
> /WEB-INF/jsp/Error.jsp
>
>
>
> and rendering of this jsp (and any jsp inside my WEB-INF) is failing on
> any
> tags inside that jsp. I receive a nullpointerexception:
>
> java.lang.NullPointerException
>
>        at
> org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:49)
>
>        at
> org.apache.jsp.WEB_002dINF.jsp.Error_jsp._jspx_meth_s_005finclude_005f0(Error_jsp.java:143)
>
>
> And debugging into ComponentTagSupport shows that the line:
>
> Container container = Dispatcher.getInstance().getContainer();
>
>
> is failing due to inability to obtain an instance of the Dispatcher.
>
>
> This all appears to work if I move the jsps out of WEB-INF and into my
> normal webcontext directory.
>
>
> Does anyone have any thoughts as to what I'm missing? This did all work
> w/struts 2.0.6, and I've only made small modifications to my web.xml..
> following this migration howto:
>
> http://cwiki.apache.org/S2WIKI/troubleshooting-guide-migrating-from-struts-20x-to-21x.html
> http://cwiki.apache.org/S2WIKI/troubleshooting-guide-migrating-from-struts-20x-to-21x.html
>
>
> thanks
>
>
> --
> View this message in context:
> http://old.nabble.com/Struts-2.0-to-2.1-Migration-problem-tp26974067p26974067.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>



-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

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




-- 
View this message in context: 
http://old.nabble.com/Struts-2.0-to-2.1-Migration-problem-tp26974067p26979597.html
Sent from the Struts - User mailing list archive at Nabble.com.


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

Reply via email to