In JSP, determine whether a file exists and create folders and files.
Memo.
In WINXP + tomcat5.1,CodeAs follows:
// Obtain the web root path // absolute path// Getservletcontext (). getrealpath ("/") to obtain the root path of the Web
On the homepage of J2EE development, choose index.htm or index. jsp.
During J2EE development, the home page can usually be index.htm, index.html, index. jsp, default.htm, default.html, and default. jsp. Do you know which one to use?
In the past,
I went to the interview the day before yesterday and met a technical interviewer. I asked a lot of questions and did not answer them. Instead, I did not understand them well enough and did not summarize them. The most typical is the hierarchy of
A JSP exception occurs during application deployment and running. When jstl library is used, according to TLD or attribute directive inTag file, attribute value does not accept any expressions, probably because jsp2.0 is used,At the same time, the
Maybe many people like me have found ckfinder and kcfinder, but suddenly they don't support Java, and then they are very lost ~~
I tried tomcat to run php to run ckfinder, But I found many errors such as directory permissions.
Finally, because I
Solution: encode the Chinese parameter twice before passing the parameter. After obtaining the parameter on the JSP page, decode the Chinese parameter once. The Chinese parameter will not become garbled!
Example:
Pageencoding = "UTF-8" %> String
Method 1:
Func is a static method in COM. Common. Constant.
STR is a dynamic parameter
Method 2:
Func is a common method in COM. Common. strutshelper.
STR is a dynamic method
S: bean is actually an instantiation
JSP pages are textual components. They go through two phases: a TranslationPhase, and a request phase. Translation is done once per page. The request phase isDone once per request.The JSP page is translated to create a servlet class, the JSP
Set up a JSP development environment in Ubuntu 7.04MySQL + Tomcat + Apache + j2sdk1.6
Enter rpm-Q-A in terminal to check whether the required software for RPM and RPM packages has been installed before all installation starts.If no rpm is
If the address is http: // localhost: 8080/deviantart/test/myjsp. jsp
Request. getcontextpath ()/deviantartObtain the container context path, which is generally the relative path of the website (project name ). If it is the root directory, the
Reference a good article on the network
Implementation Principles of servlet, JSP, and axis WebService
Review the servlet ing mode.
As we know, servlets are inherited from javax. servlet. http. httpservlet, loaded to the JVM on the server side
I "A. jsp? Param = Chinese "PASS Parameters, request. getparameter (PARAM); Receive this parameter, I add a uriencoding =" gb2312 "to the conf directory of Tomcat"The received parameters will not be garbled!However, if you want to open a link to a
JSP actions include:JSP: include: Introduce a file when the page is requested.JSP: usebean: Find or instantiate a JavaBean.JSP: setproperty: SetSetAttributes of JavaBean.JSP: getproperty: outputs the attributes of a JavaBean.JSP: Forward: Transfers
I. File Upload
Uploading files is a frequently used function in Web development. For example, uploading photos in the B/S-based personnel information management system and uploading images in the news publishing system ..... To implement the file
In my graduation project, I put all the jsp pages in the WEB-INF folder. However, a problem occurs. WEB-INF is a protected folder, and we cannot access the resources in it through the regular method, that is, if we write the following code in
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.