blob: 6fb9b0dc923f4192357b52b60842233913e18eb8 [file] [log] [blame]
Hongqing Liufd5ee812014-05-10 16:32:51 +08001<html><body><pre>
2/*
3* Licensed to the Apache Software Foundation (ASF) under one or more
4* contributor license agreements. See the NOTICE file distributed with
5* this work for additional information regarding copyright ownership.
6* The ASF licenses this file to You under the Apache License, Version 2.0
7* (the "License"); you may not use this file except in compliance with
8* the License. You may obtain a copy of the License at
9*
10* http://www.apache.org/licenses/LICENSE-2.0
11*
12* Unless required by applicable law or agreed to in writing, software
13* distributed under the License is distributed on an "AS IS" BASIS,
14* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15* See the License for the specific language governing permissions and
16* limitations under the License.
17*/
18
19
20package jsp2.examples.simpletag;
21
刘洪青6266f992017-05-15 21:21:03 +080022import java.io.IOException;
23
Hongqing Liufd5ee812014-05-10 16:32:51 +080024import javax.servlet.jsp.JspException;
25import javax.servlet.jsp.tagext.SimpleTagSupport;
Hongqing Liufd5ee812014-05-10 16:32:51 +080026
27/**
28 * SimpleTag handler that prints "Hello, world!"
29 */
30public class HelloWorldSimpleTag extends SimpleTagSupport {
刘洪青6266f992017-05-15 21:21:03 +080031 @Override
Hongqing Liufd5ee812014-05-10 16:32:51 +080032 public void doTag() throws JspException, IOException {
刘洪青6266f992017-05-15 21:21:03 +080033 getJspContext().getOut().write( "Hello, world!" );
Hongqing Liufd5ee812014-05-10 16:32:51 +080034 }
35}
36</pre></body></html>