4.Struts的<action input=""></action>:业务逻辑层
2012-08-25 08:42
645 查看
package com.bjpowernode.struts; public class UserManager { public void login(String username, String password) { if (!"admin".equals(username)) { throw new UserNotFoundException(); } if (!"admin".equals(password)) { throw new PasswordErrorException(); } } }
package com.bjpowernode.struts; public class UserNotFoundException extends RuntimeException { public UserNotFoundException() { // TODO Auto-generated constructor stub } public UserNotFoundException(String message) { super(message); // TODO Auto-generated constructor stub } public UserNotFoundException(Throwable cause) { super(cause); // TODO Auto-generated constructor stub } public UserNotFoundException(String message, Throwable cause) { super(message, cause); // TODO Auto-generated constructor stub } }
package com.bjpowernode.struts; public class PasswordErrorException extends RuntimeException { public PasswordErrorException() { // TODO Auto-generated constructor stub } public PasswordErrorException(String message) { super(message); // TODO Auto-generated constructor stub } public PasswordErrorException(Throwable cause) { super(cause); // TODO Auto-generated constructor stub } public PasswordErrorException(String message, Throwable cause) { super(message, cause); // TODO Auto-generated constructor stub } }
相关文章推荐
- 3.Struts的<action input=""></action>:Action
- 2.Struts的<action input=""></action>:ActionForm
- 1.Struts的<action input=""></action>:界面
- <form action="get.php" method="post" id="tform"> <input type="text" name="one"> <a href="jav
- 6.Struts的<action input=""></action>:web.xml
- 5.Struts的<action input=""></action>:struts-config.xml
- <form method=post action="addNew_hxxm.jsp" name="form1"enctype="multipart/form-data">
- <input type="file" name="filePath" />最简单的解决方法
- <form>标签只能作用一个<input type="hidden"/>?
- <input type="text" name="" id=""/>中name和id的区别
- <input type="file" />accept属性列表
- <input type="text" value="">实现输入提示
- <input type="file">定义样式并获取上传文件路径及指定文件类型
- <input type="image"> 和 <img> 用法区别
- 3.Struts的<action unknown="true">:web.xml
- 使用<input type="text" value=<%=str%>>出现取值不全的问题
- <input type="button" style="display:none">隐藏按钮显示
- <input type="text"/>可通过width="" height=""设置宽度高度
- 2.Struts的<action unknown="true">:struts-config.xml
- 1.Struts的<action unknown="true">:界面