Lesezeichen Erstelle PDF Email Drucken

Verzeichnisschutz im TomCat einrichten

Author:
Martin
Erstellt:
Montag, 13. Juni 2011
Letzte Bearbeitung:
Montag, 20. Juni 2011
Aufrufe:
383
Bewertung:
 
Bewerte:
Gut - Schlecht
Lesezeichen:
0 Lesezeichen anlegen

Antwort

in /opt/tomcat/current/conf/tomcat-users.xml

<?xml version='1.0' encoding='utf-8'?>

<tomcat-users>

<role rolename="ROLLENNAME"/>

...

<user username="besucher" password="XXXXX" roles="ROLLENNAME"/>

...

</tomcat-users>

in /opt/tomcat/webapps/MeinWebapp/ROOT/WEB-INF

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>NAME_DER_RESOURCE</display-name>
<security-constraint>
<web-resource-collection>
<web-resource-name>Intern</web-resource-name>
<url-pattern>/intern/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>bi.energie</role-name>
</auth-constraint>
</security-constraint>
<!-- Define the Login Configuration for this Application -->
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Intern</realm-name>
</login-config>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>

Kategorie

Kommentar schreiben


Sicherheitscode
Aktualisieren