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
  • 4 Views
  • 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

Related Questions

i have a input tag which is non editable, but some times i need
I have a working web application which already has a login and registration system.
Have just started using Google Chrome , and noticed in parts of our site,
Have just started using Visual Studio Professional's built-in unit testing features, which as I
Have a n-tire web application and search often times out after 30 secs. How
I have an application which uses JSPs and Servlets and deployed on IBM-WASCE 2.1.
So all of the pages on my web application have URIs of the form
I want port some my Python scripts into web apps so that others can
I have a login.jsp page which contains a login form. Once logged in the
AFAIK, usual ASP.NET web site/web application switched on into DEBUG mode when web/app-config setting

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.