Chapter 16: Role of JSP in J2EE Basic Authentication - PowerPoint PPT Presentation

1 / 8
About This Presentation
Title:

Chapter 16: Role of JSP in J2EE Basic Authentication

Description:

Without NetBeans. manually create a zip (WAR) file following the structure of a Web app ... In NetBeans. WAR file is automatically created when you Run Project. ... – PowerPoint PPT presentation

Number of Views:48
Avg rating:3.0/5.0
Slides: 9
Provided by: conest
Category:

less

Transcript and Presenter's Notes

Title: Chapter 16: Role of JSP in J2EE Basic Authentication


1
Chapter 16Role of JSP in J2EE / Basic
Authentication
Reference Beginning JSP
2
Objectives
  • Structure of a Web Application
  • Web Application Deployment Descriptor
  • Web.xml
  • Packaging Deploying a Web Application
  • Basic Authentication

3
Structure of a Web Application
  • Reference Page 512
  • A Web application provides a standard means of
    packaging all the JSP files and all other
    application resources in manner that all
    J2EE-compliant Web application servers can
    understand.
  • Required Directory Structure
  • webapp/ - root of Web app
  • WEB-INF/web.xml - DD of Web app
  • WEB-INF/classes - Java classes
  • WEB-INF/lib - JAR files

4
Web.xml Deployment Descriptor (DD)
  • Common JSP
  • Jsp-config
  • Context-param
  • Welcome-file-list
  • Error-page
  • Enterprise JSP
  • Login-config
  • Security-constraint
  • Security-role
  • Env-entry
  • Resource-ref
  • Servlet
  • Servlet-mapping

5
Packaging Deploying a Web App
  • Without NetBeans
  • manually create a zip (WAR) file following the
    structure of a Web app
  • In NetBeans
  • WAR file is automatically created when you Run
    Project.
  • Alternative Build Project
  • Destination
  • ltnetbeans project dirgt\dist\ch16-src.war

6
Basic Authentication
  • Reference Page 528-529
  • In tomcat-users.xml
  • ltrole rolename"chapter16role"/gt ltuser
    username"chapter16" password"chapter16"
    roles"chapter16role"/gt

7
Basic Authentication (2)
  • In web.xml ltsecurity-rolegt
  • lt/security-rolegt
  • ltsecurity-constraintgt
  • ltweb-resource-collectiongt
  • lturl-patterngt/showDate.jsplt/url-patterngt
  • lt/web-resource-collectiongt
  • ltauth-constraintgt
  • ltrole-namegtchapter16rolelt/role-namegt
  • lt/auth-constraintgt
  • lt/security-constraintgt
  • ltlogin-configgt
  • ltauth-methodgtBASIClt/auth-methodgt
  • ltrealm-namegtChapter 16 Realmlt/realm-namegt
  • lt/login-configgt

8
Next Steps
  • Try It Out sections of Textbook (Chapter 16)
  • For more Web app security options, see Chapter 24
    (Security)
Write a Comment
User Comments (0)
About PowerShow.com