Uploaded image for project: 'ZZZ-WSO2 Carbon'
  1. ZZZ-WSO2 Carbon
  2. CARBON-12570

[AS] - Compilation errors from 'VirtualDirectoryListing' sample

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Highest
    • Resolution: Fixed
    • Affects Version/s: 3.2.3
    • Fix Version/s: 4.0.0
    • Labels:
      None
    • Environment:

      jdk16, ubuntu10

    • Severity:
      Major
    • Estimated Complexity:
      Moderate
    • Test cases added:
      Yes

      Description

      Am getting compilation errors from 'VirtualDirectoryListing' sample when its build according to the instructions given in the README.

      ...........................................................................................

      Buildfile: build.xml

      clean:

      init:
      [mkdir] Created dir: /home/yumani/Documents/projects/as/wso2as-4.5.0-SNAPSHOT/samples/VirtualDirectoryListing/build/classes

      compile:
      [javac] Compiling 1 source file to /home/yumani/Documents/projects/as/wso2as-4.5.0-SNAPSHOT/samples/VirtualDirectoryListing/build/classes
      [javac] /home/yumani/Documents/projects/as/wso2as-4.5.0-SNAPSHOT/samples/VirtualDirectoryListing/src/main/java/java/org/appserver/samples/VirtualDirectoryListing/DirectoryListServlet.java:18: package javax.servlet does not exist
      [javac] import javax.servlet.ServletException;
      [javac] ^
      [javac] /home/yumani/Documents/projects/as/wso2as-4.5.0-SNAPSHOT/samples/VirtualDirectoryListing/src/main/java/java/org/appserver/samples/VirtualDirectoryListing/DirectoryListServlet.java:19: package javax.servlet.http does not exist
      [javac] import javax.servlet.http.HttpServlet;
      [javac] ^
      [javac] /home/yumani/Documents/projects/as/wso2as-4.5.0-SNAPSHOT/samples/VirtualDirectoryListing/src/main/java/java/org/appserver/samples/VirtualDirectoryListing/DirectoryListServlet.java:20: package javax.servlet.http does not exist
      [javac] import javax.servlet.http.HttpServletRequest;
      [javac] ^
      [javac] /home/yumani/Documents/projects/as/wso2as-4.5.0-SNAPSHOT/samples/VirtualDirectoryListing/src/main/java/java/org/appserver/samples/VirtualDirectoryListing/DirectoryListServlet.java:21: package javax.servlet.http does not exist
      [javac] import javax.servlet.http.HttpServletResponse;
      [javac] ^
      [javac] /home/yumani/Documents/projects/as/wso2as-4.5.0-SNAPSHOT/samples/VirtualDirectoryListing/src/main/java/java/org/appserver/samples/VirtualDirectoryListing/DirectoryListServlet.java:25: cannot find symbol
      [javac] symbol: class HttpServlet
      [javac] public class DirectoryListServlet extends HttpServlet {
      [javac] ^
      [javac] /home/yumani/Documents/projects/as/wso2as-4.5.0-SNAPSHOT/samples/VirtualDirectoryListing/src/main/java/java/org/appserver/samples/VirtualDirectoryListing/DirectoryListServlet.java:31: cannot find symbol
      [javac] symbol : class ServletException
      [javac] location: class org.appserver.samples.VirtualDirectoryListing.DirectoryListServlet
      [javac] public void init() throws ServletException {
      [javac] ^
      [javac] /home/yumani/Documents/projects/as/wso2as-4.5.0-SNAPSHOT/samples/VirtualDirectoryListing/src/main/java/java/org/appserver/samples/VirtualDirectoryListing/DirectoryListServlet.java:38: cannot find symbol
      [javac] symbol : class HttpServletRequest
      [javac] location: class org.appserver.samples.VirtualDirectoryListing.DirectoryListServlet
      [javac] protected void doGet(HttpServletRequest request,
      [javac] ^
      [javac] /home/yumani/Documents/projects/as/wso2as-4.5.0-SNAPSHOT/samples/VirtualDirectoryListing/src/main/java/java/org/appserver/samples/VirtualDirectoryListing/DirectoryListServlet.java:39: cannot find symbol
      [javac] symbol : class HttpServletResponse
      [javac] location: class org.appserver.samples.VirtualDirectoryListing.DirectoryListServlet
      [javac] HttpServletResponse response)
      [javac] ^
      [javac] /home/yumani/Documents/projects/as/wso2as-4.5.0-SNAPSHOT/samples/VirtualDirectoryListing/src/main/java/java/org/appserver/samples/VirtualDirectoryListing/DirectoryListServlet.java:40: cannot find symbol
      [javac] symbol : class ServletException
      [javac] location: class org.appserver.samples.VirtualDirectoryListing.DirectoryListServlet
      [javac] throws IOException, ServletException {
      [javac] ^
      [javac] /home/yumani/Documents/projects/as/wso2as-4.5.0-SNAPSHOT/samples/VirtualDirectoryListing/src/main/java/java/org/appserver/samples/VirtualDirectoryListing/DirectoryListServlet.java:32: cannot find symbol
      [javac] symbol : method getServletConfig()
      [javac] location: class org.appserver.samples.VirtualDirectoryListing.DirectoryListServlet
      [javac] if (getServletConfig().getInitParameter("virtualDirectoryPath") != null) {
      [javac] ^
      [javac] /home/yumani/Documents/projects/as/wso2as-4.5.0-SNAPSHOT/samples/VirtualDirectoryListing/src/main/java/java/org/appserver/samples/VirtualDirectoryListing/DirectoryListServlet.java:33: cannot find symbol
      [javac] symbol : method getServletConfig()
      [javac] location: class org.appserver.samples.VirtualDirectoryListing.DirectoryListServlet
      [javac] virtualDirectoryPath = getServletConfig().getInitParameter("virtualDirectoryPath");
      [javac] ^
      [javac] /home/yumani/Documents/projects/as/wso2as-4.5.0-SNAPSHOT/samples/VirtualDirectoryListing/src/main/java/java/org/appserver/samples/VirtualDirectoryListing/DirectoryListServlet.java:30: method does not override or implement a method from a supertype
      [javac] @Override
      [javac] ^
      [javac] /home/yumani/Documents/projects/as/wso2as-4.5.0-SNAPSHOT/samples/VirtualDirectoryListing/src/main/java/java/org/appserver/samples/VirtualDirectoryListing/DirectoryListServlet.java:62: cannot find symbol
      [javac] symbol : variable HttpServletResponse
      [javac] location: class org.appserver.samples.VirtualDirectoryListing.DirectoryListServlet
      [javac] response.sendError(HttpServletResponse.SC_NOT_FOUND, absolutePath);
      [javac] ^
      [javac] /home/yumani/Documents/projects/as/wso2as-4.5.0-SNAPSHOT/samples/VirtualDirectoryListing/src/main/java/java/org/appserver/samples/VirtualDirectoryListing/DirectoryListServlet.java:37: method does not override or implement a method from a supertype
      [javac] @Override
      [javac] ^
      [javac] 14 errors

      BUILD FAILED

        Attachments

          Activity

            People

            • Assignee:
              kishanthan@wso2.com Kishanthan Thangarajah
              Reporter:
              yumani@wso2.com Yumani Ranaweera
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: