소스 파일 최초 업로드

This commit is contained in:
ByeonJungHun
2024-04-05 10:31:45 +09:00
commit 718e6822af
682 changed files with 90848 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
<!DOCTYPE html><html><head><meta charset="UTF-8" /><title>Source Code</title></head><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 java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.DynamicAttributes;
import javax.servlet.jsp.tagext.SimpleTagSupport;
/**
* SimpleTag handler that echoes all its attributes
*/
public class EchoAttributesTag
extends SimpleTagSupport
implements DynamicAttributes
{
private final List&lt;String> keys = new ArrayList&lt;>();
private final List&lt;Object> values = new ArrayList&lt;>();
@Override
public void doTag() throws JspException, IOException {
JspWriter out = getJspContext().getOut();
for( int i = 0; i &lt; keys.size(); i++ ) {
String key = keys.get( i );
Object value = values.get( i );
out.println( "&lt;li>" + key + " = " + value + "&lt;/li>" );
}
}
@Override
public void setDynamicAttribute( String uri, String localName,
Object value )
throws JspException
{
keys.add( localName );
values.add( value );
}
}
</pre></body></html>

View File

@@ -0,0 +1,21 @@
<!--
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.
-->
<hr>
<center>
This banner included with &lt;include-coda&gt;
</center>
<hr>

View File

@@ -0,0 +1,22 @@
<!DOCTYPE html><html><head><meta charset="UTF-8" /><title>Source Code</title></head><body><pre>&lt;!--
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.
-->
&lt;hr>
&lt;center>
This banner included with &amp;lt;include-coda&amp;gt;
&lt;/center>
&lt;hr>
</pre></body></html>

View File

@@ -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>

View File

@@ -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://tomcat.apache.org/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.

View File

@@ -0,0 +1,33 @@
<!DOCTYPE html><html><head><meta charset="UTF-8" /><title>Source Code</title></head><body><pre>&lt;%--
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.
--%>
&lt;%@ taglib prefix="my" uri="http://tomcat.apache.org/jsp2-example-taglib"%>
&lt;h1>JSP 2.0 Examples - JSP Configuration&lt;/h1>
&lt;hr>
&lt;p>Using a &amp;lt;jsp-property-group&amp;gt; element in the web.xml
deployment descriptor, this JSP page has been configured in the
following ways:&lt;/p>
&lt;ul>
&lt;li>Uses &amp;lt;include-prelude&amp;gt; to include the top banner.&lt;/li>
&lt;li>Uses &amp;lt;include-coda&amp;gt; to include the bottom banner.&lt;/li>
&lt;li>Uses &amp;lt;scripting-invalid&amp;gt; true to disable
&amp;lt;% scripting %&amp;gt; elements&lt;/li>
&lt;li>Uses &amp;lt;el-ignored&amp;gt; true to disable ${EL} elements&lt;/li>
&lt;li>Uses &amp;lt;page-encoding&amp;gt; ISO-8859-1 to set the page encoding (though this is the default anyway)&lt;/li>
&lt;/ul>
There are various other configuration options that can be used.
</pre></body></html>

View File

@@ -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>

View File

@@ -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://tomcat.apache.org/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>

View File

@@ -0,0 +1,45 @@
<!DOCTYPE html><html><head><meta charset="UTF-8" /><title>Source Code</title></head><body><pre>&lt;%--
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.
--%>
&lt;%@ taglib prefix="my" uri="http://tomcat.apache.org/jsp2-example-taglib"%>
&lt;html>
&lt;head>
&lt;title>JSP 2.0 Examples - Dynamic Attributes&lt;/title>
&lt;/head>
&lt;body>
&lt;h1>JSP 2.0 Examples - Dynamic Attributes&lt;/h1>
&lt;hr>
&lt;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.&lt;/p>
&lt;hr>
&lt;h2>Invocation 1 (six attributes)&lt;/h2>
&lt;ul>
&lt;my:echoAttributes x="1" y="2" z="3" r="red" g="green" b="blue"/>
&lt;/ul>
&lt;h2>Invocation 2 (zero attributes)&lt;/h2>
&lt;ul>
&lt;my:echoAttributes/>
&lt;/ul>
&lt;h2>Invocation 3 (three attributes)&lt;/h2>
&lt;ul>
&lt;my:echoAttributes dogName="Scruffy"
catName="Fluffy"
blowfishName="Puffy"/>
&lt;/ul>
&lt;/body>
&lt;/html>
</pre></body></html>

View File

@@ -0,0 +1,21 @@
<!--
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.
-->
<hr>
<center>
This banner included with &lt;include-prelude&gt;
</center>
<hr>

View File

@@ -0,0 +1,22 @@
<!DOCTYPE html><html><head><meta charset="UTF-8" /><title>Source Code</title></head><body><pre>&lt;!--
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.
-->
&lt;hr>
&lt;center>
This banner included with &amp;lt;include-prelude&amp;gt;
&lt;/center>
&lt;hr>
</pre></body></html>