1.${ctx} and ${pageContext.request.contextPath} are the same, both of which are to obtain the current root directory.
The difference is that ${ctx} is the abbreviation version of ${pageContext.request.contextPath}. After verification, it turns out that this is true. I found that there is such a paragraph in a file in the project.
Configuration
The code copy is as follows:
<c:setvar="ctx"value="${pageContext.request.contextPath}"/>
Note that when using ${ctx, don't forget to include the one with this configuration.
The code copy is as follows:
<c:setvar="ctx"value="${pageContext.request.contextPath}"/>
The file is introduced to the current page.
2.oracle CLOB field converted to VARCHAR: to_char(substr(a.mcontent,1,3800))
3.
1. In fact, when processing the CLOB field, directly TO_CHAR. When the length exceeds 4000, an error will be reported, prompting that the column is intercepted;
2. Directly using SUBSTR to intercept the CLOB field cannot play any role;
3. You can use dbms_lob.substr(clobcolumn,4000) to intercept the CLOB field; whether the intercepted length is 4000 or 2000 depends on whether the stored Chinese characters and data.
4.tomcat memory optimization: add directly after arguments:
-Xms1024m -Xmx1024m -XX:PermSize=128M -XX:MaxNewSize=64m -XX:MaxPermSize=256m
5. SQL statements for querying tree data in oracle
The code copy is as follows:
select dept_id,dept_name,level from test_dept start with dept_id='0' connect by prior dept_id=parent_id;
After my verification, the above is to query all the data, namely the head office. The method to query branch 1 is:
The code copy is as follows:
select dept_id,dept_name,level from test_dept start with dept_id='1' connect by prior dept_id=parent_id;
6.MySQL solution to the problem of mysql server has gone away
The code copy is as follows:
mysql>show global variables like 'max_allowed_packet';
show: max_allowed_packet 1048576
Solution:
mysql>set global max_allowed_packet=1024*1024*16; mysql>show global variables like 'max_allowed_packet';show: max_allowed_packet 16777216
OK.
7.oracle's solution to the current connected database cannot be deleted
Description problem: The user in oracle cannot be deleted, prompting "Cannot delete the currently connected user"
Solution:
1. Check the user's connection status: select username,sid,serial# from v$session
2. Find the sid and serial of the user to be deleted and delete it: alter system kill session '532,4562'
3. Delete the user: drop user username cascade
Currently logged in USER SELECT USER FROM DUAL; SELECT SYS_CONTEXT ('USERENV', 'SESSION_USER') FROM DUAL;
Currently logged in SID SELECT SYS_CONTEXT('USERENV','SID') FROM DUAL;
8. When tomcat is sent to the background, Chinese will appear garbled on the page
Cause analysis:
Tomcat default encoding iso8859-1
Solution
Configure a URIEncoding="UTF-8" in the Connector in server.xml of tomcat
Modify Tomcat's Server.xml and add URLEncoding parameters to the Connector tag:
maxSpareThreads="75" enableLookups="false" redirectPort="8443"
acceptCount="100" debug="99" connectionTimeout="20000"
disableUploadTimeout="true" URIEncoding="UTF-8"/>
9. The difference between Facets and Artifacts in Intellij IDEA
Facets indicates what characteristics this module has, such as Web, Spring and Hibernate;
Artifact is a concept in maven, which indicates how a module should be packaged, such as war exploded, war, jar, ear, etc.;
A module can be deployed to the application server with Artifacts!
10.Intellij IDEA has many types of options when configuring Artifacts for projects. What does explore mean
exploit Here you can understand it as expanding, not compressing. That is, the directory structure before the outputs such as war and jar are compressed. It is recommended to use this mode during development to facilitate the effect of modifying the file immediately.
By default, IDEA's Modules and Artifacts output directories have been set and do not need to be changed. When it is typed into a war package, the classes directory will be automatically produced in the WEB-INF directory, and then the compiled files will be put in.
The above content is the ten practical knowledge of Java Web development introduced to you by the editor. I hope it will be helpful to you!