小编Lau*_*t.B的帖子

在eclipse中,无法在另一个android项目中引用android库项目

当我写这个问题时,我设法解决了它,所以在这里重复它以造福他人.这是最初的问题:

我创建了一个非常简单的库项目,我想在另一个项目中引用它.我之前没有遇到任何问题,所以不确定为什么这次不工作.我有:

  1. 通过项目属性标记库项目.该default.properties文件具有以下设置:android.library=true

  2. 在我的其他项目中,通过项目属性添加了对我的库项目的引用.该default.properties文件具有按预期添加的引用,即android.library.reference.1=K:/android_test_ws/applicationRegistrar

  3. 引用的库项目的绿色勾选从绿色开始,然后变为红叉.

这意味着图书馆项目肯定存在错误/遗漏,但我不知道是什么.我在这个场合的图书馆项目比我之前创建的图书馆项目简单得多.

eclipse android project

104
推荐指数
3
解决办法
7万
查看次数

如何从授权中排除一个网址

我的web.xml看起来像:

<security-constraint>
    <web-resource-collection>
        <web-resource-name>app</web-resource-name>
        <url-pattern>/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
        <role-name>Role</role-name>
    </auth-constraint>
</security-constraint>
Run Code Online (Sandbox Code Playgroud)

这保护每一方免受授权,但我想要排除/信息.这可能吗 ?

java authentication web.xml java-ee

47
推荐指数
2
解决办法
3万
查看次数

在jQuery-UI中调整图标大小

我发现jquery UI中的图标对我的应用来说有点小.调整.ui-icon上的大小当然没有用,因为图像是从单个图像文件加载的,所以它只显示其他图标的一部分.

有没有办法调整图标大小而不必调整我想使用的每个尺寸的图标图像文件?

jquery-ui

37
推荐指数
4
解决办法
5万
查看次数

Eclipse项目范围错误:警告:未设置环境变量HOME.以下目录将用于存储Git

启动Eclipse并得到此错误.我如何解决它?

Warning: The environment variable HOME is not set. The following directory will be used to store the Git
user global configuration and to define the default location to store repositories: 'C:\Documents and Settings\Wizard'. If this is
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
EGit might behave differently since they see different configuration options.
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. …
Run Code Online (Sandbox Code Playgroud)

eclipse git egit

21
推荐指数
3
解决办法
8万
查看次数

MANIFEST.MF中的Class-Path是否只能包含jar文件?

我想在其他目录中包含类文件,而不是主类的目录.

如果我把这些目录放入它的Class-Path属性MANIFEST.MF不起作用.

为什么?除了将这些类打包到jar文件中之外,还有其他解决方案吗?

java jar manifest classpath

12
推荐指数
1
解决办法
4万
查看次数

log4j:log4j:ERROR尝试附加到名为[stdout]的已关闭的appender

"试图附加到封闭的appender"是什么意思?

以下是我的log4j.xml文件的一小部分

<appender name="stdout" class="org.apache.log4j.ConsoleAppender">
    <param name="Threshold" value="TRACE" />
    <param name="Target" value="System.out" />
    <layout class="org.apache.log4j.PatternLayout">
        <param name="ConversionPattern" value="%d %-5p: %m%n" />
    </layout>
</appender>

<logger name="java.sql" additivity="false">
    <level value="trace" />
    <appender-ref ref="stdout" />
</logger>
Run Code Online (Sandbox Code Playgroud)

我试图打印一些SQL查询,但我收到上述错误.我错过了什么吗?

log4j

9
推荐指数
2
解决办法
3万
查看次数

Modify package names for java classes generated from wsdl

如何修改从多个wsdls生成的java类的包名称.我有两个wsdls,它们都生成类ObjectFactory,package-info等类,具有完全相同的包名.因此,我无法在我的代码中组织导入.对于wsdls,我的包看起来像这样 -

WSDL A
    com.test.customerinfo.dto
    com.test.customerinfo.exceptions
    com.test.customerinfo.service

WSDL B    
    com.test.customerinfo.dto
    com.test.customerinfo.exceptions
    com.test.customerinfo.service
Run Code Online (Sandbox Code Playgroud)

我希望它看起来像这样 -

WSDL A
    com.test.customerinfo.dto
    com.test.customerinfo.exceptions
    com.test.customerinfo.service

WSDL B    
    com.testOne.customerinfo.dto
    com.testOne.customerinfo.exceptions
    com.testOne.customerinfo.service
Run Code Online (Sandbox Code Playgroud)

我试过这个,但它没有用 -

<plugin>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-codegen-plugin</artifactId>
    <version>2.7.7</version>
    <executions>
       <execution>
          <id>generate-sources</id>
          <phase>generate-sources</phase>
          <configuration>
             <sourceRoot>target/generated-sources/test/java</sourceRoot>
             <wsdlOptions>
                <wsdlOption>
                   <wsdl>src/main/resources/wsdl/test/GetInfo.wsdl</wsdl>
                   <extraargs>
                      <extraarg>-server</extraarg>
                      <extraarg>-client</extraarg>
                      <extraarg>-impl</extraarg>
                      <extraarg>-verbose</extraarg>
                      <extraarg>-p</extraarg>
                      <extraarg>http://dto.customerinfo.test.com/=com.test.customerinfo.dto</extraarg>
                      <extraarg>-p</extraarg>
                      <extraarg>http://services.customerinfo.test.com/=com.test.customerinfo.services</extraarg>
                      <extraarg>-p</extraarg>
                      <extraarg>http://exceptions.customerinfo.test.com/=com.test.customerinfo.exceptions</extraarg>
                   </extraargs>
                   <frontEnd>jaxws21</frontEnd>
                   <faultSerialVersionUID>1</faultSerialVersionUID>
                </wsdlOption>
             </wsdlOptions>
          </configuration>
          <goals>
             <goal>wsdl2java</goal>
          </goals>
       </execution>
    </executions>
 </plugin>
Run Code Online (Sandbox Code Playgroud)

请指教.

java wsdl

5
推荐指数
1
解决办法
7728
查看次数

Tomcat JDBC与DataSource领域

对于testapp在web.xml中具有以下内容的webapp (除其他外)

<security-constraint>
    <web-resource-collection>
        <web-resource-name>My JSP</web-resource-name>
        <url-pattern>*.secured</url-pattern>
        <url-pattern>/login</url-pattern>
        <http-method>GET</http-method>
        <http-method>POST</http-method>
    </web-resource-collection>

    <auth-constraint>
        <role-name>mobileusers</role-name>
    </auth-constraint>
    <!--
    <user-data-constraint>
        <transport-guarantee>CONFIDENTIAL</transport-guarantee>
    </user-data-constraint>
    -->
</security-constraint>

<login-config>
    <auth-method>DIGEST</auth-method>
    <realm-name>Identity</realm-name>
</login-config>

<security-role>
    <description>
        No Description
    </description>
    <role-name>mobileusers</role-name>
</security-role>
Run Code Online (Sandbox Code Playgroud)

考虑以下两个Tomcat领域配置:

配置1 - JDBC领域:

.../webapps/testapp/META-INF/context.xml

<Realm  className="org.apache.catalina.realm.JDBCRealm" 
        driverName="com.mysql.jdbc.Driver"
        connectionName="mysqluser"
        connectionPassword="redacted"
        connectionURL="jdbc:mysql://192.168.1.5/testdb?autoReconnectForPools=true&amp;characterEncoding=UTF-8"
        digest="MD5"
        userTable="Users" 
        userNameCol="name" 
        userCredCol="password"
        userRoleTable="Users" 
        roleNameCol="roleName"
/>
Run Code Online (Sandbox Code Playgroud)

配置2 - DataSource领域:

.../webapps/testapp/META-INF/context.xml:

<Realm  className="org.apache.catalina.realm.DataSourceRealm" 
        digest="MD5"
        userTable="Users" 
        userNameCol="name" 
        userCredCol="password"
        userRoleTable="Users" 
        roleNameCol="roleName"
        dataSourceName="jdbc/testDB"
/>
Run Code Online (Sandbox Code Playgroud)

并在.../conf/context.xml:

<Resource 
    name="jdbc/testDB" 
    auth="Container" 
    type="javax.sql.DataSource" 
    removeAbandoned="true" 
    removeAbandonedTimeout="15" 
    maxActive="5" 
    maxIdle="5" 
    maxWait="7000" …
Run Code Online (Sandbox Code Playgroud)

tomcat digest-authentication jdbcrealm

4
推荐指数
1
解决办法
4933
查看次数