Hi,

I think that I found the problem.

The web.xml file has and auth-constraint:

```
<auth-constraint>
<!-- Anyone with one of the listed roles may access this area -->
<role-name>tomcat</role-name>
<role-name>role1</role-name>
</auth-constraint>
```
If I log in as a user that has one of those roles, then the access is
successful !

Jim



On Mon, Jul 1, 2024 at 5:59 PM o haya <ohaya1...@gmail.com> wrote:

> Hi,
>
> I just deployed Tomcat 10.1.25 to my Windows machine, and I want to test
> the FORMS example (/examples/jsp/security/protected/index.jsp) , but I am
> getting a 403 error:
>
> "You are not authorized to view this page.
>
> By default the examples web application is only accessible from a browser
> running on the same machine as Tomcat. If you wish to modify this
> restriction, you'll need to edit the example web application's context.xml
> file."
>
> I've already commented out the valve in the context.xml file
> (E:\apache-tomcat\apache-tomcat-10.1.25\webapps\examples\META-INF0\context.xml):
>
> <Context>
> <CookieProcessor className="
> org.apache.tomcat.util.http.Rfc6265CookieProcessor" sameSiteCookies="
> strict"/>
> <!-- <Valve className="org.apache.catalina.valves.RemoteAddrValve"
> allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" /> -->
> </Context>
>
> and bounced the Tomcat, but I still get the same error message.
>
>
> Does anyone know what else could be causing this error?
>
>
>

Reply via email to