war

<security-constraint> <url-pattern> and the * character within web.xml

ぐ巨炮叔叔 提交于 2019-12-02 07:12:07
Useing Spring for Security, I can get the program running using the following code. <intercept-url pattern="/web/admin**/**" access="ROLE_ADMIN" requires-channel="https"/> <intercept-url pattern="/web/**/" access="ROLE_USER,ROLE_ADMIN" requires-channel="https"/> I am trying to do this within a web.xml currently. Using JBOSS to deploy a .war file. Below is what I have, The url-pattern is what is causing me the problems in the first security-constraint. The pages are located at, and named /web/adminarchive /web/adminsettings /web/adminstuff etc... The code above within Spring handled it the way

How to add a WAR file into an existent EAR file?

一个人想着一个人 提交于 2019-12-02 05:24:45
Could someone explain to me how to add a WAR file into an EAR? I have one EAR file that already contains one WAR file, i have another WAR file that i would like to add to this EAR so it can contain both WARs and works properly. I don't know how to this but i think is possible to do it manually changing the application.xml file which is included into the EAR. Thanks! Assuming that the EAR file doesn't already contain the WAR file, you can use common zip utilities to add the WAR file within the EAR file. Note that this won't update any of the EAR file descriptors. To update the descriptor, you

JBoss - possible to mount a war on two different context paths?

我与影子孤独终老i 提交于 2019-12-02 03:51:26
问题 In JBoss, is it possible to deploy a web application on two context paths? I'd like same war instance available on / as well as /path , so, requests like '/abc' and '/path/abc' both hit same instance of the web app. I tried : <module> <web> <web-uri>web-app.war</web-uri> <context-root>/</context-root> </web> </module> <module> <web> <web-uri>web-app.war</web-uri> <context-root>/path</context-root> </web> </module> but looks like it gets deployed only on /path. All requests to '/abc' are 404s.

Eclipse 中的Maven Webapp

狂风中的少年 提交于 2019-12-02 00:08:17
记录一个有意思的事情 以前刚开始使用maven的时候, 在涉及到war 的包的时候 就想到如何去运行它 我想这个是很正常的想法 于是乎 就找了 tomcat-plugin / jetty-plugin 这样的东西 然后就一直用这样的方式 可是最近同事和我说eclipse 原生的sever 也可以跑maven war, 我开始想都没想 怎么可能, 能用我还不直接用了 还加个plugin 麻烦死了 何况我Eclipse 常驻, eclipse server 当然更适合我, 我不想去拷贝plugin 配置了 可是去试了一下才知道是可以的 感叹这就是乌龟的本性啊 很简单的步骤 1. 创建Maven 项目 Packaging 选择为 WAR 这样 eclipse 会自动识别项目为 WEB项目 如果没有选择 没有关系 后面有处理方法 2. 进入 server 视图 创建 server 右击 add add remove // 或者 // 双击 进入配置 选择 modules 选项卡 添加 就行 当然如果你的项目没有被识别为WEB 项目的时候 你是无法做第二步操作的 可以有下面操作修改 右击项目 选择 properties 今日选项 project Facets 勾选 Dynamic Web Module OK 这样你就可以进行第二步操作了 ---------------------------

Share Java classes between war files in Tomcat?

[亡魂溺海] 提交于 2019-12-01 20:39:08
I am using Tomcat 7 as a servlet container and I have two war files (two projects in Eclipse). The problem is, that I want to share classes between both deployed war files. But this is not possible with Tomcat / Servlet specifications as far as I know. Both deployed web applications seems to be are isolated from each other. So I read, I am a newbie, from JBoss as an application server in which I can deploy ear files (so I can put multiple war files into it) and then I can share classes between them? So my question: Do you agree with my statement, is it possible to do this with JBoss? And do I

Deploy Spring Boot app to AWS Beanstalk

ぐ巨炮叔叔 提交于 2019-12-01 20:03:25
What would be the best way to deploy Spring Boot project, preferable just jar, to AWS Beanstalk environment. Or should I just convert it to WAR and deploy it that way? Solution: Basically what I did was this: Created new class to tell Spring Boot that my app is a web app and that I need to create all necessary configs: public class MyBootWebApp extends SpringBootServletInitializer { @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application.sources(MyBootApp.class); } } (2) inside .pom file changed packaging to war like this: <packaging

Deploy Spring Boot app to AWS Beanstalk

*爱你&永不变心* 提交于 2019-12-01 19:42:20
问题 What would be the best way to deploy Spring Boot project, preferable just jar, to AWS Beanstalk environment. Or should I just convert it to WAR and deploy it that way? Solution: Basically what I did was this: Created new class to tell Spring Boot that my app is a web app and that I need to create all necessary configs: public class MyBootWebApp extends SpringBootServletInitializer { @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return

Spring boot war file deploy on Tomcat

眉间皱痕 提交于 2019-12-01 19:13:30
I use Spring Boot 1.2.4.RELEASE with gs-rest-service source file. I got: 127.0.0.1 - - [18/Jun/2015:09:59:25 +0300] "GET /gs-rest-service-0.1.0/ HTTP/1.1" 404 1021 There are no other exceptions in Tomcat logs. I have read related questions, but my test doesn't run. Spring Boot War deployed to Tomcat I have read howto-create-a-deployable-war and Packaging executable jar and war files . Maybe I miss something. My source: 1.pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=

Seeing contents of war file without extracting

夙愿已清 提交于 2019-12-01 19:13:02
I created a simple web application and deployed in Tomcat using the admin console of Tomcat. Now, this war files gets stored in tomcat location under webapps directory. Is there a way to see the contents of this war without extracting? I know we can see the contents of war file by extracting using jar -xvf ; however is there any tool/mechanism by which to see the contents of war files without extracting it? Thanks for your time! The t option to the command line jar program will list the contents of a jar (or war) file, e.g.: $ jar tf the-file.war 来源: https://stackoverflow.com/questions

Can I make a WAR depend on a JNDI entry in JBoss 5.1?

蓝咒 提交于 2019-12-01 18:50:30
As part of an upgrade from JBoss 4.0.4 to 5.1, I am trying to get a WAR to deploy after an EAR is successfully deployed. JBoss 5.x does not support PrefixDeploymentSorter like 4.x did, which means that I have to use <depends> in the WAR's jboss-web.xml. It seems I cannot depend on the EAR itself, so I pick the last deployed EJB instead. This EJB provides a JNDI entry that the WAR needs. Here's the EJB as it deploys when the WAR is absent from the deploy directory: 2010-03-25 10:47:30,348 INFO [org.jboss.ejb3.session.SessionSpecContainer] (main) Starting jboss.j2ee:ear=my-ear.ear,jar=mypackage