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 01-22-2008, 12:11 PM
Starter Member
 
Posts: 2
Default Reference a local jsp page in a zimlet

Hey, not to sound cliche, but I'm a zimlet newbie. I was wondering if anyone knows how to reference a local JSP page in the actionURL tag? The page is packaged inside of the zimlet zip file. Here's the code that I have. This program brings up a JSP page when you click a sequence of 3-6 digits in an email:

<zimlet name="com_zimbra_anotherjspzimlet" version="1.0" description="anotherjspzimlet">
<!-- An attempt at an example zimlet file using jsp-->
<contentObject>
<matchOn>
<regex attrs="ig">\d{3,6}</regex>
</matchOn>
<toolTipText>
Click on the site number to view it's information.
</toolTipText>
<onClick>
<canvas type="window" width="800" height="600"/>
<actionUrl target="/service/zimlet/com_zimbra_anotherjspzimlet/anotherjsppage.jsp">
<param name="myNumber">${src.objectContent}</param>
</actionUrl>
</onClick>
</contentObject>
</zimlet>
Reply With Quote
  #2 (permalink)  
Old 01-22-2008, 01:48 PM
Zimlet Guru & Moderator
 
Posts: 467
Default

Quote:
Originally Posted by newtonh20 View Post
Hey, not to sound cliche, but I'm a zimlet newbie. I was wondering if anyone knows how to reference a local JSP page in the actionURL tag? The page is packaged inside of the zimlet zip file. Here's the code that I have. This program brings up a JSP page when you click a sequence of 3-6 digits in an email:

<zimlet name="com_zimbra_anotherjspzimlet" version="1.0" description="anotherjspzimlet">
<!-- An attempt at an example zimlet file using jsp-->
<contentObject>
<matchOn>
<regex attrs="ig">\d{3,6}</regex>
</matchOn>
<toolTipText>
Click on the site number to view it's information.
</toolTipText>
<onClick>
<canvas type="window" width="800" height="600"/>
<actionUrl target="/service/zimlet/com_zimbra_anotherjspzimlet/anotherjsppage.jsp">
<param name="myNumber">${src.objectContent}</param>
</actionUrl>
</onClick>
</contentObject>
</zimlet>
Take a look at Zimbra HTML sample Zimlet (IIRC).; It uses a JSP page if I recall correctly.
Reply With Quote
  #3 (permalink)  
Old 01-25-2008, 04:07 AM
Zimlet Guru & Moderator
 
Posts: 265
Default

I don't understand why you ask this question and give yourself the example that answer it.
You just have to use :
<actionUrl target="/service/zimlet/name-of-the-zimlet/name-of-the-jsp-page.jsp">
Reply With Quote
  #4 (permalink)  
Old 01-29-2008, 06:43 AM
Starter Member
 
Posts: 2
Default Example Doesn't Work

I tried that and it didn't work. We're ending up just putting the page on one of our intranet servers and accessing it that way.
Reply With Quote
  #5 (permalink)  
Old 01-29-2008, 06:58 AM
Zimlet Guru & Moderator
 
Posts: 265
Default

It didn't work? Did you put your jsp in the zimlet? In the folder where you have your xml definition file. If not, it is normal it didn't worked.

If it is not in the same folder, you can try with an url like file://path-to-your-jsp-file to access a local file (I never tested it through).
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.