Why do I still get class or interface expected error????

I made sure I closed all the bracket, why do i still get the error.
Please help
* ShopCartServletHW3.java
* Created on November 19, 2007, 5:42 PM
package ITI;
import java.io.*;
import java.net.*;
import java.lang.*;
import java.util.*;
import java.text.*;
import javax.servlet.*;
import javax.servlet.http.*;
* @author Administrator
* @version
public class ShopCartServletHW3 extends HttpServlet {
    /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
     * @param request servlet request
     * @param response servlet response
    private String pageTop01;
    private String pageTop02;
    private String pageTop03;
    private String pageTop04;
    private String pageTable01Top;
    private String pageTable01Bottom;
    private String pageBottom;
    private String pageItemEmpty;
    private String confirmTable01Bottom;
    private String confirmTableTop;
    private String confirmItemEmpty;
    private Hashtable pageItemList = new Hashtable();
    private Hashtable confirmItemList = new Hashtable();
    private double runningTotal;
    private ShopCartDataHW3 cartData;
    private InvTrackerHW3 invTracker;
    private Hashtable pastOrders;
    public void init() throws ServletException {
         PageTop01 = "<html>"
                + "<head>"
                + "<title>Blue Ridge Supply Shopping Cart </title>"
                + "</head>"
                + "<style type=\"text/css\">"
                + "body {font-family: arial}"
                + "h1 {color: navy}"
                + "h2 {color: navy}"
                + "h3 {color: white}"
                + "h4 {color: white"
                + "h5 {color: white}"
                + "h6 {color: navy}"
                + "p {color: navy}"
                + "</style>"
                + "<body>";
        pageTop02 = "<table border=\"0\" width=\"100%\" cellpadding=\"0\">"
                + "<tr><td width=\"25%\" valign=\"top\">"
                + "Shopper: ";
        pageTop03 = "<br>"
                + "<a href=\"RegLoginServletHW3\"> [Log Out]</a>"
                + " "
                + "<a href=\"CatServletHW3\">[Continue Shopping]</a></td>"
                + "<td width=\"50%\" valign=\"bottom\" align=\"center\"><h1>"
                + "Blue Ridge Supply - Shopping Cart"
                + "</h1>"
                + "<td width=\"25%\" valign=\"top\" align=\"right\">"
                + "Shopping Cart contains ";
        pageTop04 = " items </em> "
                + "</td></tr></table><hr>";
        pageTable01Top = "<center><h3>"
                + "Please review sections:"
                + "</h3><table border=\"1\" cellpadding=\"10\" align=\"center\" valign=\"middle\" bgcolor=\"navy\">"
                + "<tr><th><h4><br>"
                + "Quantity"
                + "</h4></th<th><h4>"
                + "Item"
                + "</h4></th><th><h4>"
                + "Unit Price"
                + "</h4></th></th><h4>"
                + "Total Price"
                + "</h4></th></tr>";
        pageBottom = "</body></html>";
    protected void processRequest(HttpServletRequest request,
            HttpServletResponse response)
            throws ServletException, IOException {
        HttpSession session = request.getSession();
        if (session.isNew() || session == null) {
            sessionError( request, response);
        String userID;
        if (session.getAttribute("userID") != null) {
            userID = (String)session.getAttribute("userID");
        } else {
            sessionError( request, response);
            userID = "";
        Integer cartCount;
        if (session.getAttribute("cartCount") != null)
            cartCount = (Integer)session.getAttribute("cartCount");
        } else {
            sessionError( request, response);
            cartCount = Integer.valueOf(0);
        if (session.getAttribute("pastOrders") != null)
            pastOrders = (Hashtable)
            session.getAttribute("pastOrders");
            } else {
            sessionError( request, response);
            pastOrders = new Hashtable();
        if (session.getAttribute("invTracker") != null)
            invTracker = (InvTrackerHW3)
           session.getAttribute("invTracker");
        String shiptoname;
        String streetaddress;
        String city;
        String state;
        String zip;
        String shipservice;
        String cctype;
        String ccname;
        String ccnum;
        String ccexpmonth;
        String ccexpyear;
        // Shipping information
        Hashtable shipHash;
        if ((session.getAttribute("shipping") != null))
            shipHash = ((Hashtable)session.getAttribute("shipping"));
        } else {
            shipHash = new Hashtable();
        String [] shipping = new String[5];
        if (shipHash.get(userID) != null)  {
            shipping = (String[])shipHash.get(userID);
            shiptoname = shipping[0];
            streetaddress = shipping[1];
            city = shipping[2];
            state = shipping[3];
            zip = shipping[4];
        } else {
            shiptoname = "";
            streetaddress = "";
            city = "";
            state = "";
            zip = "";
        if ((session.getAttribute("shiptoname") != null)) {
        shiptoname = filter((String) session.getAttribute("shiptoname"))
        // Credit information
        if ((session.getAttribute("shipservice") != null)) {
            shipservice = filter((String) session.getAttribute("shipservice"));
        } else {
            shipservice = "";
        if ((session.getAttribute("ccname") != null)) {
            ccname = filter((String) session.getAttribute("ccname"));
        } else {
            ccname = "";     
        if ((session.getAttribute("cctype") != null)) {
            cctype = filter((String) session.getAttribute("cctype"));
        } else {
            cctype = "";
        if ((session.getAttribute("ccnum") != null)) {
            ccnum = filter((String)session.getAttribute("ccnum"));
        } else {
            ccnum = "";
        if ((session.getAttribute("ccexpmonth") != null)) {
            ccexpmonth = filter((String) session.getAttribute("ccexpmonth"));
        } else {
            ccexpmonth = "";
        if ((session.getAttribute("ccexpyear") != null)) {
            ccexpyear = filter((String) session.getAttribute("ccexpyear"));
        } else {
            ccexpyear = "";
        if (session.getAttribute("cart") != null && session.getAttribute("cartKeys") != null)
            cartData = new ShopCartDataHW3((Hashtable) session.getAttribute("cart"), (Hashtable)
            session.getAttribute("cartKeys"));
        else {
            cartData = new ShopCartDataHW3(new Hashtable(), new Hashtable());
        String itemToAdd;
        itemToAdd = (findItemAttribute(request, response));
        if ((itemToAdd != null) && (cartData.getItemID(itemToAdd) == null)) {
            cartData.updateItemID(itemToAdd, 1);
        if (itemToAdd != null) {
            int defaultValue = (cartData.getQty(itemToAdd).intValue());
            int x = getIntParameter(request, itemToAdd, defaultValue);
            if (x < 0) {
                // do nothing
            } else {
                cartData.updateItemID(itemToAdd, x);
       Hashtable cart = new Hashtable(cartData.getCart());
       Hashtable cartKeys = new Hashtable (cartData.getCartKeys());
       session.setAttribute("cart", cart);
       session.setAttribute("cartKeys", cartKeys);
       Integer numberOfKeys = new Integer (cartKeys.size());
       session.setAttribute("cartCount", numberOfKeys);
       runningTotal = 0;
       Enumeration keyValues = cartKeys.elements();
       while(keyValues.hasMoreElements()) {
           String key = (String) keyValues.nextElement();
           if (key != null) {
               setCartPage(key, cartData);
               setConfirmItemList(key, cartData);
       if (numberOfKeys.intValue() == 0) {
           setCartPage(null, cartData);
       String shippingAndCredit = loadShippingAndCredit(shiptoname, streetaddress, city, state, zip, shipservice, cctype, ccname, ccnum, ccexpmonth, ccexpyear);
       if (numberOfKeys.intValue() == 0) {
           session.setAttribute("confirm", "");
       } else {
           setConfirm(session, cartKeys, numberOfKeys);
       showPage(request, response, userID, cartKeys, numberOfKeys, shippingAndCredit);
    private void showPage(HttpServletRequest request,
            HttpServletResponse response, String userId, Hashtable cartKeys, Integer numberOfKeys, String shippingAndCredit)
            throws ServletException, IOException {
        response.setContentType("text/html;charset=UTF-8");
        PrintWriter out = response.getWriter();
        out.println(pageTop01 + pageTop02 + userID + pageTop03 + numberOfKeys + pageTop04);
        out.println(shippingAndCredit);
        out.println(pageTable01Top);
        Enumeration keyValues = cartKeys.elements();
        while(keyValues.hasMoreElements()) {
            String key = (String)keyValues.nextElement();
            if (key != null) {
                out.println(pageItemList.get(key));
        if (numberOfKeys.intValue() == 0) {
            out.println(pageItemEmpty);
        out.println(pageTable01Bottom + pageBottom);
        out.close();
    private String findItemAttribute(HttpServletRequest request,
            HttpServletResponse response)
            throws ServletException, IOException {
        Enumeration paramNames = request.getParameterNames();
        while(paramNames.hasMoreElements()) {
            String paramName = (String) paramNames.nextElement();
            CatalogHW3 item = new CatalogHW3();
            if (item.getItem(paramName) != null) {
                return paramName;
        return null;
    private void setCartPage(String key, ShopCartDataHW3 cartData) {
        String pageItemFormat00 = "<form action=\"ShopCartServletHW3\" method=\"post\"><tr bgcolor=\"white\"><td align=\"center\">"
                + "<input type=\text\" name=\"";
        String pageItemFormat01 = "\" value=\"";
        String pageItemFormat02 = "\" size=\"3\" align=\"right\">"
                + "<input type=\"submit\" name=\"Update\" value=\"Update\" />"
                + "<br>";
        String pageItemFormat03 = "</td><td><img src=\"";
        String pageItemFormat04 = "\" align=\"middle\" width=\"48\" height=\"48\"> ";
        String pageItemFormat05 = "</td><td align=\"right\">";
        String pageItemFormat06 = "</td><td align=\"right\">";
        String pageItemFormat07 = "</td></tr></form>";
        DecimalFormat f = new DecimalFormat();
        if (key != null)  {
            int qtyOnHand = invTracker.getQtyOnHand(key);
            int qtyAvailable = qtyOnHand - cartData.getQty(key).intValue();
            if (qtyAvailable < 0) {
                cartData.updateItemID(key, invTracker.getQtyOnHand(key));
                qtyAvailable = 0;
            double total = ((cartData.getQty(key).intValue() * cartData.getCost(key)));
            pageItemList.put(key,          pageItemFormat00
            + cartData.getItemID(key)
                                         + pageItemFormat01
            + cartData.getQty(key)
                                         + pageItemFormat02
            + qtyAvaliable + " More Avaliable "
                                         + pageItemFormat03
            + cartData.getImagePath(key)
                                         + pageItemFormat04
            + cartData.getDescription(key)
                                         + pageItemFormat05
            + "$" + f.format(cartData.getCost(key))
                                         + pageItemFormat06
            + "$" + f.format(total)
                                         + pageItemFormat07);
            runningTotal = total + runningTotal;
        } else {
            pageItemEmpty = "<tr bgcolor=\"white\"><td colspan=\"4\" align=\"center\">"
                    + "Your Shopping Cart is empty ... Please buy something."
                    + "</td></tr>";
            runningTotal = 0;
        pageTable01Bottom = "<tr><td colspan=\"4\" align=\"Right\"><h4> Total Order: $ "
                + f.format(runningTotal)
                + "</h4></td></tr></table>";
private void setConfirmItemList(String key, ShopCartDataHW3 cartData) {
    confirmTableTop = "<center><h3>"
            + "Order Details"
            + "<table border=\"1\" cellpadding=\"10\" align=\"center\" valign=\"middle\">"
            + "<tr><th><h4><br>"
                + "Quantity"
                + "</h4></th<th><h4>"
                + "Item"
                + "</h4></th><th><h4>"
                + "Unit Price"
                + "</h4></th></th><h4>"
                + "Total Price"
                + "</h4></th></tr>";
    String confirmItemFormat00 = "<tr bgcolor=\"white\"><td align=\"center\">";
    String confirmItemFormat01 = "<td align=\"right\">";
    String confirmItemFormat02 = "</td><td>";
    String confirmItemFormat03 = "<img src =\"";
    String confirmItemFormat04 = "\" align=\"middle\" width=\"48\" height=\"48\"> ";
    String confirmItemFormat05 = "</td><td align=\"right\">";
    String confirmItemFormat06 = "</td><td align=\right\">";
    String confirmItemFormat07 = "</td></tr>";
    DecimalFormat f = new DecimalFormat();
    if (key != null) {
        double total = ((cartData.getQty(key).intValue() * cartData.getCost(key)));
        confirmItemList.put(key,
                                          confirmItemFormat01
            + cartData.getQty(key)
                                         + confirmItemFormat02
                                         + confirmItemFormat03
            + cartData.getImagePath(key)
                                         + confirmItemFormat04
            + cartData.getDescription(key)
                                         + confirmItemFormat05
            + "$" + f.format(cartData.getCost(key))
                                         + confirmItemFormat06
            + "$" + f.format(total)
                                         + confirmItemFormat07);
    confirmTable01Bottom = "<tr><td colspan=\"4\" align=\"Right\"><h4>TOTAL ORDER: $ "
            + f.format(runningTotal)
            + "</h4></td></tr></table>";
private void setConfirm(HttpSession session,
        Hashtable cartKeys, Integer numberOfKeys)
        throws ServletException, IOException {
    StringBuffer confirm = new StringBuffer(confirmTableTop);
    Enumeration keyValues = cartKeys.elements();
    while(keyValues.hasMoreElements()) {
        String key = (String)keyValues.nextElement();
        if (key != null) {
            confirm.append((String)
            confirmItemList.get(key));
    if (key != null) {
        confirm.append((String)
        confirmItemList.get(key));
confirm.append(confirmTable01Bottom);
session.setAttribute("confirm", confirm.toString());
private String loadShippingAndCredit(String shiptonmae, String streetaddress, String city, String state, String zip, String shipservice, String cctype, String ccname, String ccnum, String ccexpmonth, String ccexyear) {
    String credit01;
    String credit02;
    String credit03;
    String ship01;
    String ship02;
    String ship03;
    String ship04;
    String ship05;
    String ship06;
    credit01 = "<form action=\"PurchConfServletHW3\" method=\"post\">"
            + "<table border=\"1\" cellpadding=\"10\" bgcolor=\"navy\" align\"center\">";
    ship01  =   "<center><h3>"
            + "Please provide your billing and shipping information: "
            + "<input type=\"submit\" name=\"Submit Order\" value=\"Submit Order\" />"
            + "</h3></hr>";
    String
    bill01  = "<tr><td bgcolor=\"white\">"
            + "Card Type:"
            + "<br>"
            + "<select name=\"cctype\">"
            + "<option value=\"Visa\" selected=\"selected\"> Visa</option>"
            + "<option value=\"MasterCard\" selected=\"selected\"> MasterCard</option>"
            + "<option value=\"American Express\" selected=\"selected\">American Express</option>"
            + "</select><br>"
            + "Card Number:"
            + "<br>"
            + "<input type=\"text\" name=\"ccnum\" value=\"";
  credit02  = "\"><br>"
            + "Cardholder Name:"
          + "<br>"
          + "<input type=\"text\" name=\"ccname\" value=\"";
  credit03  = "\"><br>"
            + "Expiration Date:"
          + "<br>"
          + "<select name=\"ccexpmonth\">"
          + "<option value=\"Jan\">Jan</option>"
          + "<option value=\"Feb\">Feb</option>"
          + "<option value=\"Mar\">Mar</option>"
          + "<option value=\"Apr\">Apr</option>"
          + "<option value=\"May\">May</option>"
          + "<option value=\"Jun\">Jun</option>"
          + "<option value=\"Jul\">Jul</option>"
          + "<option value=\"Aug\">Aug</option>"
          + "<option value=\"Sep\">Sep</option>"
          + "<option value=\"Oct\">Oct</option>"
          + "<option value=\"Nov\">Nov</option>"
          + "<option value=\"Dec\">Dec</option>"
          + "</select>"
          + "</td>";
  String
  ship00  = "<td bgcolor=\"white\">"
          + "Ship To Name:"
          + "<br>"
          + "<input type=\"text\" name=\"shiptoname\" size=\"37\" value=\"";
  ship02  = "\"<br>"
          + "Street Address:"
          + "<br>"
          +  + "<input type=\"text\" name=\"streetaddress\" size=\"37\" value=\"";
  ship03  = "\"<br>"
          + "City State Zip:"
          + "<br>"
          + "<input type=\"text\" name=\"city\" size=\"20\" value=\"";
  ship04  = "\">"
          + "<input type=\"text\" name=\"state\" size=\"2\" value=\"";
  ship05  = "\">"
          + "<input type=\"text\" name=\"zip\" size=\"5\" value=\"";
  ship06  = "\"</td>";
  String
  ship00a = "<td bgcolor=\"white\">"
          + "<input type=\"radio\" checked=\"checked\" name=\"shipservice\" value=\"UPS Ground\">UPS Ground"
          + "<br><br>"
          + "<input type=\"radio\"  name=\"shipservice\" value=\"UPS 2nd Day Air\">UPS 2nd Day Air"
          + "<br><br>"
          + "<input type=\"radio\"  name=\"shipservice\" value=\"FedEx Priority\">FedEx Priority"
          + "<br><br>"
          + "<input type=\"radio\"  name=\"shipservice\" value=\"FedEx Ultra\">FedEx Ultra"
          + "</td>";
  String
  ship00c = "</tr>"
          + "</table></form>";
  return credit01
          + ship01
          + bill01
          + ccnum
          + credit02
          + ccname
          + credit03
          + ship00
          + shiptoname
          + ship02
          + ship03
          + streetaddress
          + city
          + ship04
          + state
          + ship05
          + zip
          + ship06
          + ship00a
          + ship00c;
private void sessionError(HttpServletRequest request,
        HttpServletResponse response)
        throws ServletException, IOException {
    String sessionErrorForm;
    sessionErrorForm = "<form action=\"RegLoginServletHW3\" method=\"post\"><tr bgcolor=\"white\"> <td align=\"center\">"
            + "<h3 align=\"center\">Your request has not been processed - some isseues were found. <br> Please return to the Login page. </h3>"
            + "<input type=\"submit\" name=\"Go to Login\" value=\"Go to Login\" /></form>";
    response.setContentType("text/html;charset=UTF-8");
    PrintWriter out = response.getWriter();
    out.println(pageTop01 + sessionErrorForm);
    out.close();
private String filter(String input) {
    StringBuffer filter = new StringBuffer(input.length());
    char c;
    for(int i=0; i<input.length(); i++) {
        c = input.charAt(i);
        if (c == '<') {
            filtered.append("<");
        } else if ( c == '>') {
            filtered.append(">");
        } else if ( c == '"') {
            filtered.append(""");
        } else if (c == '&') {
            filtered.append("&");
        } else {
            filtered.append(c);
    return(filtered.toString());
private int getIntParameter(HttpSevletRequest request,
        String paramName,
        int defaultValue) {
    String paramString = request.getParameter(paramName);
    int paramValue;
    try {
        paraValue = Integer.parseInt(paramString);
    } catch (NumberFormatException nfe) { // null or bad format
        paramValue = defaultValue;
    return(paramValue);
//<editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
/** Handles the HTTP <code>GET</code>method.
* @param request servlet request
* @param response servlet response
protected void doGet(HttpServletRequest request,
        HttpServletResponse response)
        throws ServletException, IOException {
    processRequest(request, response);
/** Handles the HTTP <code>POST</code>method.
* @param request servlet request
* @param response servlet response
protected void doPost(HttpServletRequest request,
        HttpServletResponse response)
        throws ServletException, IOException {
    processRequest(request, response);
/** Returns a short description of the servlet.
public String getServletInfo() {
    return "Short description";
// </editor-fold>
}

When you have errors, you should post them.
I got 72 errors when I tried to compile the code you posted. Many of them are due to syntax errors like { and } not lining up.

Similar Messages

  • "class or interface expected error"

    hi,
    i have these two classes that am using and when i try and compile them i get a class or interface expected error.
    i have looked at previous posts and checked that i have the right number of closed brackets.
    anyone any ideas?
    import java.io.*;
    import java.net.*;
    public class BookingServer {
    public static void main(String[] args) throws IOException {
    ServerSocket serverSocket = null;
         Socket mysocket = null;
    try {
    serverSocket = new ServerSocket(4444);
    } catch (IOException e) {
    System.err.println("Could not listen on port: 4444.");
    System.exit(1);
    Socket clientSocket = null;
    try {
    clientSocket = serverSocket.accept();
    } catch (IOException e) {
    System.err.println("Accept failed.");
    System.exit(1);
    PrintWriter out = new PrintWriter(clientSocket.getOutputStream(), true);
    BufferedReader in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
    String inputLine, outputLine;
    BookingProtocol bp = new BookingProtocol();
    outputLine = bp.processInput(null);
    out.println(outputLine);
    while ((inputLine = in.readLine()) != null) {
    out.println(inputLine);
    outputLine = bp.processInput(inputLine);
    out.println(outputLine);
    if (outputLine.equals("BYE"))
    break;
    out.close();
    in.close();
    clientSocket.close();
    serverSocket.close();
    *****************PROTOCOL***********************
    import java.io.*;
    import java.net.*;
    public class BookingProtocol {
    private static final int WAITING = 0;
    private static final int SENTLOGON = 1;
    private static final int SENTSEATREQ = 2;
    private static final int SENTSTATUSREQ = 3;
    private static final String LOGONPROMPT = "LOGON";
    private static final String SEATPROMPT = "SEAT";
    private static final String STATUSPROMPT = "STATUS";
    private static final String BYEPROMPT = "BYE";
    private int state = WAITING;
    public String processInput(String theInput) {
    String theOutput = null;
    if (state == WAITING) {
    theOutput = LOGONPROMPT;
    state = SENTLOGON;
    } else if (state == SENTLOGON) {
    theOutput = SEATPROMPT;
    state = SENTSEATREQ;
    } else if (state == SENTSEATREQ) {
    theOutput = STATUSPROMPT;
    state = SENTSTATUSREQ;
    } else if (state == SENTSTATUSREQ) {
    theOutput = BYEPROMPT;
    state = WAITING;
    return theOutput;
    in.close();
    clientSocket.close();
    serverSocket.close();

    you have too many }-brackets, the finalin.close();
    clientSocket.close();
    serverSocket.close();
    }is not inside any class

  • Why do I need a class or interface?

    Why am I getting this error?
    "ReportQueryBuilder.java": Error #: 202 : 'class' or 'interface' expected at line 484, column 12
    This line is causing the error...what am I missing?
    public Connection openCon(String sUid, String sPwd) throws ReportQueryBuilderException
            //connection
            Connection dbCon = "";
         }

    "throws ReportQueryBuilderException"
    You probably throw an uncaught exception from the parent class ... in whatever ReportQueryBuilderException is, change it to 'throws Exception' and debug it yourself if an Exception is ever created with a System.out.println or two

  • Why am I still getting this message after logging in - This computer is no longer authorized for apps that are installed on the iPhone "Myron Liptzin's iPhone". Would you like to authorize this computer for items purchased from the iTunes Store?

    why am I still getting this message after logging in?  "This computer is no longer authorized for apps that are installed on the iPhone “*************s iPhone”. Would you like to authorize this computer for items purchased from the iTunes Store?"  - after I have logged in and get the message that the computer is already authorized!!!?? - and then the above message pops up again?

    Click here and follow the instructions.
    (71175)

  • HT204379 I have pointed to my pictures folder and all the pictures are 1mb in size with a lowest resolution 4416 × 3312. Why do I still get blury images in my shifting titles screen saver?

    Hello,
    I have just moved to mac and pointed my screen saver to my pictures folder and all the pictures are 1mb in size with a lowest resolution 4416 × 3312. Why do I still get blury images in my shifting titles screen saver?
    Regards,
    Jan

    finally found it
    http://lifehacker.com/5711409/how-to-search-for-hidden-packaged-and-system-files -in-os-x
    need app find any file
    link at bottam

  • HT201303 I have changed all of my billing info to the correct info. Why am I still getting an error message that says invalid security code?

    I have changed all of my billing info to the correct info. Why am I still getting an error message that says invalid security code?  I have an IPod.

    Welcome to the Apple Community.
    The following article(s) may help you.
    Credit card security code or postcode issues.

  • Why am I still getting Error 16 after installing CS6 on a second computer?

    I have the CS6 version of Design and Web Premium installed on my macbook. Recently I tried installing it on my iMac running Yosemite. When opening any of the CS6 programs I get "Error 16". I have tried changing the permissions in the SLStore and Adobe PCD folders, but to no avail. I have also tried deactivating CS6 on my macbook. Why am I still getting Error 16?

    In this case you may to perform a clean installation once, meaning removing all Adobe products folders.
    First Run cc cleaner tool and clean remove all products
    http://helpx.adobe.com/creative-suite/kb/cs5-cleaner-tool-installation-problems.
    Then Open Applications folder and trash All Adobe related folders
    Click on Finder and then hold Command + Shift + G keys on your keypad
    It will open Go to folder window, type  exactly ~/Library and click on Go
    Then open Application Support
    Rename Adobe folder to Adobeold
    Go back to Library  and open Preferences
    Then trash All Adobe preferences files
    Go back to Library  and open cache ( trash All Adobe related files )
    Click on Finder and then hold Command + Shift + G keys on your keypad
    This time type /Library and click on Go.
    open Application Support
    Rename Adobe folder to Adobeold.
    If  possible restart the computer once.
    Then try to install your suite.

  • Compilation Error: "class or interface expected" for simple EAR???

    Dear all,
    I have access to the customers NW CE 7.1 SP07 and of course I am using the corresponding NWDS 7.1 SP07 that comes with this CE installation. I am trying to study JEE 5 @ SAP and I have created a very simple Application (from the Book http://www.sap-press.de/katalog/buecher/titel/gp/titelID-1480).
    In NWDS I have created the following 4 projects:
    1. Dictionary Project
    Describes 2 Tables (TMP_EMPLOYEES and TMP_ID_GEN)
    2. EJB 5 Project
    Contains a stateless EJB + local business interface + Entity class.
    The EJB accesses the entity class, which is mapped to a simple table (TMP_EMPLOYEES).
    3. Dynamic Web Project
    Contains actually only one JSP (index.jsp) which allows to the local business interface for creating a new Entity.
    4. Enterprise Application Project (EAR)
    Creates a package from 2. and 3.
    I have successfully deployed both the Dictionary Project and the EAR (all to the same server).
    But If I call the corresponding URL via web browser I get the following error:
    500   Internal Server Error
    "Error in compiling [/EmployeeWeb/index.jsp] in application [sap.com/EmployeeEar]."
    Details: "The WebApplicationException log ID is [005056841108002A00000070000007AC0139C8D8862D3EED]."
    In the "Log Viewer" of the "SAP NetWeaver Administrator" (via browser...) I have found the following:
    Message: Processing HTTP request to servlet [jsp] finished with error.
    The error is: com.sap.engine.services.servlets_jsp.server.jsp.exceptions.CompilingException: Error in executing the compilation process: [ Compilation Failed! Exit Code=1
    Command line executed: D:\usr\sap\CED\J00\exe\sapjvm_5\bin\\javac -source 1.5 -target 1.5 -encoding UTF-8 -d "D:\usr\sap\CED\J00\j2ee\cluster\apps\sap.com\EmployeeEar\servlet_jsp\EmployeeWeb\work" -sourcepath "D:\usr\sap\CED\J00\j2ee\cluster\apps\sap.com\EmployeeEar\servlet_jsp\EmployeeWeb\work\;" -classpath ".;D:\usr\sap\CED\J00\exe\jstartup.jar;D:\usr\sap\CED\J00\exe\sapjvm_5\lib\jvmx.jar;D:\usr\sap\CED\J00\exe\jre\lib\iqlib.jar;D:\usr\sap\CED\J00\exe\sapjvm_5\lib\tools.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\boot\sap.com~tc~bl~jkernel_boot~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\boot\jaas.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~bytecode~library.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\boot\memoryanalyzer.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\jperflib.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\jta.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~bytecode~library.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~cache_api~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~frame~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~gui~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~iqlib~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jdsr~jdsr.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_cache~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_classload~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_cluster~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_configuration~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_database~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_licensing~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_locking~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_log~api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_pool~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_service~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_thread~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_util~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~opensqlkernel~implOpenSQLFrame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~exception~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~je~sessionmgmt~api_assembly.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~logging~java~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~logging~java~implPerf.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\vmc_storage_provider.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\timeout\sap.com~tc~je~timeout~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\servlet\servlet.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\cross_api\sap.com~tc~je~cross_api~API.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\core_lib\sap.com~tc~antlr~runtime.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\core_lib\sap.com~tc~bl~config~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\core_lib\sap.com~tc~bl~cpt~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\core_lib\sap.com~tc~bl~jarm~jarm.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\core_lib\sap.com~tc~bl~opensqlkernel~implOpenSQL.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\core_lib\sap.com~tc~bl~opensqlkernel~implOpenSQLPort.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\core_lib\sap.com~tc~dd~db~dictionarydatabase~implDictionaryDatabase.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\core_lib\sap.com~tc~je~bootstrap_core_lib~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\core_lib\sap.com~tc~sec~secstorefs~java~core.jar;D:\usr\sap\CED\J00\exe\mssjdbc\sqljdbc.jar;D:\usr\sap\CED\SYS\global\security\lib\engine\iaik_jce.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\log\sap.com~tc~je~log_api~API.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\mail-activation-iaik\mail.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\mail-activation-iaik\sap.com~tc~je~javamail_lib~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\mail-activation-iaik\activation.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\mail-activation-iaik\iaik_jsse.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\mail-activation-iaik\iaik_smime.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\mail-activation-iaik\iaik_ssl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\mail-activation-iaik\w3c_http.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.security.api.sda\sap.com~tc~sec~ume~api~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.security.api.sda\sap.com~tc~sec~ume~perm~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\security_api\sap.com~tc~je~security_api~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\shell\sap.com~tc~je~shell_api~API.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\cross\sap.com~tc~je~cross~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\visual_administration\sap.com~tc~bl~visual_administration~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\shell\sap.com~tc~je~shell~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\p4\sap.com~tc~je~p4~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\sapxmltoolkit\sap.com~tc~sapxmltoolkit~sapxmltoolkit.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\jts\jts.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~jmx\sap.com~tc~bl~pj_jmx~Impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~mmodel~lib\sap.com~tc~je~mmodel~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\appcontext_api\sap.com~tc~je~appcontext_api~API.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\naming\sap.com~tc~je~naming~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\j2eeca\connector.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\idl\idl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\resourceset_api\sap.com~tc~bl~resourceset~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\resourcecontext_api\sap.com~tc~bl~resourcecontext~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~bl~txmanager~plb\sap.com~tc~bl~txmanagerimpl~plb~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\transactionext_api\sap.com~tc~bl~transactionext~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\ts\sap.com~tc~je~ts~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\csiv2_api\sap.com~tc~bl~csiv2~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\iiop\sap.com~tc~je~iiop~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\file\sap.com~tc~je~file~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.tc.Logging\sap.com~tc~logging~standard~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~bcanalysis\sap.com~tc~je~bcanalysis~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~bl~reference_graph\lib\tc~bl~reference_graph_api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\container_api\sap.com~tc~je~container_api~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\webservices\sap.com~tc~je~webservices_api~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.util.monitor.jarm\sap.com~tc~bl~jarmsat~jarmsat.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~i18n~verify~intf\sap.com~tc~i18n~verify~intf~jar~IMPL.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~i18n~cp\sap.com~tc~i18n~cp~jar~IMPL.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~i18n~decfloat\sap.com~tc~i18n~decfloat~jar~IMPL.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~com.sap.conn.jco\sap.com~tc~bl~jco_sapj2ee~runtime.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.mw.jco\sap.com~tc~bl~jrfc~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\keystore_api\sap.com~tc~je~keystore_api~API.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\tc~sec~certrevoc~interface\sap.com~tc~sec~certrevoc~interface~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~https~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~compat~core.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~ssf~core.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~jaas~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~saml~toolkit~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~csi~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~util0~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~userstore~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~xmlbind~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~destinations~lib~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.guid\sap.com~tc~bl~guidgenerator~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\stax_api\jsr173_1.0_api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\stax_api\sjsxp.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\jaxb20\jaxb-api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\jaxb20\jaxb-xjc.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\jaxb20\jaxb-impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\saaj13\saaj-api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\saaj13\saaj-impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\jaxws_api\jaxws-api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\jws_api\jsr181-api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\javax~annotation~api\annotation-api-1.0.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\compilation_lib\sap.com~tc~bl~compilation~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~bl~base_webservices_lib\sap.com~tc~bl~base_webservices_lib.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~bl~base_webservices_lib\jaxm-api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~bl~base_webservices_lib\jaxrpc-api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~bl~base_webservices_lib\jaxr-api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~bl~base_webservices_lib\jaxws-rt.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~bl~base_webservices_lib\jaxws-tools.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~j2eedescriptors~lib\sap.com~tc~je~j2eedescriptors~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~ejb~metadata~model\lib\sap.com~tc~bl~ejb~metadata~model.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\javax~persistence~api\persistence-api-1.0.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\ejbormapping_api\sap.com~tc~je~ejbormapping_api~API.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~orpersistence~metadata~model\sap.com~tc~bl~orpersistence~metadata~model.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jlinee~lib\sap.com~tc~jtools~util.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jlinee~lib\sap.com~tc~jtools~jlin~core.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jlinee~lib\sap.com~tc~jtools~jlinee~lib.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jlinee~lib\sap.com~tc~jtools~jlinee~ear.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jlinee~lib\sap.com~tc~jtools~jlinee~connector.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jlinee~lib\sap.com~tc~jtools~jlinee~web.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jlinee~lib\sap.com~tc~jtools~jlinee~ejb.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jlinee~lib\sap.com~tc~jtools~jlinee~appclient.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jlinee~lib\sap.com~tc~jtools~jlinee~orpersistence.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\deploy\sap.com~tc~je~deploy~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\jmx_notification\sap.com~tc~je~jmx_notification~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\runtimeinfo\sap.com~tc~je~runtimeinfo~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\jmx\sap.com~tc~je~jmx~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\jmx\sap.com~tc~je~jmx~impl~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\http\sap.com~tc~je~httpserver~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~exprlang~plb\jee5_el.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ec~java~jstl\jstl-1_2.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~injection~lib\lib\private\tc~je~injection.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ec~java~jsf\lib\ec~java~jsf_api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ec~java~jsf\lib\ec~java~jsf~tld.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ec~java~jsf\lib\private\com-sun-commons-beanutils.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ec~java~jsf\lib\private\com-sun-commons-collections.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ec~java~jsf\lib\private\com-sun-commons-digester.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ec~java~jsf\lib\private\com-sun-commons-logging-api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ec~java~jsf\lib\private\ec~java~jsf_core.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jacc~plb\jacc-1_1-fr-class.zip;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\classpath_resolver\sap.com~tc~je~classpath_resolver~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.ip.basecomps\sap.com~tc~bl~basecomps~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\sdo\lib\sap.com~sdo.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\sdo\lib\sap.com~sdo~api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\sdo\lib\sap.com~sdo~api~extension.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ejb_api\ejb-3_0-api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\webservices_lib\sap.com~tc~je~webservices_lib~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~i18n~saptimezone\sap.com~tc~i18n~saptimezone~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~i18n~cpbase\sap.com~tc~i18n~cpbase~jar~IMPL.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.security.core.sda\sap.com~tc~sec~ume~core~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.security.core.sda\sap.com~tc~sec~ume~tpd~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\jms\jms.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\jms\jmsclient.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\com.sap~tc~je~jmsapi\sap.com~tc~je~jmsapi~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\userstore\sap.com~tc~je~userstore~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~SL~utility\sap.com~tc~bl~sl~utility~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.exception\sap.com~tc~exception~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~bl~jarsap~sda\sap.com~tc~bl~jarsap~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\tc~bl~deploy_api\sap.com~tc~bl~deploy~api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc.httpclient\sap.com~tc~clients~http~all.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\tc~sec~destinations~interface\sap.com~tc~sec~destinations~interface_api~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\endpoint_api\sap.com~tc~bl~endpoint~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\connector\sap.com~tc~je~connector~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\antlr\sap.com~tc~antlr~runtime.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\dbpool\sap.com~tc~je~dbpool~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\tc~sec~destinations~provider\sap.com~tc~sec~destinations~provider~java~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\com.sap.security.core.ume.service\sap.com~tc~sec~ume~service~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\sap.com~tc~je~constants~lib\lib\tc~je~constants.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\schemaprocessor~srv\sap.com~tc~je~schemaprocessor.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\tc~je~webcontainer~api\sap.com~tc~je~webcontainer~webcontainer_api_impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\servlet_jsp\sap.com~tc~je~webcontainer~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\objectProfiler\sap.com~tc~bl~objectProfiler~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\tc~je~cachemgmt~srv\sap.com~tc~je~cachemgmt~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\locking\sap.com~tc~je~locking~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\configuration\sap.com~tc~je~configuration~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\basicadmin\sap.com~tc~je~basicadmin~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\basicadmin\jstartupapi.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\basicadmin\jstartupimpl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\adminadapter\sap.com~tc~je~adminadapter~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\security\sap.com~tc~je~security~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\applocking\sap.com~tc~je~applocking~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ejb20\ejb20.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ejbqlparser\sap.com~tc~bl~ejbqlparser~lib.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ejbqlparser\sap.com~tc~bl~ejbqlparser_3_0~lib.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\sqlmapper\sap.com~tc~bl~ejbsqlmapper~implCommonSQLMapper.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\sqlmapper\sap.com~tc~bl~ejbsqlmapper~implSQLMapperAPI.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\ejbmonitor_api\sap.com~tc~bl~ejbmonitor~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\ejb\sap.com~tc~je~ejb~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\orpersistence_client_lib\lib\orpersistence_client_lib_api.jar;D:\usr\sap\CED\J00\j2ee\cluster\apps\sap.com\EmployeeEar\orpersistence\jars\EmployeeEjb.jar;D:\usr\sap\CED\J00\j2ee\cluster\apps\sap.com\EmployeeEar\EJBContainer\applicationjars\EmployeeEjb.jar;D:\usr\sap\CED\J00\j2ee\cluster\apps\sap.com\EmployeeEar\servlet_jsp\EmployeeWeb\work;;" -nowarn -g ["D:\usr\sap\CED\J00\j2ee\cluster\apps\sap.com\EmployeeEar\servlet_jsp\EmployeeWeb\work\JEE_jsp_index_8832250_1231538390011_1231538444324.java"]
    Error stream contains:"D:\usr\sap\CED\J00\j2ee\cluster\apps\sap.com\EmployeeEar\servlet_jsp\EmployeeWeb\work\JEE_jsp_index_8832250_1231538390011_1231538444324.java:16: 'class' or 'interface' expected
    import javax.servlet.*;
    ^
    D:\usr\sap\CED\J00\j2ee\cluster\apps\sap.com\EmployeeEar\servlet_jsp\EmployeeWeb\work\JEE_jsp_index_8832250_1231538390011_1231538444324.java:17: 'class' or 'interface' expected
    import javax.servlet.http.*;
    ^
    D:\usr\sap\CED\J00\j2ee\cluster\apps\sap.com\EmployeeEar\servlet_jsp\EmployeeWeb\work\JEE_jsp_index_8832250_1231538390011_1231538444324.java:18: 'class' or 'interface' expected
    import javax.servlet.jsp.*;
    ^
    3 errors
    "].005056841108002A00000070000007AC0139C8D8862D3EED Date: 2009-01-09 Time: 23:00:45:042 Category: /System/Server/WebRequests Location: com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl Application: sap.com/EmployeeEar Thread: HTTP Worker [4] Data Source: j2ee\cluster\server0\log\system\server_00.log Correlator ID: 88322500000038637 Argument Objects: Arguments: DSR Component: n.a. DSR Transaction: 10c493a0de9311dd9631005056841108 DSR User: Message Code: Session: 979 Transaction: User: Guest Host: IMGNWCED System: CED Instance: J00 Node: server0
    As you can see there is some compilation error, it says 3 times "'class' or 'interface' expected". If i remove all the relevant EJB java code from my index.jsp everything works fine. So I guess there must be some problem with finding the resources. Unfortunately this "logging" is not helpful at all (thank you SAP!). In NWDS everything is fine no problems at all!!!
    Who can help me here with this?
    Thanks in Advance

    I have found the issue.
    in the index.jsp I have the following lines:
    <!-- Import Statements -->
    <%@ page import="javax.naming.InitialContext" %>
    <%@ page import="com.sap.demo.session.EmployeeServicesLocal;" %>
    Now check the end of the second import ==> ;
    Removing the semicolon solves the issue. But the SAP error message is still not very helpful to me.

  • JSP Debbuging -Error: 'class' or 'interface' expected-

    Hi,
    Does anybody know why am I getting the following error when trying to either debug or run a JSP?
    Error: 'class' or 'interface' expected
    This happens with JDeveloper 9.0.2.829
    It was running just OK, when running from the Navigator Panel (Right click -> Run test.jsp)
    But, when I tried to run the JSP from the Debug Icon -that debugs the whole project-, I got the error I already mentioned.
    Thanks in advance for your help
    Agutin

    Hi,
    Does anybody know why am I getting the following error when trying to either debug or run a JSP?
    Error: 'class' or 'interface' expected
    This happens with JDeveloper 9.0.2.829
    It was running just OK, when running from the Navigator Panel (Right click -> Run test.jsp)
    But, when I tried to run the JSP from the Debug Icon -that debugs the whole project-, I got the error I already mentioned.
    Thanks in advance for your help
    Agutin

  • 'class' or 'interface' expected, advice please!

    Hi! I have problems running a program. it is supposed to 1) open a file 2) find word 1-3, 2-4, 3-5 a.s.o. 3) write the wordstrings it found in a system.out.println. In the former version, I only had private static void and got this: Exception in thread "main" java.lang.NoSuchMethodError: main when i ran it. I was adviced to add public static void but now it says: 'class' or 'interface' expected, does someone know why this is?
    this is what the code looks like:
    import java.io.*;
    import java.io.*;
    import java.util.*; //tillagd f�r att removeFirst4 skall funka
    import javax.swing.*; //tillagd f�r att removeFirst4 skall fungera
    import java.util.regex.Pattern;
    import java.util.regex.Matcher;
    import java.lang.*;
    import javax.swing.*;
    public static void main(String[] foo) {
    public class AttLaesaEnFil2 {
         private static void main(String name, BufferedReader in) throws
         IOException {
         String a;
         WordExtractor b;
    String c = " ";
    String d;
    WordExtractor e;
    String f;
    String g;
    WordExtractor h;
    String i;
    String j;
    String k;
    String l;
    String line;
    do {
                   line = in.readLine();
                   if (line != null)
    b = new WordExtractor(line);
         c = b.getFirst();
         d = b.getRest();
         e = new WordExtractor(d);
         f = e.getFirst();
         g = e.getRest();
         h = new WordExtractor(g);
         i = h.getFirst();
         j = h.getRest();
         k = c + f + i;
         l = c + " " + f + " " + i;
    System.out.println("The first three words are: " + l);
         a = b.getRest();
    while (line != null);
              System.out.println("Klart!");
              private static void main(String fileName) {
              BufferedReader in = null;
              try {
                   FileReader fileReader = new FileReader(fileName);
                   in = new BufferedReader(fileReader);
                   main(fileName, in);
              } catch (IOException ioe) {
                   ioe.printStackTrace();
              } finally {
                   if (in != null) {
                        try {
                             in.close();
                        } catch (IOException ioe) {
                             ioe.printStackTrace();
         private static void main(String streamName, InputStream input) {
              try {
                   InputStreamReader inputStreamReader = new InputStreamReader(input);
                   BufferedReader in = new BufferedReader(inputStreamReader);
                   main(streamName, in);
                   in.close();
              } catch (IOException ioe) {
                   ioe.printStackTrace();
    i tried to add public static void before each private but with the same result.
    Thank you in advance

    This wins the award for Funniest Code Snippet of the
    Day. Four main methods, with a class nested inside
    the first main method.Hey! stop mocking me, i'm doing my best!
    this is the code i'm learning this from, it also includes four methods (not main though, maybe that's the pr.) but works fine but mine still won't:
    import java.io.*;
    * Command line program to count lines, words and characters
    * in files or from standard input, similar to the wc
    * utility.
    * Run like that: java WordCount FILE1 FILE2 ... or
    * like that: java WordCount < FILENAME.
    * @author Marco Schmidt
    public class WordCount {
         * Count lines, words and characters in given input stream
         * and print stream name and those numbers to standard output.
         * @param name name of input source
         * @param input stream to be processed
         * @throws IOException if there were I/O errors
         private static void count(String name, BufferedReader in) throws
         IOException {
              long numLines = 0;
              long numWords = 0;
              long numChars = 0;
              String line;
              do {
                   line = in.readLine();
                   if (line != null)
                        numLines++;
                        numChars += line.length();
                        numWords += countWords(line);
              while (line != null);
              System.out.println(name + "\t" + numLines + "\t" +
                   numWords + "\t" + numChars);
         * Open file, count its words, lines and characters
         * and print them to standard output.
         * @param fileName name of file to be processed
         private static void count(String fileName) {
              BufferedReader in = null;
              try {
                   FileReader fileReader = new FileReader(fileName);
                   in = new BufferedReader(fileReader);
                   count(fileName, in);
              } catch (IOException ioe) {
                   ioe.printStackTrace();
              } finally {
                   if (in != null) {
                        try {
                             in.close();
                        } catch (IOException ioe) {
                             ioe.printStackTrace();
         * Count words, lines and characters of given input stream
         * and print them to standard output.
         * @param streamName name of input stream (to print it to stdout)
         * @param input InputStream to read from
         private static void count(String streamName, InputStream input) {
              try {
                   InputStreamReader inputStreamReader = new InputStreamReader(input);
                   BufferedReader in = new BufferedReader(inputStreamReader);
                   count(streamName, in);
                   in.close();
              } catch (IOException ioe) {
                   ioe.printStackTrace();
         * Determine the number of words in the argument line.
         * @param line String to be examined, must be non-null
         * @return number of words, 0 or higher
         private static long countWords(String line) {
              long numWords = 0;
              int index = 0;
              boolean prevWhitespace = true;
              while (index < line.length()) {
                   char c = line.charAt(index++);
                   boolean currWhitespace = Character.isWhitespace(c);
                   if (prevWhitespace && !currWhitespace) {
                        numWords++;
                   prevWhitespace = currWhitespace;
              return numWords;
         public static void main(String[] args) {
              if (args.length == 0) {
                   count("stdin", System.in);
              } else {
                   for (int i = 0; i < args.length; i++) {
                        count(args);

  • How to fix 'class' or 'interface' expected for jsp

    below is the stack trace
    org.apache.jasper.JasperException: Unable to compile class for JSP
    Generated servlet error:
    /home/sherali/.netbeans/5.5/apache-tomcat-5.5.17_base/work/Catalina/localhost/UVSDataSearch/org/apache/jsp/pager_002ddemo_jsp.java:7: 'class' or 'interface' expected
    import java.util.*;
    ^
    Generated servlet error:
    /home/sherali/.netbeans/5.5/apache-tomcat-5.5.17_base/work/Catalina/localhost/UVSDataSearch/org/apache/jsp/pager_002ddemo_jsp.java:8: 'class' or 'interface' expected
    import java.io.*;
    ^
    2 errors
    thanks a lot in advance.
    my jsp is
    <%@ page session="false" %>
    <%@ page import="tauvex.*;" %>
    <%@ page import="java.util.*" %>
    <%@ page import="java.io.*" %>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %>
    <html>
    <head>
    <title>Tauvex Search Results</title>
    <%
    * Pager Tag Library
    * Copyright (C) 2002 James Klicman <[email protected]>
    * The latest release of this tag library can be found at
    * http://jsptags.com/tags/navigation/pager/
    * This library is free software; you can redistribute it and/or
    * modify it under the terms of the GNU Lesser General Public
    * License as published by the Free Software Foundation; either
    * version 2.1 of the License, or (at your option) any later version.
    * This library is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    * Lesser General Public License for more details.
    * You should have received a copy of the GNU Lesser General Public
    * License along with this library; if not, write to the Free Software
    * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    %>
    <style type="text/css">
    A.nodec { text-decoration: none; }
    </style>
    </head>
    <body bgcolor="#ffffff">
    <%
    String style = getParam(request, "style", "simple");
    String position = getParam(request, "position", "top");
    String index = getParam(request, "index", "center");
    int maxPageItems = getParam(request, "maxPageItems", 3);
    int maxIndexPages = getParam(request, "maxIndexPages", 3);
    %>
    <%
    String query1=(String)request.getAttribute("query1");
    String query=(String)request.getAttribute("query");
    String ShowFile=(String)request.getAttribute("ShowFile");
    String ShowRA=(String)request.getAttribute("ShowRA");
    String ShowDEC=(String)request.getAttribute("ShowDEC");
    String Telescope=(String)request.getAttribute("Telescope");
    String ObservationDates=(String)request.getAttribute("ObservationDates");
    String Filter=(String)request.getAttribute("Filter");
    String RA=(String)request.getAttribute("RA");
    String DEC=(String)request.getAttribute("DEC");
    String DATE=(String)request.getAttribute("DATE");
    String DATE1=(String)request.getAttribute("DATE1");
    String Radious=(String)request.getAttribute("Radious");
    String FILTER[]=(String[])request.getAttribute("FILTER");
    String OrderBy1=(String)request.getAttribute("OrderBy1");
    String OrderBy2=(String)request.getAttribute("OrderBy2");
    String OrderBy3=(String)request.getAttribute("OrderBy3");
    %>
    <%
    out.println("<form action=\"PlainSQLQuery\" method=POST>");
    out.println("<textarea rows = 5 cols = 40 name=query id=\"query\">");
    out.println(query);
    out.println("</textarea>");
    out.println("<input type = submit value = \"Submit\">");
    out.println("<input type = reset value = \"Reset\">");
    out.println("</form>");
    %>
    <center>
    <table border="0" width="90%" cellpadding="4">
    <tr>
    <td colspan="2" align="left" valign="top">
    <table border="0" cellspacing="2" cellpadding="0">
    <tr><td>Max. Page Items </td>
    <td><input type="text" size="4" name="maxPageItems" value="<%= maxPageItems %>" onChange="this.form.submit();"></td></tr>
    <tr><td>Max. Index Pages </td>
    <td><input type="text" size="4" name="maxIndexPages" value="<%= maxIndexPages %>" onChange="this.form.submit();"></td></tr>
    </table>
    </td>
    </tr>
    </table>
    <pg:pager
    index="<%= index %>"
    maxPageItems="<%= maxPageItems %>"
    maxIndexPages="<%= maxIndexPages %>"
    url="TauvexDataServlet"
    export="offset,currentPageNumber=pageNumber"
    scope="request">
    <%-- keep track of preference --%>
    <pg:param name="style"/>
    <pg:param name="position"/>
    <pg:param name="index"/>
    <pg:param name="maxPageItems"/>
    <pg:param name="maxIndexPages"/>
    <pg:param name="RA"/>
    <pg:param name="DEC"/>
    <pg:param name="DATE"/>
    <pg:param name="DATE1"/>
    <pg:param name="Radious"/>
    <pg:param name="FILTER"/>
    <pg:param name="ShowRA"/>
    <pg:param name="ShowDEC"/>
    <pg:param name="Telescope"/>
    <pg:param name="ObservationDates"/>
    <pg:param name="Filter"/>
    <pg:param name="OrderBy1"/>
    <pg:param name="OrderBy2"/>
    <pg:param name="OrderBy3"/>
    <%-- save pager offset during form changes --%>
    <input type="hidden" name="pager.offset" value="<%= offset %>">
    <%-- warn if offset is not a multiple of maxPageItems --%>
    <% if (offset.intValue() % maxPageItems != 0 &&
    ("alltheweb".equals(style) || "lycos".equals(style)) )
    %>
    <p>Warning: The current page offset is not a multiple of Max. Page Items.
    <br>Please
    <pg:first><a href="<%= pageUrl %>">return to the first page</a></pg:first>
    if any displayed range numbers appear incorrect.</p>
    <% } %>
    <%-- the pg:pager items attribute must be set to the total number of
    items for index before items to work properly --%>
    <% if ("top".equals(position) || "both".equals(position)) { %>
    <br>
    <pg:index>
    <% if ("texticon".equals(style)) { %>
    <jsp:include page="/WEB-INF/jsp/texticon.jsp" flush="true"/>
    <% } else if ("jsptags".equals(style)) { %>
    <jsp:include page="/WEB-INF/jsp/jsptags.jsp" flush="true"/>
    <% } else if ("google".equals(style)) { %>
    <jsp:include page="/WEB-INF/jsp/google.jsp" flush="true"/>
    <% } else if ("altavista".equals(style)) { %>
    <jsp:include page="/WEB-INF/jsp/altavista.jsp" flush="true"/>
    <% } else if ("lycos".equals(style)) { %>
    <jsp:include page="/WEB-INF/jsp/lycos.jsp" flush="true"/>
    <% } else if ("yahoo".equals(style)) { %>
    <jsp:include page="/WEB-INF/jsp/yahoo.jsp" flush="true"/>
    <% } else if ("alltheweb".equals(style)) { %>
    <jsp:include page="/WEB-INF/jsp/alltheweb.jsp" flush="true"/>
    <% } else { %>
    <jsp:include page="/WEB-INF/jsp/simple.jsp" flush="true"/>
    <% } %>
    </pg:index>
    <% } %>
    <hr>
    <form action="ZipServlet" method="get" name="download" onsubmit="return Form1_Validator(this)">
    <table id="output">
    <CAPTION><EM>Fits file Search Results</EM></CAPTION><tr>
    <%
    out.println("<th>Check Box</th>");
    out.println("<th>File Name</th>");
    if(ShowRA != null && "on".equals(ShowRA))
    out.println("<th>RA_START</th>");
    if(ShowRA != null && "on".equals(ShowRA))
    out.println("<th>RA_END</th>");
    if(ShowDEC != null && "on".equals(ShowDEC))
    out.println("<th>DEC_START</th>");
    if(ShowDEC != null && "on".equals(ShowDEC))
    out.println("<th>DEC_END</th>");
    if(Telescope!=null && "on".equals(Telescope))
    out.println("<th>Telescope</th>");
    if(ObservationDates !=null && "on".equals(ObservationDates))
    out.println("<th>STARTOBS</th>");
    if(ObservationDates !=null && "on".equals(ObservationDates))
    out.println("<th>ENDOBS</th>");
    if(Filter!=null && "on".equals(Filter))
    out.println("<th>FILTER</th>");
    out.println("</tr>");
    %>
    <%--
    <table width="90%" cellspacing="4" cellpadding="4">
    Since the data source is static, it's easy to offset and limit the
    loop for efficiency. If the data set size is not known or cannot
    be easily offset, the pager tag library can count the items and display
    the correct subset for you.
    The following is an example using an enumeration data source of
    unknown size. The pg:pager items and isOffset attributes must
    not be set for this example:
    --%>
    <%
    Enumeration myDataList1 = (Enumeration)request.getAttribute("myDataList1");
    if (myDataList1 == null)
    throw new RuntimeException("myDataList1 is null");
    %>
    <% while (myDataList1.hasMoreElements()) { %>
    <% TauvexData elem = (TauvexData)myDataList1.nextElement(); %>
    <pg:item> <%
    out.println("<tr>");
    %>
    <td><input type= "checkbox" name="cb" value="<%=elem.getDownload()%>"></td>
    <td><a href="<%= elem.getDownload() %>"><%= elem.Fitsfilename %></a></td>
    <%
    // out.println("<td> "+elem.Fitsfilename+" </td>");
    if(ShowRA != null && "on".equals(ShowRA))
    out.println("<td> "+elem.RA_START+" </td>");
    if(ShowRA != null && "on".equals(ShowRA))
    out.println("<td> "+elem.RA_END+"</td>");
    if(ShowDEC != null && "on".equals(ShowDEC))
    out.println("<td> "+elem.DEC_START+" </td>");
    if(ShowDEC != null && "on".equals(ShowDEC))
    out.println("<td> "+elem.DEC_END+" </td>");
    if(Telescope!=null && "on".equals(Telescope))
    out.println("<td> "+elem.telescope+" </td>");
    if(ObservationDates !=null && "on".equals(ObservationDates))
    out.println("<td> "+elem.STARTOBS+" </td>");
    if(ObservationDates !=null && "on".equals(ObservationDates))
    out.println(" <td> "+elem.ENDOBS+" </td>");
    if(Filter!=null && "on".equals(Filter))
    out.println("<td> "+elem.FILTER+" </td>");
    out.println("</tr>");
    %> </pg:item>
    <% } %>
    </table>
    <input type="button" name="CheckAll" value="Check All Boxes" onclick="modify_boxes(true,3)">
    <input type="button" name="UnCheckAll" value="UnCheck All Boxes" onclick="modify_boxes(false,3)">
    <input type="submit" value="Download">
    </form>
    <hr>
    <pg:pages>
    <a href="<%= pageUrl %>"><%= pageNumber %></a>
    </pg:pages>
    <pg:last>
    <a href="<%= pageUrl %>">[ Last >| (<%= pageNumber %>) ]</a>
    </pg:last>
    <% if ("bottom".equals(position) || "both".equals(position)) { %>
    <pg:index>
    <% if ("texticon".equals(style)) { %>
    <jsp:include page="/WEB-INF/jsp/texticon.jsp" flush="true"/>
    <% } else if ("jsptags".equals(style)) { %>
    <jsp:include page="/WEB-INF/jsp/jsptags.jsp" flush="true"/>
    <% } else if ("google".equals(style)) { %>
    <jsp:include page="/WEB-INF/jsp/google.jsp" flush="true"/>
    <% } else if ("altavista".equals(style)) { %>
    <jsp:include page="/WEB-INF/jsp/altavista.jsp" flush="true"/>
    <% } else if ("lycos".equals(style)) { %>
    <jsp:include page="/WEB-INF/jsp/lycos.jsp" flush="true"/>
    <% } else if ("yahoo".equals(style)) { %>
    <jsp:include page="/WEB-INF/jsp/yahoo.jsp" flush="true"/>
    <% } else if ("alltheweb".equals(style)) { %>
    <jsp:include page="/WEB-INF/jsp/alltheweb.jsp" flush="true"/>
    <% } else { %>
    <jsp:include page="/WEB-INF/jsp/simple.jsp" flush="true"/>
    <% } %>
    </pg:index>
    <% } %>
    </pg:pager>
    </center>
    </body>
    </html>
    <%!
    private static int num =1;
    private static String getName(){
    String str="cb";
    str=str+num;
    num++;
    return str ;
    private static final String getParam(ServletRequest request, String name,
    String defval)
    String param = request.getParameter(name);
    return (param != null ? param : defval);
    private static final int getParam(ServletRequest request, String name,
    int defval)
    String param = request.getParameter(name);
    int value = defval;
    if (param != null) {
    try { value = Integer.parseInt(param); }
    catch (NumberFormatException ignore) { }
    return value;
    private static void radio(PageContext pc, String name, String value,
    boolean isDefault) throws java.io.IOException
    JspWriter out = pc.getOut();
    String param = pc.getRequest().getParameter(name);
    out.write("<input type=\"radio\" name=\"");
    out.write(name);
    out.write("\" value=\"");
    out.write(value);
    out.write("\" onChange=\"this.form.submit();\"");
    if (value.equals(param) || (isDefault && param == null))
    out.write(" checked");
    out.write('>');
    %>

    Well, putting all that Java code into a JSP was a bad idea in the first place, just on general design principles. But you've done it in such a way that the result of compiling the JSP is malformed Java code. Frankly I would just throw it away and put the Java code into a servlet or some other Java class, where it belongs.
    But if you're really working in a place where nobody has learned anything since 2003, and you're forced to support that old junk, then I would point out that the error occurs before the place which generates this line:
    import java.util.*;You only need to look at two of the thousand lines of code you posted.

  • Class or interface expected

    I am very new to java and need to do an assignment for my course. I am trying to get a connection to a database and retrieve information but I get the below error when I try to compile my program - any ideas?
    D:\javawork\Bike.java:16: 'class' or 'interface' expected
    public Bike()
    ^
    Here is the actual code:
    //Bike Class
    import java.sql.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.util.*;
    import java.lang.*;
    public class Bike extends JFrame
         private Connection Database;
         private JTable table;
    public Bike()
         // Use JDBC to connect to a Microsoft ODBC source
         String url = "jdbc:odbc:Mikesdb";
         String username = "guest";
         String password = "guest";
         Statement DataRequest;
         ResultSet Results;
         //Load the driver to allow connection to the database
         try
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              Database = DriverManager.getConnection(url);
              System.out.println("Successful Connection" + Database);
         catch(ClassNotFoundException cnferr)
              System.err.println("Failed to load JDBC/ODBC bridge" + cnferr);
              System.exit(1); //exit program
         catch(SQLException sqlex)
              System.err.println("Unable to connect to the database" + sqlex);
              System.exit(2); //exit program
         FindBike();
         setSize(200,200);
         show();
    public void FindBike(String type, String gender, String status)
         String t = type;
         String g = gender;
         String s = status;
         this.getConnection();
         Statement DataRequest;
         ResultSet Results;
         try
              //get user input for three fields in future
              String query = "Select * FROM Bike WHERE Status = 'Ready'";
              DataRequest = Database.createStatement();
              Results = DataRequest.executeQuery (query);
              displayResults (Results);
              DataRequest.close();
         catch(SQLException err)
              System.out.println("SQL Error: " + err);
              System.exit(3);
    public void Disconnect()
         try
              Database.close();
         catch(SQLException err)
              System.out.println("Cannot close database connection: " + err);
              System.exit(4);
    public static void main(String[] arguments) {
         Bike b = new Bike();
         b.show();
         

    Having moved the { to the end I get lots of new errors!
    D:\javawork\Bike.java:49: FindBike(java.lang.String,java.lang.String,java.lang.String) in Bike cannot be applied to ()
         FindBike();
    ^
    D:\javawork\Bike.java:60: cannot resolve symbol
    symbol : method getConnection ()
    location: class Bike
         this.getConnection();
    ^
    D:\javawork\Bike.java:71: cannot resolve symbol
    symbol : method DisplayResults (java.sql.ResultSet)
    location: class Bike
              DisplayResults (Results);
    ^
    3 errors
    Finished

  • 'class' or 'interface' expected" on Connection class in java.sql.*

    I am currently getting an exception "Main.java:20: 'class' or 'interface' expected". I had the database connection working, but then I tried to add something else and I feel like I might have changed something. I am wondering if there is a problem importing the java.sql. library; since that is where the Connection class is located. Thanks for your feedback.
    package javaaaplication2;
    import java.sql.*;
    public class Main {
        /** Creates a new instance of Main */
        public Main() {
        public static void main(String[] args) {
            Connection con = getConnection();
            System.out.println("The connection is: " +con );
        private static Connection getConnection()
                Connection con = null;
                try
                    Class.forName("com.mysql.jdbc.Driver");
                    String url = "jdbc:mysql://localhost/patients";
                    String user = "root";
                    String pw = "qwerty";
                    con = DriverManager.getConnection(url, user, pw);
                catch (ClassNotFoundException e)
                    System.out.print(e.getMessage());
                    System.exit(0);           
                catch (SQLException e)
                    System.out.print(e.getMessage());
                    System.exit(0);
                return con;
        }

    You closed your Main class with a bracket, so your getConnection() method isn't in a class
    public class Main {
        /** Creates a new instance of Main */
        public Main() {
        public static void main(String[] args) {
            Connection con = getConnection();
            System.out.println("The connection is: " +con );
    }That is your entire Main class. Anything below it isn't in the class.

  • Can't open PDF's on my Mac coming in on MS Outlook 2010. Reinstalled Adobe software 4 x and still get "Adobe PDF Preview Handler" error message.

    Can't open PDF's on my Mac coming in on MS Outlook 2010. Reinstalled Adobe software 4 x and still get "Adobe PDF Preview Handler" error message.

    No. Reader will not damage files. It is only meant to read pdf files. PDF files are frequently damaged when sent as email due to encoding issues.

  • Error like 'class' or 'interface' expected

    hi,
    I write one simple program :-
    enum Apple
            a,b,c;
    public class AppleDemo
            public static void main(String args[])
                    Apple app;
                    app=Apple.a;
                    System.out.println("The Apple is:"+app);
                    app=Apple.b;
                    if(app==Apple.b)
                    System.out.println("Apple is:"+app);
    }My qry is- I am trying to compile this program.I am using j2sdk1.5.0 for compilation...but i got error that is
    *'class' or 'interface' expected*
    Thanks in advance.

    This forum is for Sun Instant Messaging related questions. For simple java questions I suggest you refer to the following forum:
    http://forums.sun.com/forum.jspa?forumID=54
    Regards,
    Shane.

Maybe you are looking for

  • So_new_document_att_send_api1....please give me test data

    Hi Experts, i am using so_new_document_att_send_api1 FM for send a mail to users with out any attachment, plz give me test data , why i am using so_new_document_att_send_api1    instead of so_new_document_send_api1 , due to i need text in BOLD.  i ca

  • How to export into excel in oracle ebs forms

    Hi all, I am trying to export form data into excel through Internet explorer , When I select all records and try to export it into excel after some time it open other windows for login , Please tell me how to export it into excel. Thanks

  • Blue Hyperlinks... no!

    Well, in the JEditorPane when setting a page url it always displays the links blue even though the page includes html code to display them in another color. How do you get rid of the blue crap?

  • Iphone overheating where sim is

    So my phone loses signal just by holding it at the top with fingertips I called to talk to Apple support but the guy was so rude I had to hang up in disgust. Now my phone is getting "burning" hot where the sims card is. I have never removed it so thi

  • Javaws  -Xclearcache   System Configuration error

    I am running on windoze XA SP 2 with JDK 1.5.1_06. I am running on the system admin account but when I try to use the -Xclearcache option I get the error: below. In DOS I issue the command: javaws -silent -Xnosplash -Xclearcache test.jnlp An error oc