我用以下TLD编写了我的JSP自定义标记:
<?xml version="1.0" encoding="UTF-8"?>
<taglib
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee web-jsptaglibrary_2_1.xsd"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2.1">
<tlibversion>1.0</tlibversion>
<jspversion>2.1</jspversion>
...
Run Code Online (Sandbox Code Playgroud)
现在Eclipse Helios抱怨"没有检测到文档的语法约束(DTD或XML模式)."
我知道如何禁用警告,我想知道如何通过提供DTD或架构信息来解决问题.
顺便说一句,在上面的XML中我有:
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee web-jsptaglibrary_2_1.xsd"
Run Code Online (Sandbox Code Playgroud)
但它似乎没有帮助.
更新 Peter的建议我去检查我的Window> Preferences> XML> XML Catalog,我发现以下内容可能适用:
Entry element: Public
Location: dtdsAndSchemas/web-jsptaglibrary_1_2.dtd in jar file
usr/local/eclipse/plugins/org.eclipse.jst.standard.schemas_1.1.0.v201003031644.jar
URI: jar:file:/usr/local/eclipse/plugins/org
.eclipse.jst.standard.schemas_1.1.0.v201003031644.jar!/dtdsAndSchemas
/web-jsptaglibrary_1_2.dtd
Key type: Public ID
Key: -//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN
Run Code Online (Sandbox Code Playgroud)
所以我试着将以下内容添加到我的tld中:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_2.dtd">
Run Code Online (Sandbox Code Playgroud)
现在我有以下错误:
在此行找到多个注释:
值为"http://java.sun.com/xml/ns/javaee"的属性"xmlns"的值必须为"http://java.sun.com/JSP/ TagLibraryDescriptor".
schema_reference.4:无法读取架构文档'web-jsptaglibrary_2_1.xsd',因为
1)找不到文件; 2)文件无法阅读; 3)文档的根元素不是.
元素类型"taglib"的内容必须匹配"(tlib-version,jsp-version,short-name,uri ?, display-name ?, …
我有一个Spring(3.0)控制器,其方法有HttpServletRequest一个参数,因为它处理(多个)文件上传.
@RequestMapping(value = "/classified/{idClassified}/dealer/{idPerson}/upload",
method = RequestMethod.POST)
@ResponseBody
public final String uploadClassifiedPicture(
@PathVariable int idClassified,
@PathVariable int idPerson,
@RequestParam String token,
HttpServletRequest request);
Run Code Online (Sandbox Code Playgroud)
如何进行单元测试?我知道我可以创建一个MockHttpServletRequest,但我不知道如何传递一个或多个文件.
MockHttpServletRequest request = new MockHttpServletRequest("POST",
"/classified/38001/dealer/54/upload?token=dfak241adf");
Run Code Online (Sandbox Code Playgroud) 我试图在Spring的测试项目中定义JNDI数据库连接.我用Spring Roo引导了这个项目,因此是Mavenized.这是Roo脚本供参考(Roo 1.2.1)
project --topLevelPackage org.obliquid.cpool
jpa setup --database MYSQL --provider HIBERNATE --jndiDataSource /jdbc/cpool
web mvc setup
entity jpa --class org.obliquid.cpool.entity.Person
field string --fieldName name
web mvc scaffold --class ~.entity.Person
web mvc all --package ~.web
Run Code Online (Sandbox Code Playgroud)
在src/main/resources/META-INF/spring/applicationContext.xml我有以下的(由小豆创建):
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee/spring-jee-3.1.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.1.xsd">
...
<jee:jndi-lookup id="dataSource" jndi-name="/jdbc/cpool" resource-ref="true"/>
...
Run Code Online (Sandbox Code Playgroud)
我创建src/main/resources/META-INF/context.xml了以下内容:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/myapp" docBase="cpool" reloadable="true" debug="1">
<Resource name = "jdbc/cpool" …Run Code Online (Sandbox Code Playgroud) 我有一个简单的客户端/服务器设置.服务器在C中,查询服务器的客户端是Java.
我的问题是,当我通过连接发送带宽密集型数据时,例如视频帧,它会丢弃一半的数据包.我确保在服务器端正确分割udp数据包(udp的最大有效负载长度为2 ^ 16).我验证了服务器正在发送数据包(printf是sendto()的结果).但是java似乎没有获得一半的数据.
此外,当我切换到TCP时,所有视频帧都通过但延迟开始累积,在运行几秒后增加几秒延迟.
我有什么明显的遗失吗?我似乎无法弄清楚这一点.
我想获得iPhone的网络速度,以便在速度太慢时我可以向用户提供信息.
我想知道用JSP /表达式语言实现省略号缩写的最佳方法是什么.
现在,我一直在使用fn:substring,这没关系,但我希望有三个点"......",以防文本被截断.
通过网络搜索,我发现Java Web Parts有一个AbbreviateTag.但是我想知道是否有更好的库,或者我是否更好地滚动自己的自定义标签.你有什么建议?
我即将开始在我的应用程序中制作一些报告,但我不确定从哪里开始。我有一个带有 Prism 和 MVVM 的客户端应用程序,它与后面的 WCF 服务和 EF4.1 和 SQL 进行通信。
如何让报表设计器支持 ViewModel?
任何好的例子将不胜感激。
编辑:我对如何做到这一点有一个基本的了解,但这不是一个好的解决方案,我希望有一个更好的解决方案可能会有所帮助......
是否有可能在每行执行后看到堆栈和堆的内容.我希望看到它,因为它会清楚地了解.Net中的内存分配和释放.跟你的
如果有任何文件或链接可以解答我对您的回答的怀疑请分享.
我可以通过命令行启动Glassfish.但是,当我尝试通过Eclipse启动服务器时遇到以下错误:
Eclipse插件无法与GlassFish服务器通信,状态为:CREDENTIAL_ERROR
我已经检查了我的登录凭据(admin/ adminadmin)并且它们是正确的(我可以使用相同的用户/通行证登录到端口4848上的管理控制台).这是我的系统信息:
如果有问题的解决方案,请告诉我.
java ×5
networking ×3
.net ×2
spring ×2
c ×1
c# ×1
connection ×1
datagram ×1
el ×1
glassfish-3 ×1
heap ×1
ipad ×1
iphone ×1
jndi ×1
jsp ×1
jsp-tags ×1
mvvm ×1
objective-c ×1
performance ×1
reporting ×1
spring-mvc ×1
ssh ×1
stack ×1
taglib ×1
tomcat7 ×1
udp ×1
wpf ×1