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 6387599
In Process

The Archive Base Latest Questions

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

I’ve been much time on this issue, I need to have javax.servlet.Servlet(also, javax.persistence) available.

  • 0

I’ve been much time on this issue, I need to have javax.servlet.Servlet(also, javax.persistence) available. I downloaded it and put it in all the places I believe make sense(C:\Program Files\Java\jdk1.6.0_20\lib … C:\Sun\SDK\lib [the Glassfish directory] ). I keep getting errors with this issue. Any clues or tips are appreciated.

Here’s the error I get when I run “ant” :

    [javac]     public void service(HttpServletRequest request, HttpServletRespo
nse response) throws ServletException, IOException;
    [javac]                         ^
    [javac] C:\petstore~svn\trunk\ws\apps\petstore\src\java\com\sun\javaee\bluep
rints\petstore\controller\ControllerAction.java:16: cannot find symbol
    [javac] symbol  : class HttpServletResponse
    [javac] location: interface com.sun.javaee.blueprints.petstore.controller.Co
ntrollerAction
    [javac]     public void service(HttpServletRequest request, HttpServletRespo
nse response) throws ServletException, IOException;
    [javac]                                                     ^
    [javac] C:\petstore~svn\trunk\ws\apps\petstore\src\java\com\sun\javaee\bluep
rints\petstore\controller\ControllerAction.java:16: cannot find symbol
    [javac] symbol  : class ServletException
    [javac] location: interface com.sun.javaee.blueprints.petstore.controller.Co
ntrollerAction
    [javac]     public void service(HttpServletRequest request, HttpServletRespo
nse response) throws ServletException, IOException;
    [javac]
                     ^
    [javac] C:\petstore~svn\trunk\ws\apps\petstore\src\java\com\sun\javaee\bluep
rints\petstore\controller\ControllerServlet.java:16: package javax.servlet does
not exist
    [javac] import javax.servlet.ServletConfig;
    [javac]                     ^
    [javac] 100 errors

BUILD FAILED
C:\petstore~svn\trunk\ws\bp-project\command-line-ant-tasks.xml:80: Compile faile
d; see the compiler error output for details.

Total time: 2 seconds

Here is part of command-line-ant-tasks.xml:

<dirname property="antfile.dir" file="${ant.file}"/>
<path id="classpath">
    <fileset dir="${javaee.home}" includes="lib/javaee.jar, lib/appserv-rt.jar, lib/appserv-ws.jar"/>
    <pathelement location="${build.classes.dir}"/>
    <pathelement path="${javac.classpath}"/>
    <pathelement path="${extra.classpath}"/>
    <path refid="javaee.classpath" />
</path>

<!-- the includeantruntime was added 8/31 -cp="C:\servlet"  -->
<target name="bpp-actual-compilation" if="has-java-sources">
    <echo>Compiling ${module.name}</echo>
    <mkdir dir="${build.classes.dir}"/>
    <javac srcdir="${src.dir}"
        source="${default.javac.source}"
        target="${default.javac.target}"
        excludes="${javac.excludes}"
        debug="${javac.debug}"

        debuglevel="${javac.debuglevel}"
        destdir="${build.classes.dir}"
        includeantruntime="false"
        includes="**">
        <classpath refid="classpath"/>
    </javac>
</target>

And this is what I believe are the relevant parts of build.xml:

<target name="insert-proxy-settings">
    <copy todir="${build.web.dir}/WEB-INF/" file="web/WEB-INF/web.xml"/>
    <concat destfile="${build.dir}/proxy.properties">proxy.host=${proxy.host}
        proxy.port=${proxy.port}
        <filterchain>
            <expandproperties/>
        </filterchain>
    </concat>
    <!-- Replace value of the proxy settings in web.xml for Google maps -->
    <replace file="${build.web.dir}/WEB-INF/web.xml" propertyFile="${build.dir}/proxy.properties">          
        <replacefilter token="@@proxy.host@@" property="proxy.host"/>
        <replacefilter token="@@proxy.port@@" property="proxy.port"/>
    </replace>        
</target>

<target name="unzipIndexes">
    <unzip src="lib/petstoreIndexes.zip" dest="${javaee.domaindir}/lib/petstore" overwrite="true"/>
</target>

<target name="setup" depends="init, create-bp-ui-5-jar">
    <mkdir dir="${javaee.domaindir}/lib/petstore/images"/>
    <ant dir="." antfile="setup/setup.xml" target="setup" inheritAll="false" inheritRefs="false"/>
    <antcall target="unzipIndexes"/>
</target>
  • 1 1 Answer
  • 0 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. Editorial Team
    Editorial Team
    2026-05-25T03:10:19+00:00Added an answer on May 25, 2026 at 3:10 am

    I think this is the relevant part of the xml

    I assume you downloaded a servlet-xx.jar or similar and another for the persistence classes. These should go in the lib directory referenced by your classpath in the ant build script. And they then need to be added to the ant build script line above. i.e. add “lib/servlet-xx.jar, lib/persistence.jar” to the end of that line for the includes=”… value.

    Subsitute the actual names of your downloaded jars for the ones I’ve used above.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
This could be a duplicate question, but I have no idea what search terms
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I don't have much knowledge about the IPv6 protocol, so sorry if the question
I have been unable to fix a problem with Java Unicode and encoding. The
I have thousands of HTML files to process using Groovy/Java and I need to

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.