A common problem after your first installation is the following error message when attaching files to a page:

The requested URL /JSPWiki/attach was not found on this server.

The usual reason is that you haven't enabled attachments, or that you haven't specified the place to store attached files. You will need to edit your jspwiki.properties and check the following two items:

  • Make sure that you have uncommented the entry jspwiki.attachmentProvider = BasicAttachmentProvider
  • Make sure that you have specified a valid, existing directory for entry jspwiki.basicAttachmentProvider.storageDir

The attachment directory can be the same as the page provider directory. Note that the user your JSPWiki process is running as needs to have both read and write access to that directory.

You will need to restart your JSPWiki application after making these changes.

Note: With JSPWiki v2.4.0-beta, one has to login to add an attachment. Not very intuitive. Is it?


Q: It's still not working. I've checked that the attachment dir exists, the access rights are correct, ...

In cases like this, you need to tell us a lot more about your server setup. Are you running just using a JSP container? Is it Tomcat, Jetty, Websphere, something else? Does it serve content directly, or through some kind of proxy (e.g. an Apache front-end)? What errors do you get in the log files of both the JSP container and the JSPWiki webapp?

As a first step, check your web.xml and server logs. It may be that Tomcat (or whatever you might have) is not detecting the servlet properly. Check that you have the correct definitions from a fresh web.xml file from the JSPWiki distribution.

In case of an Apache front-end and mod_jk, check that you are mapping the necessary paths to tomcat. Just mapping the JSP pages is insufficient - you also must map other things like /attach/, /RPC2/. See the example.


Q: "It works well when I use English. But it doesn't work when I use Chinese."


Q:What is "HTTP Status 404 - Attachment 'UserPreferences', version -1 does not exist."

A: Standard HTTP error message. We return 404, as any proper web server should.


Note Gregor: The attached file only contains the word "prueba" - not very appropriate as an example for a mod_jk sample...

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
txt
ideas 1.txt 0.1 kB 1 19-Jan-2006 13:45 192.18.42.11
« This page (revision-13) was last changed on 23-Jun-2006 09:20 by Janne Jalkanen