war

Logback can't find logback.xml even though it exists (on the classpath)

三世轮回 提交于 2019-12-10 03:36:26
问题 I've an issue with logback. I set it up (using maven) and everything seems fine except that Logback reports it can't find the configuration file (but I'm able to log to the console using the default logger configuration). [#|2013-07-03T07:55:30.843+0200|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=124;_ThreadName=Thread-2;|07:54:39,844 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy] 07:54:39,844

Deploying .ear file to tomcat

怎甘沉沦 提交于 2019-12-10 03:26:54
问题 I have an .ear file which contains multiple war files. I am moving the app to tomcat. Once I have packaged all of the individual war files contained in the .ear for tomcat compatability how will the war files be deployed ? Do I just need to deploy all of the individual war files to tomcat and it should "just work" or is it not as simple as this ? To be more specific what is the tomcat equivalent "glue" that websphere provides to package all the wars in one ear? 回答1: Tomcat doesn't support the

Tomcat 7 - Retrieve the version of a webapp (versioned WAR)

旧巷老猫 提交于 2019-12-09 13:35:15
问题 I've been unable to find any easy way of figuring out the version string for a WAR file deployed with Tomcat 7 versioned naming (ie app##version.war). You can read about it here and what it enables here. It'd be nice if there was a somewhat more supported approach other than the usual swiss army knife of reflection powered ribcage cracking: final ServletContextEvent event ... final ServletContext applicationContextFacade = event.getServletContext(); final Field applicationContextField =

Beginner servlet question: accessing files in a .war, which path? [duplicate]

早过忘川 提交于 2019-12-09 07:39:26
This question already has answers here : Recommended way to save uploaded files in a servlet application (2 answers) Closed 3 years ago . When a third-party library I'm using tries to access a file, I'm getting "Error opening ... file ... (No such file or directory)" even though I KNOW the file is in the WAR. I've tried both packaged (.war) and "exploded" (directory) deployment, and the file is definitely there. I've tried setting full permissions on it too. It's on Unix (Ubuntu). File is war/dict/index.sense and the error is "dict/index.sense (No such file or directory)". It works fine on my

How can I deploy a WAR in an embedded Jetty 8?

半城伤御伤魂 提交于 2019-12-09 05:40:51
问题 With the following code, how can I deploy a WAR application located on the classpath ? private Server s; @BeforeClass public static void setUp() throws Exception { // Start http server Random r = new Random(); int port = 1024 + r.nextInt(8976); s = new Server(new InetSocketAddress("127.0.0.1", port)); // Add my WAR for deployment here ... s.start(); } Jetty 8.0.1 JDK 6 回答1: Something like WebAppContext webapp = new WebAppContext(); webapp.setContextPath("/"); webapp.setWar(warURL); server

How to exclude Jars from being added in the WAR file

拥有回忆 提交于 2019-12-08 19:17:39
问题 In the my application I have set some jars as project dependency. This jars are added as User Library. As I am running the application in JBoss AS7 and I am using the JSF implementation which is provided by the JBoss server, I have copied those JSF jars from the module and create a new User Library namely JBoss JSF. This library has been used to create JSF 2 Dynamic Web Project in Eclipse. Now when I am exporting it as a WAR file, those jsf jars are automatically being copied and added in

Embedding jetty server into android applications

╄→гoц情女王★ 提交于 2019-12-08 13:20:43
问题 So far i am trying making sample android applications to embedded android jetty web server enables to run samples hello-3.1.war from Google code. While i run hello-3.1 in eclipse then null pointer exception has been occur. HTTP ERROR 500 Problem accessing /hello-3.1/sayit. Reason: INTERNAL_SERVER_ERROR Caused by: java.lang.NullPointerException at org.mortbay.ijetty.hello.HelloWorld.init(HelloWorld.java:29) at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440) at org

Extract/See content of a specific file inside a .war file

ぐ巨炮叔叔 提交于 2019-12-08 11:54:16
问题 I am trying to view the content of a file ( in linux )that is inside a .war file without having to extract the war file. For example inside the war file i am trying to see the content of a file called aa.txt and which is under /path/here/ inside the war file. 回答1: jar has x option for that: $ jar -help 2>&1 | grep extract -x extract named (or all) files from archive Let's try it: $ jar tvf target/my.war | grep test-data 1811 Tue Jun 21 19:34:50 CEST 2016 WEB-INF/classes/test/spring/test-data

mvn package command doesn't run successfully after mvn clean command if done from command prompt

爱⌒轻易说出口 提交于 2019-12-08 11:19:03
问题 Hi I get a weird error when I run mvn package command from the command line after executing mvn clean command. The error is a compilation failure error. This is a trace: annotations are not supported in -source 1.3 06.04.2011 17.06.59 (use -source 5 or higher to enable annotations) 06.04.2011 17.06.59 @Override at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:715) 06.04.2011 17.06.59 at org.apache.maven.lifecycle.DefaultLifecycleExecutor

What's the preferred way to load web application specific configuration and settings in java

萝らか妹 提交于 2019-12-08 10:42:17
问题 I was wondering what is the usual way for you to load application settings in web applications. I'm just looking around because I had only needed this once and we required user to specify environment variable with path set to the configuration file which we loaded in the spring context. My point is not the loading (whether xml or properties) but the location and locating of the file, what do you think is the preferred way. Regards, Marek 回答1: Placing properties file in User's home directory