This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]



Q: How do I create anchors and link to them in a Wiki page I want to present a Table of Contents section in my page so that the viewer can simply click on the appropriate entry and be brought automatically to that section of the page. I know I could have each TOC entry as a link to a different page but I don't want that!

A: At the moment you have to use the footnotes feature. However, on 2.2 every heading also generates a named anchor, so you can build a table of contents using that.

Print-friendly format?#

Q: Does jspwiki support a print-friendly mode? If it can, how do I use it?

A: No built in support for this quite yet, but see Hide Menu for simple modifications that can make it possible.

Can we have text alignment?#

Q: Can align text in JSPWiki? I mean for example can titles be centered at their line?

A: In 2.0, you have to enable raw HTML, but this is a security risk. However, in 2.1 it is already possible to apply any CSS style to any block of text. For example

!This text is centered.
Would produce centered headline "This text is centered".

How do I configure my JSPWiki to handle JPG and GIF inline images?#

Testing JSPWiki for the first time, and mapping it against the feature set in UseMod (a popular engine I must now give up), I noticed immediately that GIF and JPG image formats are not supported in inline image linking.

Would it take much to include those formats? If you go to you'll see that the majority of images that Google finds on the net are either GIF or JPG. Third popular seems to be PNG. -- MatthewSimpson

Check out the jspwiki.translatorReader.inlinePattern -property in To support inlining of GIF images, you just add

jspwiki.translatorReader.inlinePattern.gif = *.gif

to your By default, GIF inlining is disabled as an ongoing attempt to discourage people from using it :-).

-- JanneJalkanen (This should really be a JSPWikiFAQ)... (and now it is! :-) -- MatthewSimpson)

How to change the leftUpper icon to mine own?#

Q: I want to put the mine own logo on the leftUpper corner. But, there is always a JSPWiki there. How to deal with this? Or, it must be there?

A: Create your own WikiTemplate. You can modify it at will and change it look like anything you'd ever want.


Q: Is it possible to add a comment to a version when you change something (for pages as well as for attachments) as seen on wikipedia?

-- ChristianEy

A: Not currently, but it would be a nice feature. If added, it would also be nice to see the comments shown in the recent changes/etc. --MichaelGentry

Is there any way to escape the interpretation of a numerical link as a footnote, in order to have Wiki pages with all numerical names? In other words, I created a page named 200403, but can't link to it because the Wiki thinks [200403] is an attempt to create a footnote.#

Hmm, not that I've come across, we had some pages like that that were relly dates and used a shortened english month name in them like [2004 Mar 04]. You could put a dash in or after the number, that would force a page link rather than a footnote. Like 2004-03 or 200403- but that's a little wierd.
So I guess that's a kind of a bug—a string of digits is a valid WikiName for which the markup cannot generate a link.


Q: Is there a way to put the left menu into a frame, to get a permanently visible menu?

A: I imagine it's possible; you'd have to tweak .../templates/default/ViewTemplate.jsp and base it on frames instead of a table. I found it simpler to modify my personal template to use just DIV tags and CSS (position: fixed) to render a fixed menu. --ebu

Is there a way I can dump all the pages to HTML#

I would like to set up a Wiki internally but would like to periodically publish its contents on to the Web as plain old HTML pages. Any thoughts on the best approach ?

Two possible solutions come to mind:

  • Have a spider crawl it all and publish it (for example wget might work well)
  • Use Hula by MahlenMorris to fetch the contents of all pages using XML-RPC, then apply them in your own templates.

-- JanneJalkanen

Implicit line breaks#

Q: JSPWiki is pretty much perfect for my uses, but one thing I find annoying is having to specify a line break \ \. I prefer the classic Wiki way of inserting breaks on a newline. Id there any way I can change this?


A: No.

For all intents and purposes it's far better to just leave a blank line between the paragraphs. The line break character should be used very sparingly. The resulting WikiMarkup looks far more readable anyway if you use blank lines instead of line breaks.

The other problem is that line breaks are not visible on screen while the user is editing. This may cause a lot of confusion to newbies, if the lines break at seemingly random places.

If you really, really want it, you can just easily modify TranslatorReader to emit a <br> when it meets a newline.

-- JanneJalkanen

Line breaks are not used that sparingly for our purposes, since our wiki is rather technical in nature. But thanks for the advice, I will make that change. If I make it a switch in the config file, would you like it submitted back to the main project? Thanks!

Update: Okay, I implemented this and works great. Thanks for getting me started. It actually now works with both explicit and implicit line breaks, so our current pages are not effected. If any body wants the changes, feel free to let me know.

-- KieronWilkinson

Raw HTML?#

Q: How do you allow raw html in wbepages? I've been reading through the help files and the text formatting files and can't find it. I've found references to the fact that it has been added on these pages: WikiMarkupDevelopment and AllowingRawHTML but there is no link to any page telling you how to actually start using raw html...

A: Please see Allowing Raw HTML now for the instructions.


Q: What's the easiest way to be able to color cells in a table?


Q: I want to tweak my wiki page for it to work more the way i want it to. I have password restricted the edit page but i want to be able to remove the upload a file link from the view page and add it to the edit page. Also is there any way of removing the paper clip from next to an attachment?


A: Yes, replace the images/attachment_small.png with a transparent 1x1 png :-). You can modify the templates at will, I just recommend that you make your own copy of the "default" template and modify that.

-- JanneJalkanen

Text formatting#

Q: Is there a general way to escape the formatting-significant characters? I see that doubled left-square-brackets gives you a literal left square bracket, but what about the others? (Immediate source of the question is this: I'm trying to build a page with an "ls -l" directory listing, where some of the files have 600 permissions, hence runs of four or more dashes, hence I'm seeing (unwanted) HRs in the output). Just getting into JSPWiki, and I apologize in advance if the answer's staring me in the face. Thanks, MarkFrancillon - Sept. 20, 2003.

Three braces (like this: { { {, but no spaces)

    Like this ----  Can do [anything]
allows you to put anything there in between without it being parsed.

-- JanneJalkanen

Thanks. Actually I should have said that I have HTML-interpretation on, and that my text is in the middle of a bunch of HTML markup. But I see that if I get inside that markup, what you say about wrapping in triple-curly-braces still works. Hmm, time to look at TranslatorReader, I think, and see how you're doing all this... - Mark.

The problem with the three braces is that it puts the contents inside a pre tag, which puts it in its own block. I can't see a way to refer to, say, a Windows UNC path (starts with two backslashes) inside a paragraph.

-- LachlanODea

Ah, okay. In 2.1 you can do this, just don't put the three braces as the first ones on the line, since it emits a <span> instead of a <pre>-tag.

-- JanneJalkanen

I don't like the way it works because I always seem to get a linebreak after the }}}. Is there a way to prevent this?

-- ChristophGrimmer

That this is because the </pre> HTML tag generates spacing, and then you get the <br> linebreak for the normal paragraphing. You would have to make TranslatorReader more intelligent by making sure it only emitted line breaks if it is not after certain tags. Of course, you could just nest up your Wiki page such as:

   A paragraph

   { { {
   } } }Start of next paragraph

But I guess not very nice...

-- KieronWilkinson

Special characters#

Q: What is your recommendation for changing the translation scheme of special charactes in references, as in [?????????

--rsc 3.9.03

A: You are talking about scripting, yes? I would imagine that there is some way that the scripts can be written to escape the percent signs, but I don't know enough about Windows to say how to do it. Perhaps someone else would be able to help here? One possibility would be to install a better scripting environment such as cygwin or Python.

A hackish solution would be to simply change the '%'-sign to something else in the FileSystemProvider. You would need to do your own encoding at that point, though.

-- JanneJalkanen

Thanks Janne. Done it that way:

  1. In I introduced a new property jspwiki.percentsign which defaults to the percent sign.

  2. In I changed the methods mangleName and unmangleName to replace the percent sign by the value of the property jspwiki.percentsign, in mangleName after the pagename gets encoded, in unmagleName prior to decoding the filename.
  3. Tested, seems to work.

I placed the following comment in

#  When it comes to special charaters that should be used inside a filename
#  JSPWiki encodes this charaters to their hex representation within the
#  chosen character set preceded by a percent sign. 
#  Unfortunately some operating system - especially the MS-Windows family -
#  do not handle percent signs properly in all circumstances.
#  For this situation you can choose a different character string in favor of

#  the percent sign. 
#  You have to choose this string with care as it should not be part 
#  of any JSPWiki pagename for other purposes than replacing the
#  percent sign. Otherwise the pagename gets garbled when decoded back
#  to the original representation.
#  So if you choose the double underscore for instance, make sure you'll
#  never use double underscore in any JSPWiki pagename.
#  And never use an underscore followed by a special character.

#  jspwiki.percentsign = 

The restrictions are somewhat objectionable. They could be lowered if I would use regexp instead of String.replace and check wether a hex code follows the percent sign.

--rsc 8.9.03

Add new attachment

Only authorized users are allowed to upload new attachments.
« This particular version was published on 22-May-2004 00:02 by