我知道这个问题是主观的,但是由于OpenID库页面列出了许多库,我认为可能会做出一些尝试来提名最好的一个或两个,就以下方面而言:
我很感激任何使用过任何OpenID Java库的人的回答
我继承了一年前由某人开发的JSF项目,该项目不再适用于我的公司,代码很难理解.其中很多似乎是由IDE自动生成的,尤其是类的getter和setter.实际上,每个私有字段都有关联的getter和setter,即使它们未在项目中的任何位置引用.
我想在尝试理解项目之前摆脱所有这些无用的代码,但鉴于它是一个JSF项目,bean的属性可能在xhtml文件中引用,因此在使用"show references"命令时不会显示.
有没有办法知道哪些方法真的没用,以便安全地删除它们?
我使用eclipse但是每个允许这样做的工具都会让我感到很放松!
我正在浏览Java文档以寻找C++的STL的Java等价物Queue,但我发现的只是一个被调用的接口Queue和一堆我无法做到的实现的实现.
Java是否有一个实现Queue只是一个FIFO数据结构而没有添加花里胡哨?我只需要enqueue,dequeue以及front运营和数据结构应该允许重复.
这几天我正在使用 spring mvc 进行一些测试,但有一个问题。对于要测试的基本应用程序,我选择本教程: http://loianegroner.com/2010/09/extjs-spring-mvc-3-and-hibernate-3-5-crud-datagrid-example/ 我已下载该示例和一切都按预期工作。问题是当我尝试添加另一个控制器时。看来我添加的文件没有被扫描。
我的 web.xml 文件:
<servlet>
<servlet-name>extjs-crud-grid-spring-hibernate</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/spring/app-config.xml
</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>extjs-crud-grid-spring-hibernate</servlet-name>
<url-pattern>*.action</url-pattern>
</servlet-mapping>
Run Code Online (Sandbox Code Playgroud)
/WEB-INF/spring/app-config.xml:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
<!-- Scans the classpath of this application for @Components to deploy as beans -->
<context:component-scan base-package="com.loiane" />
<!-- Configures the @Controller programming model -->
<mvc:annotation-driven />
<!-- misc -->
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
<property name="suffix" value=".jsp"/>
</bean>
<!-- Configures Hibernate - …Run Code Online (Sandbox Code Playgroud) 我试图将此scriptlet代码转换为JSF类.
视图代码
<f:view>
<h:form binding="#{jsfSocketClient.form}">
<h:outputText binding="#{jsfSocketClient.text}"/>
</h:form>
</f:view>
Run Code Online (Sandbox Code Playgroud)
和java代码
private HtmlForm form = new HtmlForm();
private HtmlOutputText text = new HtmlOutputText();
public HtmlForm getForm()
{
System.out.println("instance: "+FacesContext.getCurrentInstance().getResponseWriter());
ResponseWriter writer = (FacesContext.getCurrentInstance()).getResponseWriter();
try{
int character;
Socket socket = new Socket("127.0.0.1", 8765);
InputStream inSocket = socket.getInputStream();
OutputStream outSocket = socket.getOutputStream();
String str = "Hello!\n";
byte buffer[] = str.getBytes();
outSocket.write(buffer);
char characters = 0;
while ((character = inSocket.read()) != -1) {
text.setValue((char)character);
//writer.write((char)character);
//characters += (char)character;
}
//text.setValue(characters);
if(str.equalsIgnoreCase("bye"))
{ …Run Code Online (Sandbox Code Playgroud) 浏览器如何管理Cookie?我的意思是,是否必须创建Cookie对象?
动机:我想登录一个cookie网站。如今,Cookie不仅是名称和值-它们还包含域,有效期等。
我需要使用Java的答案。
部署我的应用程序时出现错误,如下所示.
Caused by: org.jboss.weld.exceptions.AmbiguousResolutionException: WELD-001318 Cannot resolve an ambiguous dependency between [
Producer Method [String] with qualifiers [@Any @Config] declared as [[method] @Produces @Config public ca.comdev.cdip.mis.enterpriseportal.configuration.ConfigurationProvider.getConfigurationValue(InjectionPoint)],
Producer Method [String] with qualifiers [@Any @Config] declared as [[method] @Produces @Config public ca.comdev.cdip.mis.enterpriseportal.configuration.ConfigurationProvider.getConfigurationValue(InjectionPoint)]]
Run Code Online (Sandbox Code Playgroud)
我只有这样的方法,其标题看起来像这样
@Produces @Config public String getConfigurationValue(InjectionPoint p) throws ConfigurationException{...}
Run Code Online (Sandbox Code Playgroud)
和班级有这些
@Named
@Singleton
@Startup
public class ConfigurationProvider {...}
Run Code Online (Sandbox Code Playgroud)
请帮忙.这个错误可能比我的代码更模糊.
我在Java程序中有一个编译问题:
class FigureEditor {
int[] a; ----- Syntax error on token ";", , expected
a = new int[5];
}
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?
如何将字符串转换www.mywebsite.com/firefox.txt为URL?我想在文件对象中使用它,然后进入FileReader构造函数.
我正在使用JAMon,我想使用它jamon.war来监控我的应用程序.但是,我的应用程序和jamon.war应用程序有不同的类加载器,因此他们没有看到彼此的静态变量(据我所知,数据存储在哪里).当我MonitorFactory.getReport()在我的应用程序中调用时,我收到了正确的数据.
如何使这个工作?
java ×10
jsf ×2
arrays ×1
browser ×1
cdi ×1
collections ×1
cookies ×1
jamon ×1
java-ee-6 ×1
javabeans ×1
jboss-weld ×1
jsp ×1
openid ×1
properties ×1
queue ×1
scriptlet ×1
spring ×1
spring-mvc ×1
tomcat ×1