The customized properites file is: jspwiki-custom.properties

This should be located in <tomcat>/webapps/wiki/WEB-INF/classes

You can change the workDir, or just the log file:
jspwiki.workDir=/opt/digitalspider/jspwiki/wikis/testwiki/data/
log4j.appender.FileLog.File = /var/jspwiki/logs/jspwiki.log

See the docs here:
* https://jspwiki-wiki.apache.org/Wiki.jsp?page=Documentation
* https://jspwiki-wiki.apache.org/Wiki.jsp?page=Getting%20Started

But if you have a permission error, it might be more than just the log file.

Cheers,
David V




On Wed, Jan 11, 2017 at 1:07 PM, John Lusk <johnlu...@gmail.com> wrote:

> Ok, so I added the following to my /etc/tomcat8/policy.d/03catalina.policy
> file:
>
> grant codeBase "file:${catalina.base}/webapps/wiki/-" {
>   permission java.io.FilePermission "file:/usr/share/jspwiki-files/-",
> "read, write";
>   permission java.security.AllPermission;
> };
>
> which (a) doesn't seem to have caused any disasters (yay), but (b) hasn't
> done anything nice (boo). I did a /etc/init.d/tomcat8 restart. The edits
> appear in /var/cache/tomcat8/catalina.policy, so I guess that's good.
>
> Still getting a permission error on jspwiki.log. Golly day, it sure would
> be nice if I had a complete pathname to work with on this one. Not juse
> "jspwiki.log".
>
> I have chowned various directories to tomcat8:tomcat8, which is the userid
> the process runs under.
>
> Next step: where the heck do I put the customized properties file, what do
> I name it? Possibilities are:
>
>
>    - jspwiki.properties
>    - jspwiki-custom.properties
>    - wiki.properties
>    - wiki-custom.properties
>
> Maginc incantation, anyone? (Plus path, would be nice.)
>
> (Thanks.)
>
> John.
>
> On Mon, Jan 9, 2017 at 3:31 AM, Col Willis <col.wil...@gmail.com> wrote:
>
> > I had to do something funky with the catalina.policy file to get jspwiki
> > working in tomcat8 (apt-get installed)
> >
> > grant codeBase "file:/var/lib/tomcat8/webapps/wiki/-" {
> >    // !!change the directory to the location you want to locate your
> > wiki files!!
> >    permission java.io.FilePermission
> > "file:/usr/share/tomcat8/jspwiki-files/-", "read, write";
> >
> >    // just allow the entire codebase permissions to do what it needs.
> >    permission java.security.AllPermission;
> > };
> >
> > // this file does not exist, but it does solve a problem with
> > exceptions being thrown in syslog
> > grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
> >    permission java.io.FilePermission
> > "/var/lib/tomcat8/webapps/wiki/WEB-INF/classes/logging.properties",
> > "read";
> > };
> >
> >
> > On 9 January 2017 at 00:13, Rick Brockman <r...@richardbrockman.info>
> > wrote:
> >
> > > Like you John I'm a Rip van Winkle of bygone computer days.  When  I
> > > installed Tomcat using apt-get I ran into problems and instead of
> > knocking
> > > my head against the sleep pillow, I downloaded tomcat from the web and
> > its
> > > working...
> > >
> > > On 2017-01-08 16:10, John Lusk wrote:
> > >
> > >> Ok, friends.  Trying to get JSPWiki set up on a new Amazon EC2 Unbuntu
> > >> 16.04 instance I just stood up, and I'm having some trouble.  Help?
> > >>
> > >> I installed Tomcat8 using apt-get, I wound up with:
> > >>
> > >>    /etc/default/tomcat8
> > >>    /etc/init.d/tomcat8
> > >>    /etc/tomcat8
> > >>       Catalina/localhost/{docs,examples,host-manager,manager}.xml
> > >>       (These have docbase pointing to corresponding subdirs of
> > >>       /usr/share.)
> > >>    /usr/share/tomcat8
> > >>    /var/lib/tomcat8, which has a webapps subdir.
> > >>
> > >> It all seems to be working fine.
> > >>
> > >> So, I downloaded jspwiki.war 2.10.2, renamed it to "wiki.war", and
> > >> copied it to /var/lib/tomcat8/webapps, where it promptly got unpacked.
> > >>
> > >> Now, I can see it in my Tomcat app manager, but when I attempt to
> > >> start it, I get failures.
> > >>
> > >> First, I got OutOfMemory errors.
> > >>
> > >> I assume Tomcat's default -Xmx=128m is way too small, so I bumped it
> > >> up to 768m (I've only got a 1GB EC2 instance (t2.micro), so I think
> > >> 768m is living dangerously, eh?).
> > >>
> > >> Now I'm getting errors like
> > >>
> > >>    org.apache.catalina.core.ApplicationContext.log ERROR: Failed to
> > >> create
> > >> a Wiki engine: JSPWiki: Unable to load and setup properties from
> > >> jspwiki.properties. Failed to start. Caused by: Failed to instantiate
> > >> class
> > >> org.apache.wiki.PageManager; please check log files for better
> > >> information.
> > >>
> > >>    (in localhost.2017-01-08.log)
> > >>
> > >> and
> > >>
> > >>    java.io.FileNotFoundException: jspwiki.log (Permission denied)
> > >>
> > >>    (in catalina.out)
> > >>
> > >> and
> > >>
> > >>    INFO [__DEFAULT__]
> > >> org.apache.catalina.loader.WebappClassLoaderBase.checkStateF
> > >> orResourceLoading
> > >> Illegal access: this web application instance has been stopped
> already.
> > >> Could not load [net/sf/ehcache/version.properties].
> > >>
> > >>    (in catalina.2017-01-08.log)
> > >>
> > >> I grabbed jspwiki.properties with:
> > >>
> > >>    unzip jspwiki-war-2.10.2.jar ini/jspwiki.properties
> > >>
> > >> and modified it as follows (renaming it jspwiki-custom.properties):
> > >>
> > >>    51c51
> > >>    < jspwiki.baseURL=http://localhost:8080/JSPWiki/
> > >>    ---
> > >>    > jspwiki.baseURL=http://web.how-hard-can-it-be.com/wiki/
> > >>    102c102
> > >>    < #  jspwiki.fileSystemProvider.pageDir = /p/web/www-data/jspwiki/
> > >>    ---
> > >>    > jspwiki.fileSystemProvider.pageDir = /etc/jspwiki/pages
> > >>    144c144
> > >>    < #  jspwiki.basicAttachmentProvider.storageDir =
> C:\\Data\\jspwiki
> > >>    ---
> > >>    > jspwiki.basicAttachmentProvider.storageDir =
> > >> /etc/jspwiki/attachments
> > >>    605c605
> > >>    < #jspwiki.xmlGroupDatabaseFile = /etc/tomcat/groupdatabase.xml
> > >>    ---
> > >>    > jspwiki.xmlGroupDatabaseFile = /etc/jspwiki/groupdatabase.xml
> > >>    626c626
> > >>    < #jspwiki.xmlUserDatabaseFile = /etc/tomcat/userdatabase.xml
> > >>    ---
> > >>    > jspwiki.xmlUserDatabaseFile = /etc/jspwiki/userdatabase.xml
> > >>    885c885
> > >>    < log4j.appender.FileLog.File = jspwiki.log
> > >>    ---
> > >>    > log4j.appender.FileLog.File = /var/log/jspwiki/jspwiki.log
> > >>
> > >> and tried deploying it to various places
> > >> ({/var/lib,/usr/share}/tomcat8, /var/lib/tomcat8/webapps/wiki).
> > >>
> > >> All to no avail.
> > >>
> > >> What else can I try?
> > >>
> > >> (I'm kind of a Rip van Winkle Java web app developer -- the last time
> > >> I touched this technology stack was more than ten years ago, and that
> > >> was on JBoss, all of which I've forgotten except the pain.)
> > >>
> > >> Thanks.
> > >>
> > >> John.
> > >>
> > >
> > > --
> > > -------------------------
> > >
> > > _RICK BROCKMAN_
> > >
> > > _28 LANCASTER ST._
> > >
> > > _CHERRY VALLEY, NY 13320_
> > >
> > > _607 434-4746_
> > >
> >
> >
> >
> > --
> > Col
> >
>

Reply via email to