Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning JavaServer Pages
This is the forum to discuss the Wrox book Beginning JavaServer Pages by Vivek Chopra, Jon Eaves, Rupert Jones, Sing Li, John T. Bell; ISBN: 9780764574856
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning JavaServer Pages section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 23rd, 2005, 08:57 AM
Registered User
 
Join Date: Jun 2005
Location: Nottingham, , United Kingdom.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 2

Hi, I am new to JSP. I am confused with the exercises solution, exercises 2 for chapter 2. I copied exactly same code from the exercise solutions,and I got error messages. After careful check with my typing, I found the <c:otherwise/> appears in the news.jsp, weather.jsp, and entertain.jsp. For my understanding, it should be worked as a pair:
<c:otherwise> </c:otherwise>. Could you please what is the different between <c:otherwise/> and <c:otherwise> </c:otherwise>.

Many Thanks!

Reply With Quote
  #2 (permalink)  
Old June 27th, 2005, 02:57 PM
Registered User
 
Join Date: Feb 2005
Location: McLean, Virginia, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default



Ann,

In XML it is possible for an element to have no content at all. Such an element is called an empty element. One way to denote an empty element is to merely leave out the content, e.g.

<center><c:otherwise></c:otherwise></center>

<div align="left">But as a shortcut, empty elements may also have a different syntax. Because there is no content to delimit, they may consist of a single empty-element tag. That looks like:</div id="left">

<center><c:otherwise/></center>

<div align="left">The slash at the end indicates that this is an empty-element tag, so there is no content or end-tag coming up. The slash is meant to be reminiscent of the slash in the end-tag of an element with both tags. This is just a shortcut syntax.</div id="left">




Neil Hainer
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 2 - End of chapter exercises whizzkid1892 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 July 30th, 2008 12:02 PM
chapter 7 - chapter 11 pelopito BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 3 January 6th, 2008 11:40 AM
Generics chapter 12 difficult chapter i found ...? Larryz C# 2005 1 July 4th, 2007 09:40 PM



All times are GMT -4. The time now is 08:31 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.