在servlet中
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
birthday=sdf.parse(request.getParameter("birthday"));
在jsp中:
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
String date=sdf.format(regUser.getBirthday());
在servlet中
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
birthday=sdf.parse(request.getParameter("birthday"));
在jsp中:
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
String date=sdf.format(regUser.getBirthday());
首先應該在pom中添加以下插件,跳過test,否則打包會報錯。 <plugin> <groupId>org.apache.maven.plugins</groupId>
Filter也稱之爲過濾器,它是Servlet 技術中最激動人心的技術,WEB開發人員通過Filter技術,對web服務器管理的所有web資源
http://www.shsay.com http://blog.csdn.net/ladofwind/article/details/7535387