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 07-20-2006, 12:30 AM
Junior Member
 
Posts: 6
Default how to invoke a servlet from zimlet

hi
is it possible to invoke a servlet from zimlet
if so, where should i place the .class file in apache-tomcat and what is the url i have to pass in the zimlet
i tried to place the .class file in ,apache-tomcat/webapps/service/WEB-INF/classes and by default the port number for apache-tomcat is 8080 but when i pass the url as http://localhost/....
iam getting permission denied error
should i make any changes in apache-tomcat/conf file

thanking you
with regards
srinath
Reply With Quote
  #2 (permalink)  
Old 07-20-2006, 06:20 PM
Zimbra Employee
 
Posts: 4,792
Default

Best way is to write a JSP and put that JSP in your Zimlet zip file. It will get deployed with the Zimlet. In 3.2 you can also include a .jar file that will get added to the class path.
__________________
Bugzilla - Wiki - Downloads - Offline Client
Reply With Quote
  #3 (permalink)  
Old 07-21-2006, 03:40 AM
Junior Member
 
Posts: 6
Default

hi kevin
thanks for the reply but still iam having a doubt as to where i have to place the servlet(.class file)
iam using zimbra 3.1.3 version
thanking you
with regards
srinath
Reply With Quote
  #4 (permalink)  
Old 07-24-2006, 06:21 PM
Junior Member
 
Posts: 6
Default

hi kevin
thank you verymuch
i was able to invoke the servlet directly
with regards
srinath
Reply With Quote
  #5 (permalink)  
Old 10-01-2008, 04:57 AM
Intermediate Member
 
Posts: 17
Default Could you please tell me how to do invoke servlet from Zimlet?

Could you please tell me how to do invoke servlet from Zimlet? I have been searching this from a long time. I need it very urgently.
Reply With Quote
  #6 (permalink)  
Old 10-01-2008, 05:35 AM
New Member
 
Posts: 4
Default

look at the ZimletJS and ZimletJSP topics I have been working on.

Reply With Quote
  #7 (permalink)  
Old 10-01-2008, 06:28 AM
Active Member
 
Posts: 25
Default

Quote:
Originally Posted by srinath View Post
hi kevin
thank you verymuch
i was able to invoke the servlet directly
with regards
srinath
Can you or someone explain how do you get it?
I would like to invoke a servlet from a zimlet.
Reply With Quote
  #8 (permalink)  
Old 10-02-2008, 11:47 PM
Intermediate Member
 
Posts: 17
Default I want to invoke Servlet not jsp

Hello SvenDowideit,

I don't want JSP. Instead I would like to invoke a servlet directly from Zimlet.

Hello Srinath,

I saw your reply in which you have said that you were able to invoke servlet from Zimlet. So could you please tell how you did that?
Reply With Quote
  #9 (permalink)  
Old 10-03-2008, 04:51 AM
Junior Member
 
Posts: 6
Default

Anuradha,
Sorry for my late reply
1) write your servlet program and place it in the zimbra server's tomcat folder "tomcat home directory/webapps/root/web-inf/classes"
2) in your zimlet code specifiy the path(url) of the servlet
cheers
srinath
Reply With Quote
  #10 (permalink)  
Old 01-12-2009, 05:28 AM
Junior Member
 
Posts: 7
Default

Hi srinath and KevinH

If I have a working servlet on my local machine (for starters just outputting static html code), and copy the war file to the zimbra server, I can't locate it with a browser.

In the WAR file is the class file WEB-INF/classes/echotest/echo.class, and it's placed in /opt/zimbra/jetty/webapps/service/echotest.war on the server

The servlet cannot be found through a browser (tried [hostname]/service/echotest/echo and a whole bunch of other combinations), and yes, it does have a doGet() method.

Same goes for copying the .class file directly to /opt/zimbra/jetty/webapps/service/WEB-INF/classes

Kevin's suggestion about putting stuff in the zimlet zip works perfectly for jsp files, but a servlet .war file in the zimlet zip is still not deployed or reachable, though it seems to be the most logical way to set things up.
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.