Zimlet Developers Guide:Java and JSP: Difference between revisions

No edit summary
Line 59: Line 59:
</pre>
</pre>


See the JavaScript API Reference http://files.zimbra.com/docs/zimlet/zcs/6.0/jsdocs/symbols/ZmZimletBase.html
See the [http://files.zimbra.com/docs/zimlet/zcs/6.0/jsdocs/symbols/ZmZimletBase.html JavaScript API Reference] for more information.


== Useful Links ==
== Useful Links ==

Revision as of 04:17, 31 December 2009

Zdg-6-menu-icon-zimbra.jpg Introduction Zdg-6-menu-icon-green-flag.png Getting Started Zdg-6-menu-icon-terminal.png Dev Environment Setup Zdg-6-menu-icon-gear.png Developing Zimlets Zdg-6-menu-icon-advanced.jpg
Advanced Concepts
Templates
Java & JSP
Zdg-6-menu-icon-library.jpg API Specifications Zdg-6-menu-icon-checkbox.jpg Example Zimlets


This section describes how to incorporate Java and JSP with your zimlets.

JSP

JavaServer Pages (JSP) allow you to create dynamic page content with Java. The JSP pages included with your zimlet are executed on the Zimbra server.

To reference a JSP page from your zimlet, you need the page (i.e. resource) location.

If you plan to call your JSP page from the Zimlet Definition File (for example, from an <actionUrl> element), the path to the JSP is:

/service/zimlet/{zimlet-name}/{jsp-file-name}.jsp

For example, calling a JSP file named "jspfile.jsp" (located at the root of your zimlet package) from an <actionUrl> element:

<actionUrl method="get" target="/service/zimlet/com_zimbra_simplejspaction/jspfile.jsp" />

Note: if using the Development Directory, the path will include _dev. For example:

<actionUrl method="get" target="/service/zimlet/_dev/com_zimbra_simplejspaction/jspfile.jsp" />

If you plan to call your JSP page from your Zimlet Handler Object in JavaScript, you can use ZimletBaseObject.getResource(). For example:

var jspUrl = this.getResource("jspfile.jsp");

See the JavaScript API Reference for more information.

Useful Links


Verified Against: Zimbra Collaboration Suite 6.0 Date Created: 12/22/2009
Article ID: https://wiki.zimbra.com/index.php?title=Zimlet_Developers_Guide:Java_and_JSP Date Modified: 2009-12-31



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »


Jump to: navigation, search