Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
    Bookmark Topic Watch Topic
  • New Topic

HTTP Status 404 After Adding security-constraint To web.xml

 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Report post to moderator
My application worked well with

in the web.xml file. I then inserted <security-constraint> preceding the <login-config> element, and inserted <security-role> following the <login-config> element. I got:

HTTP Status 404 -/PracticeVersion
description: The requested resource(/PracticeVersion) is not availabe.

in the browser, and I have this message in the Tomcat log:

LifecycleException: Container StandardContext[/PracticeVersion] has not been started

This was what my web.xml looks like when the problem happened:
 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please help. I am stuck.
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
it seems to me there must be more information than just:
LifecycleException: Container StandardContext[/PracticeVersion] has not been started

Look both above and below this entry for a possible 'root cause' of why it's not started.

It is usually an XML configuration error, but I find nothing wrong in your ordering.

What happens when you specify completely different pages for
form-login-page, form-error-page?

I mean don't use the same page with a parameter to tell them apart.
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
I am closing this thread, as it seems to have been re-started here
 
    Bookmark Topic Watch Topic
  • New Topic