jetty

Embedded Jetty WebAppContext FilePermission issue

寵の児 提交于 2019-12-08 04:40:50
问题 I need to limit file permissions for "plug-in" WAR files containing servlets in an embedded Jetty. To test the file permissions, I created a WAR containing this servlet that tries to write to a file outside of the webapps folder: public class Test extends HttpServlet { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { FileWriter outFile = new FileWriter("C:\\temp\\test.txt"); PrintWriter out = new PrintWriter(outFile);

Spring MVC - No mapping found for HTTP request with URI [duplicate]

非 Y 不嫁゛ 提交于 2019-12-08 04:09:28
问题 This question already has answers here : Why does Spring MVC respond with a 404 and report “No mapping found for HTTP request with URI […] in DispatcherServlet”? (7 answers) Closed 2 years ago . I'm aware that there are loads of questions on the topic but none of the solutions i found here worked for me. I'm using Spring with Jetty 6 so i don't have a web.xml file. The mapping for the spring dispatcher servlet is set to "/" in jetty's config dispatcher: <bean class="org.mortbay.jetty.servlet

How would I run an .sh file using NSTask and get its output?

左心房为你撑大大i 提交于 2019-12-08 04:01:25
I need to run an .sh file and get its output. I need to see the setup of the file as well. The .sh file simply runs a java app through terminal. Any ideas? I'm truly stuck on this..... Elijah The server.sh file: echo Starting Jarvis Program D. ALICE_HOME=. SERVLET_LIB=lib/servlet.jar ALICE_LIB=lib/aliceserver.jar JS_LIB=lib/js.jar # Set SQL_LIB to the location of your database driver. SQL_LIB=lib/mysql_comp.jar # These are for Jetty; you will want to change these if you are using a different http server. HTTP_SERVER_LIBS=lib/org.mortbay.jetty.jar PROGRAMD_CLASSPATH=$SERVLET_LIB:$ALICE_LIB:$JS

No hot deployment in Jetty 9.0.6

送分小仙女□ 提交于 2019-12-08 03:51:17
问题 I have set up a Jetty context by a context.xml for using virtual hosts. So my directory structure looks like this: webapps --mycontext.xml --mycontext.war Now when i upload a new war, no hot deployment occurs any more. It only happens when i modify mycontext.xml. That was not the case when i worked without a mycontext.xml. Here is the content of mycontext.xml <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty

How do I create a Jetty Server in Eclipse Juno?

你。 提交于 2019-12-08 03:10:14
问题 This is what I've done so far: From " Install New Software ", I chose the site: "http://eclipse-jetty.sourceforge.net/update/" Installed " Eclipse Jetty Feature ". Restarted Eclipse after the installation. However, Jetty does not show up in the list of servers in the New Server wizard. Any ideas what I'm doing wrong here? I'm a complete newbie to Java. I'm a C# programmer and I'm learning to use Eclipse and such. Sorry if I'm missing something obvious. UPDATE 1 Screenshot of New Server >

Anyone using JRuby-Rack with Rails 3?

三世轮回 提交于 2019-12-08 02:18:34
问题 Is anyone else out there running Rails 3 and JRuby-Rack, or Jetty and Rails 3? Any trick to it? I'm going insane with some debugging, and at this point I just want to know that it's possible. 回答1: These instructions work for me: http://mathias-biilmann.net/2010/2/jruby-and-rails-3-beta-step-by-step 回答2: i am using jetty-rails + rails3 for a couple of projects. jetty-rails need to be fixed , require "activesupport" need to be changed to require "active_support" (for activesupport 3.0.3) and

Xerces JAR on GAE project's classpath leads to “SAXParserFactoryImpl not found”

為{幸葍}努か 提交于 2019-12-08 02:17:10
问题 I'm using the Eclipse plugin for Google App Engine and I'm having a strange issue with a Xerces dependency. On of my classes depends on the Apache Xerces JAR which I have added to the project's classpath. This however, triggers an error when starting the Jetty app server: WARNING: failed com.google.apphosting.utils.jetty.DevAppEngineWebAppContext@6efde050 {/,/Users/lenni/dev/gate/war} javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found

Does it make sense to deploy a WAR with a webapp to Maven central repository?

若如初见. 提交于 2019-12-08 02:15:37
问题 Does it make sense to do that? If yes, where can I find an example of doing that with a simple "Hello World from Web"? Do people run webapps with Jetty when they execute it from Maven? I imagine tomcat is too heavy for that. Any help will be appreciated! Thx! 回答1: I deploy .war files to our internal Archiva Maven repository so that I can pull them down to assembly things like RPMS without having to hand copy files around, same with building assemblies. It also is useful when the .war is

Understanding Jetty's “Closed while Pending/Unready” warning

可紊 提交于 2019-12-07 23:53:09
问题 We have an asynchronous servlet which produces the following warning log from Jetty: java.io.IOException: Closed while Pending/Unready After enabling debug logs I got the following stacktrace: WARN [jetty-25948] (HttpOutput.java:278) - java.io.IOException: Closed while Pending/Unready DEBUG [jetty-25948] (HttpOutput.java:279) - java.io.IOException: Closed while Pending/Unready at org.eclipse.jetty.server.HttpOutput.close(HttpOutput.java:277) ~[jetty-server.jar:9.4.8.v20171121] at org.eclipse

How to configure Jetty to reload a WebAppContext when classes are changed

江枫思渺然 提交于 2019-12-07 21:40:16
问题 I'm developing a web application and I run Jetty as the development and testing environment when I develop under Eclipse. When I make changes to Java classes, Eclipse automatically compiles them to the build directory, but Jetty won't see the changes until I stop and start the server. I know that Jetty supports "hot deployment" using ContextDeployer that will refresh updated application contexts, but it relies on a context file in a context directory being updated - which is not very useful