Hi John, Thanks. It works. Now I will enhance my plugin for more parameters and then distribute it.
Regards, Trupti Patil Volkar, John M. wrote: > > To open something on the *client* machine; you need to run code in their > browser. All plugins are executed server-side to produce HTML output > which is transferred to the browser. > > One option to explore is to have the plugin produce a snippet of > javascript which will open a new window for the desired URL. This will > be blocked by popup blockers, but is the only idea which I have for you. > > You can look at the RedirectPlugin and tweak it to open a new window. > > http://www.jspwiki.org/wiki/RedirectPlugin > > Regards, > John Volkar > > -----Original Message----- > From: TruptiP [mailto:[email protected]] > Sent: Wednesday, January 28, 2009 4:32 AM > To: [email protected] > Subject: New handler to handle form input > > > Hi, > > I tested my handler to handle the input from form and invoke a external > URL but it works only on my machine. It doesn't work out when others > access the jspwiki and tried to invoke url > > I used 2 methods to invoke URL > 1. > Desktop d = Desktop.getDesktop(); > try{ > URI u = new URI(url); > d.browse(u); > } > 2. > cmd = "rundll32 url.dll, FileProtocolHandler "+url; > Runtime e = Runtime.getRuntime(); > e.exec(cmd); > > But in both cases it takes runtime environment. And handler is running > on my machine which acts as server machine for jspwiki. So it is not > able to open browser on other/client machine but when some one tries to > access it, browser window get open on my desktop. > > So now please tell me is there any way to achieve it.(using servlet or > jsp) > > Janne--- please advice if you have any idea or suggestions. > > Thanks and Regards, > Trupti Patil > > > > > > Fischer, Nicola (ORISA Software GmbH) wrote: >> >> Hi >> >> You can try the full link on the wikipage just to check if your class >> was loaded. >> >> F.e. >> >> [{com.ingenta.jspwiki.plugin.js.JSPlugin}] >> >> Regards, >> Nic >> >> -----Ursprüngliche Nachricht----- >> Von: TruptiP [mailto:[email protected]] >> Gesendet: Freitag, 23. Januar 2009 15:32 >> An: [email protected] >> Betreff: Re: AW: AW: New handler to handle form input >> >> >> Hi All, >> >> Now every problem is solved and i m ready with JAR file but when I >> followed the step and used it. >> >> I got following error >> >> Could not find plugin ExternalServerLink >> >> I placed jar file in web-inf/lib directory of jspwiki and set search >> path in jspwiki.properties file >> >> as com.trupti.jspwiki.handler.est.ExternalServerLink >> >> Now please help me if i am missing any step >> >> >> Regards, >> trupti >> >> >> >> >> >> >> >> >> >> >> TruptiP wrote: >>> >>> Hi All, >>> >>> As I already told you i am new to java. >>> >>> While compiling the java program which i have written as handler i >>> got following type of error. >>> >>> ExternalServerLink.java:10: package com.ecyrd.jspwiki does not exist >>> import com.ecyrd.jspwiki.WikiException; >>> ^ >>> >>> >>> I have set path variable correctly. Even I placed jspwiki.jar file >>> from jspwiki/web-inf/lib to bin and lib folder of jdk. >>> >>> Still I get same error. >>> My package is >>> com.trupti.jspwiki.handler.ExternalServerLink >>> >>> My programme name is ExternalServerLink.java and class is >>> ExternalServerLink >>> >>> Please tell me if i am missing any step. >>> >>> Thanks and regards, >>> Trupti Patil >>> >>> >>> >>> TruptiP wrote: >>>> >>>> Hi >>>> >>>> I think I got it. >>>> I can use >>>> Desktop.browse(URI) >>>> OR >>>> Runtime.getRuntime().exec("rundll32 url.dll, >>>> FileProtocolHandler", "http://www.sun.java.com"); >>>> >>>> I will try it out tommorrow and let you know the result. >>>> >>>> Thanks for help. >>>> >>>> Regards, >>>> Trupti >>>> >>>> >>>> >>>> TruptiP wrote: >>>>> >>>>> Hi >>>>> >>>>> Yes I reached upto that point only. >>>>> >>>>> I know URL object will create url for me. >>>>> But how to open that URL in same page or new page. >>>>> >>>>> After seraching a lot every where only one method is given i.e. >>>>> also with the help of applet only. >>>>> >>>>> No where written how to just open a new browser window to show >>>>> content of this url.(using java and not applet) >>>>> >>>>> Anyways thanks for ur help. >>>>> If you know about it please let me know. I am working on it from my > >>>>> side but ur help will give speed to it. >>>>> >>>>> Thanks and Regards, >>>>> Trupti >>>>> >>>>> >>>>> >>>>> Fischer, Nicola (ORISA Software GmbH) wrote: >>>>>> >>>>>> Hi, >>>>>> >>>>>> Have you had a look into the NewPageHandler.java? >>>>>> >>>>>> It shows you how to read the params you have definied in the form. >>>>>> >>>>>> From here, you can start to make a urlCall >>>>>> (http://java.sun.com/j2se/1.4.2/docs/api/java/net/URL.html) >>>>>> >>>>>> Hope that helps. >>>>>> >>>>>> Regards, >>>>>> Nicola >>>>>> >>>>>> -----Ursprüngliche Nachricht----- >>>>>> Von: TruptiP [mailto:[email protected]] >>>>>> Gesendet: Donnerstag, 22. Januar 2009 13:18 >>>>>> An: [email protected] >>>>>> Betreff: Re: AW: New handler to handle form input >>>>>> >>>>>> >>>>>> Hi >>>>>> >>>>>> I want to transfer the input value in "n" to url as parameter. But > >>>>>> this feature is not implemented in jspwiki. >>>>>> That url is external link and not the jspwiki internal link. >>>>>> >>>>>> So some how i need to cache the url and input parameter and need >>>>>> to pass to handler and then handler will open a new / same window >>>>>> with this url. >>>>>> >>>>>> [{FormOpen form='sprform' hide='onsuccess' method='post' >>>>>> submit='http://www.someurl.com?}] >>>>>> number [{FormInput type='text' name='n'}] [{FormInput > type='submit' >>>>>> value='Submit, please' name='submit'}] [{FormClose}] >>>>>> >>>>>> >>>>>> Thanks and Regards, >>>>>> Trupti Patil >>>>>> >>>>>> >>>>>> Fischer, Nicola (ORISA Software GmbH) wrote: >>>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> In this case the NewPageHandler will be your choice. >>>>>>> >>>>>>> http://www.jspwiki.org/wiki/NewPageHandler >>>>>>> >>>>>>> Regards, >>>>>>> Nicola >>>>>>> >>>>>>> -----Ursprüngliche Nachricht----- >>>>>>> Von: TruptiP [mailto:[email protected]] >>>>>>> Gesendet: Mittwoch, 21. Januar 2009 11:09 >>>>>>> An: [email protected] >>>>>>> Betreff: New handler to handle form input >>>>>>> >>>>>>> >>>>>>> Hi All, >>>>>>> >>>>>>> I want to write a handler which will forward form's input to the >>>>>>> external url as parameter value. >>>>>>> >>>>>>> As I am newbie to java. Any help regarding this will be > appreciated. >>>>>>> >>>>>>> Thanks and Regards, >>>>>>> Trupti >>>>>>> -- >>>>>>> View this message in context: >>>>>>> http://www.nabble.com/New-handler-to-handle-form-input-tp21580234 >>>>>>> p >>>>>>> 2158 0234.html Sent from the JspWiki - User mailing list archive >>>>>>> at Nabble.com. >>>>>>> >>>>>>> >>>>>>> >>>>>>> ____________ >>>>>>> Virus checked by G DATA AntiVirus >>>>>>> Version: AVF 19.229 dated 21.01.2009 >>>>>>> >>>>>>> >>>>>> >>>>>> -- >>>>>> View this message in context: >>>>>> http://www.nabble.com/New-handler-to-handle-form-input-tp21580234p >>>>>> 2 1603044.html Sent from the JspWiki - User mailing list archive >>>>>> at Nabble.com. >>>>>> >>>>>> >>>>>> >>>>>> ____________ >>>>>> Virus checked by G DATA AntiVirus >>>>>> Version: AVF 19.229 dated 21.01.2009 >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/New-handler-to-handle-form-input-tp21580234p2162 >> 5398.html Sent from the JspWiki - User mailing list archive at >> Nabble.com. >> >> >> >> ____________ >> Virus checked by G DATA AntiVirus >> Version: AVF 19.230 dated 22.01.2009 >> >> > > -- > View this message in context: > http://www.nabble.com/New-handler-to-handle-form-input-tp21580234p217024 > 87.html > Sent from the JspWiki - User mailing list archive at Nabble.com. > > > > -- View this message in context: http://www.nabble.com/New-handler-to-handle-form-input-tp21580234p21721718.html Sent from the JspWiki - User mailing list archive at Nabble.com.
