IntelliJ IDEA 创建 hello world Java web Maven项目遇到的问题

时间:2022-09-05 20:12:14

新建项目的话看下面的链接,这里我只列出我遇到的一些问题。
结构目录如下:
IntelliJ IDEA 创建 hello world Java web Maven项目遇到的问题

1、启动 Java Web 项目,打开“Project Structure”,配置“Facets”和“Artifacts”
IntelliJ IDEA 创建 hello world Java web Maven项目遇到的问题
IntelliJ IDEA 创建 hello world Java web Maven项目遇到的问题
2、运行tomcat可以访问localhost:8080,访问http://localhost:8080/student/getAllStudent
HTTP Status 500 - The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
IntelliJ IDEA 创建 hello world Java web Maven项目遇到的问题
以前tomcat启动的时候扫描包太多,修改了启动配置文件:找到 tomcat/conf/catalina.properties
tomcat.util.scan.DefaultJarScanner.jarsToSkip=*.jar
修改这个为
tomcat.util.scan.DefaultJarScanner.jarsToSkip=
或者默认配置:
tomcat.util.scan.DefaultJarScanner.jarsToSkip=\
bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,\
annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,websocket-api.jar,\
catalina.jar,catalina-ant.jar,catalina-ha.jar,catalina-tribes.jar,\
jasper.jar,jasper-el.jar,ecj-*.jar,\
tomcat-api.jar,tomcat-util.jar,tomcat-coyote.jar,tomcat-dbcp.jar,\
tomcat-jni.jar,tomcat-spdy.jar,\
tomcat-i18n-en.jar,tomcat-i18n-es.jar,tomcat-i18n-fr.jar,tomcat-i18n-ja.jar,\
tomcat-juli-adapters.jar,catalina-jmx-remote.jar,catalina-ws.jar,\
tomcat-jdbc.jar,\
tools.jar,\
commons-beanutils*.jar,commons-codec*.jar,commons-collections*.jar,\
commons-dbcp*.jar,commons-digester*.jar,commons-fileupload*.jar,\
commons-httpclient*.jar,commons-io*.jar,commons-lang*.jar,commons-logging*.jar,\
commons-math*.jar,commons-pool*.jar,\
jstl.jar,\
geronimo-spec-jaxrpc*.jar,wsdl4j*.jar,\
ant.jar,ant-junit*.jar,aspectj*.jar,jmx.jar,h2*.jar,hibernate*.jar,httpclient*.jar,\
jmx-tools.jar,jta*.jar,log4j.jar,log4j-1*.jar,mail*.jar,slf4j*.jar,\
xercesImpl.jar,xmlParserAPIs.jar,xml-apis.jar,\
junit.jar,junit-.jar,hamcrest.jar,org.hamcrest*.jar,ant-launcher.jar,\
cobertura-.jar,asm-.jar,dom4j-.jar,icu4j-.jar,jaxen-.jar,jdom-.jar,\
jetty-.jar,oro-.jar,servlet-api-.jar,tagsoup-.jar,xmlParserAPIs-*.jar,\
xom-*.jar
重启tomcat就ok了。

我看的三篇博客地址:
1、http://blog.csdn.net/qq_27093465/article/details/68961393
2、http://blog.csdn.net/qq_37677519/article/details/76169612
3、http://blog.csdn.net/sxhong/article/details/51533709