Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Init param "configPath" of GitilesServlet take no effect #42

Open
GoogleCodeExporter opened this issue Mar 20, 2015 · 1 comment
Open

Comments

@GoogleCodeExporter
Copy link
Collaborator

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);
  }

Original issue reported on code.google.com by langm...@gmail.com on 27 Feb 2014 at 3:35

@GoogleCodeExporter
Copy link
Collaborator Author

same problem

Original comment by nathen...@gmail.com on 15 Dec 2014 at 4:16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant