Spring MVC file upload & Multi file upload

MultipartResolver is not equipped by default in the Spring MVC context, so it cannot handle file upload by default. If you want to use Spring's file upload function, you need to configure MultipartResolver in the context. The configuration file in springmvc-config.xml is as follows: <bean id="multipartResolver" ...

Posted on Wed, 01 Apr 2020 01:33:05 -0400 by alex_funky_dj

Spring MVC JSP page about button button, click to submit form event

Problem description Recently, I'm working on the SSM framework. I'm not very proficient in many things. I found a problem. My jsp page has a form and a button. I submit the form through the button, but I found that the button button doesn't work. First of all, the foreground code is copy. I'm working in the background. ...

Posted on Tue, 31 Mar 2020 17:00:01 -0400 by rahish

Return value of controller method in Spring MVC

Original Link: http://www.yiidian.com/springmvc/return-value.html The controller method return value of Spring MVC can support multiple writings, each of which has a different scene and effect.Here's a look at the use of each return value. Normal String Forward String Restring void ModelAndView Java Objects 1 Normal string Returning normal st ...

Posted on Mon, 30 Mar 2020 21:15:39 -0400 by lunac

java generate QR code scan web page automatic login function

Looking for a lot of information, seven, eight, eight have tried again, and finally wrote out this function. A rookie. This article is only for notes. A simple generation of QR code, through the web page to confirm the login, to achieve the QR code page to jump to the main page. There are three servlet s: CodeServlet.java does two things A: gen ...

Posted on Sun, 29 Mar 2020 12:37:16 -0400 by welshmike

Learn Java to use token to avoid repeated submission

Reason for repeated submission The jump from the submitted page to the successful page generally uses the view location. Because the view location jumps at the server, if the user refreshes the page again after clicking submit, it will result in repeated submission, and the data in the database will be repeated. Adopt token measures 1. Generate ...

Posted on Sat, 28 Mar 2020 13:30:12 -0400 by benjaminbeazy

SpringBoot learning notes-011

4.9. Use external Servlet container Embedded Servlet content: application is made into executable jar Advantages: simple, portable; Disadvantages: JSP is not supported by default, and optimization and customization are more complex (using the customizer [ServerProperties, custom EmbeddedServletContainerCustomizer], write the creation factory [E ...

Posted on Sat, 28 Mar 2020 06:51:51 -0400 by vbzoom.com

Do you want to learn JSP in 2020?

Preface In 2020, do I need to learn JSP?I believe that students who are still in college will certainly have this question. In fact, I have seen a similar question in 18 years, "Should JSP still learn?"I sent several JSP articles in 18 years, and many developers have commented on "Is this not something of the last century", ...

Posted on Sun, 22 Mar 2020 22:00:05 -0400 by serenade2

python implements automatic logon implementation code for websites with authentication codes

This example logs in to a website that requires a username, password, and authentication code, where python's urllib2 is used to log in directly to the site and handle the cookies for the site Earlier I heard that it is very convenient to use python as a web crawler. Just these days, units also have thi ...

Posted on Tue, 17 Mar 2020 14:07:14 -0400 by Browzer

Request forwarding + request contains + request domain object

What is request forwarding Request forwarding implements resource jump within the server. Characteristics of request forwarding One request, one response. A request object must correspond to a response object. The resources jump inside the Web application (inside the server), the browser does not fe ...

Posted on Mon, 16 Mar 2020 11:21:45 -0400 by Pro Ninja

SpringMVC error: HTTP Status 405 - JSPs only permit GET POST or HEAD

In a recent article in the JavaEE series, there were some problems writing REST-style URL s for Spring MVC. Here is some code. index.jsp page code: <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html> <html> <head> & ...

Posted on Sat, 14 Mar 2020 20:30:15 -0400 by DrTom