wytkings的博客
wytkings · 共 4 篇文章
Struts2中JSTL标签不起作用解决办法
1.设置整个项目使用el表达式,需要在web.xml中加上 (控制一个项目) < jsp-config > < jsp-property-group > < el-ignored >false < / el-ignored > < /jsp-property-group > < / jsp-config > 2.设置某个jsp页面使用el表达式,需要在jsp页面加上(控制单个页面) <%@ page isELIgnored="false"%> //我设置了这点就可以了, 3.看你的web.xml文件中头的引用应该是 2.4.xsd ${requestScope.hello}
2010-06-13 10:37 · 评论(0)
ids for this class must be manually assigned ....
错误篇1: org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): ***(POJO类,及持久化类名) 分析及解决: 你要操作的数据表中的id(即主键)的类型设置成了“自动增长类型”,而在你的 hibernate.cfg.xml中,id的生成方式是assigned,即 这种搭配是矛盾的! 主键的assigned生成方式由程序自动生成表的主键,即在你的测试程序中要调用setId()方法,且必 须在调用save()前调用(…
2009-11-10 16:25 · 评论(0)
类似Google搜索引擎
//action 代码。。。。 public ActionForward suggest(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Throwable { response.setContentType("application/xml;charset=UTF-8"); response.setHeader("Charset","UTF-8"); response.setCharacterEncoding("UTF-8"); …
2009-10-21 11:52 · 评论(0)
读取sql server中二进制图片
public void showPhoto(HttpServletResponse response,String fphotoId){ Connection conn = null; try{ try { InitialContext ic = new InitialContext(); Statement stmt = null; conn = DBConnection.getConnection(); BufferedInputStream inputimage = null; stmt = conn.createStatement(); boolean defaultCommit =…
2009-10-16 15:56 · 评论(0)