Liferay: Customise the web.xml HeaderFilter added during portlet deployment

I need to customise the deployment of my liferay portlet such that the GWT nocache.js files don't get a 'Expires' HTTP header set. My war file looks like this: view.jsp com.foobar.MyEntryPoint/com.foobar.MyEntryPoint.nocache.js com.foobar.MyEntryPoint/12312312313213123123123.cache.html WEB-INF/web.xml WEB-INF/portlet.xml WEB-INF/liferay-portlet.xml ... etc my web.xml is pretty muc

Liferay:定制portlet部署期间添加的web.xml HeaderFilter

我需要定制我的liferay portlet的部署,以便GWT nocache.js文件不会收到'Expires'HTTP标头集。 我的战争文件如下所示: view.jsp com.foobar.MyEntryPoint/com.foobar.MyEntryPoint.nocache.js com.foobar.MyEntryPoint/12312312313213123123123.cache.html WEB-INF/web.xml WEB-INF/portlet.xml WEB-INF/liferay-portlet.xml ... etc 我的web.xml非常空(只有displayName) 在部署过程中,我重写了我的liferay,

Elastic Search performing slowly

I am currently using Elastic Search version 2.4.4. I am using a single node cluster where around 10 million data is stored. Each document consists of around 12 fields (some analyzed, some not-analyzed). Average document size is 1.5 kb. We are using Multi-Search that consists of 6 search queries using Java API. I have noted two different timings of Elastic Search: 1) The 'took' tim

弹性搜索执行缓慢

我目前使用Elastic Search版本2.4.4。 我正在使用一个存储大约1000万个数据的单节点群集。 每份文件由大约12个字段组成(一些分析,一些未分析)。 平均文档大小为1.5 kb。 我们正在使用包含6个使用Java API的搜索查询的多搜索。 我注意到了两种不同的弹性搜索时间:1)“花费”时间(以毫秒为单位)(每个搜索查询约为50ms)2)一个多重搜索请求花费的总时间大约为'1500ms'(I这次在Java API中计算) 与单个搜

Sample Identity Provider SAML 2.0

I have developed my sample Service Provider which works perfectly with http://www.ssocircle.com/en/ . Is there any other online Identity Provider available for testing my Service Provider or any link to get sample code for Service Provider to understand SAML 2.0 . You can use https://www.testshib.org/ both for a test Identity Provider. Also, take a look at opensaml library for code and exampl

样本身份提供商SAML 2.0

我开发了我的示例服务提供程序,它可与http://www.ssocircle.com/en/完美协作 。 是否有任何其他在线身份提供商可用于测试我的服务提供商或任何链接以获取服务提供商了解SAML 2.0的示例代码。 您可以使用https://www.testshib.org/作为测试身份提供者。 另外,请查看opensaml库以获取代码和示例。

Knapsack with an amount limitation

I'm trying to solve a problem thats some what similar to the knapsack problem but with a twist. At least thats what I have come to think it is anyway. In the knapsack problem we have the weight capacity of the knapsack, the weight and value of the items. My twist to this one is to add a certain amount of slots available to be filled with items. Like this: We have a knapsack with the maxim

背负数量限制

我试图解决一些与背​​包问题类似的问题,但有一个转折点。 至少这就是我所认为的无论如何。 在背包问题中,我们有背包的重量能力,物品的重量和价值。 我对此的一个补充是添加一定数量的可用于填充项目的插槽。 像这样:我们有一个最大重量为30的背包,不管重量如何,它只能容纳6件物品。 允许重复。 我设法做了一个递归函数,它需要一个包含相同数量列表的可用插槽的列表 List<List<Item>> workingList // E

Adding jacoco integration tests coverage for Sonar

Background: I have 2 separate java projects, call them A and B. Project A is the actual product (war application), with unit-tests. Gradle builds the project and then runs sonar analysis, and I can see the unit-tests coverage in Sonar. Project B is an integration test for the first project. It is run by Jenkins in a pipeline after building project A and deploying it on an integration-environme

为Sonar添加jacoco集成测试覆盖率

背景:我有2个独立的Java项目,称它们为A和B.项目A是实际产品(战争应用程序),带有单元测试。 Gradle构建项目,然后运行声纳分析,我可以看到Sonar中的单元测试覆盖率。 项目B是第一个项目的集成测试。 它由Jenkins在构建项目A并将其部署到集成环境后进行管道运行。 部署还涉及对代码进行测试,以便jacoco-it报告将与项目A的类相关联。 我的问题:如何将项目A的声纳页添加到目前仅有单元测试覆盖率,集成测试覆盖率的第

ListBox

I got a doubt regarding pre-selecting( setSelectedIndex(index) ) an item in a ListBox, Im using Spring + GWT. I got a dialog that contains a panel, this panel has a FlexPanel, in which I've put a couple ListBox, this are filled up with data from my database. But this Panel is for updates of an entity in my database, thus I wanted it to pre-select the current properties for this items, all

列表框

我对使用Spring + GWT预先选择( setSelectedIndex(index) )列表框中的项目,Im有疑问。 我有一个包含面板的对话框,这个面板有一个FlexPanel,我在其中放置了一对ListBox,这里面充满了我数据库中的数据。 但是这个面板是为了更新我的数据库中的一个实体,因此我希望它能够预先选择这个项目的当前属性,允许用户随意更改。 我在填写小部件的更新方法。 我尝试在更新方法中设置selectedItem,但它给了我一个空错误。

android project has red x but no errors in code

I am trying to run android project. The project has a red x on the project folder but none of the sub folder has that red x. No code is highlighted that shows an error. Unfortunately none of my projects are executing. When I run as project it says this error. It does not show any errors in problems tab either. How can I fix this problem? My java build path Edit Here is my code publ

android项目有红色的x,但代码没有错误

我正在尝试运行android项目。 该项目在项目文件夹上有一个红色的x,但没有一个子文件夹具有该红色的x。 没有代码突出显示错误。 不幸的是我的项目都没有执行。 当我作为项目运行它说这个错误。 它不会在问题标签中显示任何错误。 我该如何解决这个问题? 我的java构建路径 编辑 这是我的代码 public class AndroidLoginActivity extends Activity implements OnClickListener { EditText username, password; Butt

How to "snmpwalk" a tomcat with activated JMX to monitor it

I have an application that runs within a tomcat (a handful of java servlets) on linux. Now I am tasked to monitor the ressources (such as CPU, memory usage, etc.) within this tomcat (not the single servlets). I am not a programmer (so I cannot change code) and I am not allowed to change anything within the code. I am also not very familiar with Java (so my apologies if I throw a few things to

如何通过激活的JMX“snmpwalk”一个tomcat来监视它

我有一个应用程序在linux上运行在一个tomcat(少量的java servlets)中。 现在我负责监视这个tomcat(不是单个servlet)中的资源(如CPU,内存使用情况等)。 我不是程序员(所以我不能更改代码),我不允许在代码中更改任何内容。 我对Java也不是很熟悉(所以如果我把几件事情放在一起,我很抱歉)。 我能做的唯一事情就是启动带有激活jmx的java参数的tomcat。 所以我可以远程检查tomcat和使用JMX从远程运行的应用程序/

java.lang.SecurityException when JMX monitor Tomcat from JConsole

The scenario is simple. I'm trying to monitor from my local workstation (Mac OS 10.9) a remote server (Ubuntu 12.04) that's running Tomcat 7.0.54 where my Spring Java app is deployed. JVM hotspot 64bit "1.7.0_51" is used in both server and workstation. THE STEPS Configure Tomcat's JmxRemoteLifecycleListener to fix ports (server.xml) <Listener className="org.apache

JMX从JConsole监视Tomcat时发生java.lang.SecurityException

该场景很简单。 我试图从我的本地工作站(Mac OS 10.9)监控运行Tomcat 7.0.54的远程服务器(Ubuntu 12.04),其中部署了Spring Java应用程序。 服务器和工作站都使用JVM热点64位“1.7.0_51”。 步骤 配置Tomcat的JmxRemoteLifecycleListener以修复端口(server.xml) <Listener className="org.apache.catalina.mbeans.JmxRemoteLifecycleListener" rmiRegistryPortPlatform="9940" rmiServerPortPlatform="9941" /&g

Shutdown tomcat using web application deployed in it

I've some doubt about tomcat operation which come across my webapp development: Is there any way to shutdown tomcat itself from the webapp deployed in it? Is tomcat is running all of its webapps/war inside one JVM or individual JVM or its configurable in some configuration file? Is it possible to increase the java heap size for particular webapp deployed inside tomcat? Thanks a lot.

使用部署在其中的Web应用程序关闭tomcat

我对我的webapp开发中遇到的tomcat操作有些怀疑: 有没有办法从部署在其中的webapp关闭tomcat本身? tomcat是在一个JVM或单个JVM内运行其所有的webapps / war还是可以在某个配置文件中配置它? 是否有可能增加tomcat中部署的特定webapp的java堆大小? 非常感谢。 从某个servlet打开TCP连接并将“SHUTDOWN”发送到Tomcat的关闭端口(默认值:8005)。 一个Tomcat为所有应用程序使用一个JVM。 不,只对整个JVM。 这