This plugin allows you to insert the contents of an attachment into the current page.

It is a direct adaptation of the [InsertPagePlugin], just it reads from an attachment instead. It uses the same parameters. {{page}} should refer to an attachment, either in the current page or, using the '/' notation, in a separate page.

I found it useful to allow the integration of external processes with the wiki - I have a script that generates a table in wiki format and uploads it to the wiki as an attachment. I can then include the table in other pages using this plugin.



* Copy to your Wiki {{WEB-INF/lib}} directory the latest {{~InsertAttachmemt.jar}} file (see attachment);
* (Optional) Update the {{jspwiki.plugin.searchPath}} in your WEB-INF/jspwiki.properties to add the package name of the ~InsertAttachment plugin. If you don't do that, you have to prefix the plugin name with its package name when using it in your page.
* Restart your servlet engine.

Example (assumes the attachement is a text file containing a table in JSPWiki table markup):\\
[{org.nascif.jspwiki.plugin.insertattach.InsertAttachment page='TableSource/runningDiary.txt'}]



|| Attribute || Value
| Main Class | {{org.nascif.jspwiki.plugin.insertattach.~InsertAttachment}}
| JSPWiki version | 2.4.x
| JDK version | 5.0 ([insertattachment-20060519.jar])\\ 1.4 ([insertattach-20060626-jdk1.4.jar])
| Contact | NascifAbousalhNeto



Thanks - I get "Unsupported major.minor version 48.0" when running this - Ideas?

--Bruce Hayward, 21-Jun-2006

You're probably running JDK 1.4, and this is compiled using JDK 1.5?

-- JanneJalkanen, 22-Jun-2006

Yes, I used JDK 1.5. Is there a preferred or recommended JDK level for plugins?

-- NascifAbousalhNeto, 22-Jun-2006

;:''Yes, JSPWiki is compiled for JDK 1.4.  Please use that...  --JanneJalkanen''


Correct - I am running:
bash-2.05# java -version
java version "1.4.2_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)

(Very limited knowledge of Java other than how to spell it)

If someone can tossed up one compiled in 1.4 - would be appreciated - what I am trying to do is convert emails with attachments to pages.


- Bruce Hayward

--[Bruce E Hayward|http://BruceEHayward], 26-Jun-2006

;: Done, see attachment.
-- NascifAbousalhNeto, 22-Jun-2006


Where do I have to extract the files?

And what do I have to write into the page?

--AnonymousCoward, 26-Apr-2007

See the sections "Installation" and "Usage".
--NascifAbousalhNeto, 26-Apr-2007