Copyright 2001 Michael Slinn JBrowCaps Open Source Browser Independent Page Rendering for Java Servlets Mike Slinn

Slides:



Advertisements
Similar presentations
CSCI N241: Fundamentals of Web Design Copyright ©2004 Department of Computer & Information Science Introducing XHTML: Module B: HTML to XHTML.
Advertisements

1 © Netskills Quality Internet Training, University of Newcastle Introducing Cascading Style Sheets © Netskills, Quality Internet.
HTML Basics Customizing your site using the basics of HTML.
Apache Struts Technology
Standards and Increasing Maintainability on Web- based Systems James Eaton SE4112/16/2006.
1 HTML Standards & Compliance. 2 Minimum Required HTML tags: (must go in this order!)
28/1/2001 Seminar in Databases in the Internet Environment Introduction to J ava S erver P ages technology by Naomi Chen.
HTML Recall that HTML is static in that it describes how a page is to be displayed, but it doesn’t provide for interaction or animation. A page created.
Java Server Pages B.Ramamurthy. Java Server Pages Servlets are pure Java programs. They introduce dynamism into web pages by using programmatic content.
1 Java Server Pages Can web pages be created specially for each user? What part does Java play?
Upgrading to XHTML DECO 3001 Tutorial 1 – Part 1 Presented by Ji Soo Yoon 19 February 2004 Slides adopted from
Web programming for project students Dr Jim Briggs.
Developing a Basic Web Page with HTML
Introducing XHTML: Module B: HTML to XHTML. Goals Understand how XHTML evolved as a language for Web delivery Understand the importance of DTDs Understand.
1st Project Introduction to HTML.
Web Design is a class created to nurture the minds of high school techies, and introduce those without prior knowledge to the field.
Introducing HTML & XHTML:. Goals  Understand hyperlinking  Understand how tags are formed and used.  Understand HTML as a markup language  Understand.
Introduction to Java web programming Dr Jim Briggs JWP intro1.
Introduce of XML Xiaoling Song CS157A. What is XML? XML stands for EXtensible Markup Language XML stands for EXtensible Markup Language XML is a markup.
Basics of HTML.
1 CIS336 Website design, implementation and management (also Semester 2 of CIS219, CIS221 and IT226) Lecture 9 JavaServer Pages (JSP) (Based on Møller.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Chapter 11 Cascading Style Sheets: Part I The Web Warrior Guide to Web Design Technologies.
Creating a Basic Web Page
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
JavaScript, Fifth Edition Chapter 1 Introduction to JavaScript.
Chapter 16 The World Wide Web Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Describe several.
ULI101 – XHTML Basics (Part II) What is Markup Language? XHTML vs. HTML General XHTML Rules Block Level XHTML Tags XHTML Validation.
Chapter 16 The World Wide Web. 2 The Web An infrastructure of information combined and the network software used to access it Web page A document that.
16-1 The World Wide Web The Web An infrastructure of distributed information combined with software that uses networks as a vehicle to exchange that information.
CPS120: Introduction to Computer Science The World Wide Web Nell Dale John Lewis.
SDPL 2002Notes 7: Apache Cocoon1 7 XML Web Site Architecture Example: Apache Cocoon, a Web publishing architecture based on XML technology
Chapter 17 - Deploying Java Applications on the Web1 Chapter 17 Deploying Java Applications on the Web.
JSP Java Server Pages Softsmith Infotech.
HTML and Style. Session overview Leveling-off on the basic concepts of HTML and Styles Discuss Web authoring options.
Introduction to JavaServer Pages (JSP) Slides from Dr. Mark Llewellyn.
Java Server Pages Lecture July Java Server Pages Java Server Pages (JSPs) provide a way to separate the generation of dynamic content (java)
DSpace UI Alexey Maslov. DSpace in general A digital library tool useful for storage, maintenance, and retrieval of digital documents Two types of interaction:
Overview of HTML/XHTML Two Different Approaches  Text editor like Notepad  HTML editor such as: –KompoZer –DreamWeaver –Microsoft Expression Web –iWeb.
JAVA SERVER PAGES. 2 SERVLETS The purpose of a servlet is to create a Web page in response to a client request Servlets are written in Java, with a little.
Chapter 10 Overview of JSP Technology. Understanding the need for JSP JSP technology enables to mix regular, static HTML with dynamically generated content.
JAVA SERVER PAGES CREATING DYNAMIC WEB PAGES USING JAVA James Faeldon CS 119 Enterprise Systems Programming.
Fundamentals of Web Design Copyright ©2004  Department of Computer & Information Science Introducing XHTML: Module A: Web Design Basics.
Chapter 13. Applets and HTML HTML Applets Computer Programming with JAVA.
Presentation Topic: XML and ASP Presented by Yanzhi Zhang.
XML eXtensible Markup Language. Topics  What is XML  An XML example  Why is XML important  XML introduction  XML applications  XML support CSEB.
XML 2nd EDITION Tutorial 1 Creating An Xml Document.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Creating XHTML Documents Essentials for.
Use CSS to Implement a Reusable Design Selecting a Dreamweaver CSS Starter Layout is the easiest way to create a page with a CSS layout You can access.
1 Overview of XSL. 2 Outline We will use Roger Costello’s tutorial The purpose of this presentation is  To give a quick overview of XSL  To describe.
Copyright © 2002 ProsoftTraining. All rights reserved. JavaServer Pages.
XML Basics A brief introduction to XML in general 1XML Basics.
Cascading Style Sheets CSS. Source W3Schools
An Introduction to JavaServer™ Pages Prepared by Nicole Swan.
An Introduction to JavaServer™ Pages Prepared by Nicole Swan.
CS562 Advanced Java and Internet Application Introduction to the Computer Warehouse Web Application. Java Server Pages (JSP) Technology. By Team Alpha.
Microsoft Expression Web 3 – Illustrated Unit D: Structuring and Styling Text.
CSS Hadas Kahsay. Overview  What is CSS  Basic syntax of CSS Rules  How to link CSS style to html documents  Browsers and CSS  Advantages of CSS.
Chapter 1 Introduction to HTML, XHTML, and CSS HTML5 & CSS 7 th Edition.
 Java Server Pages (JSP) By Offir Golan. What is JSP?  A technology that allows for the creation of dynamically generated web pages based on HTML, XML,
10 Copyright © 2004, Oracle. All rights reserved. Building ADF View Components.
Standards and Compliance. A Brief History of HTML HTML through 1991  Hypertext enabled pages but presentation was lacking HTML 
1 CSC160 Chapter 1: Introduction to JavaScript Chapter 2: Placing JavaScript in an HTML File.
NASRULLAHIBA.  It is time to take your web designing skills to the next level with Cascading Style Sheets (CSS). They are a way to control the look and.
A S P. Outline  The introduction of ASP  Why we choose ASP  How ASP works  Basic syntax rule of ASP  ASP’S object model  Limitations of ASP  Summary.
JSP (Java Server Page) JSP is server side technology which is used to create dynamic web pages just like Servlet technology. This is mainly used for implementing.
Introduction to web design discussing which languages is used for website designing
Cascading Style Sheets - Building a stylesheet
Introducing HTML & XHTML:
Cascading Style Sheets - Building a stylesheet
Presentation transcript:

Copyright 2001 Michael Slinn JBrowCaps Open Source Browser Independent Page Rendering for Java Servlets Mike Slinn jbrowcaps.sourceforge.net/

Copyright 2001 Michael Slinn Incompatible Browsers Microsoft and Netscape browsers don’t speak the same language. Older browsers are at a disadvantage without style sheets. More browsers show up every day. The result is … Chaos! (and lots of extra work for nothing)

Copyright 2001 Michael Slinn Problem Not Going Away Microsoft has been successful in upgrading Internet Explorer users Netscape users tend not to upgrade New devices constantly appearing (WAP, i-mode cHTML, etc.)

Copyright 2001 Michael Slinn Browser Share at mslinn.com (as of March 2001)

Copyright 2001 Michael Slinn Netscape Distribution by Version

Copyright 2001 Michael Slinn Instead of This …

Copyright 2001 Michael Slinn 16% of Visitors See This!

Copyright 2001 Michael Slinn Problem Continues to Grow Increasingly expensive to maintain multiple versions of web site HTML

Copyright 2001 Michael Slinn What Makes JBrowCaps Special? Markup is defined in JSP file, not in Java code (unlike ECS) Stylesheet is the single source for markup definition for all browser types! Nice transition between HTML/XML page design tool and JSP Extensible (for cHTML, XML, etc.)

Copyright 2001 Michael Slinn Good CSS Source is Important Change look and feel of a web app by editing CSS, even for browsers that aren’t CSS aware JBrowCaps does not assume any defaults Baseline HTML definitions necessary

Copyright 2001 Michael Slinn CSS Terminology Bug {color:white; background-color:blue; display:block;} Selector Rule

Copyright 2001 Michael Slinn JBrowCaps CSS Parsing Multiple selectors per rule permitted: h1, h2 {color:red; display:block;} Selector redefinition permitted: h1, h2 {color:red; display:block;} h1 {font-size:20pt;} h2 {font-size:16pt;} Selectors are case sensitive! H1 is NOT the same as h1

Copyright 2001 Michael Slinn and breaks the marked up output flows the marked up output into the current line. JBrowCaps uses and according to type of CSS tag applied

Copyright 2001 Michael Slinn CSS display Attribute CSS display attribute is key to selecting or display:inline generates display:block generates

Copyright 2001 Michael Slinn CSS Enabled Browser Output StyleOn – – or StyleOff – – or

Copyright 2001 Michael Slinn CSS Challenged Browser Output StyleOn – StyleOff –

Copyright 2001 Michael Slinn Inside Tag Libraries Tomcat’s Jasper compiles JSPs into servlets. tld files are used by Jasper to verify taglib syntax At run time, tag library code uses PageContext class to access request, response and servletContext

Copyright 2001 Michael Slinn Tomcat’s Tag Library Problem TagExtraInfo() is called by Jasper at page translation time to define the tag library’s scripting variables Unfortunately, Tomcat’s current implementation does not provide TagExtraInfo() access to pageContext This means that parameters to tag libraries cannot use URLs or directory names that are relative to the web application

Copyright 2001 Michael Slinn JBrowCaps Work-Around Use absolute file names when pointing to CSS files (non-portable, unfortunately) I reported bug #75 in Apache’s Tomcat Bugzilla database, but no commitment was made to fix it

Copyright 2001 Michael Slinn JBrowCaps Custom Tag Optional attributes are shown in white If declare is not provided, all symbols in CSS file are defined in JSP

Copyright 2001 Michael Slinn Using JBrowCaps > JBrowCaps Custom Tag Test This is a test

Copyright 2001 Michael Slinn Internet Explorer 5.5 Output

Copyright 2001 Michael Slinn Netscape 4.7 Output

Copyright 2001 Michael Slinn Netscape 3.3 Output

Copyright 2001 Michael Slinn JBrowCaps Data Structures CSS Stylesheet File JBrowCaps (various classes) cssTrue HashMap cssFalse HashMap Each HashMap stores three kinds of tags, directed to different browser capabilities, for each CSS selector. Setting background color and image: Start of marked up text: End of marked up text:

Copyright 2001 Michael Slinn Future Browser Support CSS Stylesheet JBrowCaps cssTrue HashMap cssFalse HashMap i-mode cHTML HashMap

Copyright 2001 Michael Slinn JBrowCaps Classes JBrowCapsTag – tag library runtime JBrowCapsTagExtraInfo – translation time StyleSheet – main class; application bean HtmlFormat – translates between CSS tags and various flavors of markup CssRule – parses CSS selectors BrowserDetector – initialization only TurbineException – used by BrowserDetector

Copyright 2001 Michael Slinn To Do HtmlFormat is not complete. The matrix of browser version vs. tag support needs to be completed. More testing More sample pages and documentation Optimization Any volunteers for this open source project?