Today in the JSP added a C tag, there was such a mistake, my project was originally a j2ee1.4 project.
Then my project only imported the package, and then there is the top of the error, that is: no class, and then I import the Jstl.jar package, and
For JSP many people like to use El Expressions to value or to pass values, because it is very simple and convenient.
But for its specific to pass the value of the use of the method is not very familiar, then the blogger to introduce the expression
The following code is the practice of inserting dates into the database that I use as a time selector in development.
The above is the JS section, the following is in the JSP how to call (is how to use JS, this and we usually use the same method,
Click on the page a delete button, pop-up ok dialog box, OK, the page will jump to the delselect.jsp page to perform the deletion of the data in the database, after the successful execution and automatically jump to a page. In the process and for
This function mainly uses the JSP page to generate the verification code, realizes the page to refresh through the original javascript+iframe. The steps are as follows:
1. Verification Code Generation page valicode.jsp:
2, set refresh page
Instance: Now the JSP page passes a parameter named username to the action
Url:http://localhost:8080/studentsystem/role_list.action?username=qk12333.com
first, the Get Set method is used to obtain
Define a variable with the same name in the
Problem:In the Struts2 failed, not only turn the past also reported 404 errors. I do not know if it is not supported in STRUTS2 or requires additional configuration.
Reason: Because Struts2 uses the filter the way processing request, the default
Servlet: Of course, in the servlet, the general jump occurs in Doget, Dopost and other methods.1) Redirect WayResponse.sendredirect ("/a.jsp");The path to the page is the relative path. Sendredirect can jump to any page, not necessarily limited to
Method One: It only works for a single stringString name=request.getparameter ("name");Name=new String (name.getbytes ("iso-8859-1"), "Utf-8");
method Two: Valid for the current pageRequest.setcharacterencoding ("GBK");String
(i) Control of file types
This is just a demonstration of the type of picture control, other controls need to see webroot/fckeditor/editor/dialog/below the corresponding JS file
fckeditor.properties Writing Reference fckeditor-java-core-2.4.1.jar/
Jspthe built-in object is in writingJSPObject that can be used directly without any claimsCommon built-in objectsOut,request,response, session,application the Out object is used to output data to the browserThe request object obtains relevant data
What is JavaBean
Bean from the practical value is to be used as a data model, that is, to render the template of the JSP page, when the business code and JSP code to separate, improve the view and processing code reuse, that is, the so-called MVC
Spring boot is really a lot easier to develop, the spring boot contains spring MVC, the built-in Tomcat, and the main method to start1. Create a new spring boot project using ideaFile----New One project Select Spring Initializr and Next The
pageencoding= "UTF-8"%> insert title hereApplicationContext CTX=NewClasspathxmlapplicationcontext ("Applicationcontext.xml"); HelloWorld HW= (HelloWorld) ctx.getbean ("HelloWorld"); Hw.hello ();%>Spring's basic packages are introduced, and your own
The Dopost method of 1.Servlet uses the Name property instead of the ID when you receive the form data for a page transfer using Request.getparameter ().2. This is the simplest MVC pattern, where m (model) corresponds to the javabean,v (view)
I. JSP scripts and annotationsJSP Script1) embedded Java code
//Internal Java code translated into the internal of the service method
2) Direct output to the page
//will be translated into service method internal Out.print ()
Springboot official recommends using templates for front-end page presentation, but does not exclude the use of JSP in the project.When using JSPs, you need to configure:1. Packing Select a war package in a project created with MavenIf you do not
Use Jsp to connect to mobile phone text messages, perform real operations, and perform real operations
Function requestAlarmLiu (){$. Post ("alarm/getPersonAlarmList", {disposeStatus: 'not'}, function (data ){Var sosCount = 0;Var healthCount = 0;For
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.