About jfinal in the jetty environment, the issue caused by the launch of the Tomcat environment experience.

Source: Internet
Author: User

First, familiarize yourself with the release configuration related to Tomcat:

Specific Release configuration steps:


My Project deployment:

Configuration file: Tomcat. /conf/server.xml

<context path= "" reloadable= "false" docbase= "E:\WWW\GMB"/>

</Host>

Originally there was no problem, but @jfinal, Jayne recommended to leave the path of the Tomcat configuration "", then the problem. Many times our front-end action requests

is prefixed with the name of the project, so that it is less than one layer (Me.add ("CTX") takes "").

Someone will say, path that is not empty, according to the project name, such as "/GMB", but the problem comes again, the front-end access, it becomes: HTTP://LOCALHOST:8080/GMB/GMB to access, do not forget the following Tomcat configuration The physical address of the docBase.


Yes, this is the problem here, toss me in the middle of the night now only to send this experience. The solution is to configure the project prefix in Afterjfinalstart to the context, jfinal.me (). Getservletcontext (). SetAttribute ("CTX", "/GMB");


Of course, before the use of SetAttribute ("CTX", "/GMB"), there is a place on the home page to obtain the CTX project prefix, the others have not been obtained, and now still wondering. It 's a little weird, too.



About jfinal in the jetty environment, the issue caused by the launch of the Tomcat environment experience.

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.