. length-1) = "/") {// If you access the directory pathName + = "index.html"; // specify as the default webpage} // use the path parsing module, assemble the actual file path var filePath = libPath. join (". /WebRoot ", pathName );
6. Set the return HeaderBecause it is a Web request, you need to include the http return header in the returned content. The focus here is to set the content type of the http return header Based on the file extension of the
, import the module, and invoke the function to determine whether the specified directory and file exists.Attention:1. Because the operating environment is a platform server, the test is also the server folder and files, the server has/data/webroot/resource/python folder and/data/webroot/resource/python/ Test.txt file, everyone can test under.2. Of course, you can test the existence of the corresponding fol
becomes the second half, that is, contact$ Route = (string) substr ($ route, $ pos + 1 );// Controller root directory or subdirectory prefixIf (! Isset ($ basePath) // first segment{// Enter for the first time. $ owner is empty and does not have this member variable.// This member variable may not be set for the first entry or $ owner. For more information, see the CWebModule class.If (isset ($ owner-> controllerMap [$ id]){Return array (Yii: createComponent ($ owner-> controllerMap [$ id], $ i
First of all, the files in the Webroot directory are all available through the browser input path, directly read to theFor example, this:The webroot below Web-inf cannot be read directly by the browser input path.Because it's protected.If the JSP reads a picture.JSP under the webroot/jspPicture under the Webroot/imagTh
\apache software foundation\myproject\androidpn\webroot\web-inf\classes\ Jdbc.properties5. Because the project being run is not in the root directory of Tomcat 8.0, there are several files that need to be modified1 "D:\Program Files\apache software foundation\myproject\androidpn\webroot\decorators\default.jsp, the front slash is removed, such as"/ Index.do ", modified to" index.do "2 D:\Program files\apache
Required Software (INS): JDK, eclipse (J2EE version recommended), tomcatplugin, tortoisesvn, APACHE-Tomcat, and subsvn.
Phase 1: Preparation
1. Install JDK and configure system variables.
2. Install eclipse and tortoisesvn, and install the subsvn and tomcatplugin plug-ins.
Phase 2: configuration project
1. Compress APACHE-Tomcat (any location ).
2. Open eclipse and click "file-> Import" on the top left ".
3. Select "svn-> check projects from SVN" and click "Next.
4. Select "Create a new resource
in the create WEB-INF. Modify the following files as needed.
Web. xml example:
Http://java.sun.com/dtd/web-app_2_3.dtd>Weblogic. xml example:Http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd>
B) Create build. bat in the balancer directory. The content is as follows:
set JAVA_HOME=C:/bea/esb26rp1/jdk150_10 set REGISTRY_HOME=D:/ALSR3/Discovery set path=%JAVA_HOME%/bin;%path% mkdir uddi mkdir uddi/bsc cd uddi/bsc jar xvf %REGISTRY_HOME%/app/uddi/bsc.jar
Install svn and configuration through yum in linux, yumsvn
1. Environment
Centos6.4
2. Install svn
Yum-y install subversion
3. Configuration
Create a version library directory
Mkdir/www/svndata
Svnserve-d-r/www/svndata
4. Create a version Library
Create a new Subversion Project
Svnadmin create/var/www/svndata/njlrxx
Configure to allow users to access jiqing
Cd/var/www/svndata/njlrxx/conf
Vi svnserve. conf
Anon-access = none
Auth-access = write
Password-db = passwd
Note: there must be no space be
functions can be completed.
This servlet container is completed on the basis of the http server. Therefore, it only adds several classes and enhances the functions. The servlet container includes the following classes.
* HttpServer
* Request
* Response
* StaticResourceProcessor
* ServletProcessor
The source code of the above five classes is:
HttpServer:
package cn.com.servletServer;import java.io.File;import java.io.InputStream;import java.io.OutputStream;import java.net.InetAddress;import jav
only need a few common ones for the time being.
Struts2-core-2.1.6.jar
Freemarker-2.3.13.jar
Commons-logging-1.0.4.jar
Ognl-2.6.11.jar
Xwork-2.1.2.jar
Commons-fileupload-1.2.1.jar
To import the package, copy the preceding files, find the struts2 -- webroot --- lib folder, and right-click --- paste (paste Ctrl + V) OK.
Step 2To import the Web. xml file.
Configure the Web. xml file. Expand the project and you will see this file.
="1.5.0">
"Test_eclipse">
"/"Source-Path ="/Webroot"/>
"/WEB-INF/classes"Source-Path ="/Src"/>
"Context-root"Value ="Test_eclipse"/>
"Java-output-path"Value ="/Webroot/WEB-INF/classes"/>
Analysis:
"Test_eclipse">
Here, the name of the project deployed to the Web container is "test_eclipse"
"/"Source-Path ="/Webroot"/>
WB-resource indicates the resources requ
becomes the second half, that is, contact$ Route = (string) substr ($ route, $ pos + 1 );// Controller root directory or subdirectory prefixIf (! Isset ($ basePath) // first segment{// Enter for the first time. $ owner is empty and does not have this member variable.// This member variable may not be set for the first entry or $ owner. For more information, see the CWebModule class.If (isset ($ owner-> controllerMap [$ id]){Return array (Yii: createComponent ($ owner-> controllerMap [$ id], $ i
does not match, so think about where the actual application will be used.Access to the http://localhost/category/id/1111 is finally matched to the rule H, because the above rules do not match, this time should be nginx forwarding request to the backend application server, such as fastcgi (PHP), Tomcat (JSP), Nginx as the direction proxy server exists.So in actual use, the individual feels that there are at least three matching rule definitions, as follows:#这里是直接转发给后端应用服务器了, can also be a static
For more information about cakephp configuration, see the manual. in the apache server configuration file, set documentroot quot; e: cakephpappwebroot quot ;, then, you can access webrootindex. php. However, in the manual, I would like to set a few more Statements lt; Directory gt; nbsp; OptionsFollow to ask about the configuration of cakephp.
I configured according to the manual, and set documentroot "e:/cakephp/app/webroot" on the apache server
Before doing a station, with a rewrite implemented pseudo-static, today want to add a blog function, but found a problem, before the rewrite put "(\w)/" to rewrite, and now/blog/also can't open, because the system does not put/blog/as a folder access, But as a parameter in the rewrite, to rewrite the original i was trembling, searched for a long while finally found a way, record down, Memo:
# do not rewrite the subdirectory directory
Rewriteengine on
Rewritebase/
Rewritecond%{requ
window, all will be done by default. click Install. an http: // localhost/initDede will automatically pop up after the installation is complete. the php address automatically downloads the latest version of the original program. Disable it directly.
5. delete all files in the \ deampz \ WebRoot \ Default \ file and decompress the original program of the version you just downloaded DEDECMS to be tested, copy all files under uploads to the \ DedeAMP
actually valid.
read(string $name);
Returns the value of the $name variable.
Renew
Update the information in the previous session to the new session by creating a new Seesion ID, deleting the original ID.
write(string $name, mixed $value);
$name the variable $value write to the session.
Error
Returns the most recent error generated by the Cake Session Component, often used for debugging.
7. Forms
8. Log $this->log ();
Called directly in the controller:
$this->log (' Something brok2 ', log_d
){// $ Id is the first half, that is, site$ Id = substr ($ route, 0, $ pos );If (! Preg_match ('/^ \ w + $/', $ id ))Return null;If (! $ CaseSensitive)$ Id = strtolower ($ id );// $ Route becomes the second half, that is, contact$ Route = (string) substr ($ route, $ pos + 1 );// Controller root directory or subdirectory prefixIf (! Isset ($ basePath) // first segment{// Enter for the first time. $ owner is empty and does not have this member variable.// This member variable may not be set for th
member variableNon-first entry or $owner has a value, it is possible to set this member variable, see Cwebmodule classif (Isset ($owner->controllermap[$id])){Return Array (Yii::createcomponent ($owner->controllermap[$id], $id, $owner = = = $this? Null: $owner),$this->parseactionparams ($route),);}If you can obtain a standalone module through the GetModule method, call Createcontroller again, for the case where site is a module name, refer to protected/config/ main.php configuration files, such
: This article mainly introduces a rewriting issue. if you are interested in the PHP Tutorial, you can refer to it. The previous website was rewritten to implement pseudo-static state. today I want to add a blog feature, but I found a problem. The previous rewrite put "(\ w) "/" is rewritten, but now/blog/cannot be opened, because the system does not regard/blog/as access to a folder, but as a parameter in the rewrite, I found a solution after searching for half a day to record it and forget it:
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.