I have loaded the Tiles listener and run the jUnit test and it gave the same
NullPointer Exception. Moreover, the trace is same as before.
Then, I tried to load tiles servlet, and it gave the same error. Lastly, I
loaded the tiles filter and it gave ther same NPE. 
I have already tried three of them so I can't figure out what the problem
is. Did I load them wrongly?

I have just replaced the code with the new one, isn't it the one you
suggested? 

Modified web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4"
        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";>
        <display-name>TVQ</display-name>


        <filter>
                <filter-name>struts2</filter-name>
                <filter-class>
                        org.apache.struts2.dispatcher.FilterDispatcher
                </filter-class>
        </filter>
        <!-- Add the filter mapping after all filters -->
        <filter-mapping>
                <filter-name>struts2</filter-name>
                <url-pattern>/*</url-pattern>
        </filter-mapping>

        <listener>
                <listener-class>
                        org.springframework.web.context.ContextLoaderListener
                </listener-class>
        </listener>


        <listener>
                <listener-class>
                        org.apache.tiles.web.startup.TilesListener
                </listener-class>
        </listener>

                <context-param>
                        <param-name>
                                
org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
                        </param-name>
                        <param-value>
                                
/WEB-INF/tiles-defs.xml,/org/apache/tiles/classpath-defs.xml
                        </param-value>
                </context-param>

        <welcome-file-list>
                <welcome-file>index.html</welcome-file>
                <welcome-file>index.htm</welcome-file>
                <welcome-file>index.jsp</welcome-file>
                <welcome-file>default.html</welcome-file>
                <welcome-file>default.htm</welcome-file>
                <welcome-file>default.jsp</welcome-file>
        </welcome-file-list>
</web-app>


Antonio Petrelli-3 wrote:
> 
> 2008/6/26 ezgi <[EMAIL PROTECTED]>:
>> I tried three of them seperatley, but it did not work.
> 
> Please clarify, what do you mean with "it did not work"? Do you
> receive an exception at startup?
> 
>> Should I modify the configuration variable in the BaseStrutsTestCase? I
>> did not add there
>> web.xml and tiles-defs.xml.
> 
> Sincerely I am not into BaseStrutsTestCase, so I cannot help in this case
> 
>>                        <param-value>
>>                               
>> /WEB-INF/tiles-defs.xml,/org/apache/tiles/classpath-defs.xml
>>                        </param-value>
> 
> Have you got a "classpath-defs.xml" anywhere in your code? If not, remove
> it.
> 
> Antonio
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/jUnit-Testing-Problem-with-Tiles-tp18131822p18132968.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to