| /******************************************************************************* |
| * Copyright (c) 2004, 2018 IBM Corporation and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * IBM Corporation - initial API and implementation |
| *******************************************************************************/ |
| package test518987; |
| |
| import java.io.IOException; |
| |
| import javax.servlet.jsp.JspException; |
| import javax.servlet.jsp.tagext.BodyTagSupport; |
| |
| public class InsertAttrTag extends BodyTagSupport { |
| private static final long serialVersionUID = 1L; |
| |
| private String insert; |
| |
| @Override |
| public int doStartTag() throws JspException { |
| pageContext.setAttribute("insert", 10); |
| try { |
| pageContext.getOut().append(getInsert()); |
| } |
| catch (IOException e) { |
| throw new JspException(e); |
| } |
| return EVAL_BODY_INCLUDE; |
| } |
| |
| public String getInsert() { |
| return insert; |
| } |
| |
| public void setInsert(String insert) { |
| this.insert = insert; |
| } |
| } |