[opencms-dev] Insight about upload.jar - [resolved]
John Bieling
info at jobisoft.de
Fri Sep 29 12:21:47 CEST 2006
Ok, that resolves my problem, here is a step by step guide on how to
build and upload a custom upoad.jsp for opencms
This works with version 6.2.2
- get the source of opencms from the cvs
- edit the opencms/build.xml file and insert the following before the
last </project>
<target name="uploadjar" depends="checklibs" if="libsAvailable"
description="Build the upload.jar">
<delete dir="${opencms.output}/upload/" />
<mkdir dir="${opencms.output}/upload/org/opencms/applet/" />
<unjar dest="${opencms.output}/upload/">
<fileset
dir="${opencms.input}/modules/org.opencms.workplace.explorer/resources/system/workplace/resources/components/upload_applet"
includes="**/upload.jar" />
</unjar>
<javac
srcdir="${opencms.input}/src-components/org/opencms/applet"
destdir="${opencms.output}/upload"
excludes="${build.excludes}"
debug="on"
optimize="on"
deprecation="on">
</javac>
<jar
jarfile="${opencms.output}/upload/uploadtemp.jar"
basedir="${opencms.output}/upload/"
includes="org/**" >
</jar>
<genkey keystore="${opencms.output}/upload/your-keystore"
validity="3650"
dname="CN=your-organization-shortname,OU=your-department,O=your-organization-fullname,L=address,S=city,C=ZH"
alias="alias" keypass="keypass" storepass="storepass" />
<signjar signedjar="${opencms.output}/upload/upload.jar"
alias="alias" jar="${opencms.output}/upload/uploadtemp.jar"
storepass="storepass" keypass="keypass"
keystore="${opencms.output}/upload/your-keystore" />
<delete file="${opencms.output}/upload/uploadtemp.jar" />
<copyfile
dest="${opencms.input}\modules\org.opencms.workplace.explorer\resources\system\workplace\resources\components\upload_applet\upload.jar"
src="${opencms.output}/upload/upload.jar" />
</target>
- run "ant uploadjar" inside of the opencms-folder (where the build-file
resides)
- a new folder "/upload/" should have been created, with a upload.jar in it.
- in opencms deactivate the upload-applet
- upload the new upload.jar to your opencms to
"/system/workplace/resources/components/upload_applet/" as a TEXT-File
- restart opencms (i usually restart tomcat)
That works,
John Bieling
(Thanks Shi Yusen for help, i now use the httpclientfiles inside
upload.jar, which resolved my last problem)
More information about the opencms-dev
mailing list