jetty

Sending an environment variable to jetty using jettyRun in Gradle

天涯浪子 提交于 2019-12-10 15:06:10
问题 How might I make an environment variable available to jetty using the gradle plugin? Some of the code it runs in a servlet requires a particular environment variable to be set, but I can't figure out a good way to send it to the jetty process like you can for a JavaExec task (via the environment method). Also acceptable would be a property. For example, if I were to run some java, I'd include a -Dproperty.name=blah to send it the property.name property. We can do it for Test and JavaExec

Can't access hadoop web ui for job tracker [closed]

有些话、适合烂在心里 提交于 2019-12-10 14:56:56
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 7 years ago . I'm trying to set up hadoop and nutch to run on EC2. To get started, I have followed the excellent NutchHadoopTutorial. Most everything works as it

Mapping WebSocketEndpoints in a web.xml file

怎甘沉沦 提交于 2019-12-10 14:38:58
问题 I am trying to develop a Java EE 7 web application that uses a websocket endpoint and deploy it on a Jetty server. The application has the following structure: Game/ src/ main/ java/ game/ WebSocketEndpoint.java webapp/ index.html scripts/ variousjavascriptstuff.js WEB-INF/ beans.xml web.xml In the beans.xml file: <beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org

Secure GWT application with https

荒凉一梦 提交于 2019-12-10 14:35:46
问题 I am developing a GWT web application, now I want to secure the whole web application via HTTPS. Aanybody has an idea? I am using Jetty web server. Thanks in advance! 回答1: You don't need to do anything specific to GWT for enabling Https. Just enable the ssl as usual, and access your GWT host page using an https url. 回答2: You could use a reverse-proxy like nginx. This example of nginx configuration would do this : server { listen 443; server_name my.https.srv; ssl on; ssl_certificate /etc

welcome-file in web.xml with spring not working?

早过忘川 提交于 2019-12-10 14:21:38
问题 I have setup my spring-mvc servlet to match * .page requests. I have setup the welcome-file-list in web.xml to be index.page This works when I go to the root of my webserver: http://me.com does get redirected to http://me.com/index.page correctly. However, it doesn't redirect when I use subdirectoris: http://me.com/dashboard does not get redirected to http://me.com/dashboard/index.page Is there any way to get this mapping working? My web.xml file (extract): <welcome-file-list> <welcome-file

CDI injection is not working in Servlets

為{幸葍}努か 提交于 2019-12-10 12:56:03
问题 I really need your help. I'm working on this problem for weeks or months now. I apologize for the long post, but I want to explain the problem and my settings as precisely as possible. My JAVA EE 6 web application mainly contains 3 Servlets: a javax.faces.webapp.FacesServlet , a StreamingServlet extending javax.servlet.http.HttpServlet and a ClientServlet extending org.eclipse.jetty.websocket.WebSocketServlet . I want to use CDI with these Servlets but it only works for the FacesServlet, to

how to set connection/request timeout for jetty server?

若如初见. 提交于 2019-12-10 12:49:21
问题 I'm running an embedded jetty server (jetty 6.1.24) inside my application like this: Handler handler=new AbstractHandler() { @Override public void handle(String target, HttpServletRequest request, HttpServletResponse response, int dispatch) throws IOException, ServletException { //this can take a long time doSomething(); } }; Server server = new Server(8080); Connector connector = new org.mortbay.jetty.nio.SelectChannelConnector(); server.addConnector(connector); server.setHandler(handler);

Is there an example for utilization of WebSockets in JBoss AS7?

三世轮回 提交于 2019-12-10 12:35:15
问题 Is there somewhere an example that utilizes this websocket implementation for JBoss Application Server > 7.1.2 https://github.com/mikebrock/jboss-websockets I can't get it to work with the brief description thats there. I've already setup the WebSocketServlet and bound it to an address and then when I'm trying to connect to the Servlet from the Browser (newest stable Chrome) over ws:// it fails (405 access not allowed) and over wss:// nothing happens , it stays in the connecting state and

Jetty Redirect Based on Locale

纵饮孤独 提交于 2019-12-10 12:16:54
问题 I want to -based on the locale of the requesting client- redirect a URL, server side in Jetty. i.e. client makes a request for host:port/help/index.html ('help' being a webapp war) server side I read the clients locale, e.g. ' GB ' and redirect to a seperate webapp, e.g. *host:port/help_GB/index.html* I thought this would be as simple as the server side code that runs my Jetty server:- String i18nID = Locale.getDefault().getCountry(); RewriteHandler rewrite = new RewriteHandler(); rewrite

Jetty 7 - Disable directory list at root folder /

折月煮酒 提交于 2019-12-10 12:04:43
问题 I have a lot of production servers running RMI application in each one, and more 4 Java webapps, eg: Server A: RMI app by JNLP file; webapp_1 (connected by RMI with local RMI app); webapp_2 (connected by RMI with local RMI app); webapp_3 (connected by RMI with local RMI app); webapp_4 (connected by RMI with local RMI app); Server B: ...the same..OK All users access this servers directly on 8080 port (direct to Jetty) in a default context, eg 'main-area', where it can access by some html links