Java Web Programming. Student Workbook

Size: px
Start display at page:

Download "Java Web Programming. Student Workbook"

Transcription

1 Student Workbook

2 Java Web Programming Mike Naseef, Jamie Romero, and Rick Sussenbach Published by ITCourseware, LLC., 7245 South Havana Street, Suite 100, Centennial, CO Editors: Danielle Hopkins and Jan Waleri Editorial Assistant: Ginny Jaranowski Special thanks to: Many instructors whose ideas and careful review have contributed to the quality of this workbook and the many students who have offered comments, suggestions, criticisms, and insights. Copyright 2011 by ITCourseware, LLC. All rights reserved. No part of this book may be reproduced or utilized in any form or by any means, electronic or mechanical, including photo-copying, recording, or by an information storage retrieval system, without permission in writing from the publisher. Inquiries should be addressed to ITCourseware, LLC., 7245 South Havana Street, Suite 100, Centennial, Colorado, (303) All brand names, product names, trademarks, and registered trademarks are the property of their respective owners. Page ii Rev ITCourseware, LLC

3 Contents Chapter 1 - Course Introduction... 7 Course Objectives... 8 Course Overview Using the Workbook Suggested References Chapter 2 - Web Applications and MVC Web Applications JSPs and Servlets Model-View-Controller Model 2 Architecture The WAR File web.xml Building the WAR Deploying the WAR Labs Chapter 3 - JavaServer Pages Introduction to JSP JSP Syntax JSP Scripting Elements Request and Response Implicit Objects page Directive Error Handling The include directive include and forward Actions Labs Chapter 4 - Java Servlets HTTP Requests HttpServlet Servlet Lifecycle... Annotation ITCourseware, LLC Rev Page iii

4 RequestDispatcher HttpSession ServletContext Servlet Filters JSP vs. Servlet Labs Chapter 5 - JavaBeans What is a JavaBean? Rules Properties Using JavaBeans in JSPs Properties and Forms Data Access Objects Resource Reference Bean Scopes in Servlets Bean Scopes in JSPs Labs Chapter 6 - JSP Expression Language JSP Expression Language Literals Variables The. and [ ] Operators Other Operators Implicit Objects Labs Chapter 7 - Introduction to JSTL What is JSTL? Core Tags Conditionals Core Tags Iteration and Import Variables, Output, and Exceptions XML Manipulation Tags Internationalization Tags SQL Tags Labs Page iv Rev ITCourseware, LLC

5 Chapter 8 - Security Concepts Constraints Roles login-config BASIC Authentication FORM Authentication Login and Error Pages Labs Appendix A - Tag Libraries Custom Tags Using Custom Tags Defining Tags Tags with Attributes Fragments and Variables Packaging Tag Files Labs Appendix B - Ant What Is Ant? build.xml Tasks Properties and Property Files Managing Files and Directories Filesets Java Tasks Creating Java Archives Specifying Paths Miscellaneous Tasks Solutions Index ITCourseware, LLC Rev Page v

6 Page vi Rev ITCourseware, LLC

7 Chapter 1 Course Introduction Chapter 1 - Course Introduction 2011 ITCourseware, LLC Rev Page 7

8 Course Objectives Write web applications that combine Java Servlets, JavaServer Pages, and JavaBeans using the Model-View-Controller architecture. Use JavaBeans to encapsulate business and data access logic. Generate HTML or XML output with JavaServer Pages. Process HTTP requests with Java Servlets. Configure your web applications with the web.xml deployment descriptor. Create scriptless JSPs by using JSTL tags combined with JSP Expression Language for functionality, such as conditionals, iteration, internationalization, and XML processing. Page 8 Rev ITCourseware, LLC

9 Chapter 1 Course Introduction 2011 ITCourseware, LLC Rev Page 9

10 Course Overview Audience: Java programmers who need to develop web applications using JSPs and Servlets. Prerequisites: Java programming experience and basic HTML knowledge are required. Classroom Environment: A workstation per student. Page 10 Rev ITCourseware, LLC

11 Chapter 1 Course Introduction Using the Workbook This workbook design is based on a page-pair, consisting of a Topic page and a Support page. When you lay the workbook open flat, the Topic page is on the left and the Support page is on the right. The Topic page contains the points to be discussed in class. The Support page has code examples, diagrams, screen shots and additional information. Hands On sections provide opportunities for practical application of key concepts. Try It and Investigate sections help direct individual discovery. In addition, there is an index for quick look-up. Printed lab solutions are in the back of the book as well as on-line if you need a little help. The Topic page provides the main topics for classroom discussion. The Support page has additional information, examples and suggestions. Java Servlets Chapter 2 Servlet Basics The Servlet Life Cycle The servlet container controls the life cycle of the servlet. When the first request is received, the container loads the servlet class and calls the init() method. Topics are organized into first (), second ( ) and For every request, the container uses a separate thread to call the service() method. third ( ) level When points. the servlet is unloaded, the container calls the destroy() method. As with Java s finalize() method, don t count on this being called. Override one of the init() methods for one-time initializations, instead of using a constructor. The simplest form takes no parameters. Hands On: Add an init() method to your Today servlet that initializes a bornon date, then print the bornon date along with the current date: Today.java... public class Today extends GenericServlet { private Date bornon; public void service(servletrequest request, ServletResponse response) throws ServletException, IOException {... // Write the document out.println("this servlet was born on " + bornon.tostring()); out.println("it is now " + today.tostring()); } public void init() { bornon = new Date(); } The init() method is called when the servlet is } loaded into the container. Callout boxes point out important parts of the example code. Code examples are in a fixed font and shaded. The on-line file name is listed above the shaded area. public void init() {...} If you need to know container-specific configuration information, use the other version. public void init(servletconfig config) {... Whenever you use the ServletConfig approach, always call the superclass method, which performs additional initializations. super.init(config); Page 16 Rev ITCourseware, LLC Pages are numbered sequentially throughout the book, making lookup easy. Screen shots show examples of what you should see in class ITCourseware, LLC Rev Page ITCourseware, LLC Rev Page 11

12 Suggested References Basham, Bryan, Kathy Sierra, and Bert Bates Head First Servlets and JSP: Passing the Sun Certified Web Component Developer Exam (SCWCD). O'Reilly & Associates, Sebastopol, CA. ISBN Bergsten, Hans JavaServer Pages, 3rd Edition. O'Reilly & Associates, Sebastopol, CA. ISBN Hall, Marty and Larry Brown Core Servlets and JavaServer Pages, Vol. 1: Core Technologies, 2nd Edition. Prentice Hall, Englewood Cliffs, NJ. ISBN Hall, Marty, Larry Brown and Yaakov Chaikin Core Servlets and JavaServer Pages, Volume II (2nd Edition). Prentice Hall, Englewood Cliffs, NJ. ISBN Heffelfinger, David, Java EE 6 with GlassFish 3 Application Server. Packt Publishing, Birmingham, UK. ISBN Jendrock, Eric, et.al The Java EE 6 Tutorial: Basic Concepts (4th Edition). Prentice Hall, Upper Saddle River, NJ. ISBN Steelman, Andrea, Joel Murach. Bergsten, Hans Murach's Java Servlets and JSP, 2nd Edition. Mike Murach & Associates. ISBN Java Servlet Technology: JSP Technology: JSTL Technology: Java EE 6 Tutorial: Page 12 Rev ITCourseware, LLC

13 Chapter 1 Course Introduction 2011 ITCourseware, LLC Rev Page 13

14 Page 14 Rev ITCourseware, LLC

15 Chapter 2 Web Applications and MVC Chapter 2 - Web Applications and MVC Objectives Describe Java web technologies. Explain how the Model-View-Component architecture applies to a web application. Describe the structure of WAR files. Build and deploy a web application ITCourseware, LLC Rev Page 15

16 Web Applications Web applications are applications that the end user can access using a standard web browser. The Java Platform Enterprise Edition (Java EE) defines a web application as a collection of web components and supporting files. Web components include Java servlets and JSP files. Supporting files include static HTML documents, image files, and supporting classes. Your web application runs in the environment of a web container, which is managed by an application server. Web containers can contain several web applications. Your applications can work together or operate independently. Each web application is addressed with a context path. The context path is determined when the application is deployed. A web container can contain a "default" application, which has an empty context path. To access a component or file in the web application from a browser, you must include the context path in the request URL. Page 16 Rev ITCourseware, LLC

17 Chapter 2 Web Applications and MVC Browser HTTP Application Server Web Container Web Application Servlet JSP 2011 ITCourseware, LLC Rev Page 17

18 JSPs and Servlets The standard protocol for communication between browsers and servers is designed for static documents. Typically, a web server returns the contents of a static file in response to a browser request. Use servlets and JavaServer Pages (JSP) to handle requests from a browser dynamically. A servlet is a web component which receives an object encapsulating the browser request and constructs a response to the browser. The response typically contains an HTML document. JSP pages start as text documents containing HTML or XML with special tags for executing Java code. JSP pages are compiled into servlets automatically. HTML designers do not need to learn Java. Java developers do not need to learn HTML. You get some important benefits by using Java's web component architecture: Your application will be portable across web containers. You can get better performance and security from servlets than from standard CGI. You can make full use of the vast set of Java APIs. You can use facilities provided by the web container to maintain state. Page 18 Rev ITCourseware, LLC

19 Chapter 2 Web Applications and MVC 2011 ITCourseware, LLC Rev Page 19

20 Model-View-Controller The Model-View-Controller (MVC) architecture was originally described by Smalltalk for implementing GUI applications. The primary goal of MVC is to separate user interface code (the view) from domain code (the model). The controller is introduced as a separate body of code that manages the translation of events in the view to procedures in the model. The view only accesses the model to retrieve values for display. The model should not have any knowledge of the view or the controller. The benefits of MVC are similar to encapsulation. Changes in the model can be made without impacting the view. The view can be modified, or new views can be implemented without impacting the model. Developers can focus on their skills database programmers do not need to understand user interface issues. MVC adapts well to the needs of web applications. The view is further separated from the model both architecturally and physically. The controller typically takes a broader role, managing the view as well as the model. Page 20 Rev ITCourseware, LLC

21 Chapter 2 Web Applications and MVC View Controller Model 2011 ITCourseware, LLC Rev Page 21

22 Model 2 Architecture The typical adaptation of MVC to Java web applications is called the Model 2 Architecture. Use JavaBeans to define the model. The controller should encapsulate business object data in JavaBeans to make the data accessible to the JSP views. The controller can provide helper JavaBeans to convert data from the business object to formats appropriate to the view. For example, a JavaBean could convert a date to an appropriate string value. Use a servlet as the controller. It will extract data needed to handle the request from the browser. The servlet will also call methods on business objects to process the request. Finally, it will forward the request to the JSP page, including any beans needed to generate the view. The servlet might choose between JSP pages based on the results of the request. Use JSP pages to generate the view typically an HTML or XML document. The view will retrieve information to display from the beans included by the servlet. Page 22 Rev ITCourseware, LLC

23 Chapter 2 Web Applications and MVC In the early days of JSP, the popular architecture was what is now referred to as "Model 1." In this architecture, a browser request is handled directly by a JSP file, which, in turn, creates JavaBeans to access the business objects. In both Model 1 and Model 2 architectures, JavaBeans are the preferred mechanism for accessing business objects. The JSP specification has strong support for working with JavaBeans objects, which makes it easier to separate the display logic of the JSP file from the business logic of the application. ArticleNotFound.jsp ListArticles.jsp ShowArticle.jsp View Browser blognews.articleservlet JSP 1 Web Container 3 Controller Servlet 2 Model JavaBean blognews.article The filenames shown in the diagram refer to files in the BlogNews example application ITCourseware, LLC Rev Page 23

24 The WAR File You must organize your web application using a specific directory structure. The application root directory acts as the document root for your application. You put your JSP, HTML, and other supporting files here. You can use subdirectories to organize your application. Store your application files in a subdirectory named WEB-INF. Place the optional web.xml configuration file here. This subdirectory is not accessible via the web server. Put your servlet classes and supporting classes in the WEB-INF/classes directory. Put any JAR files specific to your application in the WEB-INF/lib directory. This is the preferred method for storing your JavaBeans. If a JAR file will be used by other applications, it may make more sense to put it in a system-wide or server-wide directory. You can package your application for distribution in a Web ARchive (WAR) file. A WAR file is a JAR file that contains all of the files in your application. Since WAR files must conform to the Java EE specifications, they are portable between different web containers. Page 24 Rev ITCourseware, LLC

25 Chapter 2 Web Applications and MVC Contents of BlogNews.war: ArticleNotFound.jsp BadPostArticle.jsp GenericErrorHandler.jsp index.html ListArticles.jsp NewArticle.html ShowArticle.jsp ViewArticle.html META-INF MANIFEST.MF META-INF and MANIFEST.MF are artifacts created by the jar utility. They have no effect on the war. WEB-INF web.xml classes Most container vendors also suggest a vendorspecific XML file in the WEB-INF directory. blognews Article.class ArticleFactory.class ArticleNotFoundException.class ArticleDateComparator.class ArticleServlet.class 2011 ITCourseware, LLC Rev Page 25

26 web.xml Provide an optional deployment descriptor to supply additional configuration information for your web application. Create it as WEB-INF/web.xml in your web application directory. List files the container should look for when the user request specifies a context with the <welcome-file-list> element. Use the <error-page> element to delegate error handling to your own servlets, JSP pages, or HTML files. This allows you to customize the appearance of your error pages dynamically. HTTP errors are mapped by the 3-digit status code. <error-page> <error-code>404</error-code> <location>/errors/pagenotfound.jsp</location> </error-page> Exceptions are mapped by the full class name of the exception handled. <error-page> <exception-type>java.io.ioexception</exception-type> <location>/errors/ioexception.jsp</location> </error-page> The web container looks for a page matching the class of the exception thrown or one of its superclasses. When the web container invokes your error handler, it provides request attributes with the error code or exception, and the original request URI. Use these attributes to customize your error response. Page 26 Rev ITCourseware, LLC

27 Chapter 2 Web Applications and MVC Examples/WebContent/WEB-INF/web.xml <?xml version="1.0" encoding="utf-8"?> <web-app xmlns:xsi=" xmlns=" xmlns:web=" java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemalocation=" java.sun.com/xml/ns/javaee id="webapp_id" version="3.0"> <description> This is the BlogNews application. Setup is straightforward. No changes should be necessary at deployment unless you wish to change the default error page or the welcome file. Articles will be stored in the WEB-INF/articles directory which is created automatically the first time the servlet is accessed. </description> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> </welcome-file-list> <error-page> <error-code>404</error-code> <location>/genericerrorhandler.jsp</location> </error-page> </web-app> You can use a <description> element to provide documentation. The location is specified relative to the web application root. Note: Prior to the Servlet 3.0 specification, web.xml was required. Servlet 3.0 defined several annotations that you can add to your code to take the place of many, but not all, of the web.xml entries ITCourseware, LLC Rev Page 27

28 Building the WAR You build your application using these steps: 1. Create a directory in which to build your web application. mkdir webapp 2. Compile your classes putting the resulting class files in WEB-INF/classes. javac -d webapp/web-inf/classes *.java If you create any JAR files, put them in WEB-INF/lib. 3. Copy your JSP files, HTML files, and other supporting files into the application directory. 4. Optionally, create your deployment descriptor in WEB-INF/web.xml. To build the WAR file, use the jar command to archive the application directory. jar cf MyApplication.war webapp Page 28 Rev ITCourseware, LLC

29 Chapter 2 Web Applications and MVC To simplify the building and deployment process, we will use the Apache Software Foundation's Ant tool. To use Ant, you create an XML configuration file called build.xml and define targets that define the steps for building and deploying your application. The targets also set dependencies, so that you can compile, build, and deploy with a single command. For this class, we have provided build.xml files for you with targets for compiling the Java files, building the WAR file, and deploying the WAR file. To complete all of the steps on the preceding page, you simply need to run the ant command with the appropriate build target. Your instructor will give you the details of how to run Ant and which target to use ITCourseware, LLC Rev Page 29

30 Deploying the WAR You deploy a web application with these fundamental steps. 1. Pass the WAR file to your web container. You might simply copy the file to a specific location or use a tool to locate the file. 2. Specify the context path for the application. The context path often defaults to the name of the WAR file. 3. Configure any container-managed resources as specified in the deployment descriptor. These might include database connections, JNDI services, and security roles. The mechanisms for performing these is determined by your web container. Some container providers have GUI or web-based tools for deploying applications. You may need to create the appropriate configuration files manually and include them in your WAR file. Page 30 Rev ITCourseware, LLC

31 Chapter 2 Web Applications and MVC Try It: The BlogNews application is a simple example of a web application using the Model 2 architecture. The application allows you to create and display a list of articles. The servlet creates a new directory within the WEB-INF directory of the deployed application. The articles are stored in this new directory as serialized objects. The upside of this implementation is that you do not need to configure a storage directory or database. The downside is that this directory is usually destroyed when the application is redeployed. The classes in the blognews package represent the controller, the model, and the business logic. The Article class is our model JavaBean. The ArticleFactory and supporting class ArticleNotFoundException provide the business logic for working with articles. The ArticleServlet is the controller Start Tomcat, then build and deploy the application by running the ant command in the chapter's Examples directory. To view the application, navigate with your browser to ITCourseware, LLC Rev Page 31

32 Labs Modify the deployment descriptor so that the 405 error (generated when a user tries to use a GET when a POST is required) is handled by the GenericErrorHandler. You can generate this error by entering the URL for the View command manually in your browser's address bar ( (Solution: Solutions-Lab1/WebContent/WEB-INF/web.xml) Modify the servlet so that it throws a runtime exception (try dividing by zero or dereference a null pointer). Deploy the application and observe the error displayed. Now, modify the deployment descriptor so that GenericErrorHandler.jsp is displayed instead. (Solutions: Solutions-Lab2/src/blognews/ArticleServlet.java, Solutions-Lab2/WebContent/ WEB-INF/web.xml) (Optional) Create a new view which lists only the titles of the articles. Add an action to the servlet to display the view, and add a link to index.html in order to access this action. (Solutions: Solutions-Lab3/src/blognews/ArticleServlet.java, Solutions-Lab3/WebContent/ ListTitles.jsp, Solutions-Lab3/WebContent/index.html) (Optional) Create a new view that allows the user to edit the body of an article. You will need to create a form to enter the title of the article to edit and a new action in ArticleServlet to display the new view using the article entered in the form. The new view can use the existing Post action in the servlet to save the changes. Add a link to index.html to display the new form. (Solutions: Solutions-Lab4/WebContent/EditArticle.jsp, Solutions-Lab4/WebContent/ EditArticle.html, Solutions-Lab4/src/blognews/ArticleServlet.java, Solutions-Lab4/ WebContent/index.html) Page 32 Rev ITCourseware, LLC

33 Chapter 2 Web Applications and MVC 2011 ITCourseware, LLC Rev Page 33

34 Page 132 Rev ITCourseware, LLC

35 Chapter 8 Security Chapter 8 - Security Objectives Add authentication and authorization to a web application. Use HTTP Basic and Form-based login methods. Create security roles and constraints in web.xml ITCourseware, LLC Rev Page 133

36 Concepts Often, you want to restrict access to your web application to certain users. Authentication allows you to identify who is trying to run the application. At a bank, you will be asked to present a picture ID to prove your identity. Once you know who the user is, you need to authorize that user; that is, decide if they are allowed access. Even if you prove your identity, the bank will not let you access another person's account. Another person can tell the bank you should have access to their account. Web applications need to authenticate a user, and then determine if the user is authorized to perform a request. A user often provides a password to authenticate their identity. The web application can then check requested actions against those allowed for the user. Page 134 Rev ITCourseware, LLC

37 Chapter 8 Security Hands On: A news blog application is provided in the chapter directory. Currently, it has no security restrictions. We will add security features to this application throughout this chapter. Build and deploy the application using Ant. Navigate with your browser to SecureBlogNews to view the application. Browser Application Server HTTP Request 401 Authentication Required Access a Restricted URL Prompt for username and password Original HTTP Request + username and password Web Page Username/ password OK Note: All subsequent HTTP requests will include the username/password (if needed). They are cached for the given realm ITCourseware, LLC Rev Page 135

38 Constraints Add <security-constraint> entries to web.xml to restrict access to portions of a web application. Each security constraint entry describes what access is allowed on a set of resources. Security constraints must have a <web-resource-collection> sub-element, describing the set of resources covered by the security constraint. The collection must have a <web-resource-name> sub-element describing the collection. The collection can have any number of <url-pattern> sub-elements describing URLs to include in the collection. URL patterns can include wildcard characters. Security constraints should have an <auth-constraint> sub-element. Leaving out the <auth-constraint> results in access by everyone. An empty <auth-constraint> results in access by no one. Page 136 Rev ITCourseware, LLC

39 Chapter 8 Security Hands On: Add the following entry to the end of Examples/WebContent/WEB-INF/web.xml:... </error-page> <security-constraint> <web-resource-collection> <web-resource-name>the entire app</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <auth-constraint/> </security-constraint> </web-app> Use Ant to redeploy the application and try it out. Note that all pages of the application are now restricted ITCourseware, LLC Rev Page 137

40 Roles Roles specify who is allowed access to secured resources. Roles provide finer granularity than "everyone" and "no one." The <security-role> element specifies which roles are available for use by the web application. The <role-name> sub-element defines a role. Use as many <security-role> elements as needed. The <auth-constraint> element specifies which roles are allowed access to the resource. No one has access if no roles are provided. Specify a role using the <role-name> sub-element. Provide as many <role-name> sub-elements as needed. The special role "*" matches all the roles defined by the <security-role> elements in web.xml for this application. Assignment of users to roles is application-server specific. Page 138 Rev ITCourseware, LLC

41 Chapter 8 Security Hands On: The application server contains a user entry with username student and password password, which is mapped to the blog-user role. Change <auth-constraint> in web.xml and add the <security-role> entry to the end of web.xml:... </error-page> <security-constraint> <web-resource-collection> <web-resource-name>the entire app</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <auth-constraint> <role-name>blog-user</role-name> </auth-constraint> </security-constraint> <security-role> <role-name>blog-user</role-name> </security-role> </web-app> You have specified who can use the application, but do not yet have a way to determine the user's identity ITCourseware, LLC Rev Page 139

42 login-config Add a <login-config> element to tell the application what type of authentication to use. BASIC and FORM authentication use a username and password type of authentication. Other authentication methods exist, but require more setup and are lesscommonly used. The <login-config> element also provides any extra information needed by the authentication method. Once a user is authenticated, the container looks up which roles are associated with that user. Requests against secured resources result in the container asking for authentication. The container allows or denies the request based on whether the user has a role that can use the resource. Use the getremoteuser() method of the request inside a servlet to return the user's name. public void doget(httpservletrequest req, HttpServletResponse res){ String user=req.getremoteuser();... } Page 140 Rev ITCourseware, LLC

43 Chapter 8 Security Hands On: Add the following entry to the end of web.xml, but do not redeploy the application.... <security-role> <role-name>blog-user</role-name> </security-role> <login-config> </login-config> </web-app> 2011 ITCourseware, LLC Rev Page 141

44 BASIC Authentication The default form of authentication is BASIC. Explicitly set BASIC authentication by setting the <auth-method> subelement of <login-config> to BASIC. You can provide an optional realm name with the <realm-name> subelement. The realm is usually not important except as part of the client prompt. The application server tells the client which realm the resource is in, and asks the client to get the corresponding username and password. The client displays a dialog box presenting the request. The client encodes the username and password, passing them back to the application server. The client encodes the username and password using the Base-64 scheme. Base-64 is easy to decode, so treat it as if the username and password are sent as plain text. Use HTTPS instead of HTTP if this is an issue. Page 142 Rev ITCourseware, LLC

45 Chapter 8 Security Hands On: Change the login config in web.xml to the following and redeploy the application:... <security-role> <role-name>blog-user</role-name> </security-role> <login-config> <auth-method>basic</auth-method> <realm-name>news Blog</realm-name> </login-config> </web-app> Now a dialog box displays when you try to access the application. Submit the dialog using student and password to access the application ITCourseware, LLC Rev Page 143

46 FORM Authentication Customize the login form with FORM authentication. BASIC authentication presents a standard dialog box that cannot be customized. Set the <auth-method> sub-element of <login-config> to FORM to use FORM authentication. The <form-login-config> sub-element of <login-config> provides additional information. The <form-login-page> sub-element provides the URL of the custom login form. The <form-error-page> sub-element provides the URL of the custom login error page. The application server uses these pages instead of the standard authentication dialog box. FORM authentication does not use realms. Usernames and passwords are plain text fields of a form. Use HTTPS to keep these secret. Page 144 Rev ITCourseware, LLC

47 Chapter 8 Security Hands On: Replace the <login-config> entry in web.xml and redeploy the application:... <security-role> <role-name>blog-user</role-name> </security-role> <login-config> <auth-method>form</auth-method> <form-login-config> <form-login-page>/customlogin.html</form-login-page> <form-error-page>/customloginerror.html</form-error-page> </form-login-config> </login-config> </web-app> Access the application and note that the custom login screen is now used. Enter an invalid username and password to bring up the custom error page. Login with a valid username and password to access the application ITCourseware, LLC Rev Page 145

48 Login and Error Pages The custom login page must contain a form that follows some simple rules. The action for the form must be j_security_check. The form must contain a field named j_username. The form must also contain a field named j_password. The custom login page can contain anything else you want. The custom error page can be any page you want. HTML or JSP is fine. No special rules it is just like any other page. Possible additions to an error message are: A link to try again A link to a forgotten password or username A link to reset a forgotten password Page 146 Rev ITCourseware, LLC

49 Chapter 8 Security Examples/WebContent/CustomLogin.html <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" " <html>... <body> Please Login below: <p> <form method="post" action="j_security_check"> <table> <tr> <td>login:</td> <td><input type="text" name="j_username"></td> </tr> <tr> <td>password:</td> <td><input type="password" name="j_password"></td> </tr> <tr><td><input type="submit" value="submit"></td></tr> <tr><td></td></tr> </table> </form> </body> </html> Examples/WebContent/CustomLoginError.html <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" " <html>... <body> Bad username/password combination - is the Caps Lock on? </body> </html> 2011 ITCourseware, LLC Rev Page 147

50 Labs The StarterCode directory contains a candy store application. Use Ant to deploy the application. The main entry point to the application is An admin page is also available at localhost:8080/truffles/admin/setprice. Add BASIC authentication to the application such that any recognized user can run the application. (Solution: Solutions/WebContent/WEB-INF/web.xml) Change the BASIC authentication to FORM authentication. (Solution: Solutions/WebContent/WEB-INF/web.xml.2, Solutions/WebContent/ TruffleLogin.html, Solutions/WebContent/TruffleError.html) Change the authentication so that only the manager can set prices. (Solution: Solutions/WebContent/WEB-INF/web.xml.3) Page 148 Rev ITCourseware, LLC

51 Chapter 8 Security The application server contains the following accounts that you can use in the labs. username password role customer1 customer2 manager password password password cust cust mgr 2011 ITCourseware, LLC Rev Page 149

Application Security

Application Security 2009 Marty Hall Declarative Web Application Security Originals of Slides and Source Code for Examples: http://courses.coreservlets.com/course-materials/msajsp.html Customized Java EE Training: http://courses.coreservlets.com/

More information

Controlling Web Application Behavior

Controlling Web Application Behavior 2006 Marty Hall Controlling Web Application Behavior The Deployment Descriptor: web.xml JSP, Servlet, Struts, JSF, AJAX, & Java 5 Training: http://courses.coreservlets.com J2EE Books from Sun Press: http://www.coreservlets.com

More information

Recommended readings. Lecture 11 - Securing Web. Applications. Security. Declarative Security

Recommended readings. Lecture 11 - Securing Web. Applications. Security. Declarative Security Recommended readings Lecture 11 Securing Web http://www.theserverside.com/tt/articles/content/tomcats ecurity/tomcatsecurity.pdf http://localhost:8080/tomcat-docs/security-managerhowto.html http://courses.coreservlets.com/course-

More information

Web Application Architecture (based J2EE 1.4 Tutorial)

Web Application Architecture (based J2EE 1.4 Tutorial) Web Application Architecture (based J2EE 1.4 Tutorial) 1 Disclaimer & Acknowledgments Even though Sang Shin is a full-time employee of Sun Microsystems, the contents here are created as his own personal

More information

In this chapter, we lay the foundation for all our further discussions. We start

In this chapter, we lay the foundation for all our further discussions. We start 01 Struts.qxd 7/30/02 10:23 PM Page 1 CHAPTER 1 Introducing the Jakarta Struts Project and Its Supporting Components In this chapter, we lay the foundation for all our further discussions. We start by

More information

Building Web Applications, Servlets, JSP and JDBC

Building Web Applications, Servlets, JSP and JDBC Building Web Applications, Servlets, JSP and JDBC Overview Java 2 Enterprise Edition (JEE) is a powerful platform for building web applications. The JEE platform offers all the advantages of developing

More information

Supplement IV.E: Tutorial for Tomcat. For Introduction to Java Programming By Y. Daniel Liang

Supplement IV.E: Tutorial for Tomcat. For Introduction to Java Programming By Y. Daniel Liang Supplement IV.E: Tutorial for Tomcat For Introduction to Java Programming By Y. Daniel Liang This supplement covers the following topics: Obtaining and Installing Tomcat Starting and Stopping Tomcat Choosing

More information

Course Name: Course in JSP Course Code: P5

Course Name: Course in JSP Course Code: P5 Course Name: Course in JSP Course Code: P5 Address: Sh No BSH 1,2,3 Almedia residency, Xetia Waddo Duler Mapusa Goa E-mail Id: ITKP@3i-infotech.com Tel: (0832) 2465556 (0832) 6454066 Course Code: P5 3i

More information

Complete Java Web Development

Complete Java Web Development Complete Java Web Development JAVA-WD Rev 11.14 4 days Description Complete Java Web Development is a crash course in developing cutting edge Web applications using the latest Java EE 6 technologies from

More information

Web Applications. Originals of Slides and Source Code for Examples: http://courses.coreservlets.com/course-materials/msajsp.html

Web Applications. Originals of Slides and Source Code for Examples: http://courses.coreservlets.com/course-materials/msajsp.html 2009 Marty Hall Using and Deploying Web Applications Originals of Slides and Source Code for Examples: http://courses.coreservlets.com/course-materials/msajsp.html Customized Java EE Training: http://courses.coreservlets.com/

More information

Creating Java EE Applications and Servlets with IntelliJ IDEA

Creating Java EE Applications and Servlets with IntelliJ IDEA Creating Java EE Applications and Servlets with IntelliJ IDEA In this tutorial you will: 1. Create IntelliJ IDEA project for Java EE application 2. Create Servlet 3. Deploy the application to JBoss server

More information

Java Servlet 3.0. Rajiv Mordani Spec Lead

Java Servlet 3.0. Rajiv Mordani Spec Lead Java Servlet 3.0 Rajiv Mordani Spec Lead 1 Overview JCP Java Servlet 3.0 API JSR 315 20 members > Good mix of representation from major Java EE vendors, web container developers and web framework authors

More information

Getting Started with Web Applications

Getting Started with Web Applications 3 Getting Started with Web Applications A web application is a dynamic extension of a web or application server. There are two types of web applications: Presentation-oriented: A presentation-oriented

More information

Oracle WebLogic Server

Oracle WebLogic Server Oracle WebLogic Server Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server 10g Release 3 (10.3) July 2008 Oracle WebLogic Server Developing Web Applications, Servlets, and JSPs for

More information

How To Understand The Architecture Of Java 2Ee, J2Ee, And J2E (Java) In A Wordpress Blog Post

How To Understand The Architecture Of Java 2Ee, J2Ee, And J2E (Java) In A Wordpress Blog Post Understanding Architecture and Framework of J2EE using Web Application Devadrita Dey Sarkar,Anavi jaiswal, Ankur Saxena Amity University,UTTAR PRADESH Sector-125, Noida, UP-201303, India Abstract: This

More information

Java EE Introduction, Content. Component Architecture: Why and How Java EE: Enterprise Java

Java EE Introduction, Content. Component Architecture: Why and How Java EE: Enterprise Java Java EE Introduction, Content Component Architecture: Why and How Java EE: Enterprise Java The Three-Tier Model The three -tier architecture allows to maintain state information, to improve performance,

More information

Web Container Components Servlet JSP Tag Libraries

Web Container Components Servlet JSP Tag Libraries Web Application Development, Best Practices by Jeff Zhuk, JavaSchool.com ITS, Inc. dean@javaschool.com Web Container Components Servlet JSP Tag Libraries Servlet Standard Java class to handle an HTTP request

More information

PowerTier Web Development Tools 4

PowerTier Web Development Tools 4 4 PowerTier Web Development Tools 4 This chapter describes the process of developing J2EE applications with Web components, and introduces the PowerTier tools you use at each stage of the development process.

More information

Web Application Programmer's Guide

Web Application Programmer's Guide Web Application Programmer's Guide JOnAS Team ( Florent BENOIT) - March 2009 - Copyright OW2 consortium 2008-2009 This work is licensed under the Creative Commons Attribution-ShareAlike License. To view

More information

SSC - Web applications and development Introduction and Java Servlet (II)

SSC - Web applications and development Introduction and Java Servlet (II) SSC - Web applications and development Introduction and Java Servlet (II) Shan He School for Computational Science University of Birmingham Module 06-19321: SSC Outline Outline of Topics Servlet Configuration

More information

Keycloak SAML Client Adapter Reference Guide

Keycloak SAML Client Adapter Reference Guide Keycloak SAML Client Adapter Reference Guide SAML 2.0 Client Adapters 1.7.0.Final Preface... v 1. Overview... 1 2. General Adapter Config... 3 2.1. SP Element... 4 2.2. SP Keys and Key elements... 5 2.2.1.

More information

Introduction to J2EE Web Technologies

Introduction to J2EE Web Technologies Introduction to J2EE Web Technologies Kyle Brown Senior Technical Staff Member IBM WebSphere Services RTP, NC brownkyl@us.ibm.com Overview What is J2EE? What are Servlets? What are JSP's? How do you use

More information

Web Applications. For live Java training, please see training courses at

Web Applications. For live Java training, please see training courses at 2009 Marty Hall Using and Deploying Web Applications Originals of Slides and Source Code for Examples: http://courses.coreservlets.com/course-materials/msajsp.html Customized Java EE Training: http://courses.coreservlets.com/

More information

Glassfish, JAVA EE, Servlets, JSP, EJB

Glassfish, JAVA EE, Servlets, JSP, EJB Glassfish, JAVA EE, Servlets, JSP, EJB Java platform A Java platform comprises the JVM together with supporting class libraries. Java 2 Standard Edition (J2SE) (1999) provides core libraries for data structures,

More information

DTS Web Developers Guide

DTS Web Developers Guide Apelon, Inc. Suite 202, 100 Danbury Road Ridgefield, CT 06877 Phone: (203) 431-2530 Fax: (203) 431-2523 www.apelon.com Apelon Distributed Terminology System (DTS) DTS Web Developers Guide Table of Contents

More information

Servlet 3.0. Alexis Moussine-Pouchkine. mercredi 13 avril 2011

Servlet 3.0. Alexis Moussine-Pouchkine. mercredi 13 avril 2011 Servlet 3.0 Alexis Moussine-Pouchkine 1 Overview Java Servlet 3.0 API JSR 315 20 members Good mix of representation from major Java EE vendors, web container developers and web framework authors 2 Overview

More information

Configuring BEA WebLogic Server for Web Authentication with SAS 9.2 Web Applications

Configuring BEA WebLogic Server for Web Authentication with SAS 9.2 Web Applications Configuration Guide Configuring BEA WebLogic Server for Web Authentication with SAS 9.2 Web Applications This document describes how to configure Web authentication with BEA WebLogic for the SAS Web applications.

More information

SSC - Web development Model-View-Controller for Java web application development

SSC - Web development Model-View-Controller for Java web application development SSC - Web development Model-View-Controller for Java web application development Shan He School for Computational Science University of Birmingham Module 06-19321: SSC Outline Outline of Topics Java Server

More information

Java EE 6 New features in practice Part 3

Java EE 6 New features in practice Part 3 Java EE 6 New features in practice Part 3 Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. License for use and distribution

More information

Ch-03 Web Applications

Ch-03 Web Applications Ch-03 Web Applications 1. What is ServletContext? a. ServletContext is an interface that defines a set of methods that helps us to communicate with the servlet container. There is one context per "web

More information

Piotr Nowicki's Homepage. Java EE 6 SCWCD Mock Exam. "Simplicity is the ultimate sophistication." Important!

Piotr Nowicki's Homepage. Java EE 6 SCWCD Mock Exam. Simplicity is the ultimate sophistication. Important! Piotr Nowicki's Homepage "Simplicity is the ultimate sophistication." Java EE 6 SCWCD Mock Exam Posted on March 27, 2011 by Piotr 47 Replies Edit This test might help to test your knowledge before taking

More information

Developing Web Applications using JavaServer Pages and Servlets

Developing Web Applications using JavaServer Pages and Servlets Redpaper Martin Keen Rafael Coutinho Sylvi Lippmann Salvatore Sollami Sundaragopal Venkatraman Steve Baber Henry Cui Craig Fleming Developing Web Applications using JavaServer Pages and Servlets This IBM

More information

Mastering Tomcat Development

Mastering Tomcat Development hep/ Mastering Tomcat Development Ian McFarland Peter Harrison '. \ Wiley Publishing, Inc. ' Part I Chapter 1 Chapter 2 Acknowledgments About the Author Introduction Tomcat Configuration and Management

More information

Volume 1: Core Technologies Marty Hall Larry Brown. An Overview of Servlet & JSP Technology

Volume 1: Core Technologies Marty Hall Larry Brown. An Overview of Servlet & JSP Technology Core Servlets and JavaServer Pages / 2e Volume 1: Core Technologies Marty Hall Larry Brown An Overview of Servlet & JSP Technology 1 Agenda Understanding the role of servlets Building Web pages dynamically

More information

CONTROLLING WEB APPLICATION BEHAVIOR WITH

CONTROLLING WEB APPLICATION BEHAVIOR WITH CONTROLLING WEB APPLICATION BEHAVIOR WITH WEB.XML Chapter Topics in This Chapter Customizing URLs Turning off default URLs Initializing servlets and JSP pages Preloading servlets and JSP pages Declaring

More information

ACM Crossroads Student Magazine The ACM's First Electronic Publication

ACM Crossroads Student Magazine The ACM's First Electronic Publication Page 1 of 8 ACM Crossroads Student Magazine The ACM's First Electronic Publication Crossroads Home Join the ACM! Search Crossroads crossroads@acm.org ACM / Crossroads / Columns / Connector / An Introduction

More information

Hello World Portlet Rendered with JSP for WebSphere Portal Version 4.1

Hello World Portlet Rendered with JSP for WebSphere Portal Version 4.1 1 of 11 16.10.2002 11:41 Hello World Portlet Rendered with JSP for WebSphere Portal Version 4.1 Table of Contents Creating the directory structure Creating the Java code Compiling the code Creating the

More information

Please send your comments to: KZrobok@Setfocus.com

Please send your comments to: KZrobok@Setfocus.com Sun Certified Web Component Developer Study Guide - v2 Sun Certified Web Component Developer Study Guide...1 Authors Note...2 Servlets...3 The Servlet Model...3 The Structure and Deployment of Modern Servlet

More information

Workshop for WebLogic introduces new tools in support of Java EE 5.0 standards. The support for Java EE5 includes the following technologies:

Workshop for WebLogic introduces new tools in support of Java EE 5.0 standards. The support for Java EE5 includes the following technologies: Oracle Workshop for WebLogic 10g R3 Hands on Labs Workshop for WebLogic extends Eclipse and Web Tools Platform for development of Web Services, Java, JavaEE, Object Relational Mapping, Spring, Beehive,

More information

PicketLink Federation User Guide 1.0.0

PicketLink Federation User Guide 1.0.0 PicketLink Federation User Guide 1.0.0 by Anil Saldhana What this Book Covers... v I. Getting Started... 1 1. Introduction... 3 2. Installation... 5 II. Simple Usage... 7 3. Web Single Sign On (SSO)...

More information

TIBCO ActiveMatrix Service Grid WebApp Component Development. Software Release 3.2.0 August 2012

TIBCO ActiveMatrix Service Grid WebApp Component Development. Software Release 3.2.0 August 2012 TIBCO ActiveMatrix Service Grid WebApp Component Development Software Release 3.2.0 August 2012 Important Information SOME TIBCO SOFTWARE EMBEDS OR BUNDLES OTHER TIBCO SOFTWARE. USE OF SUCH EMBEDDED OR

More information

Usability. Usability

Usability. Usability Objectives Review Usability Web Application Characteristics Review Servlets Deployment Sessions, Cookies Usability Trunk Test Harder than you probably thought Your answers didn t always agree Important

More information

www.virtualians.pk CS506 Web Design and Development Solved Online Quiz No. 01 www.virtualians.pk

www.virtualians.pk CS506 Web Design and Development Solved Online Quiz No. 01 www.virtualians.pk CS506 Web Design and Development Solved Online Quiz No. 01 Which of the following is a general purpose container? JFrame Dialog JPanel JApplet Which of the following package needs to be import while handling

More information

Exam Prep. Sun Certified Web Component Developer (SCWCD) for J2EE Platform

Exam Prep. Sun Certified Web Component Developer (SCWCD) for J2EE Platform Exam Prep Sun Certified Web Component Developer (SCWCD) for J2EE Platform Core Servlets & JSP book: www.coreservlets.com More Servlets & JSP book: www.moreservlets.com Servlet and JSP Training Courses:

More information

Configuring Integrated Windows Authentication for JBoss with SAS 9.2 Web Applications

Configuring Integrated Windows Authentication for JBoss with SAS 9.2 Web Applications Configuring Integrated Windows Authentication for JBoss with SAS 9.2 Web Applications Copyright Notice The correct bibliographic citation for this manual is as follows: SAS Institute Inc., Configuring

More information

Securing a Web Service

Securing a Web Service 1 Securing a Web Service HTTP Basic Authentication and HTTPS/SSL Authentication and Encryption - Read Chaper 32 of the J2EE Tutorial - protected session, described later in this chapter, which ensur content

More information

Server Setup and Configuration

Server Setup and Configuration Server Setup and Configuration 1 Agenda Configuring the server Configuring your development environment Testing the setup Basic server HTML/JSP Servlets 2 1 Server Setup and Configuration 1. Download and

More information

EVALUATION ONLY. WA2088 WebSphere Application Server 8.5 Administration on Windows. Student Labs. Web Age Solutions Inc.

EVALUATION ONLY. WA2088 WebSphere Application Server 8.5 Administration on Windows. Student Labs. Web Age Solutions Inc. WA2088 WebSphere Application Server 8.5 Administration on Windows Student Labs Web Age Solutions Inc. Copyright 2013 Web Age Solutions Inc. 1 Table of Contents Directory Paths Used in Labs...3 Lab Notes...4

More information

JBoss SOAP Web Services User Guide. Version: 3.3.0.M5

JBoss SOAP Web Services User Guide. Version: 3.3.0.M5 JBoss SOAP Web Services User Guide Version: 3.3.0.M5 1. JBoss SOAP Web Services Runtime and Tools support Overview... 1 1.1. Key Features of JBossWS... 1 2. Creating a Simple Web Service... 3 2.1. Generation...

More information

ServletExec TM 5.0 User Guide

ServletExec TM 5.0 User Guide ServletExec TM 5.0 User Guide for Microsoft Internet Information Server Netscape Enterprise Server iplanet Web Server Sun ONE Web Server and Apache HTTP Server ServletExec 5.0 User Guide 1 NEW ATLANTA

More information

CrownPeak Java Web Hosting. Version 0.20

CrownPeak Java Web Hosting. Version 0.20 CrownPeak Java Web Hosting Version 0.20 2014 CrownPeak Technology, Inc. All rights reserved. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical,

More information

Managing Data on the World Wide-Web

Managing Data on the World Wide-Web Managing Data on the World Wide-Web Sessions, Listeners, Filters, Shopping Cart Elad Kravi 1 Web Applications In the Java EE platform, web components provide the dynamic extension capabilities for a web

More information

The Server.xml File. Containers APPENDIX A. The Server Container

The Server.xml File. Containers APPENDIX A. The Server Container APPENDIX A The Server.xml File In this appendix, we discuss the configuration of Tomcat containers and connectors in the server.xml configuration. This file is located in the CATALINA_HOME/conf directory

More information

Tutorial: Building a Web Application with Struts

Tutorial: Building a Web Application with Struts Tutorial: Building a Web Application with Struts Tutorial: Building a Web Application with Struts This tutorial describes how OTN developers built a Web application for shop owners and customers of the

More information

Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server 12.1.3 12c (12.1.3)

Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server 12.1.3 12c (12.1.3) [1]Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server 12.1.3 12c (12.1.3) E41936-07 August 2015 This document is a resource for software developers who

More information

Web Applications and Struts 2

Web Applications and Struts 2 Web Applications and Struts 2 Problem area Problem area Separation of application logic and markup Easier to change and maintain Easier to re use Less error prone Access to functionality to solve routine

More information

An introduction to creating JSF applications in Rational Application Developer Version 8.0

An introduction to creating JSF applications in Rational Application Developer Version 8.0 An introduction to creating JSF applications in Rational Application Developer Version 8.0 September 2010 Copyright IBM Corporation 2010. 1 Overview Although you can use several Web technologies to create

More information

Oracle Fusion Middleware

Oracle Fusion Middleware Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server 11g Release 1 (10.3.1) E13712-01 May 2009 This document is a resource for software developers who develop

More information

An Overview of Servlet & JSP Technology

An Overview of Servlet & JSP Technology 2007 Marty Hall An Overview of Servlet & JSP Technology 2 Customized J2EE Training: http://courses.coreservlets.com/ Servlets, JSP, Struts, JSF, EJB3, Ajax, Java 5, Java 6, etc. Ruby/Rails coming soon.

More information

Java and Web. WebWork

Java and Web. WebWork Java and Web WebWork Client/Server server client request HTTP response Inside the Server (1) HTTP requests Functionality for communicating with clients using HTTP CSS Stat. page Dyn. page Dyn. page Our

More information

TIBCO ActiveMatrix BPM WebApp Component Development

TIBCO ActiveMatrix BPM WebApp Component Development TIBCO ActiveMatrix BPM WebApp Component Development Software Release 4.0 November 2015 Two-Second Advantage 2 Important Information SOME TIBCO SOFTWARE EMBEDS OR BUNDLES OTHER TIBCO SOFTWARE. USE OF SUCH

More information

Crawl Proxy Installation and Configuration Guide

Crawl Proxy Installation and Configuration Guide Crawl Proxy Installation and Configuration Guide Google Enterprise EMEA Google Search Appliance is able to natively crawl secure content coming from multiple sources using for instance the following main

More information

Application Notes for Packaging and Deploying Avaya Communications Process Manager Sample SDK Web Application on a JBoss Application Server Issue 1.

Application Notes for Packaging and Deploying Avaya Communications Process Manager Sample SDK Web Application on a JBoss Application Server Issue 1. Avaya Solution & Interoperability Test Lab Application Notes for Packaging and Deploying Avaya Communications Process Manager Sample SDK Web Application on a JBoss Application Server Issue 1.0 Abstract

More information

Web Application Developer s Guide

Web Application Developer s Guide Web Application Developer s Guide VERSION 8 Borland JBuilder Borland Software Corporation 100 Enterprise Way, Scotts Valley, CA 95066-3249 www.borland.com Refer to the file deploy.html located in the redist

More information

Case Studies of Running the Platform. NetBeans UML Servlet JSP GlassFish EJB

Case Studies of Running the Platform. NetBeans UML Servlet JSP GlassFish EJB September Case Studies of Running the Platform NetBeans UML Servlet JSP GlassFish EJB In this project we display in the browser the Hello World, Everyone! message created in the session bean with servlets

More information

TypingMaster Intra. LDAP / Active Directory Installation. Technical White Paper (2009-9)

TypingMaster Intra. LDAP / Active Directory Installation. Technical White Paper (2009-9) TypingMaster Intra LDAP / Active Directory Installation Technical White Paper (2009-9) CONTENTS Contents... 2 TypingMaster Intra LDAP / Active Directory White Paper... 3 Background INFORMATION... 3 Overall

More information

JBoss Portlet Container. User Guide. Release 2.0

JBoss Portlet Container. User Guide. Release 2.0 JBoss Portlet Container User Guide Release 2.0 1. Introduction.. 1 1.1. Motivation.. 1 1.2. Audience 1 1.3. Simple Portal: showcasing JBoss Portlet Container.. 1 1.4. Resources. 1 2. Installation. 3 2.1.

More information

JAVA Web Database Application Developer

JAVA Web Database Application Developer JAVA Web Database Application Developer Aniket Gulwade 1 and Vishal Suryawanshi 2 1 Information Technology, Jawaharlal Darda Institute of Engineering and Technology, Yavatmal, India, aniketgulwade@gmail.com

More information

Configuring Integrated Windows Authentication for Oracle WebLogic with SAS 9.2 Web Applications

Configuring Integrated Windows Authentication for Oracle WebLogic with SAS 9.2 Web Applications Configuring Integrated Windows Authentication for Oracle WebLogic with SAS 9.2 Web Applications Copyright Notice The correct bibliographic citation for this manual is as follows: SAS Institute Inc., Configuring

More information

How To Protect Your Computer From Being Hacked On A J2Ee Application (J2Ee) On A Pc Or Macbook Or Macintosh (Jvee) On An Ipo (J 2Ee) (Jpe) On Pc Or

How To Protect Your Computer From Being Hacked On A J2Ee Application (J2Ee) On A Pc Or Macbook Or Macintosh (Jvee) On An Ipo (J 2Ee) (Jpe) On Pc Or Pistoia_ch03.fm Page 55 Tuesday, January 6, 2004 1:56 PM CHAPTER3 Enterprise Java Security Fundamentals THE J2EE platform has achieved remarkable success in meeting enterprise needs, resulting in its widespread

More information

White Paper March 1, 2005. Integrating AR System with Single Sign-On (SSO) authentication systems

White Paper March 1, 2005. Integrating AR System with Single Sign-On (SSO) authentication systems White Paper March 1, 2005 Integrating AR System with Single Sign-On (SSO) authentication systems Copyright 2005 BMC Software, Inc. All rights reserved. BMC, the BMC logo, all other BMC product or service

More information

<Insert Picture Here> Hudson Security Architecture. Winston Prakash. Click to edit Master subtitle style

<Insert Picture Here> Hudson Security Architecture. Winston Prakash. Click to edit Master subtitle style Hudson Security Architecture Click to edit Master subtitle style Winston Prakash Hudson Security Architecture Hudson provides a security mechanism which allows Hudson Administrators

More information

Java 2 Web Developer Certification Study Guide Natalie Levi

Java 2 Web Developer Certification Study Guide Natalie Levi SYBEX Index Java 2 Web Developer Certification Study Guide Natalie Levi Index Copyright 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved. No part of this publication

More information

Oracle WebLogic Server

Oracle WebLogic Server Oracle WebLogic Server Deploying Applications to WebLogic Server 10g Release 3 (10.3) July 2008 Oracle WebLogic Server Deploying Applications to WebLogic Server, 10g Release 3 (10.3) Copyright 2007, 2008,

More information

JSP Java Server Pages

JSP Java Server Pages JSP - Java Server Pages JSP Java Server Pages JSP - Java Server Pages Characteristics: A way to create dynamic web pages, Server side processing, Based on Java Technology, Large library base Platform independence

More information

Client-Server Architecture & J2EE Platform Technologies Overview Ahmed K. Ezzat

Client-Server Architecture & J2EE Platform Technologies Overview Ahmed K. Ezzat Client-Server Architecture & J2EE Platform Technologies Overview Ahmed K. Ezzat Page 1 of 14 Roadmap Client-Server Architecture Introduction Two-tier Architecture Three-tier Architecture The MVC Architecture

More information

Oracle WebLogic Server 11g: Administration Essentials

Oracle WebLogic Server 11g: Administration Essentials Oracle University Contact Us: 1.800.529.0165 Oracle WebLogic Server 11g: Administration Essentials Duration: 5 Days What you will learn This Oracle WebLogic Server 11g: Administration Essentials training

More information

Building and Using Web Services With JDeveloper 11g

Building and Using Web Services With JDeveloper 11g Building and Using Web Services With JDeveloper 11g Purpose In this tutorial, you create a series of simple web service scenarios in JDeveloper. This is intended as a light introduction to some of the

More information

SESM Tag Library. Configuring a Tag Library APPENDIX

SESM Tag Library. Configuring a Tag Library APPENDIX APPENDIX A This appendix provides information on configuring an SESM tag library and describes the SESM tag libraries other than the Localization tag library: Iterator Tag Library, page A-2 Navigator Tag

More information

Web-JISIS Reference Manual

Web-JISIS Reference Manual 23 March 2015 Author: Jean-Claude Dauphin jc.dauphin@gmail.com I. Web J-ISIS Architecture Web-JISIS Reference Manual Web-JISIS is a Rich Internet Application (RIA) whose goal is to develop a web top application

More information

Java Application Developer Certificate Program Competencies

Java Application Developer Certificate Program Competencies Java Application Developer Certificate Program Competencies After completing the following units, you will be able to: Basic Programming Logic Explain the steps involved in the program development cycle

More information

15-415 Database Applications Recitation 10. Project 3: CMUQFlix CMUQ s Movies Recommendation System

15-415 Database Applications Recitation 10. Project 3: CMUQFlix CMUQ s Movies Recommendation System 15-415 Database Applications Recitation 10 Project 3: CMUQFlix CMUQ s Movies Recommendation System Project Objective 1. Set up a front-end website with PostgreSQL back-end 2. Allow users to login, like

More information

Programming on the Web(CSC309F) Tutorial: Servlets && Tomcat TA:Wael Aboelsaadat

Programming on the Web(CSC309F) Tutorial: Servlets && Tomcat TA:Wael Aboelsaadat Programming on the Web(CSC309F) Tutorial: Servlets && Tomcat TA:Wael Aboelsaadat Acknowledgments : This tutorial is based on a series of articles written by James Goodwill about Tomcat && Servlets. 1 Tomcat

More information

Enabling Single-Sign-On between IBM Cognos 8 BI and IBM WebSphere Portal

Enabling Single-Sign-On between IBM Cognos 8 BI and IBM WebSphere Portal Guideline Enabling Single-Sign-On between IBM Cognos 8 BI and IBM WebSphere Portal Product(s): IBM Cognos 8 BI Area of Interest: Security Copyright Copyright 2008 Cognos ULC (formerly Cognos Incorporated).

More information

Configure a SOAScheduler for a composite in SOA Suite 11g. By Robert Baumgartner, Senior Solution Architect ORACLE

Configure a SOAScheduler for a composite in SOA Suite 11g. By Robert Baumgartner, Senior Solution Architect ORACLE Configure a SOAScheduler for a composite in SOA Suite 11g By Robert Baumgartner, Senior Solution Architect ORACLE November 2010 Scheduler for the Oracle SOA Suite 11g: SOAScheduler Page 1 Prerequisite

More information

Configuring Integrated Windows Authentication for JBoss with SAS 9.3 Web Applications

Configuring Integrated Windows Authentication for JBoss with SAS 9.3 Web Applications Configuring Integrated Windows Authentication for JBoss with SAS 9.3 Web Applications Copyright Notice The correct bibliographic citation for this manual is as follows: SAS Institute Inc., Configuring

More information

Topics. Incorporating JSP Custom Tags Into Your Web Apps. A Quick Example of Using One. What They Are. Why Developers Should Consider Them

Topics. Incorporating JSP Custom Tags Into Your Web Apps. A Quick Example of Using One. What They Are. Why Developers Should Consider Them Incorporating JSP Custom Tags Into Your Web Apps Charles Arehart Founder/CTO, Systemanage Laurel MD Topics Why They Can Be Useful 5 Steps to Using Them Finding Custom Tag Libraries The JSP Standard Tag

More information

ServletExec TM 6.0 User Guide. for Microsoft Internet Information Server Sun ONE Web Server Sun Java System Web Server and Apache HTTP Server

ServletExec TM 6.0 User Guide. for Microsoft Internet Information Server Sun ONE Web Server Sun Java System Web Server and Apache HTTP Server ServletExec TM 6.0 User Guide for Microsoft Internet Information Server Sun ONE Web Server Sun Java System Web Server and Apache HTTP Server ServletExec 6.0 User Guide 1 NEW ATLANTA COMMUNICATIONS, LLC

More information

Instant Chime for IBM Sametime Installation Guide for Apache Tomcat and Microsoft SQL

Instant Chime for IBM Sametime Installation Guide for Apache Tomcat and Microsoft SQL Instant Chime for IBM Sametime Installation Guide for Apache Tomcat and Microsoft SQL Spring 2015 Copyright and Disclaimer This document, as well as the software described in it, is furnished under license

More information

HttpUnit Laboratorio di Sistemi Software - A.A. 2003/2004

HttpUnit Laboratorio di Sistemi Software - A.A. 2003/2004 HttpUnit Laboratorio di Sistemi Software - A.A. 2003/2004 Introduction HttpUnit, available from http://www.httpunit.org, is an open source Java library for programmatically interacting with HTTP servers.

More information

Java Server Pages combined with servlets in action. Generals. Java Servlets

Java Server Pages combined with servlets in action. Generals. Java Servlets Java Server Pages combined with servlets in action We want to create a small web application (library), that illustrates the usage of JavaServer Pages combined with Java Servlets. We use the JavaServer

More information

Announcements. Comments on project proposals will go out by email in next couple of days...

Announcements. Comments on project proposals will go out by email in next couple of days... Announcements Comments on project proposals will go out by email in next couple of days... 3-Tier Using TP Monitor client application TP monitor interface (API, presentation, authentication) transaction

More information

Core Java+ J2EE+Struts+Hibernate+Spring

Core Java+ J2EE+Struts+Hibernate+Spring Core Java+ J2EE+Struts+Hibernate+Spring Java technology is a portfolio of products that are based on the power of networks and the idea that the same software should run on many different kinds of systems

More information

Principles and Techniques of DBMS 5 Servlet

Principles and Techniques of DBMS 5 Servlet Principles and Techniques of DBMS 5 Servlet Haopeng Chen REliable, INtelligentand Scalable Systems Group (REINS) Shanghai Jiao Tong University Shanghai, China http://reins.se.sjtu.edu.cn/~chenhp e- mail:

More information

TIBCO ActiveMatrix BPM Web Application Component Development. Software Release 2.0 November 2012

TIBCO ActiveMatrix BPM Web Application Component Development. Software Release 2.0 November 2012 TIBCO ActiveMatrix BPM Web Application Component Development Software Release 2.0 November 2012 Important Information SOME TIBCO SOFTWARE EMBEDS OR BUNDLES OTHER TIBCO SOFTWARE. USE OF SUCH EMBEDDED OR

More information

An introduction to web programming with Java

An introduction to web programming with Java Chapter 1 An introduction to web programming with Java Objectives Knowledge Objectives (continued) The first page of a shopping cart application The second page of a shopping cart application Components

More information

Deploying Intellicus Portal on IBM WebSphere

Deploying Intellicus Portal on IBM WebSphere Deploying Intellicus Portal on IBM WebSphere Intellicus Web-based Reporting Suite Version 4.5 Enterprise Professional Smart Developer Smart Viewer Intellicus Technologies info@intellicus.com www.intellicus.com

More information

What Is the Java TM 2 Platform, Enterprise Edition?

What Is the Java TM 2 Platform, Enterprise Edition? Page 1 de 9 What Is the Java TM 2 Platform, Enterprise Edition? This document provides an introduction to the features and benefits of the Java 2 platform, Enterprise Edition. Overview Enterprises today

More information

Spring Security SAML module

Spring Security SAML module Spring Security SAML module Author: Vladimir Schäfer E-mail: vladimir.schafer@gmail.com Copyright 2009 The package contains the implementation of SAML v2.0 support for Spring Security framework. Following

More information

Java Web Services Developer Pack. Copyright 2003 David A. Wilson. All rights reserved.

Java Web Services Developer Pack. Copyright 2003 David A. Wilson. All rights reserved. Java Web Services Developer Pack Copyright 2003 David A. Wilson. All rights reserved. Objectives Configure to use JWSDP Find the right sample program Many in JWSDP More in the Web Services Tutorial Find

More information