Assuming your application is not compiling anything and does not use JSP pages, is it fine to run Jetty using just the JRE, or is there some other requirement to run on the JDK?
You can use the JRE, even for JSP compiling, as the JSP support has the Eclipse Compiler for Java (ECJ) built-in.
Related
I deployed the Platform Independent Binary of GeoServer on ubuntu. To launch geoserver, I would just run this script /usr/share/geoserver/bin/startup.sh
So no jetty is actually installed. Geoserver web app can be accessbile via http://localhost:8080/geoserver/web
I wonder how I can configure a second web app which takes this path http://localhost:8080/upload/index.html
Ideally, I would like python and perhaps PHP are supported.
Any tips is appreciated. Thanks.
You can add any other war files to geoserver_dir/webaps/ and Jetty will unpack and run them like any other servlet.
I have no idea how you would add python and PHP to that set up. Maybe you would be better off looking at running tomcat and apache and using the GeoServer war file there.
I can run my Rails 4.2 with Ruby 2.2 application, normaly, all goes fine, rake commands and web server.
But some Textmate bundles that need run
require "#{project}/config/boot"
when executes
require 'bundler/setup'
crash:
.../config/boot.rb:3:in `require': no such file to load -- bundler/setup (LoadError)
An example of these bundles is "Show DB Schema for Current Class”
I use rvm, and is installed successfully and runs normally (I think so)
I have been looking for information about this issue without success...so I begin to think that people don't use these bundles,isn't it?
Is there any way that I can run my war file in jetty-runner using jre's java.exe ? If I run it using jdk's java.exe its working fine. But when I run it off using jre's java.exe Spring and Tiles is not working properly. I'm getting the following Exception.
org.apache.tiles.impl.CannotRenderException: ServletException including path '/W..
Jetty itself can run fine with the jre like that, but if you're using things like jsp's which require a jdk to compile then you would need a jdk or monkey with the classpath and jsp settings to make sure it uses the ejc dependency we distribute with our jsp jars. That all assuming that it is spring/tiles there that are using jsps, if they have some other requirement on the jdk I can't say.
Assuming jsps again, alternately look into precompiling those jsps if you absolutely have to run with the jre. There are a number of approaches for that, we have a maven plugin for it 'org.mortbay.jetty:jetty-jspc-maven-plugin' and I know there are ant tasks for it as well.
cheers
Am using jettyrunner for executing my war files.I am using command java -jar jetty runner ex.war.But am running this jetty server from my java application by executing this commands from java.My problem is at first time its working good,but the second time if i am again executing another war file with the same code its executing the older war.i have found the reason that the older jetty server is keep on running.How could i stop this server from java in order to start the jetty server for another war.
One option should be:
http://wiki.eclipse.org/Jetty/Howto/Secure_Termination
Another would be to use the ShutdownHandler:
http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/tree/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ShutdownHandler.java
Or don't use the jetty-runner directly like that from java code and just write a small embedded usage:
http://wiki.eclipse.org/Jetty/Tutorial/Embedding_Jetty
Turned out, jetty-runner.jar doesn't have a feature to stop existing jetty process ran with stop-port and stop-key.
I found the answer in https://github.com/jetty-project/jetty-documentation/blob/master/src/docbkx/administration/runner/jetty-runner.xml
Then, to stop jetty from a different terminal, you need to
supply the same port and key information. For this you'll either
need a local installation of jetty, the jetty-maven-plugin jetty-ant plugin, or write a custom class
Fortunately, I was implementing gradle build, so jetty-ant satisfied my needs.
I set up a new webapp Maven project and wanted to test it with Jetty's Maven plugin.
So I issued the console command: mvn jetty:run
After defining the pluginGroup in Maven's settings file I ran once again the command.
Unfortunately, it failed because I was using one of the below mentioned versions of the plugin:
maven-jetty-plugin
jetty-maven-plugin
Why are there 2 Maven based plugins for achieving the same thing - running Jetty? Why do they have to bring so much confusion?
Or be so kind as to explain me the differences between them.
With Jetty7 this plugin was renamed to jetty-maven-plugin to better conform to maven2 convention. The Jetty 7 version of the plugin has also undergone substantial changes in configuration. For more information, see the Jetty 7 Maven Plugin feature guide.
See the docs here
The maven-jetty-plugin is for Jetty 6 and jetty-maven-plugin is for Jetty7 and later. The name change was made to "adhere with maven plugin naming conventions" and is part of the big mess created by the move of Jetty to the Eclipse Foundation. Actually, Jetty 7 is considered as a transition version (this must be the politically correct expression for big mess).