Git Product home page Git Product logo

Comments (7)

spearce avatar spearce commented on May 7, 2024
1. Extract the content of gitiles-war-1.0-SNAPSHOT.war file to <tomcat_dir>/webapps/gitiles/
2. Edit <tomcat_dir>/webapps/gitiles/WEB-INF/web.xml, change param value of init param
"configPath" to the path of gitiles config file.
3. Start up tomcat, visit http://<server>:<port>/gitiles/

HTTP 500
javax.servlet.ServletException: gitiles.baseGitUrl not set
	com.google.gitiles.GitilesFilter.getBaseGitUrl(GitilesFilter.java:416)
	com.google.gitiles.GitilesFilter.setDefaultUrls(GitilesFilter.java:333)
	com.google.gitiles.GitilesFilter.setDefaultFields(GitilesFilter.java:301)
	com.google.gitiles.GitilesFilter.init(GitilesFilter.java:198)
	com.google.gitiles.GitilesServlet.init(GitilesServlet.java:73)
        ...


The problem is in com.google.gitiles.GitilesConfig

  public static File defaultFile(FilterConfig filterConfig) {
    String configPath = System.getProperty(PROPERTY_NAME, DEFAULT_PATH);    //configPath
will never be null
    if (configPath == null && filterConfig != null) {
      configPath = filterConfig.getInitParameter(FILTER_CONFIG_PARAM);      //this
line will never be reached
    }
    return new File(configPath);
  }

Reported by None on 2014-02-26 19:35:18

from gitiles.

spearce avatar spearce commented on May 7, 2024
same problem

Reported by None on 2014-12-14 20:16:31

from gitiles.

atkawa7 avatar atkawa7 commented on May 7, 2024

@spearce could you reopen this issue. It seems the fix didn't work.

from gitiles.

jrn avatar jrn commented on May 7, 2024

@atkawa7, can you say more? E.g. how would I go about reproducing this bug, what is the expected result, and what happens instead?

from gitiles.

atkawa7 avatar atkawa7 commented on May 7, 2024

@jrn I was having the issue building gitiles on windows. I build a war file using bazel on linux then transferred it to my windows machine. Then deployed the war in tomcat. Changed the configPath param in the web.xml to point to C:\dev\gitiles.config. I get javax.servlet.ServletException: gitiles.baseGitUrl not set. This was because the above lines are not overriding default.
https://github.com/google/gitiles/blob/master/gitiles-servlet/src/main/java/com/google/gitiles/GitilesConfig.java#L37-L43
In the end I had to open catalina.properties and added the following line
com.google.gitiles.configPath=C:\dev\gitiles.config and it worked fine.

from gitiles.

jrn avatar jrn commented on May 7, 2024

Thanks.

from gitiles.

atkawa7 avatar atkawa7 commented on May 7, 2024

@jrn Please see my new issue about building gitiles on windows

from gitiles.

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.