This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
developers:examples:java:tomcat-hello-world [2019/08/01 10:06] tjotov removed |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Tomcat Hello World application ====== | ||
- | |||
- | The installation package contains a sample web application “Hello World” that serves as an example of ADUCID< | ||
- | |||
- | [[https:// | ||
- | |||
- | [[https:// | ||
- | |||
- | ===== Prerequisites ===== | ||
- | |||
- | Preliminary condition must be fulfilled to be sure that sample application is fully working: | ||
- | |||
- | * PEIG must be running (Client’s side of ADUCID®) | ||
- | * There must be valid ADUCID® approved identity with personal factor on ADUCID Server Kit | ||
- | |||
- | ===== Installation ===== | ||
- | |||
- | To install the web application, | ||
- | |||
- | - Ask the user administrator to add a loginName attribute, jsmith value for example, to your profile. Potentially also ask role administrator for the role, demo application works with RegAdmin and UserAdmin roles, on figure 7-1 jsmith has RegAdmin role only. | ||
- | - Configure Aducid Authenticator as per instructions in section 4.2. | ||
- | - Rename supplied sample web application “Hello World” from aducid-tomcat-webapp-[version].war to aducid-tomcat-webapp.war. | ||
- | - Load the sample web application into Tomcat, specifically to $TOMCAT_HOME/ | ||
- | - Run Tomcat, so that the installed sample web application unpacks. | ||
- | - Stop Tomcat. | ||
- | - Set application configuration parameters in the file $TOMCAT_HOME/ | ||
- | * appName—the application name shown on the log out page | ||
- | * loginPage—link to the log in page, used from the error and log out page | ||
- | * refreshAfterErrorPage—link to a page where the user can go if an error occurs | ||
- | - Run Tomcat. | ||
- | |||
- | After installation, | ||
- | |||
- | < | ||
- | http:// | ||
- | </ | ||
- | |||
- | For example on address: | ||
- | |||
- | < | ||
- | http:// | ||
- | </ | ||
- | |||
- | In case of installing on Linux OS, consider also iptables settings. | ||
- | |||
- | The web application you have just installed contains two JSP pages. | ||
- | |||
- | / | ||
- | |||
- | / | ||
- | |||
- | <font 11.0pt/ | ||
- | |||
- | {{: | ||
- | |||
- | ===== Troubleshooting ===== | ||
- | |||
- | If the result of authentication process is not according previous figure check following: | ||
- | |||
- | * PEIG is active – indicator is green | ||
- | * There is valid ADUCID® approved identity with personal factor on ADUCID Server Kit | ||
- | |||
- | ====== Appendix A ====== | ||
- | |||
- | The appendix shows the relevant part of the web.xml descriptor. | ||
- | |||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | </ | ||
- | < | ||
- | < | ||
- | </ | ||
- | < | ||
- | < | ||
- | </ | ||
- | < | ||
- | < | ||
- | </ | ||
- | </ | ||
- | |||
- | ====== Appendix B ====== | ||
- | |||
- | Example of log4j.properties settings | ||
- | |||
- | < | ||
- | log4j.rootCategory=INFO, | ||
- | |||
- | log4j.logger.com.aducid.tomcat=DEBUG | ||
- | |||
- | log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender | ||
- | |||
- | log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout | ||
- | |||
- | log4j.appender.CONSOLE.layout.ConversionPattern=[%p] [%c] %m%n | ||
- | </ | ||
- | |||