📄 savemessageaction.java
字号:
package onlyfun.caterpillar; import java.util.*;import java.sql.*; import javax.servlet.http.*;import org.apache.struts.action.*;import org.apache.commons.beanutils.*; public class SaveMessageAction extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { String name = (String) PropertyUtils.getSimpleProperty(form, "name"); String email = (String) PropertyUtils.getSimpleProperty(form, "email"); String subject = (String) PropertyUtils.getSimpleProperty(form, "subject"); String memo = (String) PropertyUtils.getSimpleProperty(form, "memo"); Calendar calendar = new GregorianCalendar(); int year = calendar.get(Calendar.YEAR); int month = calendar.get(Calendar.MONTH) + 1; int day = calendar.get(Calendar.DATE); int hour = calendar.get(Calendar.HOUR_OF_DAY); int minute = calendar.get(Calendar.MINUTE); int second = calendar.get(Calendar.SECOND); String time = year + "
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -