Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Zimlets

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-01-2010, 06:58 AM
New Member
 
Posts: 4
Default disable zimlet JSP caching

I am writing a zimlet in JSP which has user properties. When these properties are changed by the user in zimbra, the changes do not occur in the JSP output (the JSP code access them directly).

includes.jsp
PHP Code:
<%@ taglib uri="/WEB-INF/zimbra.tld" prefix="z" %>
<%!
    private 
String property;

    public 
void init(String prop)
    {
        
property prop;
    }

    [ 
functions that use property ]

%>

<
z:property zimlet="..." action="list" var="props"/>

<%
    
response.setHeader("Cache-Control""no-cache");
    
response.setHeader("Pragma""no-cache");
    
response.setDateHeader("Expires", -1); 

    
Map<StringStringprop = (Map<StringString>) pageContext.getRequest().getAttribute("props");
    
String property prop.get("property");
    
init(property);
%> 
main1.jsp, main2.jsp, etc
PHP Code:
<%@ include file="includes.jsp" %>
<%
    [ 
code that calls functions from includes.jsp ]
%> 
My problem is that when the user changes property from the zimlet settings (double clicking the zimlet in the panel), the output of any of the files mainX.jsp is the same as if the property didn't change.

I also ran the following to add the zimbra taglib to JSP in ZCS6:

Code:
# Copy the  <env-entry> sections from /opt/zimbra/jetty/webapps/zimbra/WEB-INF/web.xml
# to /opt/zimbra/jetty/webapps/zimlet/WEB-INF/web.xml

ln -s /opt/zimbra/jetty/webapps/service/WEB-INF/zimbra.tld /opt/zimbra/jetty/webapps/zimlet/WEB-INF
ln -s /opt/zimbra/jetty/webapps/service/WEB-INF/lib /opt/zimbra/jetty/webapps/zimlet/WEB-INF
ln -s /opt/zimbra/jetty/webapps/zimbra/WEB-INF/tags /opt/zimbra/jetty/webapps/zimlet/WEB-INF
ln -s /opt/zimbra/jetty/webapps/zimbra/WEB-INF/tlds /opt/zimbra/jetty/webapps/zimlet/WEB-INF
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.