This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

<user-data-constraint> working example  RSS feed

 
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to implement the working example for <user-data-constraint>. I am unable to understand when and where I will get this 301 code , when will this redirection happen. Do any body happen to have a small snippet of working code which will demonstrate it to me.

because this is the web.xml file that I have written.



I am unable to access the index.jsp pages in /Beer/AddRecipe and /Beer/ReviewRecipe. Previously I used to get this before i put <user-data-constraint. It used to ask me for username and password.

And also I want to implement the form authentication. Which is not working.
the index.html file is



What changes I have to make it work.

Everything was working till I introduced <form> authentication, and introduces <user-data-constraint> Please help me to solve the problem
 
Ranch Hand
Posts: 437
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Anil.

I am unable to understand when and where I will get this 301 code , when will this redirection happen.


When a request comes, container sees is there defined in <security-constraint>? If yes, it will send 301 code to the browser. Then the browser enables https and comes to container. Basically container will deal with http requests, i.e on port no. 8080.
We have to change the settings in tomcat/conf/server.xml (enable connector on port 8443) and also we need jsse api. For more information see this.
 
Anil Deshpande
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the working example on this is beyond the scope of this SCWCD. Bacause even in Head first Servlets and JSP, they have not given the working example code
 
Chinmaya Chowdary
Ranch Hand
Posts: 437
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have to know there is a element inside <user-data-constraint> and its purpose.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!