Grosse MàJ
This commit is contained in:
@ -0,0 +1,56 @@
|
||||
<html><body><pre>
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You 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.
|
||||
*/
|
||||
|
||||
|
||||
package jsp2.examples.simpletag;
|
||||
|
||||
import javax.servlet.jsp.JspException;
|
||||
import javax.servlet.jsp.JspWriter;
|
||||
import javax.servlet.jsp.tagext.SimpleTagSupport;
|
||||
import javax.servlet.jsp.tagext.DynamicAttributes;
|
||||
import java.util.ArrayList;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* SimpleTag handler that echoes all its attributes
|
||||
*/
|
||||
public class EchoAttributesTag
|
||||
extends SimpleTagSupport
|
||||
implements DynamicAttributes
|
||||
{
|
||||
private ArrayList keys = new ArrayList();
|
||||
private ArrayList values = new ArrayList();
|
||||
|
||||
public void doTag() throws JspException, IOException {
|
||||
JspWriter out = getJspContext().getOut();
|
||||
for( int i = 0; i < keys.size(); i++ ) {
|
||||
String key = (String)keys.get( i );
|
||||
Object value = values.get( i );
|
||||
out.println( "<li>" + key + " = " + value + "</li>" );
|
||||
}
|
||||
}
|
||||
|
||||
public void setDynamicAttribute( String uri, String localName,
|
||||
Object value )
|
||||
throws JspException
|
||||
{
|
||||
keys.add( localName );
|
||||
values.add( value );
|
||||
}
|
||||
}
|
||||
</pre></body></html>
|
@ -0,0 +1,5 @@
|
||||
<hr>
|
||||
<center>
|
||||
This banner included with <include-coda>
|
||||
</center>
|
||||
<hr>
|
@ -0,0 +1,7 @@
|
||||
<html><body><pre>
|
||||
<hr>
|
||||
<center>
|
||||
This banner included with &lt;include-coda&gt;
|
||||
</center>
|
||||
<hr>
|
||||
</pre></body></html>
|
@ -0,0 +1,35 @@
|
||||
<html>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You 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.
|
||||
-->
|
||||
<head>
|
||||
<title>View Source Code</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF">
|
||||
<p><font color="#0000FF"><a href="config.jsp"><img src="../../images/execute.gif" align="right" border="0"></a>
|
||||
<a href="../../index.html"><img src="../../images/return.gif" width="24" height="24" align="right" border="0"></a></font></p>
|
||||
|
||||
<h3><a href="config.jsp.html">Source Code for config.jsp<font color="#0000FF"></a>
|
||||
</font> </h3>
|
||||
<h3><a href="prelude.jspf.html">Source Code for prelude.jspf<font color="#0000FF"></a>
|
||||
</font> </h3>
|
||||
<h3><a href="coda.jspf.html">Source Code for coda.jspf<font color="#0000FF"></a>
|
||||
</font> </h3>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,32 @@
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You 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.
|
||||
-->
|
||||
<%@ taglib prefix="my" uri="http://jakarta.apache.org/tomcat/jsp2-example-taglib"%>
|
||||
<h1>JSP 2.0 Examples - JSP Configuration</h1>
|
||||
<hr>
|
||||
<p>Using a <jsp-property-group> element in the web.xml
|
||||
deployment descriptor, this JSP page has been configured in the
|
||||
following ways:</p>
|
||||
<ul>
|
||||
<li>Uses <include-prelude> to include the top banner.</li>
|
||||
<li>Uses <include-coda> to include the bottom banner.</li>
|
||||
<li>Uses <scripting-invalid> true to disable
|
||||
<% scripting %> elements</li>
|
||||
<li>Uses <el-ignored> true to disable ${EL} elements</li>
|
||||
<li>Uses <page-encoding> ISO-8859-1 to set the page encoding (though this is the default anyway)</li>
|
||||
</ul>
|
||||
There are various other configuration options that can be used.
|
||||
|
@ -0,0 +1,34 @@
|
||||
<html><body><pre>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You 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.
|
||||
-->
|
||||
<%@ taglib prefix="my" uri="http://jakarta.apache.org/tomcat/jsp2-example-taglib"%>
|
||||
<h1>JSP 2.0 Examples - JSP Configuration</h1>
|
||||
<hr>
|
||||
<p>Using a &lt;jsp-property-group&gt; element in the web.xml
|
||||
deployment descriptor, this JSP page has been configured in the
|
||||
following ways:</p>
|
||||
<ul>
|
||||
<li>Uses &lt;include-prelude&gt; to include the top banner.</li>
|
||||
<li>Uses &lt;include-coda&gt; to include the bottom banner.</li>
|
||||
<li>Uses &lt;scripting-invalid&gt; true to disable
|
||||
&lt;% scripting %&gt; elements</li>
|
||||
<li>Uses &lt;el-ignored&gt; true to disable ${EL} elements</li>
|
||||
<li>Uses &lt;page-encoding&gt; ISO-8859-1 to set the page encoding (though this is the default anyway)</li>
|
||||
</ul>
|
||||
There are various other configuration options that can be used.
|
||||
|
||||
</pre></body></html>
|
@ -0,0 +1,33 @@
|
||||
<html>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You 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.
|
||||
-->
|
||||
<head>
|
||||
<title>View Source Code</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF">
|
||||
<p><font color="#0000FF"><a href="dynamicattrs.jsp"><img src="../../images/execute.gif" align="right" border="0"></a>
|
||||
<a href="../../index.html"><img src="../../images/return.gif" width="24" height="24" align="right" border="0"></a></font></p>
|
||||
|
||||
<h3><a href="dynamicattrs.jsp.html">Source Code for dynamicattrs.jsp<font color="#0000FF"></a>
|
||||
</font> </h3>
|
||||
<h3><a href="EchoAttributesTag.java.html">Source Code for EchoAttributesTag.java<font color="#0000FF"></a>
|
||||
</font> </h3>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,44 @@
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You 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.
|
||||
-->
|
||||
<%@ taglib prefix="my" uri="http://jakarta.apache.org/tomcat/jsp2-example-taglib"%>
|
||||
<html>
|
||||
<head>
|
||||
<title>JSP 2.0 Examples - Dynamic Attributes</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>JSP 2.0 Examples - Dynamic Attributes</h1>
|
||||
<hr>
|
||||
<p>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.</p>
|
||||
<hr>
|
||||
<h2>Invocation 1 (six attributes)</h2>
|
||||
<ul>
|
||||
<my:echoAttributes x="1" y="2" z="3" r="red" g="green" b="blue"/>
|
||||
</ul>
|
||||
<h2>Invocation 2 (zero attributes)</h2>
|
||||
<ul>
|
||||
<my:echoAttributes/>
|
||||
</ul>
|
||||
<h2>Invocation 3 (three attributes)</h2>
|
||||
<ul>
|
||||
<my:echoAttributes dogName="Scruffy"
|
||||
catName="Fluffy"
|
||||
blowfishName="Puffy"/>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,46 @@
|
||||
<html><body><pre>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You 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.
|
||||
-->
|
||||
<%@ taglib prefix="my" uri="http://jakarta.apache.org/tomcat/jsp2-example-taglib"%>
|
||||
<html>
|
||||
<head>
|
||||
<title>JSP 2.0 Examples - Dynamic Attributes</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>JSP 2.0 Examples - Dynamic Attributes</h1>
|
||||
<hr>
|
||||
<p>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.</p>
|
||||
<hr>
|
||||
<h2>Invocation 1 (six attributes)</h2>
|
||||
<ul>
|
||||
<my:echoAttributes x="1" y="2" z="3" r="red" g="green" b="blue"/>
|
||||
</ul>
|
||||
<h2>Invocation 2 (zero attributes)</h2>
|
||||
<ul>
|
||||
<my:echoAttributes/>
|
||||
</ul>
|
||||
<h2>Invocation 3 (three attributes)</h2>
|
||||
<ul>
|
||||
<my:echoAttributes dogName="Scruffy"
|
||||
catName="Fluffy"
|
||||
blowfishName="Puffy"/>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
</pre></body></html>
|
@ -0,0 +1,5 @@
|
||||
<hr>
|
||||
<center>
|
||||
This banner included with <include-prelude>
|
||||
</center>
|
||||
<hr>
|
@ -0,0 +1,7 @@
|
||||
<html><body><pre>
|
||||
<hr>
|
||||
<center>
|
||||
This banner included with &lt;include-prelude&gt;
|
||||
</center>
|
||||
<hr>
|
||||
</pre></body></html>
|
Reference in New Issue
Block a user