Debian Codegraph @

jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-jetty-webapp/src/main/java/org/example/TestServlet.java

raw
1 //
2 // ========================================================================
3 // Copyright (c) 1995 Mort Bay Consulting Pty Ltd and others.
4 //
5 // This program and the accompanying materials are made available under the
6 // terms of the Eclipse Public License v. 2.0 which is available at
7 // https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
8 // which is available at https://www.apache.org/licenses/LICENSE-2.0.
9 //
10 // SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
11 // ========================================================================
12 //
13
14 package org.example;
15
16 import java.io.IOException;
17 import java.util.List;
18
19 import jakarta.servlet.ServletException;
20 import jakarta.servlet.http.HttpServlet;
21 import jakarta.servlet.http.HttpServletRequest;
22 import jakarta.servlet.http.HttpServletResponse;
23
24 public class TestServlet extends HttpServlet
25 {
26 @Override
27 protected void doGet(HttpServletRequest req, HttpServletResponse resp)
28 throws ServletException, IOException
29 {
30 List l = (List)getServletContext().getAttribute("arraylist");
31
32 resp.getOutputStream().println("All Good " + l.toString());
33 }
34 }