Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

login config resource not available

 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using tomcat and looking at creating Form Based Authentication as described in the the chanpetr on security in HeadFirst.

I've also looked at the tomcat example as described in the Documentation 6) Realms and AAA. This works fine, but my own version which identically follows theirs doesn't and produces the following error when attempting to login.


type Status report

message /test/j_security_check

description The requested resource (/test/j_security_check) is not available.

I must be missing something.

Can anybody help - it would be nice to get it working,

Thanks - Peter
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the <login-config> element from your web.xml. Additionally, post your html <form>, which is using FORM based authentication.
 
Peter Warde
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here's the <login-config> in my web.xml

<login-config>
<auth-method>FORM</auth-method>
<realm-name>Example Form-Based Authentication Area</realm-name>
<form-login-config>
<form-login-page>/loginPage.html</form-login-page>
<form-error-page>/errorPage.html</form-error-page>
</form-login-config>
</login-config>

Here's the loginPage.html

<html>
<head>
<title>Login</title>
</head>
<body>
<b>Please login</b>
<form method="POST" action="j_security_check">
<input type="text" name="j_username">
<input type="password" name="j_password">
<input type="submit" value="Enter"
</form>
</body>
</html>


I've checked it several times, but I still get the message j_security_check not available.

Thanks

Peter
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do we need <realm-name>Example Form-Based Authentication Area</realm-name> for form based authentication? Isn't it only for BASIC?
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic