jetty « Development « JSP-Servlet Q&A





1. How do you get an embedded Jetty webserver to dump its interim Java code for JSPs    stackoverflow.com

I keep running into this problem when debugging JSP pages in OpenNMS. The Jetty wiki talks about keepGenerated (http://docs.codehaus.org/display/JETTY/KeepGenerated) in webdefault.xml but it seems unclear how this works in ...

2. jetty diplays the code of jsp files    stackoverflow.com

I am trying to deploy my web application with jetty, but jetty diplays the code of jsp files at the adress: http://localhost:8080/index.jsp has this a relation to my browser?or is ...

3. Which is better JETTY COMET implementation or Resin COMET implementation    stackoverflow.com

We've been using JETTY's suspended servlet implementation to roll our own COMET web applications using JSON messages and XStream. Does anyone have experience with Resin's implementation of COMET and how they ...

4. How can I create a servlet with jruby (running with jetty)?    stackoverflow.com

I am pretty new to jruby and java and want to create a servlet in jruby while using jetty as web server. I am not sure if I am on the ...

5. Strangeness with Jetty serving images    stackoverflow.com

I'm completely stumped. I'll give the background for the sake of completeness but I'm not sure if it will help or not. I'm running a Lift project on a standard Jetty set-up ...

6. Embedded Jetty looking for files inside its Jar file    stackoverflow.com

Hey people, it's my first question here. I successfully embedded Jetty on a test application. It can serve files without issues. Now I want to know if it's possible for Jetty to serve ...

7. comet callback-polling and jetty-cometd implementation    stackoverflow.com

I am using the cometd implementation that comes with the jetty server. I'd like to use the callback-polling transport, but when I try to connect to the comet server from javascript ...

8. Some servlet/jetty questions    stackoverflow.com

Having the ServletAPI plus the configurations you can make to jetty or any other web container

  1. Do we have a way to limit the request sizes ? (ie to close the connection ...

9. Servlet web.xml authentication for welcome page    stackoverflow.com

I have a web.xml which looks like:

<web-app>

<welcome-file-list>
   <welcome-file>index.jsp</welcome-file>
</welcome-file-list>

<security-constraint>
  <web-resource-collection>
    <web-resource-name>Default</web-resource-name>
    <url-pattern>/</url-pattern>
  </web-resource-collection>
  <auth-constraint/>
</security-constraint>

<security-constraint>
  <web-resource-collection>
    <web-resource-name>Index page</web-resource-name>
 ...





10. Programmatically registering a servlet in Jetty 7    stackoverflow.com

I'm trying to register a Servlet in Jetty 7.0 programmatically. All the examples I find are for Jetty 6, and Jetty 7 is quite different. Here is my server ...

11. Java Servlet Container on a small VPS    stackoverflow.com

A while back I was using Virtual Private Server (VPS) that had very limited RAM. I used it to host Jetty. It was so slow that it became completely ...

12. How do I hide stack traces in the browser (using Jetty)?    stackoverflow.com

I'm using Jetty as my servlet container. If an exception is thrown in one of my servlets the browser will display an HTTP ERROR 500 with the exception message and a ...

13. jetty: dynamically changing idle time    stackoverflow.com

I have a jetty server which is configured to expire requests after 30 seconds, this is the configuration line in the xml config file:

<Set name="maxIdleTime">30000</Set>
There are two kinds of requests that ...

14. JSP page is not getting reflected in Jetty    stackoverflow.com

I am using Jetty web server, and while loading JSP page, its getting loaded from cache and not from the server. my updated jsp page is not getting reflected. I was ...

15. Get MAC address from Jetty HTTPServletRequest    stackoverflow.com

Does anybody know if there is a way to get the sender's MAC address from an HTTPServletRequest in Jetty? (Note: by sender, I mean immediate sender aka the last ...

16. Jetty servlet respons to Ajax always empty    stackoverflow.com

Hi I try to run a java server on Jetty which should respond to an ajax call. Unfortunately the response seems to be empty when I call it with ajax. When ...





17. custom taglibs cause "PWC6033: Unable to compile class for JSP"    stackoverflow.com

When I try to use custom taglibs in my webapp it doesn't work on OS X (or Windows), using Eclipse, and Run Jetty Run. When I WAR up the files and ...

18. How to configure Jetty programmatically to execute JSP pages?    stackoverflow.com

I found some hints on Stackoverflow how to enable JSP support in Jetty by editing web.xml. But can this be done programmatically, without any web.xml?
(Preferable without writing an own servlet for that) Even ...

19. HttpServletRequest: How to determine Content-Type of requested asset    stackoverflow.com

I am writing a quick-and-dirty static file server using Jetty. I need to set the Content-Type for each response:

HttpServletResponse.setContentType("content/type");
For a given file request, how do I reliably determine what content type ...

20. how to specify the contextPath    stackoverflow.com

Hi I am using jetty servlets. I have the following structure. war/web-inf/web.xml war/classes/servlet.class (servlet I want to call) war/*.html Problem:

ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);

    context.setContextPath("/");
    context.addServlet(new ServletHolder(new GreetingServiceImpl()), "/*");
  ...

21. Servlet 3.0 support in embedded Jetty 8.0    stackoverflow.com

For my unit-tests I use a simple test-server based on Jetty:

package eu.kostia.textanalysis.webservices.jetty;

import java.awt.Desktop;
import java.net.URI;

import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.webapp.WebAppContext;

public class TestServer {
 static private final String CONTEXT_PATH = "/webservice";
 static private final String PROJECT_HOME ...

22. Why is Jetty looking for a JSP instead of a GSP?    stackoverflow.com

I'm testing out my Grails app in Jetty (v.7.0.2). I've created the WAR (grails prod war), and added it to the webapps directory for Jetty. I've removed the "root" ...

23. 401 Unauthorized    stackoverflow.com

When I try to access a webapp remotely I get 401 errors, and a websocket connection I have does not work probably as a result of that. Using localhost works perfectly ...

24. Jetty: servlets vs handlers    stackoverflow.com

I am trying to understand Jetty; Tell me please: 1) When is it better to use Servlets and when Handlers? 2) Can i use Connectors with Servlets for "thread-per-request model"? Thank you!!!

25. Jetty embedded: JSP and Servlets together?    stackoverflow.com

I have an application with embedded Jetty 6.1.26. Servlet 2.5. Below is my server configuration. The problem is, that when I try to have JSPs and Servlets together, it does not work. I ...

26. https servlet with Jetty    stackoverflow.com

I wrote a simple https servlet with Jetty according to the documentation which for some reason does not work. No error messages, nothing... the browser connects to the servlet, but that's ...

27. ServletContextListener.contextInitialized doesnt get called when context is initialised    stackoverflow.com

I am creating a war file (progressReporter.war) and i am deploying it on Jetty7.2.2.v20101205. I have a sysout on contextInitialized method which i should see when jetty starts up. I am ...

28. Location of Jetty temporary JSP sources    stackoverflow.com

I am trying to find where Jetty puts its generated Java source for JSPs. According to webdefault.xml, "keepgenerated" is true, but I have no idea where the files are stored; I can ...

29. How to embed jetty to a dynamic web project using jsp in an eclipse IDE    stackoverflow.com

I am using an embedded jetty for my Wicket projects with no problem since wicket does not use JSP. Until I run across a task to create a basic Dynamic ...

30. Cleanest Jetty Configuration for Development?    stackoverflow.com

EDIT: I think I should clarify my intent... I'm trying to simplify the development iteration cycle of write-code >> build WAR >> deploy >> refresh >> repeat. I'd like to be relatively ...

31. Jetty : Dynamically removing the registered servlet    stackoverflow.com

I created and started jetty server with WebAppContext. I can also add servlet to the WebAppContext with addServlet method. But I want to dynamically remove this servlet. How can I do ...

32. JSP Error Page produces a JSP error    stackoverflow.com

My spring-mvc web application has an error page with a collapsible stack trace element in it (obviously a development/debug option). This used to work just fine, and displayed the proper ...

33. Jetty servlet does not detect that client has disconnected    stackoverflow.com

This is the code of the servlet that I deployed to Jetty:

public class StreamServlet extends HttpServlet
{
  public void doGet( HttpServletRequest request, 
    HttpServletResponse response ) throws ServletException, ...

34. Custom error pages not working in Jetty    stackoverflow.com

I notice that, on Jetty (Servlet container), by default, if there is an error, the entire Stack backtrace is sent to the browser, which isn't so good for the live environment. So ...

35. Servlet - save file to disk, but not sure what path to use?    stackoverflow.com

I have a servlet which accepts a file upload, I'd like to store the file in a specific directory on disk. I'm using jetty. The file system looks like this:

/jetty
  ...

36. How to use Guice Servlet with Wicket    stackoverflow.com

After setting up my Wicket project with Guice Servlet, I get a java.lang.IllegalStateException: filter path was not configured. The filter path is configured, though. Am I missing something? web.xml

<?xml version="1.0" encoding="utf-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" ...

37. Jetty error - file org/mortbay/jetty/servlet/WebApplicationContext.class not found    stackoverflow.com

In one of our project we already using 5.1.10 version of Jetty. We recently upgraded to 6.1.22 version of Jetty by adding following entry in the root pom.xml file of that ...

38. What is an alternative to Jetty? I'm looking for a simple javax.servlet container    stackoverflow.com

What is an alternative to Jetty? I'm looking for a simple javax.servlet container. Jetty is too complex for the task I'm working with. And its documentation is very poor. ...

39. open jsp on jetty server    stackoverflow.com

hi i'm trying to build a website with jetty server. i want to open jsp page as the start page but i cant make it work from there.i tried this example . ...

40. How to track statistics for a particular servlet in Jetty (probably using StatisticsHandler)    stackoverflow.com

There is a particular servlet whose performance I'm interested in and that Servlet is registered via something like the following:

public static void register(Context context, Servlet servlet) {
    ServletHolder ...

41. doPost not getting called by embedded Jetty, when using Context collection    stackoverflow.com

I am using Jetty 6 in embedded mode. I have a number of servlets in a ContextHandlerCollection. Beyond this problem, the servlets work fine on their different URLs.

ContextHandlerCollection contexts = new ...

42. How to set JSP response locale in Jetty 7/8?    stackoverflow.com

If I set the HTTP response locale programmatically in a servlet as follows:

@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException
{
    response.setLocale(SOME_LOCALE);
    ...

43. Grails 1.4 Jetty-7.4 webredirect looking for JSP    stackoverflow.com

I have been searching all over the internet, and found some issues about the older version of Grails, but I'm still getting it in 1.4M01 and latest jetty-7.4 as well. After ...

44. Serving files from war file    stackoverflow.com

I am using a java servlet container, which serves files from the webapp directory. Say for instance I have Foo.html. host:80/Foo.html will serve this file. How do I serve the Foo.html ...

45. Invoking a servlet while another servlet initializes in Jetty    stackoverflow.com

I have a web.xml with two servlets and the tag is used to control the ordering of the servlet initialization. The first servlet starts up fine. The second servlet attempts to make ...

46. How can i increase file upload size of Jetty Servlet container?    stackoverflow.com

It seems that running Archiva using Jetty is limiting me to of file upload. How do i increase file upload size of Jetty 6 Servlet container?

the request was rejected because ...

47. How to serve JSP files using Jetty?    stackoverflow.com

I'm embedding jetty, serving a single servlet and some static content. I've downloaded jetty from http://download.eclipse.org/jetty/7.4.5.v20110725/dist/, and added all jars from JETTY_HOME/lib/* and JETTY_HOME/lib/jsp/* to user librarys in ...

48. JSP compilation issue with embedded jetty if using tagdir attribute    stackoverflow.com

I'm trying to test JSP tags that are defined as .tag files in my application's WebContent directory. The webproject layout is as follows:

  • Project
  • WebContent
    • WEB-INF
      • tags
        • tag1.tag
      • views
        • tagTest.jsp
Using standalone jetty, I'm trying to load test jsp. ...

49. Persistent push with comet long-polling on Jetty?    stackoverflow.com

I am trying to create a Jetty servlet that allows clients (web browsers, Java clients, ...) to get broadcast notifications from the web server. The notifications should be sent in a JSON ...

50. How to grab uncaught exceptions in a Java servlet web application    stackoverflow.com

Is there a standard way to catch uncaught exceptions that happen inside of a java servlet container like tomcat or Jetty? We run a lot of servlets that come from ...

51. How do I bind a servlet to everything except /?    stackoverflow.com

I have a server which I need to bind two servlets to. The first is the "home" servlet, which I want to reside at /. This will display what is essentially ...

52. RESTEasy UnavailableException HttpServletDispatcher    stackoverflow.com

I searched and tried for hours to solve this problem, unfortunately without success. I am using Java 1.6, RESTEasy 2.2.1.GA and a Jetty Embedded Server to setup a webservice. Originally I copied an ...

53. CXF: Providing decoupled endpoint via existing Servlet transport    stackoverflow.com

I have an application which provides services using CXF's Servlet transport and Jetty 6.1. This application also needs to consume external services. All services support WS-Addressing specification (and WS-RM on top). ...

54. Execute JSP with Jetty 7.3 without javac    stackoverflow.com

The problem: I have a web application which is served by Jetty webserver v 7.3. I have a JSP page in the application. When I run the Jetty on system which has ...

55. Jetty can't seem to find an inner class    coderanch.com

Hi All! Thanks in advance for looking at this. If this is not the appropriate forum category, feel free to move it. Basically what I'm doing is creating a .war file from a couple of classes - one of which is a servlet to post to a workflow in our application. Builds ok. Deploys ok. But when I try to browse ...

56. Jetty embeded servlet not working    forums.oracle.com