Giter Club home page Giter Club logo

Comments (7)

jendib avatar jendib commented on May 17, 2024

Pass -Dreader.home=/var/reader to the JVM to choose a data directory.

from reader.

KewlCat avatar KewlCat commented on May 17, 2024

You mean, to the JVM used by Tomcat ?
Isn't there a way to add this to the environment of the container ? A <Resource> element, for instance ?

from reader.

KewlCat avatar KewlCat commented on May 17, 2024

It says right here : http://sismics.com/reader/#!/help
"On Linux, Reader keeps its files in /var/reader."
I didn't carefully RTFM.

Sorry !

from reader.

jendib avatar jendib commented on May 17, 2024

I've found this : http://stackoverflow.com/questions/14984256/how-to-pass-the-d-additional-parameter-while-starting-tomcat to add a -D parameter to Tomcat.
Concerning the documentation, in fact their is no default value if you only use the .war (only with the others installers). #11 should fix this.

from reader.

KewlCat avatar KewlCat commented on May 17, 2024

I know, it's just that I'm reluctant to add a parameter to the JVM only for one of the webapps. I like to have every webapp completely "watertight" (if you see what I mean). That's why I was looking at a solution with an environment variable in the container or at a lower level (a modified copy of the web.xml file inside Catalina/localhost/ ?)
Also, it seems that I have the #11 issue, since there is nothing in my /var/reader directory :-/

from reader.

jendib avatar jendib commented on May 17, 2024

I think you can't add an environment variable on a specific webapp, because all your webapps runs on the same JVM.

from reader.

KewlCat avatar KewlCat commented on May 17, 2024

By "environment variable" I was not really refering to shell environment when Tomcat is launched, but rather to the <Resource> elements you can put in <Container>, <Host> or <Context> (I don't remeber which ones accept it) that you can access through a <resource-ref> in the web.xml file, and in your code with calls to
Context myContext = new InitialContext();
Context myContextEnv = (Context) myContext.lookup("java:comp/env");
Whatever myWhatever = (Whatever) myContextEnv.lookup("name_of_whatever");
This is how I get references to my datasource which is instantiated by Tomcat and pushed to the webapp with the correct connect string (I define different connections on production / testing / dev machines, only by modifying the ROOT.xml file in the configuration directory ($TOMCAT_HOME/conf/Catalina/domainname/ )

Naturally, I have no idea if this could be applicable here :-p

from reader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.