ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/test/org/apache/catalina/startup/TesterServletWithAnnotations.java

Path
ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/test/org/apache/catalina/startup/TesterServletWithAnnotations.java
Status
scanned
Type
file
Name
TesterServletWithAnnotations.java
Extension
.java
Programming language
Java
Mime type
text/plain
File type
ASCII text, with CRLF line terminators
Tag

      
    
Rootfs path

      
    
Size
2462 (2.4 KB)
MD5
b73e92d822c4b858f25b50f2d3f6c28c
SHA1
40041bed7033b47d70f5b81864eb6b67b45e6e39
SHA256
54a31c06e49b3b5ba11c100fd9d1bc50a4d364542ffdd2221bd5a8dcc9055b25
SHA512

      
    
SHA1_git
b9b657015672bcd78c3bbdd3d17e5c6555431cf5
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
TesterServletWithAnnotations.java | 2.4 KB |

/* * 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 org.apache.catalina.startup; import java.io.IOException; import jakarta.annotation.Resource; import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServlet; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; public class TesterServletWithAnnotations extends HttpServlet { private static final long serialVersionUID = 1L; @Resource private int envEntry1; private int envEntry2; private int envEntry3; private int envEntry4; @Resource(name = "envEntry5") private int envEntry5; private int envEntry6; @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { resp.setContentType("text/plain"); resp.getWriter().print("envEntry1: " + envEntry1); resp.getWriter().print(" envEntry2: " + envEntry2); resp.getWriter().print(" envEntry3: " + envEntry3); resp.getWriter().print(" envEntry4: " + envEntry4); resp.getWriter().print(" envEntry5: " + envEntry5); resp.getWriter().print(" envEntry6: " + envEntry6); } public void setEnvEntry2(int envEntry2) { this.envEntry2 = envEntry2; } @Resource public void setEnvEntry3(int envEntry3) { this.envEntry3 = envEntry3; } @Resource public void setEnvEntry4(int envEntry4) { this.envEntry4 = envEntry4; } @Resource(name = "envEntry6") public void setEnvEntry6(int envEntry6) { this.envEntry6 = envEntry6; } }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
44.91
Copyrights

      
    
Holders

      
    
Authors

      
    
License detections License expression License expression SPDX
apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de apache-2.0 Apache-2.0
URL Start line End line
http://www.apache.org/licenses/LICENSE-2.0 9 9