Uh-oh. She’s right...

Think about what we did. We made a page for the header, “Header.jsp”. It was a nice JSP all on its own, complete with its opening and closing HTML and BODY tags. Then we made the “Contact.jsp” and it, too, had nice opening and closing tags. Well, didn’t we say that everything in the included file is pasted (virtually) into the page with the include? That means everything.

image with no caption

The code below, from the generated servlet, will NOT work in all browsers. It worked in ours because we got lucky.

image with no caption

Note

Do NOT put opening and closing HTML and BODY tags within your reusable pieces!

Design and write your layout template chunks (like headers, nav bars, etc.) assuming they will be included in some OTHER page.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset