我想获得有关Java中嵌入式数据库的意见或建议.特别是我在看H2,HSQLDB和Derby.您是否在生产项目中使用了这些?您是否有评论或建议选择其他人?
谢谢
编辑:我目前正在评估这些选项,以用于我们的内部开发,所以我没有考虑具体的用例.我正在评估它们的一个可能用途是使用数据库作为本地存储库的桌面应用程序.在某些时候,它与中央存储库(在本例中为DB2)同步.它是一个存储和转发架构.无论如何,这只是指导你的答案的可能性,基本上我正在寻找你使用这些工具的经验.
有没有人有JPA 1和JPA 2之间的变化列表?我已经阅读了关于Criteria查询和其他更改的内容,但我想要一个"什么是新的"参考.谢谢
我在MVC3应用程序中看到了一个奇怪的行为.我有一个由Ajax调用的Action,并收到一个带有HTML文本的帖子.我想允许输入HTML,所以我设置了ValidateInput(false)属性.我还有一个带有以下参数的全局OutputCache过滤器:(NoStore = true,Duration = 0,VaryByParam ="*")
代码如下所示:
[HttpPost]
[ValidateInput(false)]
[OutputCache(NoStore = true, Duration = 0, VaryByParam = "*" )]
public ActionResult Edit(SomeModel someModel)
{
saveModel(someModel);
return new AjaxEditSuccessResult();
}
Run Code Online (Sandbox Code Playgroud)
当我向该方法发送帖子时,它会被执行并保存模型,但我得到的响应是标准的"从客户端检测到一个潜在危险的Request.Form值"错误消息,带有此栈跟踪:
[HttpRequestValidationException (0x80004005): A potentially dangerous Request.Form value was detected from the client (text="<p class="MsoNormal"...").]
System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection) +9665149
System.Web.<>c__DisplayClass5.<ValidateHttpValueCollection>b__3(String key, String value) +18
System.Web.HttpValueCollection.EnsureKeyValidated(String key) +9664565
System.Web.HttpValueCollection.Get(String name) +17
System.Web.Caching.OutputCacheModule.CreateOutputCachedItemKey(String path, HttpVerb verb, HttpContext context, CachedVary cachedVary) +676
System.Web.Caching.OutputCacheModule.CreateOutputCachedItemKey(HttpContext context, CachedVary cachedVary) +55
System.Web.Caching.OutputCacheModule.OnLeave(Object source, EventArgs eventArgs) …Run Code Online (Sandbox Code Playgroud) 我正在尝试实现一个JQuery脚本来处理图像映射中的某些区域.我使用$('area [shape ="poly"]')作为选择器来获取我感兴趣的区域.它在IE8和Firefox中运行良好,但它没有在IE6或IE7中选择元素.
这是一个显示此问题的测试页面.我不知道这是一个JQuery错误还是我做错了什么.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
var areas = $('area[shape="poly"]');
alert('areas: ' + areas.length);
});
//]]>
</script>
<title>Test</title>
</head>
<body>
<img id="img1" src="nothing.gif" style="width:300px; height:300px; border: 2px solid black" usemap="#map1"/>
<map id="map1">
<area shape="rect" title="rectArea" coords="126,112,231,217" alt=""/>
<area shape="poly" title="polyArea1" coords="274,72,262,70,251,68,240,67,228,66,217,67,206,68,194,70,183,72,181,63,192,60,204,58,216,57,228,56,240,57,252,58,264,60,276,63" alt=""/>
<area shape="poly" title="polyArea2" coords="241,194,235,193,228,193,222,193,216,194,196,119,204,117,212,116,220,115,228,115,237,115,245,116,253,117,261,119" alt=""/>
</map>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
这在IE8和Firefox中显示2,在IE6-7中显示0
谢谢,Guillermo