User Tools

Site Tools


developers:examples:java:tomcat-hello-world

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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<sup>®</sup>  technology integration. The installation DVD contains source files of the sample application. 
- 
-[[https://cloud-alpha.aducid.com/aducid-tomcat-webapp/|Try it out]] 
- 
-[[https://github.com/aducid-dev/tomcat-adapter|Get sources and binaries on GitHub]] 
- 
-===== 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, follow these steps: 
- 
-  - 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/webapps folder 
-  - Run Tomcat, so that the installed sample web application unpacks. 
-  - Stop Tomcat. 
-  - Set application configuration parameters in the file $TOMCAT_HOME/webapps/aducid-tomcat-webapp/WEB-INF/classes/config.properties: 
-      * 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, sample application is accessible on address: 
- 
-<code> 
-http://[ip_address_of_your_container]:[port_of_your_container]/aducid-tomcat-webapp 
-</code> 
- 
-For example on address: 
- 
-<code> 
-http://10.20.29.189:8080/aducid-tomcat-webapp 
-</code> 
- 
-In case of installing on Linux OS, consider also iptables settings. 
- 
-The web application you have just installed contains two JSP pages. 
- 
-/unsecured.jsp - this page is freely accessible. 
- 
-/web/secured.jsp - this page is protected by the “RegAdmin” and “UserAdmin” roles. 
- 
-<font 11.0pt/11;;inherit;;inherit>If both the application and Tomcat are configured properly, the /web/secured.jsp page will be accessible. Accessibility of individual sections depends on the role assigned.</font> 
- 
-{{:developers:examples:java:tomcat-hello-wolrd-1.png?nolink&800x404}} 
- 
-===== 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. 
- 
-<code> 
-<security-constraint> 
-    <web-resource-collection> 
-        <web-resource-name>secured resources</web-resource-name> 
-        <url-pattern>/web/*</url-pattern> 
-        <url-pattern>/authCheck</url-pattern> 
-    </web-resource-collection> 
-    <auth-constraint> 
-        <role-name>RegAdmin</role-name> 
-        <role-name>UserAdmin</role-name> 
-    </auth-constraint> 
-</security-constraint> 
-<login-config> 
-    <auth-method>ADUCID</auth-method> 
-</login-config> 
-<security-role> 
-    <role-name>RegAdmin</role-name> 
-</security-role> 
-<security-role> 
-    <role-name>UserAdmin</role-name> 
-</security-role> 
-</code> 
- 
-====== Appendix B ====== 
- 
-Example of log4j.properties settings 
- 
-<code> 
-log4j.rootCategory=INFO, CONSOLE 
- 
-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 
-</code> 
- 
  
developers/examples/java/tomcat-hello-world.1564653985.txt.gz · Last modified: 2019/08/01 10:06 by tjotov