A lot of people have heard of OpenCms, know it's strong, simply download installed, and finally saw a long-lost OpenCms, see its concise interface, after a happy but unavoidably a face dazed, this thing how to use, how do I use it to build a station, from where to start, do not know, find information, less than a few, after several setbacks , forced by time and many other factors, many people reluctantly chose to give up ...
Hopefully this article will help the followers of OpenCms, but it's only the fur of OpenCms, and it will take a lot more effort to make its powerful function available.
First, switch to "/sites/", create the site folder "TestWeb"
Enter the title of the folder, which is the name of the site, and in a moment you will see its usefulness, which will appear under the site ...
The following results are created:
Second, configure Tomcat, open the Tomcat/conf/server.xml file, add the following blue selection:
Third, open the Tomcat/webapps/cms623/web-inf/config/opencms-system.xml, add the following blue selection area:
Four, restart Tomat, landing to OpenCms, then in the "Site" list box will appear we created the site "My test Site", hair, the following figure:
Switch to "My test Site", show the following figure, this is the "root directory" of our website ...
Five, create the website module: com.testweb.www, the following figure (module creation process see: http://blog.csdn.net/qianxuncms/archive/2007/04/06/1554192.aspx):
Create template (template creation process see: http://blog.csdn.net/qianxuncms/archive/2007/04/09/1557085.aspx), template content as follows: <% @ taglib prefix = "cms "uri =" Http://www.opencms.org/taglib/cms "%>
< HTML >
< head >
< title >< Cms:property name = "title"/></title >
< meta HTTP-EQUIV = "Content-type" CONTENT = "text/html"; Charset=<cms:property name= "content-encoding" default= UTF-8 "/>"/>
< BODY >
< h2 > Test Site templates
< cms:include element = "Body"/>
</Body >
</HTML >
VI, the creation of projects, including Web site resources and module resources (detailed introduction of the project will be a separate article, this is not to say more), the following figure:
Seven, use the template to generate the page, switch to the Testwebproj project, and then switch to "my test Site", new "page", the following figure:
The name is entered as "index.html", or the "index" system automatically adds the suffix ". html", and the template selects the "My test Site-template One" that you just created
After creating the page, edit the page and enter the content
Save, the browsing effect is as follows:
Publish the project, the following figure, determine the current project is "Testwebproj", click "Publish Project"
When the post is finished, switch to the online item and the site selects "My test Site"
Click to browse index.html, the results are as follows:
The URL for this browser is: http://localhost:8081/cms623/opencms/ index.html, Exit OpenCms, you can through this URL directly access to OpenCms created the site, Loalhost replaced by LAN IP, the local area network other machines can also browse the site, so that through the OpenCms to create a simple website ...
Thank you for your attention opencms--Chinese Resources First Blog, welcome to communicate directly with the author, common progress. msn:qianxuncms@hotmail.com,qq:9165456.
More resources please visit OpenCms Chinese web