Hi Have you looked at the IfPlugin - http://www.jspwiki.org/wiki/IfPlugin which can be used as in this example: [{If page='TestPage' exists='true' Page "TestPage" exists.}]
Gavin Ps: As I recall the blank line below the if is necessary > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of > Weijian Fang > Sent: 24 July 2008 11:51 > To: [email protected] > Subject: Is there a way to test whether a wiki page exists > inside a JSP page? > > Hi, > > Is there a way to test whether a wiki page exists inside a JSP page? > e.g., using those <wiki:xxx> markup? > > I think I should describe the reason I ask the above > question. I am using PDFPlugin that allows a pdf file be > created from the wiki page. > It is great except when the wiki page has not been created > yet, displaying pdf causes the following exception. Ant that > is displayed in the browser, which is very ugly. So if I can > make sure that only existing wiki pages have the link of > "view pdf", the problem will be mostly solved. Any > suggestions are welcome! Many thanks! > > HTTP Status 500 - > > type Exception report > > message > > description The server encountered an internal error () that > prevented it from fulfilling this request. > > exception > > java.lang.NullPointerException > com.ecyrd.jspwiki.WikiEngine.getHTML(WikiEngine.java:1409) > com.ecyrd.jspwiki.WikiEngine.getHTML(WikiEngine.java:1444) > com.ecyrd.jspwiki.WikiEngine.getHTML(WikiEngine.java:1424) > > com.palbrattberg.jspwiki.Wiki2PDFServlet.doGet(Wiki2PDFServlet > .java:186) > javax.servlet.http.HttpServlet.service(HttpServlet.java:690) > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(Ur > lRewriteFilter.java:738) > > note The full stack trace of the root cause is available in the Apache > Tomcat/5.5.25 logs. > Apache Tomcat/5.5.25 > > > > Cheers, > > Weijian > > Read our disclaimer at: http://www.picknpay.co.za/pnp/view/pnp/en/page5093? If you don't have web access, the disclaimer can be mailed to you on request. Disclaimer requests to be sent to [EMAIL PROTECTED]
