1.超霸气的一个界面。功能超多,不用再单独写配置文件来配置了,系统自动生成。
IDEA的基础配置
2.Tomcat配置:
创建项目时可以直接配置;
或者点击右上角会有tomcat的详细配置。
3.其他设置问题。https://blog.csdn.net/qq_31655965/article/details/52788374
尝试新建项目:
注意点:项目的名称的格式;
添加jar包
Tomcat的设置--右上角
运行测试
报错了。
Artifact FirstStruts:war exploded:war exploded: Error during artifact deployment. See server log for details.
情况一:File->Project Structure->Artifacts出现如下的界面,在最初的时候,图中圈起来的地方有黄色的波浪线异常提示(我现在已经解决了,所以已经没有提示了)。
单机图中画圈部分,在图中右下角会有异常提示,最最右下角一般会有一个浏览选择,选择Add ……就可以了。
第二种情况:展开这个+,按图操作
选择后点击apply-ok。
又出现新错误了。
15-May-2018 21:57:54.993 WARNING [RMI TCP Connection(2)-127.0.0.1] org.apache.tomcat.util.descriptor.web.WebXml.setVersion Unknown version string [4.0]. Default version will be used.
15-May-2018 21:57:57.438 SEVERE [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
应该是tomcat的版本version问题。 改成3.1
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" metadata-complete="true" version="3.1"> <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> </web-app>
重新运行后还有一个 错误。
15-May-2018 23:00:03.132 SEVERE [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
解决:jdk的引用路径错误。未匹配
错误:23:16 Error running 'Tomcat 8.0.35': Address localhost:1099 is already in use
关于端口占用解决方法:https://blog.csdn.net/huazhongkejidaxuezpp/article/details/41813683