Jeecms modifies the background access path

Source: Internet
Author: User

Modify the background access path
 
1. Modify the background access path:

For example, http: // localhost: 8080/jeeadmin/jeecms/login. do

Change: http: // localhost: 8080/hailou/index. do

Modification method:

1. Set

<Servlet-mapping>

<Servlet-name> JeeCmsAdmin </servlet-name>

<Url-pattern>/jeecms/admin/* </url-pattern>

</Servlet-mapping>

Change

<Servlet-mapping>

<Servlet-name> JeeCmsAdmin </servlet-name>

<Url-pattern>/hailou/* </url-pattern>

</Servlet-mapping>

2, will be in the jeecms-servlet-admin.xml

<Property name = "loginUrl" value = "/jeecms/admin/login. do"/>

<Property name = "returnUrl" value = "/jeecms/admin/index. do"/>

Change

<Property name = "loginUrl" value = "/hailou/login. do"/>

<Property name = "returnUrl" value = "/hailou/index. do"/>



<Entry key = "appBase" value = "/hailou"/>

Change

<Entry key = "appBase" value = "/jeecms/admin"/>

3. Set the variable in the getURI (HttpServletRequest request) method in the AdminContextInterceptor class

Change count = 2 to count = 1



2. Why is the content page slow?

This is because when a jeecms employee creates a page, the css file is cited in four files: http: // 192.168.0.121/Hangzhou page.



3. When the server is started, dic home shocould not be a file, but a directory is thrown!

Analysis problem: this is because PaodingMaker. the getFile () method uses the old version of java.net. URL. getFile () cannot recognize Chinese characters or spaces. Only URLs are used. toURI (). getPath () can recognize Chinese characters and spaces.



Solve the problem: You need to modify the code in Paoding. Find the setDicHomeProperties method of PaodingMaker. java and modify File dicHomeFile = getFile (dicHome );



File dicHomeFile2 = getFile (dicHome );

String path = "";

Try {

Path = URLDecoder. decode (dicHomeFile2.getPath (), "UTF-8 ");

} Catch (UnsupportedEncodingException e ){

E. printStackTrace ();

}
File dicHomeFil

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.