}/............
approot/packages/bootstore.data/{version}/........
approot/packages/bootstore.bussiness/{version}/..... approot/packages/elmah/{version}/...............
Different IIS and Web.cmd modes
Although we do not understand the principle of dnx content, but there is a bit of content, we should remember that in both modes, the mode of access to static files may not be the same. The reason is that although the root directory of IIS mode is where the static files are stored, the Web.cmd
:
Click OK to add php-cgi
Create a new Web site Directory folder in D disk such as Webroot and give the Webroot folder Users group Read and Execute, List Folder contents, read, write permission
Create a new phpinfo.php file under the Webroot folder, which reads:
Phpinfo ();?>
Create a new Web site on IIS and bind to webro
assemble the access path to the actual file path to be accessed for return.
Copy Code code as follows:
var Requrl=req.url; Get the requested URL
To output the requested path to the console
Console.log (Requrl);
Using the URL resolution module to get the path name in the URL
var pathName = Liburl.parse (requrl). PathName;
Use the path module to get the extension in the path name
if (Libpath.extname (pathName) = = "") {
If the path does not have an extension
pathna
to the Web project
For example: E:\eclipseM9\workspace\tree\
Tree is the root of my web project
2. You can also call at any time in any class
This.getclass (). getClassLoader (). GetResource (""). GetPath ();
This will get the full path to the classes directory
For example:/d:/workspace/strutstest/webroot/web-inf/classes/
There is also This.getclass (). GetResource (""). GetPath (). toString ();
This will get to the/d:/workspace/strutstest/
(). Getrealpath ("/");
This gets the full path to the Web project
For example: E:\eclipseM9\workspace\tree\
Tree is the root of my web project
2. You can also call at any time in any class
This.getclass (). getClassLoader (). GetResource (""). GetPath ();
This will get the full path to the classes directory
For example:/d:/workspace/strutstest/webroot/web-inf/classes/
There is also This.getclass (). GetResource (""). GetPath (). toString ();
Static Deployment
Copy the Web project file directly to the WebApps directory
Copy all content under the Webroot directory directly under the Web project to the WebApps directory under the Tomcat installation directory, which is the default application directory for the Tomcat directory, and each folder in the WebApps directory is an application. When the Tomcat server is started, all applications under the WebApps directory are loaded. For example,
that the template root directory is the Webroot directory, reference Web integration Chapter Mapresourceloader: Can be stored dynamically in the template Compositeresourceloader mixed with multiple loading modes
Code 5th will pass the variable name into the template with the value "Beetl". Line 6th of the code is the render template, the output, template provides a variety of methods to obtain rendering output, the following Tempalte.render () return
files and some other files.* In this package, Web_root is the working path "Webroot".* The working path is the location called by the Java command in the file system.*/public static final String Web_root =System.getproperty ("User.dir") +file.separator + "Webroot";Close commandprivate static final String Shutdown_command = "/shutdown";Receive Shutdown commandPrivate Boolean shutdown = false;public static v
Blog Category:
Java Basics
The classpath in MyEclipse is a very important question.MyEclipse in the search is based on their search, and MyEclipse have a special file to save Classpath information, this is someone else's project copy of the time required an important document, Otherwise this project to import into their own myeclipse will be an error, this time it is only manual to write this file, MyEclipse classpath file is the project root directory ". Classpath" file, the format
= req. url; // obtain the request url// Output the Request Path to the consoleConsole. log (reqUrl );// Use the url parsing module to obtain the path name in the urlVar pathName = libUrl. parse (reqUrl). pathname;// Use the path module to obtain the extension in the path nameIf (libPath. extname (pathName) = ""){// If the path does not have an extensionPathName + = "/"; // specify the Access Directory}If (pathName. charAt (pathName. length-1) = "/"){// If you access the DirectoryPathName + = "i
the Tomcat project is in the%tomcat root directory%/ WebApps folder, you can be informed that at this time the browser-initiated request, the code "/" represents the current path should represent the root directory of WebAppsIn the code, " forwarding " is the browser that initiates a request to the server, and the server helps it access other resources in the project based on the requested content and returns it to the browser. The entire "Resource path" is initiated by the server, you can view
localhostErrorlog "Logs/dummy-host.localhost-error.log"Customlog "Logs/dummy-host.localhost-access.log" commonModify the configuration as follows:DocumentRoot modified to the WWW directory under the local WAMP environment (e.g., D:\wamp\www)ServerName Change to localhost3, restart Apache, found that localhost can open normally, configure localhost is relatively simple.Example two, APACEH configuring test.biuuu.com virtual Host Steps1, the same way, the replication configuration code is modified
Beginners Javaweb development of people will encounter a problem, is the server environment configuration problems. Here are three ways to build a server.Direct modificationserver.xml FileWhen you write a Web application (Jsp/servlet) and want to access this page directly through a browser, you need to configure the relevant path in Tomcat:Locate the Tomcat under Conf directory and you will see a server.xml, the server configuration file. Open with a text compiler, pull to the Host tab, and add
in Web
4.1 development tools
The development tool works with eclispe3.2.2 and MyEclipse5.0. For environment configuration, refer to other manual.
4.2 create a project
Open Eclipse, and in the toolbar,FIle "->"NEw "->"OTher"
Create a web Project, select "Web Project" under "MyEclipse", and click"NExt "next step,
Enter the Project Name. In this example, enter "iReportTest" and click"FInish completed
The iReportTest project is displayed in the project list:
4.3 import jar files
In the project,
Install svn and configure through yum in CentOS
1. EnvironmentCentos5.5
2. Install svnYum-y install subversion
3. Configuration
Create a version library directoryMkdir/www/svndata
Svnserve-d-r/www/svndata
4. Create a version Library
Create a new Subversion ProjectSvnadmin create/www/svndata/oplinux
Configure to allow rsync accessCd/www/svndata/oplinux/conf
Vi svnserve. confAnon-access = noneAuth-access = writePassword-db = passwd
Note: there must be no space before the modified file; otherwise,
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 folders and files on this computer.Import OSPri
String path = Struts2util.getservletcontext (). Getrealpath ("/");One, method one(1), Request.getrealpath ("/");//not recommended to get the root path of the project(2), Request.getrealpath (Request.getrequesturi ());//Get the path of the JSP, this method is more useful, can be used directly in the servlet and JSP(3), Request.getsession (). Getservletcontext (). Getrealpath ("/");//Get the root path of the project, this method is more useful, can be used directly in the servlet and JSP(4), the a
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.