Results 1 to 7 of 7

Thread: [SOLVED] Zimbra send back the who .jsp file???

  1. #1
    jason719 is offline Active Member
    Join Date
    Aug 2009
    Posts
    26
    Rep Power
    5

    Default [SOLVED] Zimbra send back the who .jsp file???

    Hi ,

    I wrote a zimlet JSP. Basically it generates a html file and send back.
    After the request is sent from zimlet via AjxRpc, the whole JSP file as text is sent back (I can see the whole JSP file via the callback function which shows the "result.text").

    seems the .jsp file is not recognized and compiled by the zimbra.

    Did I miss any configuration or anything?

    Thanks
    Jason

    FYI. here is the code

    com_zimbra_scs.prototype._testjsp =
    function()
    {
    var url = this.getResource("queryPres.jsp");
    var params= ["who=" + AjxStringUtil.urlComponentEncode("unknownyet"),
    "tags=" + AjxStringUtil.urlEncode ("noidea")
    ].join ("&");
    var callback = new AjxCallback (this,this.onDoneGetPres);
    AjxRpc.invoke(params,url+"?"+params,null,callback, true);
    };

    com_zimbra_scs.prototype.onDoneGetPres =
    function(result)
    {
    alert("result is " + result.text);
    }


    //queryPres.jsp

    <html>
    <body>
    JSP -> <&#37; out.println("hello world!"); %>
    </body>
    </html>
    Last edited by jason719; 09-14-2009 at 01:42 PM.

  2. #2
    rrao is offline Zimbra Employee
    Join Date
    Sep 2005
    Posts
    187
    Rep Power
    9

    Default

    Quote Originally Posted by jason719 View Post
    Hi ,

    I wrote a zimlet JSP. Basically it generates a html file and send back.
    After the request is sent from zimlet via AjxRpc, the whole JSP file as text is sent back (I can see the whole JSP file via the callback function which shows the "result.text").

    seems the .jsp file is not recognized and compiled by the zimbra.

    Did I miss any configuration or anything?

    Thanks
    Jason

    FYI. here is the code

    com_zimbra_scs.prototype._testjsp =
    function()
    {
    var url = this.getResource("queryPres.jsp");
    var params= ["who=" + AjxStringUtil.urlComponentEncode("unknownyet"),
    "tags=" + AjxStringUtil.urlEncode ("noidea")
    ].join ("&");
    var callback = new AjxCallback (this,this.onDoneGetPres);
    AjxRpc.invoke(params,url+"?"+params,null,callback, true);
    };

    com_zimbra_scs.prototype.onDoneGetPres =
    function(result)
    {
    alert("result is " + result.text);
    }


    //queryPres.jsp

    <html>
    <body>
    JSP -> <% out.println("hello world!"); %>
    </body>
    </html>
    Couple of things:
    1. When you are doing GET, the first params should be null, since youare nor passing anything in the body.
    AjxRpc.invoke(params,url+"?"+params,null,callback, true);

    2. Make sure to NOT include queryPres.jsp in the cofig_template.xml file

    3. Are you using _dev mode? or have you deployed it using zmzimletctl?
    Bugzilla - Wiki - Downloads - Before posting... Search!

  3. #3
    jason719 is offline Active Member
    Join Date
    Aug 2009
    Posts
    26
    Rep Power
    5

    Default

    Quote Originally Posted by rrao View Post
    Couple of things:
    1. When you are doing GET, the first params should be null, since youare nor passing anything in the body.
    AjxRpc.invoke(params,url+"?"+params,null,callback, true);

    I'll try that

    2. Make sure to NOT include queryPres.jsp in the cofig_template.xml file


    It is not included.

    3. Are you using _dev mode? or have you deployed it using zmzimletctl?
    Not _dev mode, I deployed it using zmzimletctl

  4. #4
    jason719 is offline Active Member
    Join Date
    Aug 2009
    Posts
    26
    Rep Power
    5

    Default

    I even tred from the browser to type the JSP's url, it 's the same behavior.

  5. #5
    rrao is offline Zimbra Employee
    Join Date
    Sep 2005
    Posts
    187
    Rep Power
    9

    Default

    Quote Originally Posted by jason719 View Post
    I even tred from the browser to type the JSP's url, it 's the same behavior.
    I just realized you are using RC1, it has a little odd way of talking to JSPs. Its been fixed in GA. Please use 6.0 GA and if you still get into trouble, please let us know.
    Bugzilla - Wiki - Downloads - Before posting... Search!

  6. #6
    jason719 is offline Active Member
    Join Date
    Aug 2009
    Posts
    26
    Rep Power
    5

    Default

    Weird though usually the forum send me the notification if anyone replies. Somehow it didnít this time.

    Anyway, I got the GA version for RHRL installed on my system (I only have CentOS).
    Installation seems fine until when I tried to start it. (a couple of services failed to start)


    [zimbra@zimbra bin]$ ./zmcontrol status
    Host zimbra.lab.local
    antispam Running
    antivirus Running
    convertd Running
    imapproxy Stopped
    zmnginxctl is not running
    ldap Running
    logger Running
    mailbox Stopped
    zmmtaconfig is running.
    mailboxd is not running.
    zmmailboxdctl is not running
    memcached Running
    mta Stopped
    postfix is not running
    snmp Running
    spell Stopped
    zmapachectl is not running
    stats Running
    [zimbra@zimbra bin]$

  7. #7
    jason719 is offline Active Member
    Join Date
    Aug 2009
    Posts
    26
    Rep Power
    5

    Default

    Hi,

    Now I trie to install open source GA on Fedora 11 which is official supported. ldap rpm failed to be installed.

    Then installation got canceled. :-(

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. zimbra opesource Backup Script Problem!
    By tashi in forum Administrators
    Replies: 4
    Last Post: 03-30-2009, 11:49 PM
  2. [SOLVED] parts_decode_ext error
    By jsabater in forum Administrators
    Replies: 7
    Last Post: 10-13-2008, 07:24 AM
  3. zimbra install with perpetually broken logger/stats
    By jptech in forum Installation
    Replies: 8
    Last Post: 09-29-2008, 02:33 PM
  4. Replies: 12
    Last Post: 02-25-2008, 07:28 PM
  5. [SOLVED] Clamav problem ? What's happening ?
    By aNt1X in forum Installation
    Replies: 23
    Last Post: 02-14-2008, 05:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •