Tomcat Security Constraint in Windows Server 2003 and IIS

B

bootman

Greetings,

I'm having a bit of difficulty in getting tomcat security contraints
to work in Windows Server 2003 using IIS.

I previously tried a setup with Tomcat just by itself and the
configuration to the tomcat-users.xml, web.xml and server.xml files
worked, I could enter in the username and password and access would be
granted. However when I tried to implement this into a Windows Server
2003 environment, the authentication fails.

-----------------------------------------------------------------------------
In server.xml I uncommented the following line,

<Realm className="org.apache.catalina.realm.MemoryRealm" />

-----------------------------------------------------------------------------
In the tomcat-users.xml file I added the following,

<role rolename="webmanuser"/>
<user username="webmanuser" password="thepassword"
roles="webmanuser"/>

-----------------------------------------------------------------------------
Finally in the in applications web.xml file I added the following,

<security-constraint>
<web-resource-collection>
<web-resource-name>Website Name</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>webmanuser</role-name>
</auth-constraint>
</security-constraint>

<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Website Name</realm-name>
</login-config>

-----------------------------------------------------------------------------

A Windows User was created with the following details,

Username: webmanuser
Password: thepass

- User cannot change password.
- Password never expires.

-----------------------------------------------------------------------------



The effect of the above setup when running with IIS is that the
authentication box appears as it should, I type in the username and
password but then the page displays an error saying that the website
cannot be found.

Can someone please help me or point me to a tutorial somewhere?


Many Thanks,
The Bootzman.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top