About caches, struts and webapps...

Guillaume Kuhmel <[email protected]>
Newsgroups gmane.comp.cms.jahia.devel
Message-ID <[email protected]>
Hi all,

I've got an issue with the cache on a page where there's a webapp.
-The webapp contains 2 "screens": a search form by criteria, and a 
result list.
-The entry point of my webapp is a Stuts action. I've used a tip from 
this list in order to use an action as entry point:
    -In the web.xml, set welcome-file-list to setup.do.
    -create an empty file named setup.do
    -create an action mapped to "/setup"
All works fine in standalone.

-I launch the webapp once. All works correctly: i can launch a search, 
have a result list. If i look my webapp's logs, the setup Action is 
executed.
-I go to another page, come back to the page containing the webapp: the 
search form is displayed.
-i quit my explorer, relaunch it, go the the webapp page: the search 
form is displayed. But If i look my webapp's logs, the setup Action is 
NOT executed. So my webapp doesn't work because some variables have not 
been initialised.
So i've supposed this was a cache problem: If after the relaunch of the 
browser i access through "/cache/offonce/" url of the webapp page, all 
works fine.....

I've consulted the mailing archive and found this to remove the cache:
-put "setCacheExpirationDelay(Long)" in JSP,
-put request.setAttribute("org.jahia.portletapi.CacheExpirationDelay",  0)

But....it doesn't work ! i have the same problem. The only way to solve 
for the moment is
- to access via "/cache/offonce/", but it''s not possible to create such 
link in pages that call my webapp's page...
- to do what setup Action do in the search form JSP of my webapp....but 
like this, the init code is executed every time the webapp is accessed !

Have you heard of such a pb?? have any idea? I've heard that 4.0.6 and 
4.1 should resolve some cache issues....

Thanks a lot,

Guillaume.

-- 
------------------------------------------------------------------------

*Guillaume Kuhmel*
*Ingénieur Concepteur Développeur*
*[email protected] <mailto:[email protected]>*
*Tél. : +33 (0)4.42.37.10.92*

	

*http://www.sqli.com* <http://www.sqli.fr>
*Groupe SQLI**
**75 rue Marcelin Berthelot
13848 Aix en Provence Cedex 3*
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.