About 5,780,000 results
Open links in new tab
  1. jakarta ee - What is Java Servlet? - Stack Overflow

    May 12, 2017 · A servlet at its very core is a java class; which can handle HTTP requests. Typically the internal nitty-gritty of reading a HTTP request and response over the wire is taken …

  2. java - How do servlets work? Instantiation, sessions, shared …

    Jun 24, 2010 · ServletContext When the servlet container (like Apache Tomcat) starts up, it will deploy and load all its web applications. When a web application is loaded, the servlet …

  3. java - In simple terms, what is a servlet container? - Stack Overflow

    Aug 19, 2021 · A servlet container is a software program that runs on a web server and provides the runtime environment for Java servlets. A servlet is a Java class that can be used to extend …

  4. java - Error 500 occurs when accessing the servlet class - Stack …

    Dec 27, 2021 · When trying to launch the application, error 500 (HTTP Status 500 – Internal Server Error) appears when it comes to accessing the ControllerServlet, the code of ...

  5. java - javac command line compile error: package javax.servlet …

    For you to compile the file i.e. *.java, you have to ensure the servlet.jar is in the classpath. Note that JSPs eventually get translated to servlets which are, ofcourse, Java files.

  6. How do you return a JSON object from a Java Servlet

    Jan 6, 2010 · How do you return a JSON object form a Java servlet. Previously when doing AJAX with a servlet I have returned a string. Is there a JSON object type that needs to be used, or …

  7. How to set 'SameSite' on a cookie from within a Java application?

    Do you know any Java cookie implementation which allows to set a custom flag for cookie, like SameSite=strict? It seems that javax.servlet.http.Cookie has a strictly limited set of flags which …

  8. java - Spring Boot Unable to Locate `javax.servlet.Filter` Class ...

    Nov 9, 2023 · This is because the filter is in jakarta.servlet.Filter (not in javax.servlet.Filter), since Java 17. However, the 5.x.x Spring Security is still relying on javax.servlet.Filter, so you must …

  9. Servlet returns "HTTP Status 404 The requested resource (/servlet) …

    Put servlet class in a package First of all, put the servlet class in a Java package. You should always put publicly reuseable Java classes in a package, otherwise they are invisible to …

  10. How to return an html document from java servlet? [duplicate]

    Jun 11, 2013 · This works to return a string: import javax.servlet.http.*; @SuppressWarnings("serial") public class MonkeyServlet extends HttpServlet { public void …