Skip to content

Commit 17eea3d

Browse files
author
Vladimir Kotal
authored
move content to wiki
1 parent d2daf0a commit 17eea3d

File tree

1 file changed

+0
-116
lines changed

1 file changed

+0
-116
lines changed

README.md

Lines changed: 0 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -460,122 +460,6 @@ configuration into a separate file and simplify future upgrades.
460460

461461
See `opengrok.jar` manual below for more details.
462462

463-
#### 5.4.2 Configure and Deploy source.war Webapp
464-
465-
To configure the webapp `source.war`, look into the parameters defined in
466-
`web.xml` of `source.war` file and change them (see note1) appropriately.
467-
468-
* **HEADER** – the fragment of HTML that will be used to display title or
469-
logo of your project
470-
* **SRC_ROOT** – absolute path name of the root directory of your source tree
471-
* **DATA_ROOT** – absolute path of the directory where OpenGrok data
472-
files are stored
473-
474-
* File `header_include` can be created under `DATA_ROOT`.
475-
The contents of this file will be appended to the header of each
476-
web page after the OpenGrok logo element.
477-
* File `footer_include` can be created under `DATA_ROOT`.
478-
The contents of this file will be appended to the footer of each
479-
web page after the information about last index update.
480-
* The file `body_include` can be created under `DATA_ROOT`.
481-
The contents of this file will be inserted above the footer of the web
482-
application's "Home" page.
483-
* The file `error_forbidden_include` can be created under `DATA_ROOT`.
484-
The contents of this file will be displayed as the error page when
485-
the user is forbidden to see a particular project with `HTTP 403` code.
486-
487-
488-
#### 5.4.3 Path Descriptions (optional)
489-
490-
OpenGrok can use path descriptions in various places (e.g. while showing
491-
directory listings or search results). Example descriptions are in `paths.tsv`
492-
file (delivered as `/usr/opengrok/doc/paths.tsv` by OpenGrok package on Solaris).
493-
494-
The `paths.tsv` file is read by OpenGrok indexing script from the configuration
495-
directory (the same where `configuration.xml` is located) which will create file
496-
`dtags.eftar` in the index subdirectory under `DATA_ROOT` directory which will
497-
then be used by the webapp to display the descriptions.
498-
499-
The file contains descriptions for directories one per line. Path to the
500-
directory and its description are separated by tab. The path to the directory
501-
is absolute path under the `SRC_ROOT` directory.
502-
503-
For example, if the `SRC_ROOT` directory contains the following directories:
504-
505-
* foo
506-
* bar
507-
* bar/blah
508-
* random
509-
* random/code
510-
511-
then the `paths.tsv` file contents can look like this:
512-
513-
```
514-
/foo source code for foo
515-
/bar source code for bar
516-
/bar/blah source code for blah
517-
```
518-
519-
Note that only some paths can have a description.
520-
521-
#### 5.4.4 Changing webapp parameters (optional)
522-
523-
`web.xml` is the deployment descriptor for the web application. It is in a Jar
524-
file named `source.war`, you can change it as follows:
525-
526-
* **Option 1**:
527-
Unzip the file to `TOMCAT/webapps/source/` directory and
528-
change the `source/WEB-INF/web.xml` and other static html files like
529-
`index.html` to customize to your project.
530-
531-
* **Option 2**:
532-
Extract the `web.xml` file from `source.war` file
533-
534-
```bash
535-
unzip source.war WEB-INF/web.xml
536-
```
537-
538-
edit `web.xml` and re-package the jar file.
539-
540-
```bash
541-
zip -u source.war WEB-INF/web.xml
542-
```
543-
544-
Then copy the war files to `TOMCAT/webapps` directory.
545-
546-
* **Option 3**:
547-
Edit the Context container element for the webapp
548-
549-
Copy `source.war` to `TOMCAT/webapps`
550-
551-
When invoking OpenGrok to build the index, use `-w <webapp>` to set the
552-
context. If you change this(or set using `OPENGROK_WEBAPP_CONTEXT`) later,
553-
FULL clean reindex is needed.
554-
555-
After the index is built, there's a couple different ways to set the
556-
Context for the servlet container:
557-
558-
* Add the Context inside a Host element in `TOMCAT/conf/server.xml`
559-
560-
```xml
561-
<Context path="/<webapp>" docBase="source.war">
562-
<Parameter name="DATA_ROOT" value="/path/to/data/root" override="false" />
563-
<Parameter name="SRC_ROOT" value="/path/to/src/root" override="false" />
564-
<Parameter name="HEADER" value='...' override="false" />
565-
</Context>
566-
```
567-
* Create a Context file for the webapp
568-
569-
This file will be named `<webapp>.xml`.
570-
571-
For Tomcat, the file will be located at:
572-
`TOMCAT/conf/<engine_name>/<hostname>`, where `<engine_name>`
573-
is the Engine that is processing requests and `<hostname>` is a Host
574-
associated with that Engine. By default, this path is
575-
`TOMCAT/conf/Catalina/localhost` or `TOMCAT/conf/Standalone/localhost`.
576-
577-
This file will contain something like the Context described above.
578-
579463
#### 5.4.5 Custom ctags configuration
580464

581465
To make ctags recognize additional symbols/definitions/etc. it is possible to

0 commit comments

Comments
 (0)