Spaces
Error:
Request.getrequestdispatcher ("adminland.jsp"). Forward (request, response), blank after jump
Solution: Add request.setcharacterencoding ("GBK") to the function;
<ifranm></> Jump Failed
FIX: Link in top <a href= ".... jsp" target= "_parent" ></a>
Error: The Chinese character is stored in the database, and it becomes garbled after being read out
FIX: The URL of the database connection is changed to
Jdbc:mysql://localhost:3306/jinxiaocun?useunicode=true&characterencoding=gbk
For Get method URL pass parameter Chinese garbled
Resolution: The obtained parameters are transcoded: String args= request.getparameter ("GroupName");
string result = new String (Args.getbytes ("iso-8859-1"), "GBK");
Error: Org.apache.jasper.JasperException:Unable to compile class for Jsp:an error
occurred at LINE:20 in the JSP file:/error.jspexception cannot be resolved
Solve:
The first line should read
<%@ page language= "java" import= "java.util.*" pageencoding= "UTF-8"
Iserrorpage= "true"%>
Join data not successful
Resolution: 1. Database connection password user name is correct
2. Whether to pass the URL with the Get method
The Name property in the <input> tag in 3.jsp is correct
Error: null pointer error occurred when referencing map
Cause: It is possible that map is empty, that is, there is no matching data in the database when the map is loaded
Workaround: When loading a map, first determine if there is a data match
Method 1: First list to determine whether the List.size is 0
Method 2:resultset rs = Pstmt.executequery ();
Rs.getstring ("Count") is 0
500 error occurred, type is XXX jar does not work
Resolution: 1. See if the jar package is imported
2. In the Java build path librarise see if there is a jar package with a red Cross, if any, modify the path with edit,
Cannot delete re-import
Appear
HTTP Status 404-/jinxiaocun/a.java
Type Status Report
Message/jinxiaocun/a.java
Description The requested resource is not available.
Apache tomcat/6.0.41
Solve:
modifying in an XML file
<servlet>
<servlet-name>HelloWorldServlet</servlet-name> <servlet-
Class>helloworldservlet</servlet-class> </servlet>
<servlet-mapping>
<servlet-name>HelloWorldServlet</servlet-name> <url-pattern>/helloworldservlet</url-
Pattern> </servlet-mapping>
Warning:
After you have copied the folder directly, the deployment has a warning: whether to delete the existing files
Solve:
Modify the. MyMetadata context-root= "/[The name of your own folder" under the project folder.
Error: Java+jsp picture is not loaded
Solve:
1. Changing the Save function
Servletutilities.savechartaspng
Servletutilities.savechartasjpeg
2. Modify the Wel file to
<servlet>
<servlet-name>DisplayChart</servlet-name>
<servlet-class>org.jfree.chart.servlet.DisplayChart</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>DisplayChart</servlet-name>
<url-pattern>/servlet/DisplayChart</url-pattern>
</servlet-mapping>
Java+jsp+mysql Web page Production summary (1)