struts初探

版权声明:本文为博主原创文章,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/xiaoliangyuu/p/5595984.html

 

首先:struts2官网, https://struts.apache.org/。

 

可以根据如下地址进行struts2的第一个项目helloworld

guides页面 >> Tutorials(教程;学习指南) >> Getting Started >> Hello World Using Struts 2。

 

以下是我在做第一个项目时遇到的问题:

1、 500错误,以下是浏览器显示的错误日志
     

500 Internal Privoxy Error

Privoxy encountered an error while processing your request:

Could not load template file no-server-data or one of its included components.

Please contact your proxy administrator.

If you are the proxy administrator, please put the required file(s)in the (confdir)/templates directory. The location of the (confdir) directory is specified in the main Privoxy config file. (It's typically the Privoxy install directory).

     解决: struts.xm里,action路径写错了,改正。

2、 工程部署成功且运行成功后,tomcat服务器里找不到该工程。

      解决:双击eclipse里的tomcat服务器,可以打开tomcat的overview进行相关设置,如图

其中server Locations就是工程部署的设置,其中有三种部署位置可选,其中有两个位置

.metadata\.plugins\org.eclipse.wst.server.core\tmp0  (eclipse默认项目部署位置)

D:\Program Files (x86)\tomcat-6.0.32  (我们自己的tomcat服务器的位置)

我们只要在此设置,就可以改变工程的部署位置了。

 

 

      

posted @ 2016-06-18 12:14  小亮yuu  阅读(442)  评论(0编辑  收藏  举报