小编Var*_*run的帖子

Model,javabean和POJO之间的区别

我开始用spring学习MVC.我听过很多时间Bean,包含了setter和getter.Model基本上是什么数据流动,Pojo哪些是相同的Bean.但是我在这个术语中真的很困惑,所有这些对我来说都是一样的,请你们解释一下这些术语的确切区别.

JAVABEAN

POJO

模型

java model pojo javabeans

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

如何从jQuery DataTable中的所有页面中选择所有复选框

我有HTML页面,它有多个复选框,可以单独检查.我有" 全选 " 按钮,当我点击此按钮时,所有复选框都应该被选中,当我再次点击同一个按钮时,所有复选框都应从所有页面中取消选中.

在我原来的程序中有成千上万的记录,但是一次有10条记录显示,但是当用户点击选择时它应该选择所有的千条记录.

我正在使用jQuery Datatables插件来显示数据.它提供分页,搜索,排序等,所以我一直只在当前页面上显示10条记录.如果我点击下一个或Bootstrap Datatable提供的页码,将显示另外10条记录.正如在问题中提到的,我想从所有页面中选择所有复选框.

$(document).ready(function () {
   $('body').on('click', '#selectAll', function () {
      if ($(this).hasClass('allChecked')) {
         $('input[type="checkbox"]', '#example').prop('checked', false);
      } else {
       $('input[type="checkbox"]', '#example').prop('checked', true);
       }
       $(this).toggleClass('allChecked');
     })
});
Run Code Online (Sandbox Code Playgroud)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<html>
        <head>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
        <title>monitoring</title>
        <script src="jquery.js"></script>
         </head>
        <body>
        <table id="example" class="myclass">
        <thead>
        <tr>
         <th>
          <button type="button" id="selectAll" class="main">
          <span class="sub"></span> Select </button></th>
        	<th>Name</th>
        	<th>Company</th>
        	<th>Employee Type</th>
        	<th>Address</th>
        	<th>Country</th>
        </tr>
        </thead>
        <tbody>
        										  
        <tr>
        <td><input type="checkbox"/>
        </td>
        <td>varun</td>
        <td>TCS</td>
        <td>IT</td>
        <td>San …
Run Code Online (Sandbox Code Playgroud)

html javascript jquery jquery-datatables

14
推荐指数
2
解决办法
5万
查看次数

如何从redhat完全删除Openjdk

我正在使用Redhat 6,我正在使用,java 1.6因为我有一个要求合作java 1.6.我使用redhat更新 yum uppdateopenjdk 1.8自动安装.我试图删除openjdk使用

yum remove java*
Run Code Online (Sandbox Code Playgroud)

java 1.6 得到删除但不是openjdk.

然后我尝试了yum remove openjdk*这个dint工作.我试图从UI中删除但是从那里我能够列出openjdk 1.8但没有获得删除它的选项.
我该如何完全删除openjdk.

openjdk

14
推荐指数
2
解决办法
4万
查看次数

javax.security.auth.login.LoginException:无法找到LoginModule类:org.jboss.security.ClientLoginModule

已经超过3天无法弄清楚我的詹金斯出了什么问题.

我有Jenkins的工作,从中获取源代码Bitbucket并构建和部署Jboss 5.1.

但在部署时我得到了波纹管异常尝试了多个解决方案,但我得到了同样恼人的错误.

堆栈跟踪

[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.534 s
[INFO] Finished at: 2015-07-08T03:19:04+05:30
[INFO] Final Memory: 13M/176M
[INFO] ------------------------------------------------------------------------
[JENKINS] Archiving /var/lib/jenkins/jobs/SpringHelloWorld/workspace/pom.xml to com.programcreek/HelloWorld/0.0.1-SNAPSHOT/HelloWorld-0.0.1-SNAPSHOT.pom
[JENKINS] Archiving /var/lib/jenkins/jobs/SpringHelloWorld/workspace/target/HelloWorld.war to com.programcreek/HelloWorld/0.0.1-SNAPSHOT/HelloWorld-0.0.1-SNAPSHOT.war
channel stopped
Deploying /var/lib/jenkins/jobs/SpringHelloWorld/workspace/target/HelloWorld.war to container JBoss 5.x Remote
  The undeployment phase of the redeploy action has failed: org.codehaus.cargo.util.CargoException: Cannot undeploy deployable org.codehaus.cargo.container.deployable.WAR[HelloWorld.war]
ERROR: Build step failed with exception
org.codehaus.cargo.util.CargoException: Cannot deploy deployable org.codehaus.cargo.container.deployable.WAR[HelloWorld.war]
	at org.codehaus.cargo.container.jboss.JBoss5xRemoteDeployer.deploy(JBoss5xRemoteDeployer.java:216)
	at org.codehaus.cargo.container.spi.deployer.AbstractDeployer.redeploy(AbstractDeployer.java:212)
	at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:73)
	at …
Run Code Online (Sandbox Code Playgroud)

deployment build jboss5.x jenkins

8
推荐指数
1
解决办法
2918
查看次数

为什么我们使用servletconfig接口和servletcontext接口

大家好我是servlet和jsp的新手我不清楚servletconfig接口和servletcontext接口我再次启动jsp我遇到了一个术语PageContext.所以任何机构都用一个很好的例子来解释这些术语.

servletconfig接口和servletcontext接口以及jsp中的PageContext

java jsp servlets

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

如何使用Jenkins克隆Bitbucket存储库

我正在使用RedHat linux

  1. 我在Bitbucket中创建了一个存储库,说Demo,我有一些HTML代码.
  2. 我在我的系统中安装了Jenkins.

我想要做的是用Jenkins克隆Bitbucket存储库,以便我可以构建项目.

我所遵循的步骤是

  1. 在詹金斯创建一个新工作.
  2. 给出关于项目的描述
  3. 源代码管理选项卡中选择git和Jenkins请求存储库URL,我将提供此URL. 在此输入图像描述

但詹金斯抛出一个错误说

无法连接到存储库:执行命令时出错:git ls-remote -h git clone https://UserName@bitbucket.org/UserName/java-script.git HEAD

花了大约3天而无法配置,而是学到了很多关于詹金斯的知识.我也试过Jenkins的Bitbucket插件也没用.

git bitbucket jenkins

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

为什么我的git没有从1.7.1更新到1.9.4

我在REDHAT 6.我想更新我的git,我尝试了多种方法.

第一种方法

$ yum update git.我得到:没有标记为更新的包.

第二种方法

$ wget http://git-core.googlecode.com/files/git-1.8.3.4.tar.gz
$ wget -O git-manpages-1.8.3.4.tar.gz http://code.google.com/p/git-core/downloads/detail?name=git-manpages-1.8.3.4.tar.gz&can=2&q=

Next, install all required libraries before building GIT:

$ sudo yum install zlib-devel perl-CPAN gettext

Now let’s untar and build and install GIT in the /usr directory:

$ tar xvfz git-1.8.3.4.tar.gz
$ cd git-1.8.3.4
$ ./configure
$ make
$ sudo make prefix=/usr install
$ git --version
git version 1.8.3.4
Run Code Online (Sandbox Code Playgroud)

得到了这个错误.

[qaserver@qaserver3 ~]$ cd git-1.8.3.4
[qaserver@qaserver3 git-1.8.3.4]$ ./configure
configure: Setting lib to 'lib' (the default) …
Run Code Online (Sandbox Code Playgroud)

git

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

Bootstrap.js,Bootstrap.min.js,Bootstrap-table.js之间的区别是什么?

很抱歉提出这样一个愚蠢的问题,但我真的不清楚这些.

Bootstrap是非常棒的库,可以节省开发人员的大量工作.因为它提供了很多功能

  1. 节省大量时间.
  2. 响应功能.
  3. 一致的设计.
  4. 使用方便.
  5. 兼容不同的浏览器.

我最近开始使用bootstrap.关于一些事情,我真的很困惑.

当我们下载Bootstrap时,我们得到了类似的文件结构.

bootstrap/
|—— css/
|   |—— bootstrap.css
|   |—— bootstrap.min.css
|   |—— bootstrap-theme.css
|   |—— bootstrap-theme.min.css
|—— js/
|   |—— bootstrap.js
|   |—— bootstrap.min.js
|—— fonts/
|   |—— glyphicons-halflings-regular.eot
|   |—— glyphicons-halflings-regular.svg
|   |—— glyphicons-halflings-regular.ttf
|   |—— glyphicons-halflings-regular.woff
Run Code Online (Sandbox Code Playgroud)

所以首先我要知道的是

  1. bootstrap.js和 之间有什么区别 bootstrap.min.js.当使用bootstrap.jsbootstrap.min.js
  2. bootstrap.css和 之间有什么区别 bootstrap.min.css.当使用bootstrap.cssbootstrap.min.css

随着上面的库Bootstrap提供了更多的库 Bootstrap DatatableBootstrap Table

Bootstrap Datatable Bootstrap数据表

Bootstrap表 引导表

  1. Bootstrap Datatable和之间有什么区别Bootstrap …

twitter-bootstrap

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

如何使用jenkins在单个存储库中构建两个不同的项目

我处于这种情况,已经超过两周,但我无法解决问题.很抱歉这个问题有很长的描述.我想要做的是:

我有两个不同的项目,说AB我有使用詹金斯构建它们.虽然他们是独立的但他们一起工作.所以我创建了不同的存储库并调用它们Repo-A,Repo-B并且我能够构建它们.

这是一个真正的问题:现在我想从单个存储库一起构建它们.所以,我创建了一个名为库Demo的到位桶,现在我有两个项目A,并BDemo资源库中.

现在我pom.xmlDemo存储库中创建了一个文件,以便我可以将它用作父POM和每个项目AB拥有自己的文件pom.xml.

项目演示 pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.demo.parent</groupId>
  <artifactId>Parent</artifactId>
  <packaging>pom</packaging>
  <version>0.0.1-SNAPSHOT</version>
  <name>Maven Webapp</name>
  <url>http://localhost:8081/nexus/content/repositories/releases</url>

  <!--<url>http://maven.apache.org</url> -->

  <modules>
    <module>A</module>
    <module>B</module>
  </modules>

 <distributionManagement>
    <snapshotRepository>
        <id>my-snapshots</id>
        <name>Internal Repository</name>
        <url>http://localhost:8081/nexus/content/repositories/snapshots</url>
    </snapshotRepository>

    <repository>
        <id>my-releases</id>
        <name>Internal Repository</name>
        <url>http://localhost:8081/nexus/content/repositories/releases</url>
    </repository>
</distributionManagement>

</project>
Run Code Online (Sandbox Code Playgroud)

项目A的 pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.a.batch</groupId>

    <parent>
        <groupId>com.demo.parent</groupId>
        <artifactId>Parent</artifactId>
        <version>0.01-SNAPSHOT</version>
    </parent> …
Run Code Online (Sandbox Code Playgroud)

pom.xml maven jenkins parent-pom

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

如何防止我的网络应用程序在java中遭受CSRF(跨站请求伪造)

我试图阻止我的 Web 应用程序遭受 CSRF(跨站点请求伪造)我点击了此链接Link for CSRF

这是我尝试过的。为了在 Java 中实现这一机制,我选择使用两个过滤器,一个为每个请求创建盐,另一个用于验证它。由于用户请求和后续应验证的 POST 或 GET 不一定按顺序执行,因此我决定使用基于时间的缓存来存储有效盐字符串的列表。

第一个过滤器用于为请求生成新的盐并将其存储在缓存中,代码如下:

public class LoadSalt implements Filter{


    public void doFilter(ServletRequest request, ServletResponse response,
            FilterChain chain) throws IOException, ServletException {

        // Assume its HTTP  
        HttpServletRequest httpReq = (HttpServletRequest)request;
        // Check the user session for the salt cache, if none is present we create one
        @SuppressWarnings("unchecked")
        Cache<String, Boolean> csrfPreventionSaltCache = (Cache<String, Boolean>)
                httpReq.getSession().getAttribute("csrfPreventionSaltCache");

        System.out.println("Checking cahce befor creating it from Request :csrfPreventionSaltCache: "+csrfPreventionSaltCache);

        if(csrfPreventionSaltCache == null)
        {
            System.out.println("csrfPreventionSaltCache is null …
Run Code Online (Sandbox Code Playgroud)

java csrf-protection

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