小编mrs*_*dge的帖子

HTTP Tunnel Servlet (Java)

I am trying to write an HTTP tunnel as we want to be able to connect to a remote machine through our web application. While I am aware of the security risks involved, it's something we would like to do. It's not hosted on the internet, but on private networks, so the risk is considered low.

The basic requirement is to allow the Java Debugging tool to connect through a servlet to a machine. We have some clients that insist …

java sockets servlets tunnel http-tunneling

6
推荐指数
1
解决办法
5760
查看次数

maven-ear-plugin不包括jar.xml中的jarModule

我一直在关注maven-ear-plugin网站上的示例,该网站展示了如何将第三方库添加到生成的application.xml中.但是,它似乎没有像我预期的那样工作.类似地,Web模块contextRoot被忽略.

根据文档,我想要做的应该是完全可能的.

可以使用contextRoot参数自定义Web模块的上下文根.

请注意,生成的application.xml中不包含第三方库(即JarModule)(只有ejb-client应包含在java条目中).但是,通过指定includeInApplicationXml标志,可以在生成的application.xml中包含jar依赖项.

在我的application.xml中执行构建时,我有以下输出.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC
    "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
    "http://java.sun.com/dtd/application_1_3.dtd">
<application>
  <display-name>MyApp.EAR</display-name>
  <module>
    <ejb>MyApp.jar</ejb>
  </module>
  <module>
    <web>
      <web-uri>MyApp.war</web-uri>
      <context-root>/MyApp.Web</context-root>
    </web>
  </module>
</application>
Run Code Online (Sandbox Code Playgroud)

从以下maven configuraton(pom.xml).

...
<modelVersion>4.0.0</modelVersion>
<groupId>com.blah</groupId>
<artifactId>MyApp.EAR</artifactId>
<version>1.0</version>
<packaging>ear</packaging>

<build>
    <plugins>
        <plugin>
            <groupId>maven-ear-plugin</groupId>
            <artifactId>maven-ear-plugin</artifactId>
            <version>2.7</version>
            <configuration>
                <applicationName>MyApp</applicationName>
                <modules>
                    <ejbModule>
                        <groupId>com.blah</groupId>
                        <artifactId>MyApp.EJB</artifactId>
                    </ejbModule>
                    <webModule>
                        <groupId>com.blah</groupId>
                        <artifactId>MyApp.Web</artifactId>
                        <contextRoot>MyApp</contextRoot>
                    </webModule>
                    <jarModule>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-simple</artifactId>
                        <includeLibInApplicationXml>true</includeLibInApplicationXml>
                    </jarModule>
                </modules>
                <archive>
                    <manifestEntries>
                        <WebLogic-Application-Version>${weblogic.version}</WebLogic-Application-Version>
                    </manifestEntries>
                </archive>
            </configuration>
        </plugin>
    </plugins>
</build>

<dependencies> …
Run Code Online (Sandbox Code Playgroud)

ear java-ee maven application.xml maven-ear-plugin

6
推荐指数
1
解决办法
2万
查看次数

z-index和float:右边不能很好地一起玩

我有一些问题,一个是z-index,另一个是浮点数:右; .

我希望有一个图标来显示用户可以点击以消除通知的十字,这显示在页面底部显示的通知的右上角.

我注意到的是z-index对样式类的div没有任何影响dismiss,无论我改变要使用的各种div.鼠标光标在悬停时不会更改,单击图标时不会调用单击侦听器.

第二个问题是float: right;样式类notifyRight出现在错误位置的div .它打算出现在同一行notifyLeft,notifyCenter归类申报单,但它出现在下面的横线.

我正在尝试以另一种方式做得更好,因为我无法弄清楚如何解决这两个问题.

代码输出示例.

下面的源代码或者你可以http://jsfiddle.net/3cGRN/.

HTML:

<div style="height: 100%; width: 100%;">
    <div style="position: absolute; bottom: 0px; width: 100%;">
        <div id="notificationContainer" class="anchor-for-absolute-positioning">
            <div id="dismiss" class="dismiss">
                <img src="http://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/16/Actions-application-exit-icon.png" title="Dismiss notification message." />
            </div>
            <div id="first" class="use-anchor">
                <div class="notifyLeft">
                    <img src="http://icons.iconarchive.com/icons/deleket/soft-scraps/48/Button-Info-icon.png" style=" display: block;">
                </div>
                <div class="notifyCenter">
                    <img src="http://icons.iconarchive.com/icons/fasticon/cat/128/Cat-Black-White-icon.png" />
                </div>
                <div class="notifyRight">
                    <img src="http://icons.iconarchive.com/icons/deleket/soft-scraps/48/Button-Info-icon.png" style=" display: block;">
                </div>
            </div>
        </div>
    </div> …
Run Code Online (Sandbox Code Playgroud)

html css jquery

3
推荐指数
1
解决办法
3197
查看次数