Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/misc/dynamicattrs.jsp URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/misc/dynamicattrs.jsp?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/misc/dynamicattrs.jsp (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/misc/dynamicattrs.jsp Mon May 29 04:51:34 2006 @@ -0,0 +1,43 @@ + +<%@ taglib prefix="my" uri="http://jakarta.apache.org/tomcat/jsp2-example-taglib"%> + + + JSP 2.0 Examples - Dynamic Attributes + + +

JSP 2.0 Examples - Dynamic Attributes

+
+

This JSP page invokes a custom tag that accepts a dynamic set + of attributes. The tag echoes the name and value of all attributes + passed to it.

+
+

Invocation 1 (six attributes)

+ +

Invocation 2 (zero attributes)

+ +

Invocation 3 (three attributes)

+ + + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/misc/dynamicattrs.jsp ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/misc/prelude.jspf URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/misc/prelude.jspf?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/misc/prelude.jspf (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/misc/prelude.jspf Mon May 29 04:51:34 2006 @@ -0,0 +1,5 @@ +
+
+This banner included with <include-prelude> +
+
Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/book.html URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/book.html?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/book.html (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/book.html Mon May 29 04:51:34 2006 @@ -0,0 +1,36 @@ + + + +View Source Code + + + + +

+

+ +

Source Code for the Book Example JSP +

+

Source Code for the FindBook SimpleTag Handler +

+

Source Code for BookBean +

+

Source Code for the EL Functions +

+ + + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/book.html ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/book.jsp URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/book.jsp?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/book.jsp (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/book.jsp Mon May 29 04:51:34 2006 @@ -0,0 +1,54 @@ + +<%@ taglib prefix="my" uri="/WEB-INF/jsp2/jsp2-example-taglib.tld" %> + + + JSP 2.0 Examples - Book SimpleTag Handler + + +

JSP 2.0 Examples - Book SimpleTag Handler

+
+

Illustrates a semi-realistic use of SimpleTag and the Expression + Language. First, a <my:findBook> tag is invoked to populate + the page context with a BookBean. Then, the books fields are printed + in all caps.

+
+ Result:
+ + + + + + + + + + + + + + + + + + + + + + +
FieldValueCapitalized
Title${book.title}${my:caps(book.title)}
Author${book.author}${my:caps(book.author)}
ISBN${book.isbn}${my:caps(book.isbn)}
+ + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/book.jsp ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/hello.html URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/hello.html?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/hello.html (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/hello.html Mon May 29 04:51:34 2006 @@ -0,0 +1,32 @@ + + + +View Source Code + + + + +

+

+ +

Source Code for the Hello World Tag Example JSP +

+

Source Code for the Hello World SimpleTag Handler +

+ + + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/hello.html ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/hello.jsp URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/hello.jsp?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/hello.jsp (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/hello.jsp Mon May 29 04:51:34 2006 @@ -0,0 +1,30 @@ + +<%@ taglib prefix="mytag" uri="/WEB-INF/jsp2/jsp2-example-taglib.tld" %> + + + JSP 2.0 Examples - Hello World SimpleTag Handler + + +

JSP 2.0 Examples - Hello World SimpleTag Handler

+
+

This tag handler simply echos "Hello, World!" It's an example of + a very basic SimpleTag handler with no body.

+
+ Result: + + + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/hello.jsp ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/repeat.html URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/repeat.html?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/repeat.html (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/repeat.html Mon May 29 04:51:34 2006 @@ -0,0 +1,32 @@ + + + +View Source Code + + + + +

+

+ +

Source Code for the Repeat Tag Example JSP +

+

Source Code for the Repeat SimpleTag Handler +

+ + + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/repeat.html ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/repeat.jsp URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/repeat.jsp?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/repeat.jsp (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/repeat.jsp Mon May 29 04:51:34 2006 @@ -0,0 +1,38 @@ + +<%@ taglib prefix="mytag" uri="/WEB-INF/jsp2/jsp2-example-taglib.tld" %> + + + JSP 2.0 Examples - Repeat SimpleTag Handler + + +

JSP 2.0 Examples - Repeat SimpleTag Handler

+
+

This tag handler accepts a "num" parameter and repeats the body of the + tag "num" times. It's a simple example, but the implementation of + such a tag in JSP 2.0 is substantially simpler than the equivalent + JSP 1.2-style classic tag handler.

+

The body of the tag is encapsulated in a "JSP Fragment" and passed + to the tag handler, which then executes it five times, inside a + for loop. The tag handler passes in the current invocation in a + scoped variable called count, which can be accessed using the EL.

+
+ Result:
+ + Invocation ${count} of 5
+
+ + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/repeat.jsp ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/hello.html URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/hello.html?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/hello.html (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/hello.html Mon May 29 04:51:34 2006 @@ -0,0 +1,32 @@ + + + +View Source Code + + + + +

+

+ +

Source Code for hello.jsp +

+

Source Code for helloWorld.tag +

+ + + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/hello.html ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/hello.jsp URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/hello.jsp?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/hello.jsp (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/hello.jsp Mon May 29 04:51:34 2006 @@ -0,0 +1,34 @@ + +<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %> + + + JSP 2.0 Examples - Hello World Using a Tag File + + +

JSP 2.0 Examples - Hello World Using a Tag File

+
+

This JSP page invokes a custom tag that simply echos "Hello, World!" + The custom tag is generated from a tag file in the /WEB-INF/tags + directory.

+

Notice that we did not need to write a TLD for this tag. We just + created /WEB-INF/tags/helloWorld.tag, imported it using the taglib + directive, and used it!

+
+ Result: + + + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/hello.jsp ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/panel.html URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/panel.html?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/panel.html (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/panel.html Mon May 29 04:51:34 2006 @@ -0,0 +1,32 @@ + + + +View Source Code + + + + +

+

+ +

Source Code for panel.jsp +

+

Source Code for panel.tag +

+ + + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/panel.html ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/panel.jsp URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/panel.jsp?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/panel.jsp (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/panel.jsp Mon May 29 04:51:34 2006 @@ -0,0 +1,57 @@ + +<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %> + + + JSP 2.0 Examples - Panels using Tag Files + + +

JSP 2.0 Examples - Panels using Tag Files

+
+

This JSP page invokes a custom tag that draws a + panel around the contents of the tag body. Normally, such a tag + implementation would require a Java class with many println() statements, + outputting HTML. Instead, we can use a .tag file as a template, + and we don't need to write a single line of Java or even a TLD!

+
+ + + + + + +
+ + First panel.
+
+
+ + Second panel.
+ Second panel.
+ Second panel.
+ Second panel.
+
+
+ + Third panel.
+ + A panel in a panel. + + Third panel.
+
+
+ + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/panel.jsp ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/products.html URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/products.html?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/products.html (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/products.html Mon May 29 04:51:34 2006 @@ -0,0 +1,21 @@ + + + +View Source Code + + + + +

+

+ +

Source Code for products.jsp +

+

Source Code for displayProducts.tag +

+ + + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/products.html ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/products.jsp URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/products.jsp?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/products.jsp (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/products.jsp Mon May 29 04:51:34 2006 @@ -0,0 +1,53 @@ + +<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %> + + + JSP 2.0 Examples - Display Products Tag File + + +

JSP 2.0 Examples - Display Products Tag File

+
+

This JSP page invokes a tag file that displays a listing of + products. The custom tag accepts two fragments that enable + customization of appearance. One for when the product is on sale + and one for normal price.

+

The tag is invoked twice, using different styles

+
+

Products

+ + + Item: ${name}
+ Price: ${price} +
+ + Item: ${name}
+ Was: ${origPrice}
+ Now: ${salePrice} +
+
+
+

Products (Same tag, alternate style)

+ + + ${name} @ ${price} ea. + + + ${name} @ ${salePrice} ea. (was: ${origPrice}) + + + + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/products.jsp ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsptoserv/hello.jsp URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsptoserv/hello.jsp?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsptoserv/hello.jsp (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsptoserv/hello.jsp Mon May 29 04:51:34 2006 @@ -0,0 +1,25 @@ + + + + +

+I have been invoked by +<% out.print (request.getAttribute("servletName").toString()); %> +Servlet. +

+ + \ No newline at end of file Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsptoserv/hello.jsp ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsptoserv/jsptoservlet.jsp URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsptoserv/jsptoservlet.jsp?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsptoserv/jsptoservlet.jsp (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsptoserv/jsptoservlet.jsp Mon May 29 04:51:34 2006 @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsptoserv/jsptoservlet.jsp ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsptoserv/jts.html URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsptoserv/jts.html?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsptoserv/jts.html (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsptoserv/jts.html Mon May 29 04:51:34 2006 @@ -0,0 +1,33 @@ + + + + +Untitled Document + + + + +

+ +

Source Code for JSP calling servlet +

+ +

Source Code for Servlet calling JSP +

+ + + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsptoserv/jts.html ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/num/numguess.html URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/num/numguess.html?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/num/numguess.html (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/num/numguess.html Mon May 29 04:51:34 2006 @@ -0,0 +1,33 @@ + + + +Untitled Document + + + + +

+ +

Source Code for Numguess Example +

+ + + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/num/numguess.html ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/num/numguess.jsp URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/num/numguess.jsp?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/num/numguess.jsp (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/num/numguess.jsp Mon May 29 04:51:34 2006 @@ -0,0 +1,68 @@ + + +<%@ page import = "num.NumberGuessBean" %> + + + + + +Number Guess + + + +<% if (numguess.getSuccess()) { %> + + Congratulations! You got it. + And after just <%= numguess.getNumGuesses() %> tries.

+ + <% numguess.reset(); %> + + Care to try again? + +<% } else if (numguess.getNumGuesses() == 0) { %> + + Welcome to the Number Guess game.

+ + I'm thinking of a number between 1 and 100.

+ +

+ What's your guess? + +
+ +<% } else { %> + + Good guess, but nope. Try <%= numguess.getHint() %>. + + You have made <%= numguess.getNumGuesses() %> guesses.

+ + I'm thinking of a number between 1 and 100.

+ +

+ What's your guess? + +
+ +<% } %> + +
+ + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/num/numguess.jsp ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/plugin/applet/Clock2.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/plugin/applet/Clock2.java?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/plugin/applet/Clock2.java (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/plugin/applet/Clock2.java Mon May 29 04:51:34 2006 @@ -0,0 +1,212 @@ +/* +* Copyright 2004 The Apache Software Foundation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import java.util.*; +import java.awt.*; +import java.applet.*; +import java.text.*; + +/** + * Time! + * + * @author Rachel Gollub + */ + +public class Clock2 extends Applet implements Runnable { + Thread timer; // The thread that displays clock + int lastxs, lastys, lastxm, + lastym, lastxh, lastyh; // Dimensions used to draw hands + SimpleDateFormat formatter; // Formats the date displayed + String lastdate; // String to hold date displayed + Font clockFaceFont; // Font for number display on clock + Date currentDate; // Used to get date to display + Color handColor; // Color of main hands and dial + Color numberColor; // Color of second hand and numbers + + public void init() { + int x,y; + lastxs = lastys = lastxm = lastym = lastxh = lastyh = 0; + formatter = new SimpleDateFormat ("EEE MMM dd hh:mm:ss yyyy", Locale.getDefault()); + currentDate = new Date(); + lastdate = formatter.format(currentDate); + clockFaceFont = new Font("Serif", Font.PLAIN, 14); + handColor = Color.blue; + numberColor = Color.darkGray; + + try { + setBackground(new Color(Integer.parseInt(getParameter("bgcolor"),16))); + } catch (Exception E) { } + try { + handColor = new Color(Integer.parseInt(getParameter("fgcolor1"),16)); + } catch (Exception E) { } + try { + numberColor = new Color(Integer.parseInt(getParameter("fgcolor2"),16)); + } catch (Exception E) { } + resize(300,300); // Set clock window size + } + + // Plotpoints allows calculation to only cover 45 degrees of the circle, + // and then mirror + public void plotpoints(int x0, int y0, int x, int y, Graphics g) { + g.drawLine(x0+x,y0+y,x0+x,y0+y); + g.drawLine(x0+y,y0+x,x0+y,y0+x); + g.drawLine(x0+y,y0-x,x0+y,y0-x); + g.drawLine(x0+x,y0-y,x0+x,y0-y); + g.drawLine(x0-x,y0-y,x0-x,y0-y); + g.drawLine(x0-y,y0-x,x0-y,y0-x); + g.drawLine(x0-y,y0+x,x0-y,y0+x); + g.drawLine(x0-x,y0+y,x0-x,y0+y); + } + + // Circle is just Bresenham's algorithm for a scan converted circle + public void circle(int x0, int y0, int r, Graphics g) { + int x,y; + float d; + x=0; + y=r; + d=5/4-r; + plotpoints(x0,y0,x,y,g); + + while (y>x){ + if (d<0) { + d=d+2*x+3; + x++; + } + else { + d=d+2*(x-y)+5; + x++; + y--; + } + plotpoints(x0,y0,x,y,g); + } + } + + // Paint is the main part of the program + public void paint(Graphics g) { + int xh, yh, xm, ym, xs, ys, s = 0, m = 10, h = 10, xcenter, ycenter; + String today; + + currentDate = new Date(); + SimpleDateFormat formatter = new SimpleDateFormat("s",Locale.getDefault()); + try { + s = Integer.parseInt(formatter.format(currentDate)); + } catch (NumberFormatException n) { + s = 0; + } + formatter.applyPattern("m"); + try { + m = Integer.parseInt(formatter.format(currentDate)); + } catch (NumberFormatException n) { + m = 10; + } + formatter.applyPattern("h"); + try { + h = Integer.parseInt(formatter.format(currentDate)); + } catch (NumberFormatException n) { + h = 10; + } + formatter.applyPattern("EEE MMM dd HH:mm:ss yyyy"); + today = formatter.format(currentDate); + xcenter=80; + ycenter=55; + + // a= s* pi/2 - pi/2 (to switch 0,0 from 3:00 to 12:00) + // x = r(cos a) + xcenter, y = r(sin a) + ycenter + + xs = (int)(Math.cos(s * 3.14f/30 - 3.14f/2) * 45 + xcenter); + ys = (int)(Math.sin(s * 3.14f/30 - 3.14f/2) * 45 + ycenter); + xm = (int)(Math.cos(m * 3.14f/30 - 3.14f/2) * 40 + xcenter); + ym = (int)(Math.sin(m * 3.14f/30 - 3.14f/2) * 40 + ycenter); + xh = (int)(Math.cos((h*30 + m/2) * 3.14f/180 - 3.14f/2) * 30 + xcenter); + yh = (int)(Math.sin((h*30 + m/2) * 3.14f/180 - 3.14f/2) * 30 + ycenter); + + // Draw the circle and numbers + + g.setFont(clockFaceFont); + g.setColor(handColor); + circle(xcenter,ycenter,50,g); + g.setColor(numberColor); + g.drawString("9",xcenter-45,ycenter+3); + g.drawString("3",xcenter+40,ycenter+3); + g.drawString("12",xcenter-5,ycenter-37); + g.drawString("6",xcenter-3,ycenter+45); + + // Erase if necessary, and redraw + + g.setColor(getBackground()); + if (xs != lastxs || ys != lastys) { + g.drawLine(xcenter, ycenter, lastxs, lastys); + g.drawString(lastdate, 5, 125); + } + if (xm != lastxm || ym != lastym) { + g.drawLine(xcenter, ycenter-1, lastxm, lastym); + g.drawLine(xcenter-1, ycenter, lastxm, lastym); } + if (xh != lastxh || yh != lastyh) { + g.drawLine(xcenter, ycenter-1, lastxh, lastyh); + g.drawLine(xcenter-1, ycenter, lastxh, lastyh); } + g.setColor(numberColor); + g.drawString("", 5, 125); + g.drawString(today, 5, 125); + g.drawLine(xcenter, ycenter, xs, ys); + g.setColor(handColor); + g.drawLine(xcenter, ycenter-1, xm, ym); + g.drawLine(xcenter-1, ycenter, xm, ym); + g.drawLine(xcenter, ycenter-1, xh, yh); + g.drawLine(xcenter-1, ycenter, xh, yh); + lastxs=xs; lastys=ys; + lastxm=xm; lastym=ym; + lastxh=xh; lastyh=yh; + lastdate = today; + currentDate=null; + } + + public void start() { + timer = new Thread(this); + timer.start(); + } + + public void stop() { + timer = null; + } + + public void run() { + Thread me = Thread.currentThread(); + while (timer == me) { + try { + Thread.currentThread().sleep(100); + } catch (InterruptedException e) { + } + repaint(); + } + } + + public void update(Graphics g) { + paint(g); + } + + public String getAppletInfo() { + return "Title: A Clock \nAuthor: Rachel Gollub, 1995 \nAn analog clock."; + } + + public String[][] getParameterInfo() { + String[][] info = { + {"bgcolor", "hexadecimal RGB number", "The background color. Default is the color of your browser."}, + {"fgcolor1", "hexadecimal RGB number", "The color of the hands and dial. Default is blue."}, + {"fgcolor2", "hexadecimal RGB number", "The color of the seconds hand and numbers. Default is dark gray."} + }; + return info; + } +} Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/plugin/applet/Clock2.java ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/plugin/plugin.html URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/plugin/plugin.html?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/plugin/plugin.html (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/plugin/plugin.html Mon May 29 04:51:34 2006 @@ -0,0 +1,29 @@ + + + +Untitled Document + + + + +

+ +

Source Code for Plugin Example +

+ + + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/plugin/plugin.html ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/plugin/plugin.jsp URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/plugin/plugin.jsp?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/plugin/plugin.jsp (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/plugin/plugin.jsp Mon May 29 04:51:34 2006 @@ -0,0 +1,33 @@ + + + Plugin example + +

Current time is :

+ + + Plugin tag OBJECT or EMBED not supported by browser. + + +

+

+ +The above applet is loaded using the Java Plugin from a jsp page using the +plugin tag. + +

+ + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/plugin/plugin.jsp ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/security/protected/error.jsp URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/security/protected/error.jsp?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/security/protected/error.jsp (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/security/protected/error.jsp Mon May 29 04:51:34 2006 @@ -0,0 +1,24 @@ + + + +Error Page For Examples + + +Invalid username and/or password, please try +again. + + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/security/protected/error.jsp ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/security/protected/index.jsp URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/security/protected/index.jsp?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/security/protected/index.jsp (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/security/protected/index.jsp Mon May 29 04:51:34 2006 @@ -0,0 +1,78 @@ + +<% + if (request.getParameter("logoff") != null) { + session.invalidate(); + response.sendRedirect("index.jsp"); + return; + } +%> + + +Protected Page for Examples + + + +You are logged in as remote user <%= request.getRemoteUser() %> +in session <%= session.getId() %>

+ +<% + if (request.getUserPrincipal() != null) { +%> + Your user principal name is + <%= request.getUserPrincipal().getName() %>

+<% + } else { +%> + No user principal could be identified.

+<% + } +%> + +<% + String role = request.getParameter("role"); + if (role == null) + role = ""; + if (role.length() > 0) { + if (request.isUserInRole(role)) { +%> + You have been granted role + <%= util.HTMLFilter.filter(role) %>

+<% + } else { +%> + You have not been granted role + <%= util.HTMLFilter.filter(role) %>

+<% + } + } +%> + +To check whether your username has been granted a particular role, +enter it here: +
+ +
+

+ +If you have configured this app for form-based authentication, you can log +off by clicking +here. +This should cause you to be returned to the logon page after the redirect +that is performed. + + + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/security/protected/index.jsp ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/security/protected/login.jsp URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/security/protected/login.jsp?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/security/protected/login.jsp (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/security/protected/login.jsp Mon May 29 04:51:34 2006 @@ -0,0 +1,37 @@ + + + +Login Page for Examples + +
+ + + + + + + + + + + + + +
Username:
Password:
+
+ + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/security/protected/login.jsp ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/sessions/DummyCart.html URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/sessions/DummyCart.html?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/sessions/DummyCart.html (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/sessions/DummyCart.html Mon May 29 04:51:34 2006 @@ -0,0 +1,55 @@ + + + + + +sessions.DummyCart Bean Properties + + +

+sessions.DummyCart Bean Properties +

+
+
+
public class DummyCart
extends Object
+ +

+


+ +

+ + + + + + + + + +
+Properties Summary
+ +String +DummyCart:items +
+
+ +Multi +
+


+ + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/sessions/DummyCart.html ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/sessions/carts.html URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/sessions/carts.html?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/sessions/carts.html (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/sessions/carts.html Mon May 29 04:51:34 2006 @@ -0,0 +1,52 @@ + + + + + carts + + + + + +
+
+Please enter item to add or remove: +
+Add Item: + + + + +

+ + + +
+ +
+ + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/sessions/carts.html ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/sessions/carts.jsp URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/sessions/carts.jsp?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/sessions/carts.jsp (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/sessions/carts.jsp Mon May 29 04:51:34 2006 @@ -0,0 +1,43 @@ + + + + + + +<% + cart.processRequest(request); +%> + + + +
You have the following items in your cart: +
    +<% + String[] items = cart.getItems(); + for (int i=0; i +
  1. <% out.print(util.HTMLFilter.filter(items[i])); %> +<% + } +%> +
+ +
+ +
+<%@ include file ="/sessions/carts.html" %> + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/sessions/carts.jsp ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/sessions/crt.html URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/sessions/crt.html?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/sessions/crt.html (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/sessions/crt.html Mon May 29 04:51:34 2006 @@ -0,0 +1,33 @@ + + + + +Untitled Document + + + + +

+ +

Source Code for Cart Example +

+ +

Property Sheet for DummyCart +

+ + + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/sessions/crt.html ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/simpletag/foo.html URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/simpletag/foo.html?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/simpletag/foo.html (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/simpletag/foo.html Mon May 29 04:51:34 2006 @@ -0,0 +1,29 @@ + + + +Untitled Document + + + + +

+ +

Source Code for the Simple Tag Example +

+ + + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/simpletag/foo.html ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/simpletag/foo.jsp URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/simpletag/foo.jsp?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/simpletag/foo.jsp (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/simpletag/foo.jsp Mon May 29 04:51:34 2006 @@ -0,0 +1,37 @@ + + + +<%@ taglib uri="http://jakarta.apache.org/tomcat/examples-taglib" prefix="eg"%> + +Radio stations that rock: + +
    + +
  • <%= member %>
  • +
    +
+ + +Did you see me on the stderr window? + + + +Did you see me on the browser window as well? + + + + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/simpletag/foo.jsp ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/snp/snoop.html URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/snp/snoop.html?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/snp/snoop.html (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/snp/snoop.html Mon May 29 04:51:34 2006 @@ -0,0 +1,30 @@ + + + + +Untitled Document + + + + +

+ +

Source Code for Request Parameters Example +

+ + + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/snp/snoop.html ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/snp/snoop.jsp URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/snp/snoop.jsp?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/snp/snoop.jsp (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/snp/snoop.jsp Mon May 29 04:51:34 2006 @@ -0,0 +1,55 @@ + + + + +

Request Information

+ +JSP Request Method: <% out.print(util.HTMLFilter.filter(request.getMethod())); %> +
+Request URI: <%= request.getRequestURI() %> +
+Request Protocol: <%= request.getProtocol() %> +
+Servlet path: <%= request.getServletPath() %> +
+Path info: <% out.print(util.HTMLFilter.filter(request.getPathInfo())); %> +
+Query string: <% out.print(util.HTMLFilter.filter(request.getQueryString())); %> +
+Content length: <%= request.getContentLength() %> +
+Content type: <% out.print(util.HTMLFilter.filter(request.getContentType())); %> +
+Server name: <%= request.getServerName() %> +
+Server port: <%= request.getServerPort() %> +
+Remote user: <%= request.getRemoteUser() %> +
+Remote address: <%= request.getRemoteAddr() %> +
+Remote host: <%= request.getRemoteHost() %> +
+Authorization scheme: <%= request.getAuthType() %> +
+Locale: <%= request.getLocale() %> +
+The browser you are using is <% out.print(util.HTMLFilter.filter(request.getHeader("User-Agent"))); %> +
+
+ + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/snp/snoop.jsp ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/source.jsp URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/source.jsp?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/source.jsp (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/source.jsp Mon May 29 04:51:34 2006 @@ -0,0 +1,19 @@ + +<%@ taglib uri="http://jakarta.apache.org/tomcat/examples-taglib" + prefix="eg" %> + + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/source.jsp ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/choose.html URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/choose.html?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/choose.html (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/choose.html Mon May 29 04:51:34 2006 @@ -0,0 +1,35 @@ + + + +View Source Code + + + +

+ + + + + +

+ +

+ Source Code for choose.jsp +

+ + + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/choose.html ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/choose.jsp URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/choose.jsp?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/choose.jsp (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/choose.jsp Mon May 29 04:51:34 2006 @@ -0,0 +1,57 @@ + + + + Tag Examples - choose + + +

Tag Plugin Examples - <c:choose>

+ +
+
+ Plugin Introductory Notes +
+
Brief Instructions for Writing Plugins +

+
+ + +
+ + <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> + + + # ${index}: + + + One!
+
+ + Four!
+
+ + Three!
+
+ + Huh?
+
+
+
+ + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/choose.jsp ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/foreach.html URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/foreach.html?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/foreach.html (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/foreach.html Mon May 29 04:51:34 2006 @@ -0,0 +1,35 @@ + + + +View Source Code + + + +

+ + + + + +

+ +

+ Source Code for foreach.jsp +

+ + + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/foreach.html ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/foreach.jsp URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/foreach.jsp?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/foreach.jsp (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/foreach.jsp Mon May 29 04:51:34 2006 @@ -0,0 +1,56 @@ + + + + Tag Plugin Examples: forEach + + +

Tag Plugin Examples - <c:forEach>

+ +
+
+ Plugin Introductory Notes +
+
Brief Instructions for Writing Plugins +

+
+ + +
+ + <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> + <%@ page import="java.util.Vector" %> + +

Iterating over a range

+ + ${item} + + + <% Vector v = new Vector(); + v.add("One"); v.add("Two"); v.add("Three"); v.add("Four"); + + pageContext.setAttribute("vector", v); + %> + +

Iterating over a Vector

+ + + ${item} + + + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/foreach.jsp ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/howto.html URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/howto.html?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/howto.html (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/howto.html Mon May 29 04:51:34 2006 @@ -0,0 +1,42 @@ + + + + Tag Plugin Implementation +

How to write tag plugins

+

+ To write a plugin, you'll need to download the source for Tomcat 5. + There are two steps: +

    +
  1. + Implement the plugin class.

    + This class, which implements + org.apache.jasper.compiler.tagplugin.TagPlugin + instructs Jasper what Java codes to generate in place of the tag + handler calls. + See Javadoc for org.apache.jasper.compiler.tagplugin.TagPlugin + for details. +

  2. + +
  3. + Create the plugin descriptor file WEB-INF/tagPlugins.xml

    + This file + specifies the plugin classes and their corresponding tag handler + classes. +

  4. +
+ + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/howto.html ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/if.html URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/if.html?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/if.html (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/if.html Mon May 29 04:51:34 2006 @@ -0,0 +1,35 @@ + + + +View Source Code + + + +

+ + + + + +

+ +

+ Source Code for if.jsp +

+ + + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/if.html ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/if.jsp URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/if.jsp?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/if.jsp (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/if.jsp Mon May 29 04:51:34 2006 @@ -0,0 +1,44 @@ + + + + Tag Plugin Examples: if + + +

Tag Plugin Examples - <c:if>

+ +
+
+ Plugin Introductory Notes +
+ Brief Instructions for Wrieting Plugins +

+
+ + +
+ <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> + +

Set the test result to a variable

+ + The result of testing for (1==1) is: ${theTruth} + +

Conditionally execute the body

+ + It's true that (2>0)! + + + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/if.jsp ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/notes.html URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/notes.html?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/notes.html (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/notes.html Mon May 29 04:51:34 2006 @@ -0,0 +1,38 @@ + + + + Tag Plugin Introduction +

Tag Plugins: Introductory Notes

+

+ Tomcat 5 provides a framework for implementing tag plugins. The + plugins instruct Jasper, at translation time, to replace tag handler + calls with Java scriptlets. + The framework allows tag library authors to implement plugins for + their tags. +

+

+ Tomcat 5 is released with plugins for several JSTL tags. Note + that these plugins work with JSTL 1.1 as well as JSTL 1.0, though + the examples uses JSTL 1.1 and JSP 2.0. + These plugins are not complete (for instance, some item types not + handled in <c:if>). + They do serve as examples to show plugins in action (just + examine the generated Java files), and how they can be implemented. +

+ + + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/notes.html ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/webapps/examples/jsp/xml/xml.html URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/jsp/xml/xml.html?rev=410080&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/examples/jsp/xml/xml.html (added) +++ tomcat/tc6.0.x/trunk/webapps/examples/jsp/xml/xml.html Mon May 29 04:51:34 2006 @@ -0,0 +1,30 @@ + + + + +Untitled Document + + + + +

+ +

Source Code for XML syntax Example +

+ + + Propchange: tomcat/tc6.0.x/trunk/webapps/examples/jsp/xml/xml.html ------------------------------------------------------------------------------ svn:eol-style = native --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org