Return-Path: Delivered-To: apmail-incubator-jspwiki-user-archive@locus.apache.org Received: (qmail 13953 invoked from network); 29 Sep 2008 08:16:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Sep 2008 08:16:34 -0000 Received: (qmail 27817 invoked by uid 500); 29 Sep 2008 08:16:32 -0000 Delivered-To: apmail-incubator-jspwiki-user-archive@incubator.apache.org Received: (qmail 27802 invoked by uid 500); 29 Sep 2008 08:16:32 -0000 Mailing-List: contact jspwiki-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jspwiki-user@incubator.apache.org Delivered-To: mailing list jspwiki-user@incubator.apache.org Received: (qmail 27791 invoked by uid 99); 29 Sep 2008 08:16:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Sep 2008 01:16:32 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [212.227.126.186] (HELO moutng.kundenserver.de) (212.227.126.186) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Sep 2008 08:15:28 +0000 Received: from localhost (p5B2FAC08.dip0.t-ipconnect.de [91.47.172.8]) by mrelayeu.kundenserver.de (node=mrelayeu5) with ESMTP (Nemesis) id 0ML25U-1KkDvD1BPe-000604; Mon, 29 Sep 2008 10:15:59 +0200 Date: Mon, 29 Sep 2008 10:15:56 +0200 From: Florian Holeczek X-Priority: 3 (Normal) Message-ID: <19110690206.20080929101556@holeczek.de> To: Benedikt Mohrmann Subject: Re: Call Plugin via Link In-Reply-To: <48E08DE4.5050302@mail.upb.de> References: <48DFA96A.9030702@mail.upb.de> <018B8C10-6139-4354-BD08-8D4DF494973B@ecyrd.com> <48E08DE4.5050302@mail.upb.de> MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha1; boundary="----------F413E14939F1A801" X-Provags-ID: V01U2FsdGVkX1/WNSgrCydSSTPbRgl/kmbaRb6b95NDzh1nScR 8hKJWuEgdxnh2qNg4P/sSa9/bx9LKLtsmm7vr5WeCCon16r6fn wdHRzH1K+uNbnM9RyhbXg== X-Virus-Checked: Checked by ClamAV on apache.org ------------F413E14939F1A801 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hallo Benedikt, the syntax is like: ?var1=3Da&var2=3Db&var3=3Dc Regards Florian Urspr=FCngliche Nachricht vom 29.09.2008 um 10:12: > Hi, > first of all thx for your support. > I can now say more precisely what seems to be the bug. > If I add my plugin on the Main site and call the following URL=20 > "http://localhost:8080/JSPWiki/?wid=3D123" everything works quite well. > But in links like=20 > "http://localhost:8080/JSPWiki/Wiki.jsp?page=3DWIDRequestDetailsHeadLess?= wid=3D123" > the "?" is just not read. > It makes no difference if the link is=20 > "http://localhost:8080/JSPWiki/Wiki.jsp?page=3DWIDRequestDetailsHeadLess?= wid=3D123" > or=20 > "http://localhost:8080/JSPWiki/Wiki.jsp?page=3DWIDRequestDetailsHeadLess?= ??????wid=3D123". > JSPWiki always tries to create the new page=20 > "WIDRequestDetailsHeadLessWid=3D123". > As a result it seems as if the "?" is not transmitted or read when I use > links which contain the "Wiki.jsp?page" construct. > How can I change this? > Best regards > Benedikt > Janne Jalkanen schrieb: >> >> Either use a direct http link, or define an interwiki link for http:,=20 >> which allows you to use a http: shortcut (which I think has been done=20 >> below). >> >> That is, >> >> jspwiki.interWikiRef.http =3D http://%s >> >> /Janne >> >> On 28 Sep 2008, at 18:57, Benedikt Mohrmann wrote: >> >>> Hi, >>> >>> I am still trying to call a plugin via a link! >>> I already created a page called "WIDRequestDetailsHeadLess". >>> Now I created a link=20 >>> "http://localhost:8080/JSPWiki/Wiki.jsp?page=3DWIDRequestDetailsHeadLes= s?wid=3D123".=20 >>> >>> As you can see, this is a link to the created page with a http=20 >>> parameter! >>> >>> But JSPWiki always tries to create a new page called=20 >>> "WIDRequestDetailsHeadLessWid=3D123". >>> >>> Any hints about that? >>> >>> Have a nice weekend >>> Benedikt >>> >>> >>> Louis.Masters@log-net.com schrieb: >>>> Sorry for the slow response. >>>> >>>> If you could, send me your wiki pages from steps 1 and 2. I'll plug= =20 >>>> them into my site and see what happens. >>>> >>>> -Lou >>>> >>>> >>>> Benedikt Mohrmann wrote on 09/24/2008=20 >>>> 08:52:01 AM: >>>> >>>> >>>>> Hi, >>>>> >>>>> hmmm, seems a little more clear, but so far I couldn`t make it. >>>>> >>>>> Here is what I have done: >>>>> 1. Created a new page called "WIDRequestDetailsHeadLess" with the=20 >>>>> only content "[{'MyTest'}]" (where MyTest is my Plugin). >>>>> >>>>> 2. Created a link with the target=20 >>>>> "[http:WIDRequestDetailsHeadLess?wid=3D123]" on another page. >>>>> >>>>> 3. My Plugin Code: >>>>> public class MyTest implements WikiPlugin { >>>>> >>>>> public String execute(WikiContext context, Map params) >>>>> throws PluginException { >>>>> >>>>> String wid =3D context.getHttpParameter("wid"); >>>>> if("123"=3D=3Dwid){ >>>>> return "Runs"; >>>>> } >>>>> else return "Runs not"; >>>>> } >>>>> } >>>>> >>>>> The problem is that when I click on the link, the Wiki wants to=20 >>>>> create a >>>> >>>> >>>>> new page called "WIDRequestDetailsHeadLess?wid=3D123". >>>>> >>>>> Regards >>>>> >>>>> >>>>> Louis.Masters@log-net.com schrieb: >>>>> >>>>>> Yes, now that I look at my previous post, it would be nice of me=20 >>>>>> to explain it. >>>>>> >>>>>> OK, so I had the same question you had - I created a plugin and=20 >>>>>> put it >>>> on >>>>>> a page, but I needed to pass in a variable before it ran. The=20 >>>>>> trouble >>>> is, >>>>>> once you invoke the page, the plugin runs immediately and does not >>>> give >>>>>> you a chance to pass anything in. So I posted to this group and=20 >>>>>> was tipped to use a HTTP parm and then read it from the plugin=20 >>>>>> when the >>>> page >>>>>> opens. So, to clarify, here is what happens... >>>>>> >>>>>> 1. The link is clicked with a HTTP parm in the URL: >>>>>> >>>>>> [http:WIDRequestDetailsHeadLess?wid=3D40803] >>>>>> >>>>>> 2. The "WIDRequestDetailsHeadLess" is simply a page that invokes=20 >>>>>> the plugin: >>>>>> >>>>>> [{'WallyWIDDetailsPlugin'}] >>>>>> (This is the entire page!) >>>>>> >>>>>> 3. Here is the "trick"... At the beginning of the plugin is the >>>> following >>>>>> code: >>>>>> >>>>>> wid =3D c.getHttpParameter("wid"); >>>>>> >>>>>> if(wid =3D=3D null) >>>>>> { >>>>>> value =3D params.get("wid"); >>>>>> if (value =3D=3D=20 >>>>>> null||((String)value).equals("")) >>>> { >>>> >>>>>> gotError =3D true; >>>>>> } >>>>>> else >>>>>> { >>>>>> wid =3D (String)value; >>>>>> } >>>>>> } >>>>>> >>>>>> This block of code makes it available to be used from a link and from >>>> a >>>>>> form. The getHttpParameter call uses the parm from the URL while=20 >>>>>> the params.get looks for a "wid" parm from the form. >>>>>> >>>>>> A little more clear? >>>>>> >>>>>> -Lou >>>>>> >>>>>> >>>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>>> LOG-NET, Inc. >>>>>> The Logistics Network Management System >>>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>>> 230 Half Mile Road >>>>>> Third Floor >>>>>> Red Bank, NJ 07701 >>>>>> PH: 732-758-6800 >>>>>> FAX: 732-747-7497 >>>>>> http://www.LOG-NET.com >>>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>>> CONFIDENTIAL & PRIVILEGED >>>>>> Unless otherwise indicated or if obvious from the nature of the >>>> content, >>>>>> the information contained herein is privileged and confidential=20 >>>>>> information/work product. The communication is intended for the=20 >>>>>> use of >>>> the >>>>>> individual or entity named above. If the reader of this transmission >>>> is >>>>>> not the intended recipient, you are hereby notified that any=20 >>>>>> dissemination, distribution or copying of this communication is >>>> strictly >>>>>> prohibited. If you have received this communication in error,=20 >>>>>> please notify the sender immediately by telephone (732-758-6800)=20 >>>>>> or by >>>> electronic >>>>>> mail (postmaster@LOG-NET.com), and destroy any copies, electronic, >>>> paper >>>>>> or otherwise, which you may have of this communication. Thank you. >>>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>>> >>>>>> >>>>>> >>>>>> Benedikt Mohrmann 09/23/2008 10:59 AM >>>>>> Please respond to >>>>>> jspwiki-user@incubator.apache.org >>>>>> >>>>>> >>>>>> To >>>>>> jspwiki-user@incubator.apache.org >>>>>> cc >>>>>> >>>>>> Subject >>>>>> Re: Call Plugin via Link >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> Hi, >>>>>> >>>>>> first of all, thanks for the snip (it was the post I meant). >>>>>> But to be honest, I do not get the trick behind this. >>>>>> It would be very helpful, if you would send me a larger snip or=20 >>>>>> some explainations (if possible). >>>>>> >>>>>> Thanks a lot >>>>>> >>>>>> >>>>>> Louis.Masters@log-net.com schrieb: >>>>>> >>>>>> >>>>>>> I posted the solution to this back in june, but here is a snip: >>>>>>> >>>>>>> >>>>>>> OK, I may have worked out how to do this. I created another page >>>> that >>>> >>>>>>> invokes the plugin without the form (basically when the page is >>>>>>> >>>>>> rendered). >>>>>> >>>>>> >>>>>>> I added some code to the beginning of the plugin (thanks to a FAQ >>>> tip) >>>>>>> that >>>>>>> looks for a HTTP parm like so: >>>>>>> >>>>>>> wid =3D c.getHttpParameter("wid"); >>>>>>> >>>>>>> When I am linking to the page and I need to pass the wid, I use a >>>> link >>>>>>> like >>>>>>> so: >>>>>>> >>>>>>> [http:WIDRequestDetailsHeadLess?wid=3D40803] >>>>>>> >>>>>>> Or >>>>>>> >>>>>>> 39701 >>>>>>> >>>>>>> And it works great. >>>>>>> >>>>>>> >>>>>>> Let me know if this is unclear. >>>>>>> >>>>>>> -Lou >>>>>>> >>>>>>> >>>>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>>>> LOG-NET, Inc. >>>>>>> The Logistics Network Management System >>>>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>>>> 230 Half Mile Road >>>>>>> Third Floor >>>>>>> Red Bank, NJ 07701 >>>>>>> PH: 732-758-6800 >>>>>>> FAX: 732-747-7497 >>>>>>> http://www.LOG-NET.com >>>>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>>>> CONFIDENTIAL & PRIVILEGED >>>>>>> Unless otherwise indicated or if obvious from the nature of the >>>> content, >>>>>> >>>>>>> the information contained herein is privileged and confidential=20 >>>>>>> information/work product. The communication is intended for the use >>>> of >>>>>> the >>>>>> >>>>>>> individual or entity named above. If the reader of this=20 >>>>>>> transmission >>>> is >>>>>> >>>>>>> not the intended recipient, you are hereby notified that any=20 >>>>>>> dissemination, distribution or copying of this communication is >>>> strictly >>>>>> >>>>>>> prohibited. If you have received this communication in error,=20 >>>>>>> please >>>> >>>> >>>>>>> notify the sender immediately by telephone (732-758-6800) or by >>>>>>> >>>>>> electronic >>>>>> >>>>>>> mail (postmaster@LOG-NET.com), and destroy any copies, electronic, >>>> paper >>>>>> >>>>>>> or otherwise, which you may have of this communication. Thank you. >>>>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>>>> >>>>>>> >>>>>>> >>>>>>> Benedikt Mohrmann 09/23/2008 10:25 AM >>>>>>> Please respond to >>>>>>> jspwiki-user@incubator.apache.org >>>>>>> >>>>>>> >>>>>>> To >>>>>>> jspwiki-user@incubator.apache.org >>>>>>> cc >>>>>>> >>>>>>> Subject >>>>>>> Call Plugin via Link >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> is it possible to call a self-written plugin via a link? >>>>>>> So when you click on the link, the plugin is started and returns=20 >>>>>>> its output. >>>>>>> I thought I already found an option on the homepage, but today I >>>> wasn't >>>>>>> able to get it again. >>>>>>> >>>>>>> Best regards >>>>>>> Benedikt >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> >>>> >>>> >> ------------F413E14939F1A801 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIIDgYJKoZIhvcNAQcCoIIH/zCCB/sCAQMxCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHAaCC BbgwggW0MIIDnKADAgECAgMFhHQwDQYJKoZIhvcNAQEFBQAweTEQMA4GA1UEChMHUm9vdCBD QTEeMBwGA1UECxMVaHR0cDovL3d3dy5jYWNlcnQub3JnMSIwIAYDVQQDExlDQSBDZXJ0IFNp Z25pbmcgQXV0aG9yaXR5MSEwHwYJKoZIhvcNAQkBFhJzdXBwb3J0QGNhY2VydC5vcmcwHhcN MDgwNzIyMTUyNDIxWhcNMTAwNzIyMTUyNDIxWjCBjDEZMBcGA1UEAxMQRmxvcmlhbiBIb2xl Y3plazEiMCAGCSqGSIb3DQEJARYTZmxvcmlhbkBob2xlY3play5kZTEgMB4GCSqGSIb3DQEJ ARYRZmxvcmlhbkBibnYtZ3ouZGUxKTAnBgkqhkiG9w0BCQEWGmZsb3JpYW4uaG9sZWN6ZWtA Ym52LWd6LmRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA8LEfYuPM1wANxvva djWkRiGEhidYhqmZm13oe8277mP3IkyToP2+XYM4QiVgHavGYjsOvihpoG2LYINqG3Qrwu9n M8wd9jWPGLRMqNhgx/qjWaarysIyKo0LO9nr3wJ8grmbZrOe1fGk608LySbX4GfKv7jXbS9G ea31apnovz8bheLaWlCTwn/VReYqKBjDKXtNjYB095TW+q0HFYiGVo58jqzga7VJC08+spF0 iTriOJmH3UFMBYJJnwQTF8MLUKwHBevkCshty3VLS4sAO5IRKhXXCBSCm+PzP7DrLC1zyDK6 pwbVEjMH6OxjcG9arRRVCUSDP+wCSbjCx3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