2 java111212121 jaVa111212121 于 2016.04.20 15:50 提问

jfinal手册第一个快速入门的程序,如何通过tomcat发布到网上正常显示

我用的是java EE编程的
这是主程序
package projectTest;

import com.jfinal.config.Constants;
import com.jfinal.config.Handlers;
import com.jfinal.config.Interceptors;
import com.jfinal.config.JFinalConfig;
import com.jfinal.config.Plugins;
import com.jfinal.config.Routes;

public class Test extends JFinalConfig {

@Override
public void configConstant(Constants me) {
    me.setDevMode(true); 
}

@Override
public void configRoute(Routes me) {
    me.add("/hello", HelloController.class); 
}

@Override
public void configPlugin(Plugins me) {

}

@Override
public void configInterceptor(Interceptors me) {

}

@Override
public void configHandler(Handlers me) {

}

}

这是HelloController程序

package projectTest;

import com.jfinal.core.Controller;

public class HelloController extends Controller {
public void index() {

    renderText("Hello JFinal World."); 

} 

}

然后通过tomcat7.0发布(都是配置好了的),但是一直显示404错误,这是url:http://localhost:8080/hello

日志信息:
四月 20, 2016 3:42:59 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version: Apache Tomcat/7.0.68
四月 20, 2016 3:42:59 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built: Feb 8 2016 20:25:54 UTC
四月 20, 2016 3:42:59 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number: 7.0.68.0
四月 20, 2016 3:42:59 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name: Windows 8.1
四月 20, 2016 3:42:59 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version: 6.3
四月 20, 2016 3:42:59 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture: amd64
四月 20, 2016 3:42:59 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home: C:\Mine\Study\jdk7\jie7
四月 20, 2016 3:42:59 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version: 1.7.0_80-b15
四月 20, 2016 3:42:59 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor: Oracle Corporation
四月 20, 2016 3:42:59 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE: C:\Mine\Study\tomcat
四月 20, 2016 3:42:59 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME: C:\Mine\Study\tomcat
四月 20, 2016 3:42:59 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=C:\Mine\Study\tomcat
四月 20, 2016 3:42:59 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=C:\Mine\Study\tomcat
四月 20, 2016 3:42:59 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=C:\Mine\Study\tomcat\webapps
四月 20, 2016 3:42:59 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=C:\Mine\Study\tomcat\endorsed
四月 20, 2016 3:42:59 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=GBK
四月 20, 2016 3:42:59 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Mine\Study\jdk7\jie7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Mine\Study\jdk7\bin;C:\Mine\Study\jdk7\jre\bin;.
四月 20, 2016 3:42:59 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-bio-8080"]
四月 20, 2016 3:42:59 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-bio-8009"]
四月 20, 2016 3:42:59 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 585 ms
四月 20, 2016 3:42:59 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
四月 20, 2016 3:42:59 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.68
四月 20, 2016 3:42:59 下午 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor C:\Mine\Study\tomcat\conf\Catalina\localhost\jfinal_demo.xml
四月 20, 2016 3:42:59 下午 org.apache.catalina.startup.HostConfig deployDescriptor
警告: A docBase C:\Mine\Study\tomcat\webapps\jfinal_demo inside the host appBase has been specified, and will be ignored
四月 20, 2016 3:42:59 下午 org.apache.catalina.startup.SetContextPropertiesRule begin
警告: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:jfinal_demo' did not find a matching property.
四月 20, 2016 3:42:59 下午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
四月 20, 2016 3:43:00 下午 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deployment of configuration descriptor C:\Mine\Study\tomcat\conf\Catalina\localhost\jfinal_demo.xml has finished in 669 ms
四月 20, 2016 3:43:00 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory C:\Mine\Study\tomcat\webapps\docs
四月 20, 2016 3:43:00 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory C:\Mine\Study\tomcat\webapps\docs has finished in 58 ms
四月 20, 2016 3:43:00 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory C:\Mine\Study\tomcat\webapps\examples
四月 20, 2016 3:43:00 下午 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
四月 20, 2016 3:43:00 下午 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
四月 20, 2016 3:43:00 下午 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@2d4b90ff')
四月 20, 2016 3:43:00 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory C:\Mine\Study\tomcat\webapps\examples has finished in 363 ms
四月 20, 2016 3:43:00 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory C:\Mine\Study\tomcat\webapps\host-manager
四月 20, 2016 3:43:00 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory C:\Mine\Study\tomcat\webapps\host-manager has finished in 63 ms
四月 20, 2016 3:43:00 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory C:\Mine\Study\tomcat\webapps\manager
四月 20, 2016 3:43:00 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory C:\Mine\Study\tomcat\webapps\manager has finished in 78 ms
四月 20, 2016 3:43:00 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory C:\Mine\Study\tomcat\webapps\ROOT
四月 20, 2016 3:43:00 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory C:\Mine\Study\tomcat\webapps\ROOT has finished in 53 ms
四月 20, 2016 3:43:00 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8080"]
四月 20, 2016 3:43:00 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
四月 20, 2016 3:43:00 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 1338 ms
四月 20, 2016 3:43:01 下午 com.jfinal.core.ActionHandler warn
警告: 404 Action Not Found: /

求大大帮帮忙

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!