• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem Using j_security_check

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

I am trying to login to secured pages using j_security_check and JDBCRealm but when I try to login, the server displays me the following error message:-

Apache Tomcat/4.0.4-b3 - HTTP Status 400 - Invalid direct reference to form login page

type Status report

message Invalid direct reference to form login page

description The request sent by the client was syntactically incorrect (Invalid direct reference to form login page).


Can anyone help me to fix this as I have tried alot to fix this but no results.
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check whether the WEB.xml file has the correct mapping for the j_security_check. As I faced the same problem with Weblogic and fixed up using the same.

Make sure that your mapping is referring to the class in Apache. As this is the only way it can be solved.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hy Shantanu,

About the subject here https://coderanch.com/t/133606/Security/security-check
how exactly has to be done the mapping configuration of j_security_check? Have you an example? What class must be associated? I tryed something like this but I still have the message "HTTP Status 400 - Invalid direct reference to form login page"

<filter>
<filter-name>LoginFilter</filter-name>
<display-name>PostLoginFilter</display-name>
<filter-class>com.x.webapp.LoginFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>LoginFilter</filter-name>
<url-pattern>/j_security_check</url-pattern>
</filter-mapping>

After that I can successfully access a protected ressource.

Thanks.
 
reply
    Bookmark Topic Watch Topic
  • New Topic