Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6817085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:00:21+00:00 2026-05-26T21:00:21+00:00

The problem: I have a web application which is served by Jetty webserver v

  • 0

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 JDK(has javac) installed everything works fine. I want to port this to a system which has JRE(does not have javac). When I run the Jetty I get an error.

The solution:
Pre-compile the JSP into Servlet. Generate application war file which includes this servlet. Let jetty execute the Servlet in place of compiling and executing JSP at runtime.

I tried to pre-compile JSP using JSPC ant target. But it is generating an empty .java file. My target code is as follows.

<jspc srcdir="${web.dir}"
          destdir="${build.classes.dir}"
          package="x.y.z"
          verbose="9"
          classpathref="project.class.path">
      <include name="**/index.jsp"/>
    </jspc>

Kindly suggest me a proper approach. If my approach is correct, kindly point out the mistake that I am making in configuring the ant task.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T21:00:21+00:00Added an answer on May 26, 2026 at 9:00 pm

    Don’t use the ant supplied jspc task. It is deprecated, flaky, and only worked with Tomcat 4 installed (certain versions).

    Instead, install Tomcat (whichever version best supports the same JSP/Servlet specs as your deployed Jetty) and call the Jasper compiler via the Tomcat provided Ant task. An example for Tomcat 5 is available here.

    Note that once the JSP pages are compiled to Servlets, the Servlets are compiled to classes, etc. You don’t need any of this “build environment” in your Jetty deployment environment.

    Also note that the commentary near the end of the ant supplied jspc task. I don’t know if it is still relevant, but it is interesting.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem with a little .Net web application which uses the Amazon
I have a problem, which is not easily described. I'm writing a web application
I have the following problem. I have a Seam web application which features e-mail
I have a web application written using CherryPy, which is run locally on 127.0.0.1:4321
I recently encountered an odd problem with RSACryptoServiceProvider.VerifyHash . I have a web application
I am using a javax.servlet.http.HttpServletRequest to implement a web application. I have no problem
I have an 'access denied' problem on an ASP.NET web application, where the user
I'm using Rational Application Developer to create some web services. The problem I have
I have a web application, which was designed and always worked under root context
I have a small C# ASP.NET web application which generates several PNG image files

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.