08.7.22:
1.
2.拷贝整个数据库的内容: 指令mysqldump
E:/work/mysql-5.0.51b-win32/bin> mysqldump -u root -h 192.168.0.123 old>c:/wwwww
.sql
3.Struts.2.0中查寻到对象 通过GET方法在界面中就能等到对象的成员变量的值.如:(ser.name)
4.跌带方法:
5 登陆时如何把登陆对象放入到Map中并且从JSP中取出:放入的方法:定义变量: private Map session 生成Set方法; 把获得的对象通过put放入进去!如从请求的界面得到的是U对象:session.put(session_key,U) OK!就成功的把它放进去了!现在我门把他取来:${sessionScope.对象} OK!取出成功!
现在我在ACTION中取出来的 代码如下:
放入进去通过PUT
session.put(AUsers.SESSION_KEY, u);
在类中定义KEY键直public static final String SESSION_KEY="users";
得到session对象
HttpSession session = ServletActionContext.getRequest().getSession();
得到Users对象
AUsers users = (AUsers) session.getAttribute("users");
6更正上面的5不是放的session中而是放到了map中!map从其他的界面取不出来只能从它跳转的界面中取出来!而session是个全局变量!在任何地方都可以取
和上面一样定义一个session对象 :private HttpSession session ;
先得到个session对象把 如:session = ServletActionContext.getRequest().getSession();
然后把取到的对象放进session中session.setAttribute("users", u);
Aaction中取出代码如:AUsers users = (AUsers) session.getAttribute("users");
Jsp中取出来为${sessionScope.对象.对象属性}
7.利用命令提示符查看IP 地址:ipconfig
8.SSH2中service出现空指针 :分析原因:1.XXXDAO没有SET进去:2.配置文件中没有写注入进去;3.注入时语句大写必须是小写的xxx.Dao;
9.错误:There is no Action mapped for namespace / and action name login。。。。。
CLEAN UP一下.有时候你改了STRUTS的ACTION映射文件后没有及时更新到CLASSES下面.就会有这个结果.
10.对于9的错误:clean 会有些问题!
在更新时总是报错:……Working copy not locked; this is probably a bug, please report svn:……,提示就是class目录下的.svn有毛病!
从到http://www.tigris.org查找解决方法,有一段描述:
This message is coming straight out of the Subversion library, so technically it is Subversion asking you to report the problem to them. This error message is kind of their general error message when something really unexpected happens. In the case of Eclipse, the problem is almost always one specific thing. The problem is that your Eclipse build folder was versioned and added to your repository. What happens is that when Eclipse does a full build it will delete everything in this folder, including the ".svn" metadata folder. When Subversion cannot find this folder it issues the above error.
The solution is to delete this folder from your repository, which you can do from the SVN Repositories view. Then try deleting the folder from your working copy and perforiming an update. You might need to checkout your project again. Once you have a valid project again, be sure to add the build folder to the svn:ignore property of its parent folder so that the problem does not happen again.
If this is not your problem, then as best as you can try to figure out what might have led up to having this problem and report it on th Subversion [email protected] mailing list
大意:重新部署工程时会将文件夹WEB-INF/classes下的内容全删了,包括".svn"这个文件夹,从面导致SVN找不到这个文件夹的信息,于是报错。解决的方法是在SVN仓库内将classes下的内容清空,然后在确保本地工程已完全提交的情况下,将本地工程包括文件删除,再从SVN仓库中重新取出。 导致此问题的原因善不明确,估计是往这个文件夹手动添加了文件。