Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Getting Started with Oracle WebLogic Server 12c: Developer's Guide

You're reading from   Getting Started with Oracle WebLogic Server 12c: Developer's Guide If you've dipped a toe into Java EE development and would now like to dive right in, this is the book for you. Introduces the key components of WebLogic Server and all that's great about Java EE 6.

Arrow left icon
Product type Paperback
Published in Sep 2013
Publisher Packt
ISBN-13 9781849686969
Length 374 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Table of Contents (18) Chapters Close

Getting Started with Oracle WebLogic Server 12c: Developer's Guide
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
1. Overview of WebLogic Server 12c and Related Technologies FREE CHAPTER 2. Setting Up the Environment 3. Java EE Basics – Persistence, Query, and Presentation 4. Creating RESTful Services with JAX-RS 5. Singleton Bean, Validations, and SOAP Web Services 6. Using Events, Interceptors, and Logging Services 7. Remote Access with JMS 8. Adding Security 9. Servlets, Composite Components, and WebSockets 10. Scaling Up the Application 11. Some WebLogic Internals Index

Securing the web application


Now that the authentication provider is set, we have to modify the deployment descriptors of the application to set the security properties and create a login page to let users authenticate themselves.

Modifying the web.xml descriptor file

We first need to set the security constraints by editing web.xml:

  1. Open the WEB-INF/web.xml file of the Store web application.

  2. Paste the following lines right after the servlet-mapping tag:

      <security-constraint>
        <web-resource-collection>
          <web-resource-name>protected</web-resource-name>
          <url-pattern>/reservation.jsf</url-pattern>
        </web-resource-collection>
        <auth-constraint>
          <role-name>User</role-name>
        </auth-constraint>
      </security-constraint>
      <login-config>
        <auth-method>FORM</auth-method>
        <form-login-config>
          <form-login-page>/login.jsf</form-login-page>
          <form-error...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime