jetty

Jetty returning 403 Forbidden

牧云@^-^@ 提交于 2019-12-23 14:02:16
问题 Hi I am porting my web app from tomcat to Jetty. I am using the Jetty runner to launch it. I am using the following command to launch Jetty: java -jar jetty-runner.jar --port --path url-path path-to-war However when I try to browse to the from the browser I get the following error: HTTP ERROR 403 Problem accessing . Reason: Forbidden In the logs i see the following Warning: WARN:oejs.SecurityHandler:No authenticator for: {RoleInfo,C[*, all_auth_users]} I am trying to use Jetty out of the box

Jetty returning 403 Forbidden

∥☆過路亽.° 提交于 2019-12-23 14:02:07
问题 Hi I am porting my web app from tomcat to Jetty. I am using the Jetty runner to launch it. I am using the following command to launch Jetty: java -jar jetty-runner.jar --port --path url-path path-to-war However when I try to browse to the from the browser I get the following error: HTTP ERROR 403 Problem accessing . Reason: Forbidden In the logs i see the following Warning: WARN:oejs.SecurityHandler:No authenticator for: {RoleInfo,C[*, all_auth_users]} I am trying to use Jetty out of the box

Jetty returning 403 Forbidden

早过忘川 提交于 2019-12-23 14:01:53
问题 Hi I am porting my web app from tomcat to Jetty. I am using the Jetty runner to launch it. I am using the following command to launch Jetty: java -jar jetty-runner.jar --port --path url-path path-to-war However when I try to browse to the from the browser I get the following error: HTTP ERROR 403 Problem accessing . Reason: Forbidden In the logs i see the following Warning: WARN:oejs.SecurityHandler:No authenticator for: {RoleInfo,C[*, all_auth_users]} I am trying to use Jetty out of the box

Different servlet-api versions collision

与世无争的帅哥 提交于 2019-12-23 13:16:06
问题 I'm developing RestEasy web services using Maven and Jetty as the server. One of the services should use Filter that extends javax.servlet.http.HttpServletResponseWrapper. The problem is in method setCharacterEncoding of the interface javax.servlet.ServletResponse which comes from servlet-api 2.3. I'm getting the following exception java.lang.NoSuchMethodError: com.webapp.rest.jsonp.HttpServletResponseContentWrapper.setCharacterEncoding(Ljava/lang/String;)V I've speficied servlet-api 2.4

Different servlet-api versions collision

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-23 13:15:12
问题 I'm developing RestEasy web services using Maven and Jetty as the server. One of the services should use Filter that extends javax.servlet.http.HttpServletResponseWrapper. The problem is in method setCharacterEncoding of the interface javax.servlet.ServletResponse which comes from servlet-api 2.3. I'm getting the following exception java.lang.NoSuchMethodError: com.webapp.rest.jsonp.HttpServletResponseContentWrapper.setCharacterEncoding(Ljava/lang/String;)V I've speficied servlet-api 2.4

Default page for root path

北城以北 提交于 2019-12-23 12:29:12
问题 I have the following site structure: mysite.com /app1/ /app2/ Right now with my configuration it seems when I navigate to mysite.com, it shows a list of the apps on the server. How can I get it to show app1/index.html when i navigate mysite.com? 回答1: Ok... not sure why it took me this long to find the answer but... according to some page online which I now forget... Rename app1 folder to 'root'. The default handler defined in your jettyweb config xml will then map this app to / You can also

Serving static content with Jetty/Jersey/Guice

亡梦爱人 提交于 2019-12-23 12:06:43
问题 Similar to another question (cf. Filtering static content Jersey) I want to serve static content from Jetty. There are several similar questions scattered all around the vast Internet, but most of them do not involve Guice, and those that do are completely out of date. I have an existing service that uses Jersey (1.12) and Guice (3) with the following web.xml : <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema

Jetty + Jersey + Jackson, different behavior in Eclipse (Success) vs command line (Error Unsupported Media Type)!

为君一笑 提交于 2019-12-23 09:53:08
问题 I'm getting crazy trying to run Jetty Jersey and Jackson outside Eclipse. I have a main class: public class Main { public static void main(String[] args) throws Exception { ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS); context.addServlet(org.glassfish.jersey.servlet.ServletContainer.class, "/*").setInitParameter( "jersey.config.server.provider.classnames", CanaryEndpoint.class.getCanonicalName()); Server jettyServer = new org.eclipse.jetty.server

Jetty Maxidletime

孤街浪徒 提交于 2019-12-23 09:48:09
问题 When does maxidletime in jetty get triggered? 回答1: The maxIdleTime setting is passed to the operating system's Socket handler and becomes the timeout value for that socket. If the other end of the connection keeps the connection alive, the connection will never be closed by the OS. Jetty's Thread will wait for as long as the OS deems the connection to be still 'alive'. 回答2: The maxIdle time was originally passed to the socket sotimeout. However, now that jetty is asynchronous, it is not

Jetty Servlet does not run — getting directory listing instead

别说谁变了你拦得住时间么 提交于 2019-12-23 09:44:34
问题 I'm trying to get a servlet built and running in Netbeans to run on a jetty server. Deploying locally always works, however deploying on Jetty results in a directory listing rather than the servlet actually running. The problem seems to be with the context configuration, but I have no idea what I'm doing wrong. Here is the XML for web.xml in the war file: <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001