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

  • Home
  • SEARCH
  • 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 48599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T16:18:19+00:00 2026-05-10T16:18:19+00:00

We have the usual web.xml for our web application which includes some jsp and

  • 0

We have the usual web.xml for our web application which includes some jsp and jsp tag files. I want to switch to using pre-compiled jsp’s. I have the pre-compilation happening in the build ok, and it generates the web.xml fragment and now I want to merge the fragment into the main web.xml.

Is there an include type directive for web.xml that will let me include the fragment.

Ideally I will leave things as is for DEV- as its useful to change jsp’s on the fly and see the changes immediately but then for UAT/PROD, the jsp’s will be pre-compiled and thus work faster.

  • 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. 2026-05-10T16:18:19+00:00Added an answer on May 10, 2026 at 4:18 pm

    I use the Tomcat jasper ANT tasks in my project, which precompile the JSPs into servlets and add the new servlet mappings to the original web.xml. In the DEV builds, just skip this step and deploy the JSPs without pre-compile and modification of the web.xml.

        <?xml version='1.0'?> <project name='jspc' basedir='.' default='all'>  <import file='${build.appserver.home}/bin/catalina-tasks.xml'/>   <target name='all' depends='jspc,compile'></target>   <target name='jspc'>   <jasper    validateXml='false'    uriroot='${build.war.dir}'    webXmlFragment='${build.war.dir}/WEB-INF/generated_web.xml'    addWebXmlMappings='true'    outputDir='${build.src.dir}' />  </target>   <target name='compile'>   <javac destdir='${build.dir}/classes'    srcdir='${build.src.dir}'    optimize='on'    debug='off'    failonerror='true'    source='1.5'    target='1.5'    excludes='**/*.smap'>    <classpath>     <fileset dir='${build.war.dir}/WEB-INF/classes'>      <include name='*.class' />     </fileset>     <fileset dir='${build.war.lib.dir}'>      <include name='*.jar' />     </fileset>     <fileset dir='${build.appserver.home}/lib'>      <include name='*.jar' />     </fileset>         <fileset dir='${build.appserver.home}/bin'>      <include name='*.jar'/>     </fileset>    </classpath>     <include name='**' />     <exclude name='tags/**'/>   </javac>  </target>   <target name='clean'>   <delete>    <fileset dir='${build.src.dir}'/>    <fileset dir='${build.dir}/classes/org/apache/jsp'/>   </delete>  </target> </project> 

    If you already have the JSP compilation working and just want to merge the web.xml files, a simple XSLT could be written to add selected elements(such as the servlet mappings) from the newly generated web,xml into your original.

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

Sidebar

Ask A Question

Stats

  • Questions 122k
  • Answers 122k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The 2 machines might have different warning levels or error… May 12, 2026 at 12:36 am
  • Editorial Team
    Editorial Team added an answer Store the users IP in a database every time the… May 12, 2026 at 12:36 am
  • Editorial Team
    Editorial Team added an answer Take a look at Python Eggs: http://peak.telecommunity.com/DevCenter/PythonEggs Or, you can… May 12, 2026 at 12:36 am

Related Questions

I've been looking into OSGi recently and think it looks like a really good
Are there benefits of writing a web service interface whose methods all take and
We want to create a widget platform for a particular website. I couldn't find
We are a small team of 4 developers working on a web application. We

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.