jetty

JSTL not parsed in a JSP page running on an embedded Jetty instance

亡梦爱人 提交于 2020-01-05 19:18:38
问题 I have a web application which works fine if i just deploy it on to the deploy folder of either Tomcat or Jboss. What i am trying to do now is to embed this application on to a Jetty container. I cant seem to get it to work as it is spitting out errors related to the JSTL tag library. Here is the error that is shown: Problem accessing /Web/app/localTimestamp. Reason: /WEB-INF/views/localTimestamp.jsp(1,62) PWC6188: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in

Java Servlet parse request body multithread

倖福魔咒の 提交于 2020-01-05 13:01:10
问题 I've implemented a asynchronous Servlet, which needs to parse the body of request and store the parsed result in cache. Should I implement the parseBody() function in Servlet or implement a new class, which will do the parsing? What is the best practice? Here is my current code snippet: public class DocFeedServlet extends FeedServlet { private static final Logger LOGGER = LoggerFactory.getLogger(DocFeedServlet.class); private static final ObjectMapper OBJECTMAPPER = new ObjectMapper(); public

Can't get jetty to read jetty-env.xml

不打扰是莪最后的温柔 提交于 2020-01-05 08:13:17
问题 I have the following: Startup code: Server server = new Server(8080); WebAppContext context = new WebAppContext(); context.setDescriptor("/WEB-INF/web.xml"); context.setResourceBase("/home/webapp); context.setContextPath("/"); context.setParentLoaderPriority(true); server.setHandler(context); server.start(); jetty-env.xml in /home/webapp/WEB-INF: <?xml version="1.0"?> <Configure class="org.mortbay.jetty.webapp.WebAppContext"> <New id="properties" class="org.mortbay.jetty.plus.naming.EnvEntry"

Deploying Jetty server via .jar. Why can't I access the index?

冷暖自知 提交于 2020-01-05 07:07:36
问题 I'm trying to deploy a Jetty server from a jar file. When jar is being run on the server, it reaches the Jetty 404 page at least, but is unable to reach index.html . My main class to launch the server looks like this, and works fine locally when run through the IDE on localhost: public static void main(String[] args) { Server server = new Server(8080); ServletContextHandler servletContextHandler = new ServletContextHandler(NO_SESSIONS); servletContextHandler.setContextPath("/");

“There's nothing here yet” after deploying Java Web App on Azure

半城伤御伤魂 提交于 2020-01-05 04:17:24
问题 I have a web app I want to deploy on Azure. I followed the recommended instructions and deployed my app, and according to the Azure portal, everything is working just fine. However, when I visit the base URL my app should reside in, I see a page that says the following: This Java based web application has been successfully created There's nothing here yet, but Microsoft Azure makes it simple to publish content with GIT and FTP Also when I visit any one of the endpoints (in this case, the

How to configure jetty as css/js file server with expires header?

↘锁芯ラ 提交于 2020-01-05 03:18:07
问题 <Configure class="org.eclipse.jetty.server.handler.ContextHandler"> <Set name="contextPath">/</Set> <Set name="resourceBase"><SystemProperty name="jetty.home" default="."/>/webapps/foo</Set> <Set name="handler"> <New class="org.eclipse.jetty.server.handler.ResourceHandler"> <Set name="cacheControl">max-age=3600,public</Set> </New> </Set> <Set name="virtualHosts"> <Array type="java.lang.String"> <Item>foo.bar</Item> </Array> </Set> </Configure> This is my configuration, but no expires header

How to configure jetty as css/js file server with expires header?

纵然是瞬间 提交于 2020-01-05 03:17:03
问题 <Configure class="org.eclipse.jetty.server.handler.ContextHandler"> <Set name="contextPath">/</Set> <Set name="resourceBase"><SystemProperty name="jetty.home" default="."/>/webapps/foo</Set> <Set name="handler"> <New class="org.eclipse.jetty.server.handler.ResourceHandler"> <Set name="cacheControl">max-age=3600,public</Set> </New> </Set> <Set name="virtualHosts"> <Array type="java.lang.String"> <Item>foo.bar</Item> </Array> </Set> </Configure> This is my configuration, but no expires header

jetty transparent proxy always returns 403 forbidden

守給你的承諾、 提交于 2020-01-04 11:02:12
问题 I am trying to use the transparent proxy provided by jetty. This is my web.xml <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="WebApp_9" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <display-name>Archetype Created Web Application</display-name> <servlet> <servlet-name>googleProxy</servlet-name> <servlet-class>org.eclipse.jetty.servlets.ProxyServlet$Transparent<

EL in a JSP stopped evaluating

一笑奈何 提交于 2020-01-04 06:32:09
问题 In a JSP page(index.jsp): ${requestContext.requestURL} is the URL just shows the expression itself. It used to be evaluated to something like "http://.../somerset/" I created the Maven project with maven-archetype-webapp archetype in Eclipse. The Jetty version is jetty-6.1.14. My web.xml is simple: <web-app> <display-name>Archetype Created Web Application</display-name> <servlet> <servlet-name>SomersetServlet</servlet-name> <display-name>SomersetServlet</display-name> <description><

Serving static html files using DefaultServlet on embedded Jetty

安稳与你 提交于 2020-01-04 04:13:54
问题 I'm working on a project that needs to be self contained so I've decided to embed Jetty in my app. I'm gonna be serving static HTML pages, a few JSP pages, and also will be using some custom servlets. I've found a perfect example of how to setup the embedded Jetty to accomplish all of this (http://thinking.awirtz.com/2011/11/03/embedded-jetty-servlets-and-jsp/), however, since this is the first time I'll be using Jetty and working with JSP pages or servlets, I've got a few basic questions.