return result;
}
+ @Override
public void run() {
while (run) {
try {
ResourceBundle rb = ResourceBundle.getBundle("LocalStrings");
+ @Override
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
out.println("</html>");
}
+ @Override
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
public class HelloWorldExample extends HttpServlet {
+ @Override
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
ResourceBundle rb = ResourceBundle.getBundle("LocalStrings");
+ @Override
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
out.println("</table>");
}
+ @Override
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
ResourceBundle rb = ResourceBundle.getBundle("LocalStrings");
+ @Override
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
}
+ @Override
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
ResourceBundle rb = ResourceBundle.getBundle("LocalStrings");
+ @Override
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
out.println("</html>");
}
+ @Override
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
ResourceBundle rb = ResourceBundle.getBundle("LocalStrings");
+ @Override
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
out.println("</html>");
}
+ @Override
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
return df.format(lastchange);
}
+ @Override
public int hashCode() {
return symbol.hashCode();
}
+ @Override
public boolean equals(Object other) {
if (other instanceof Stock) {
return this.symbol.equals(((Stock) other).symbol);
}
}
+ @Override
public String toString() {
StringBuilder buf = new StringBuilder("STOCK#");
buf.append(getSymbol());
}
+ @Override
public Object clone() {
Stock s = new Stock(this.getSymbol(), this.getValue());
s.setLastChange(this.getLastChange());
new ArrayList<HttpServletResponse>();
protected MessageSender messageSender = null;
+ @Override
public void init() throws ServletException {
messageSender = new MessageSender();
Thread messageSenderThread =
messageSenderThread.start();
}
+ @Override
public void destroy() {
connections.clear();
messageSender.stop();
}
}
+ @Override
protected void service(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
// Compatibility method: equivalent method using the regular connection model
public class CompressionFilterTestServlet extends HttpServlet {
+ @Override
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
* Close this output stream, causing any buffered data to be flushed and
* any further output data to throw an IOException.
*/
+ @Override
public void close() throws IOException {
if (debug > 1) {
* Flush any buffered data for this output stream, which also causes the
* response to be committed.
*/
+ @Override
public void flush() throws IOException {
if (debug > 1) {
*
* @exception IOException if an input/output error occurs
*/
+ @Override
public void write(int b) throws IOException {
if (debug > 1) {
*
* @exception IOException if an input/output error occurs
*/
+ @Override
public void write(byte b[]) throws IOException {
write(b, 0, b.length);
*
* @exception IOException if an input/output error occurs
*/
+ @Override
public void write(byte b[], int off, int len) throws IOException {
if (debug > 1) {
/**
* Set content type
*/
+ @Override
public void setContentType(String contentType) {
if (debug > 1) {
System.out.println("setContentType to "+contentType);
*
* @exception IOException if an input/output error occurs
*/
+ @Override
public void flushBuffer() throws IOException {
if (debug > 1) {
System.out.println("flush buffer @ CompressionServletResponseWrapper");
* already been called for this response
* @exception IOException if an input/output error occurs
*/
+ @Override
public ServletOutputStream getOutputStream() throws IOException {
if (writer != null)
* already been called for this response
* @exception IOException if an input/output error occurs
*/
+ @Override
public PrintWriter getWriter() throws IOException {
if (writer != null)
}
-
+ @Override
public void setContentLength(int length) {
// Don't, as compression will change it
}
public abstract class ExampleTagBase extends BodyTagSupport {
+ @Override
public void setParent(Tag parent) {
this.parent = parent;
}
+ @Override
public void setBodyContent(BodyContent bodyOut) {
this.bodyOut = bodyOut;
}
+ @Override
public void setPageContext(PageContext pageContext) {
this.pageContext = pageContext;
}
+ @Override
public Tag getParent() {
return this.parent;
}
+ @Override
public int doStartTag() throws JspException {
return SKIP_BODY;
}
+ @Override
public int doEndTag() throws JspException {
return EVAL_PAGE;
}
+ @Override
public void doInitBody() throws JspException {
// Default implementations for BodyTag methods as well
// just in case a tag decides to implement BodyTag.
}
+ @Override
public int doAfterBody() throws JspException {
return SKIP_BODY;
}
+ @Override
public void release() {
bodyOut = null;
pageContext = null;
*
* @return EVAL_BODY_INCLUDE
*/
+ @Override
public int doStartTag() throws JspException {
i = 0;
return EVAL_BODY_BUFFERED;
}
+ @Override
public void doInitBody() throws JspException {
pageContext.setAttribute("member", atts[i]);
i++;
}
+ @Override
public int doAfterBody() throws JspException {
try {
if (i == 3) {
import javax.servlet.jsp.tagext.*;
public class FooTagExtraInfo extends TagExtraInfo {
+ @Override
public VariableInfo[] getVariableInfo(TagData data) {
return new VariableInfo[]
{
toBrowser = false;
}
+ @Override
public int doStartTag() throws JspException {
return EVAL_BODY_BUFFERED;
}
+ @Override
public int doAfterBody() throws JspException {
try {
String s = bodyOut.getString();
this.jspFile = jspFile;
}
+ @Override
public int doEndTag() throws JspException {
if ((jspFile.indexOf( ".." ) >= 0) ||
(jspFile.toUpperCase().indexOf("/WEB-INF/") != 0) ||
/**
* Return a String representation of this object.
*/
+ @Override
public String toString() {
if (filterConfig == null)
private ArrayList<String> keys = new ArrayList<String>();
private ArrayList<Object> values = new ArrayList<Object>();
+ @Override
public void doTag() throws JspException, IOException {
JspWriter out = getJspContext().getOut();
for( int i = 0; i < keys.size(); i++ ) {
private static final String BOOK_AUTHOR = "J. R. R. Tolkein";
private static final String BOOK_ISBN = "0618002251";
+ @Override
public void doTag() throws JspException {
BookBean book = new BookBean( BOOK_TITLE, BOOK_AUTHOR, BOOK_ISBN );
getJspContext().setAttribute( this.var, book );
* SimpleTag handler that prints "Hello, world!"
*/
public class HelloWorldSimpleTag extends SimpleTagSupport {
+ @Override
public void doTag() throws JspException, IOException {
getJspContext().getOut().write( "Hello, world!" );
}
public class RepeatSimpleTag extends SimpleTagSupport {
private int num;
+ @Override
public void doTag() throws JspException, IOException {
for (int i=0; i<num; i++) {
getJspContext().setAttribute("count", String.valueOf( i + 1 ) );
private JspFragment fragment2;
private JspFragment fragment3;
+ @Override
public void doTag() throws JspException, IOException {
switch( (int)(Math.random() * 6) ) {
case 0:
private String color;
private String label;
+ @Override
public void doTag() throws JspException, IOException {
getJspContext().getOut().write(
"<td width=\"32\" height=\"32\" bgcolor=\"" + this.color +
public class servletToJsp extends HttpServlet {
+ @Override
public void doGet (HttpServletRequest request,
HttpServletResponse response) {
* @param uri The value of the URI argument in this directive
* @param page The page data for this page
*/
+ @Override
public ValidationMessage[] validate(String prefix, String uri,
PageData page) {