问题描述
- 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:MineStudyjdk7jie7
四月 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:MineStudytomcat
四月 20, 2016 3:42:59 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME: C:MineStudytomcat
四月 20, 2016 3:42:59 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=C:MineStudytomcat
四月 20, 2016 3:42:59 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=C:MineStudytomcat
四月 20, 2016 3:42:59 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=C:MineStudytomcatwebapps
四月 20, 2016 3:42:59 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=C:MineStudytomcatendorsed
四月 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:MineStudyjdk7jie7bin;C:WindowsSunJavabin;C:Windowssystem32;C:Windows;C:Program Files (x86)InteliCLS Client;C:Program FilesInteliCLS Client;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;c:Program Files (x86)ATI TechnologiesATI.ACECore-Static;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsIPT;C:Program FilesIntelIntel(R) Management Engine ComponentsIPT;C:Program FilesIntelWiFibin;C:Program FilesCommon FilesIntelWirelessCommon;C:MineStudyjdk7bin;C:MineStudyjdk7jrebin;.
四月 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:MineStudytomcatconfCatalinalocalhostjfinal_demo.xml
四月 20, 2016 3:42:59 下午 org.apache.catalina.startup.HostConfig deployDescriptor
警告: A docBase C:MineStudytomcatwebappsjfinal_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:MineStudytomcatconfCatalinalocalhostjfinal_demo.xml has finished in 669 ms
四月 20, 2016 3:43:00 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory C:MineStudytomcatwebappsdocs
四月 20, 2016 3:43:00 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory C:MineStudytomcatwebappsdocs has finished in 58 ms
四月 20, 2016 3:43:00 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory C:MineStudytomcatwebappsexamples
四月 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:MineStudytomcatwebappsexamples has finished in 363 ms
四月 20, 2016 3:43:00 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory C:MineStudytomcatwebappshost-manager
四月 20, 2016 3:43:00 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory C:MineStudytomcatwebappshost-manager has finished in 63 ms
四月 20, 2016 3:43:00 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory C:MineStudytomcatwebappsmanager
四月 20, 2016 3:43:00 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory C:MineStudytomcatwebappsmanager has finished in 78 ms
四月 20, 2016 3:43:00 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory C:MineStudytomcatwebappsROOT
四月 20, 2016 3:43:00 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory C:MineStudytomcatwebappsROOT 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: /求大大帮帮忙