Servlet cannot find applet class.. HELP..DONT REPLY..SOLUTION FOUND

Hi.. can anybody help me.. with this age old problem?
I have an applet.. which generates a pie chart .. Pie.class. If i embed it in a normal HTML page.. it runs smoothly.
Now the problem is.. in my servlet i tried to do this
out.println("<applet code=Pie.class codebase=/mywebapp/  height=300 width=300">);etc..
but when the servlet runs.. the applet is not initalised .. so instead of having the applet i have a 'x' sign.. .. To diagnose the problem better.. i right click on the area that is supposed to be the applet and select 'Open Java Console' . ..there i see.. a ClassNotFound Exception.
I have kept the Pie.class in the WEB-INF -> classes Folder ( where all the other class files of the servlets are kept ).
Can anybody help me??
Thanks in advance
Hi guys sorry to bother u.. i have found the soln. myslef... my mistake was to place the applet class in web-inf-> class folder.. as soon as i placed it outside the folder.. it worked superbly. Thanks anyway
Message was edited by:
arijit_datta

me also same problem...
this class path is included in server itself..
or we can set during compiling time...
then this is my compile.bat file please check
set classpath=%CLASSPATH%; ./WEB-INF/classes;
@echo off
javac -d ./WEB-INF/classes/ ./dev/beans/*.java
javac -d ./WEB-INF/classes/ ./dev/ContentManagement/beans/*.java
javac -d ./WEB-INF/classes/ ./dev/servlets/*.java
and my servlet file like this below..
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import com.deploy.servlet.*;
public class ControlServlet extends HttpServlet
     public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException,IOException
          response.setContentType("text/html");
          PrintWriter out = response.getWriter();
          out.println("Testing");
/*          if (request.getParameter("pageName")=="CEOSpeak")
               CEOBean CB = new CEOBean();
               if (request.getParameter("actionType")=="add")
               else if (request.getParameter("actionType")=="edit")
               else if (request.getParameter("actionType")=="delete")
                    if(CB.deleteCEO(request.getParameter("CEOId")))
                         response.sendRedirect("CEO_Speaks.jsp");

Similar Messages

  • Servlet cannot find helper class

    Hello
    Under WEB-INF/classes I put ServletExample and SingletonExample. Compiling ServletExample, that makes use of SingletonExample, works.
    In the directory WEB-INF/classes I also have another direcotry, test. And in WEB-INF/classes/test I put again ServletExample and SingletonExample.
    Here I have tried in several ways to compile the servlet, but I always get an:
    Cannot find symbol class SingletonExample.
    I tried writing package test at the top of both files, and even at the top of only one of these two.
    I even tried to make WEB-INF/classes/test/ServletExample make use of SingletonExample residing in WEB-INF/classes, but I didnt succeded.
    What happens when you have subdirectory in WEB-INF/classes/? I think this is a MUST, to have subdirectory in large webapplication, so I really dont want to put everything in the classes directory.
    Do you how to resolve this prolem? And: if Im in WEB-INF/classes/test and want to referr from a servlet residing in this direcory to a Singleton/helper class residing in WEB-INF/classes/, which approach do I have to use?
    Thanks
    Paolo

    Jeez, you aren't gonna get very far in Java like this.
    CLASSPATH is wrong - again. You're supposed to give JARs and paths where the class loader is supposed to look, not the actual .class file.
    Also, you're not telling the compiler to put the .class file in the package directory structure.
    Your example is pretty awful. Try this:
    Put this code into c:\common
    package common;
    import common.test.TestDown;  // What the hell is this?  There is no package test, but there is a package named common.test
    public class TestUp
       public void sayHello()
          System.out.println("Hello.....");
    }Put this code into c:\common\test
    package common.test;
    import common.TestUp;
    public class  TestDown
       public TestDown()
            TestUp testUp = new TestUp();
            testUp.sayHello();
       public static void main(String[] args)
            new TestDown();
    }Open a command shell and navigate to c:\, then do the following:
    Directory of c:
    07/01/2005  03:43 PM    <DIR>          .
    07/01/2005  03:43 PM    <DIR>          ..
    07/01/2005  03:45 PM    <DIR>          common
                   0 File(s)              0 bytes
                   3 Dir(s)  74,909,675,520 bytes free
    C:\>javac -d . common\*.java
    C:\>javac -d . common\test\*.java
    C:\>java -classpath . common.test.TestDown
    Hello.....Once you've got your head around this, go learn Ant and have it compile your projects properly.
    %

  • Cannot find symbol     class Usernamebean

    hi i am new in j2ee
    can some body help to give the solution.
    i am always thankfull to everybody
    i have a servlet where i am calling a bean of same package but servlet not compile giving that error
    cannot find symbol class Usernamebean
    servlet code
    package ecomm; import java.sql.*; import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.util.*; import bengalcom.*; public class Loginservelet extends HttpServlet { public void doGet(HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException { try {         String accnum=req.getParameter("username");   String pinnum=req.getParameter("password"); try { Class.forName("com.mysql.jdbc.Driver"); Connection dbcon=DriverManager.getConnection("jdbc:mysql://localhost/ecomm","root",""); PreparedStatement s = dbcon.prepareStatement("select * from vendordetails where email = ? and password = ? and blocking='No' "); s.setString(1,accnum); s.setString(2,pinnum); ResultSet result=s.executeQuery(); boolean rowfound=false; rowfound=result.next();   if(rowfound==true) { String vname=result.getString("fname"); String  vid=result.getString("vid"); String email=result.getString("email");   UsernameBean nameBean =new UsernameBean();   nameBean.setFirstName(accnum); HttpSession session = req.getSession(true); session.setAttribute("vname",vname); session.setAttribute("vid",vid); session.setAttribute("email",email);   RequestDispatcher dispatcher=getServletContext().getRequestDispatcher("/earea.jsp?vname=vname&vid=vid&email=email"); dispatcher.forward(req,res); dbcon.close(); } else{ RequestDispatcher dispatcher=getServletContext().getRequestDispatcher("/eblock.jsp"); dispatcher.forward(req,res); }   } catch(ClassNotFoundException e) { } } catch(SQLException e) { System.out.println(e.toString()); } } public void doPost(HttpServletRequest req, HttpServletResponse res)         throws ServletException, IOException     {         doGet(req, res);     } }

    Hi,
    java is case sensitive, Check the case in class name.
    Regards,
    Ram

  • Cannot find package/class symbol

    hello. i'm using netveans for the first time. i have a java application with 2 classes... pb.java with public class pb int package svr and cl.java with public class cl in package cli
    that is..
    file class package
    pb pb svr
    cl cl cli
    pb.java compiles properly cl.java gioves error.
    the error is in the following lines of code...
    pb obj1 = new pb();
            pb obj2 = new pb();i'm trying to make an object fo type pb from cl.java. the error i get is...
    cannot find symbol
    class pb
    location cli.cl
    i alse tried puttin svr.pb instead of pb but no use.
    the entire cose is as follows...
    pb.java
    * pb.java
    * Created on December 4, 2006, 8:56 AM
    package svr;
    public class pb
        private double balance;
        private double []lt = new double [10];
        private int i=9;
        public void deposit(double amt)
            if(amt<=0)
                System.out.println("Enter amount greater than 0");
            else
                balance=balance+amt;
                if(i>=0)
                    lt=amt;
    else
    for(int j=9;j>=0;j--)
    lt[i]=lt[i-1];
    lt[0]=amt;
    public void withdraw(double amt)
    if(amt<=0)
    System.out.println("Enter amount greater than 0");
    else
    if(amt>balance)
    System.out.println("Balance lower than amount entered");
    else
    balance=balance-amt;
    if(i>=0)
    lt[i]=-amt;
    else
    for(int j=9;j>=0;j--)
    lt[i]=lt[i-1];
    lt[0]=-amt;
    public void bal()
    System.out.println("Balance: "+balance);
    public void lts()
    System.out.println("Last 10 Transactions");
    for(int j=i;j>10;j++)
    System.out.println(lt[j]);
    public void statement()
    lts();
    bal();
    cl.java
    * cl.java
    * Created on December 4, 2006, 8:58 AM
    package cli;
    class cl
        public static void main(String[] args)
            pb obj1 = new pb();
            pb obj2 = new pb();
            obj1.deposit(100.50);
            obj1.statement();
            obj2.deposit(200.75);
            obj2.statement();
            obj1.withdraw(25.50);
            obj1.statement();
            obj2.withdraw(100.25);
            obj2.statement();

    For a beginner these tools are worst, because they
    hide all the stuff a programmer needs to know to find
    his way around Java. They should spend a few weeks
    with the command line and a good text editor before
    switching.
    Just because an IDE does something for you, it
    doesn't mean you don't need to kno wwhat it does.
    Unless you volunteer to handle all "how do I do X in
    Netbeans/Eclipse/Whatever", JAR and classpath
    questions posted here by newbies yourself.I suppose I can agree with that to some extent. I wouldn't suggest to anyone that they just blindly trust whatever code the IDE inserts automatically.
    But there's nothing wrong about learning by example. The IDE is willing to teach proper syntax, and eclipse will give suggestions about capitalizing class names and making constants all-caps.
    There are things that frustrate new programmers where an IDE will be helpful, especially if the entire API is uncharted territory.

  • Cannot find the class file

    Hi All,
    Can any one help me regarding the issue?
    Error:
    package com.support.misc.feedback
    I am getting the following error for the above line. But I have created the Hierarchy in folder structure. But still it is throwing the error.
    1. Cannot find the class file for com.sapportals.htmlb.page.DynPage
    2. This compilation unit indirectly references the missing type com.sapportals.htmlb.page.DynPage (typically some required class file is referencing a type outside the class path)     FeedbackBean.java
    Thanks in Advance.
    Message was edited by: Gowsika Kannan

    Hi Gowsika,
    the class needed is located in htmlb.jar which can be found under <irj-root>/WEB-INF/portal/portalapps/com.sap.portal.htmlb/lib
    You need to integrate this jar in your .classpath
    Hope this helps,
    Robert
    PS: Please do not post the same question 3 times

  • Error Message= x Cannot find the HTML help browser installed on your system.

    Help! I cannot seem to find the solution for the error message I get when trying to generate a layout in Microsoft HTMl Help (Primary Layout). I am using the trial version, but it didn't seem to be an issue for anyone else in my class that was also using the trial version.
    The error message states, "Cannot find the HTML help browser installed on your system."
    Thank you!

    Sounds like a problem with the installation of RoboHelp on those machines. When you install RoboHelp, it installs the necessary files to view a CHM.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • "cannot find this class" erro while creating Background Callable Object.

    Hi All,
    I am facing "cannot find this class" while creating Background Callable Object.
    I followed the following document for Creating Background Callable Object.
    [Creating Callable Objects for Background Execution|http://help.sap.com/saphelp_nwce10/helpdata/en/53/cde385301f4aa3b8e77a92cd46bff3/frameset.htm]
    After giving the fully qualified java class name in the Implementation Class Name when i press next i am getting the error.
    Please suggets me in solving this issue.
    Regards,
    S.V.Satish Kumar
    Edited by: Sathish Kumar SV on Apr 4, 2009 10:34 AM

    Hi, kavita.
    First, make sure you choosed the correct container when you created the background CO.
    Second, make sure your package name was "com.examples.bckgco" and class name was "UserDetailsCallableObject". The exception  which you got just means you entered incorrect name.
    It doesn`t relate to your program.
    Best Regards.
    Louis Huang.

  • I have down loaded faulty towers and they have gone into my music list. Also down loaded the buyable version of where eagles dare and cannot find it please help me get organized

    I have down loaded faulty towers and they have been listed in my music. Also down loaded a film where eagles dare (the buyable version) and I cannot find it. Help please

    Are you looking in the video player app or the iPod app.
    Videos should not appear in the iPod app, they should be in the video app.

  • I cannot find information to help me change the orientation of a video filmed in portrait format but only able to be played back lying on its side  (landscape) instead of upright. All the rotation buttons for iPhoto are not 'engaged' when it is in video .

    I cannot find information to help me change the orientation of a video filmed in portrait format but it can only able to be played back lying on its side  (landscape) instead of upright. All the rotation buttons for iPhoto are not 'engaged' when it is in video .

    Thanks OT,
    I tried the Export function but it would not allow me to choose the option of exporting to iMovie. I think you are right about needing Quicktime Pro. I opened iMovie and imported the clip from iPhoto and with some searching found the 'cropping, rotation' mechanism. So I now have a copy in the correct orientation. I plan to import/export it back to iPhoto because I want to have a copy on my iPhone to show people and I wanted to have it available as part of a slideshow I am making in iPhoto of my recent overseas trip. It is a pain that there is no simple orientating tool for the movie clips downloaded to iPhoto with the photos from the one camera.

  • Cannot find symbol class Scanner

    hi all
    i'm defining a class within a project so i can use the class inside my program, but the line:
    Scanner keyboard = new Scanner(System.in);generates an error with my compiler:
    cannot find symbol class Scanner
    please help

    you aren't using jdk 5 or higher then. that's when scanner was added to the jdk.
    download a modern jdk and you'll be fine.
    %

  • "cannot find symbol : class Scanner"  error message

    I have an error message that says:
    "cannot find symbol : class Scanner"
    I tried typing at the top of the program
    import java.util.Scanner;but I still have the same error message.
    What should I do ?
    Thank you in advance

    http://java.sun.com/j2se/1.5.0/docs/api/java/util/Scanner.html
    Since:
    1.5
    look at the javadoc, it says since 1.5 so it's not there in earlier versions.
    just a guess

  • "cannot find symbol class studentList" error

    Hi I get this error
    "cannot find symbol class studentList", but this class is at the same file and also it is in the same folder. so what's wrong .. and I checked the spelling it's the same.
    I should create an object named myList of type studentList
    and second, I call method menu() and pass it myList as actual parameter.
    so I called the function menu which is should be in the main too
    like this
    myList.menu();
    and menu method accepts as parameter an object of type studentList. and display the menu for the user to choose..
    here is part my program:
    public class ListTest
    {  public void menu(Student L) // accepts parameter
                   System.out.println("");
                System.out.println("Choose a number between 1 to 4");
                      System.out.println("1-Print Info of A Student ");          
                System.out.println("2-Print Info of All Students ");                          
               System.out.println("3-Display grade of A Specific student");                           
                System.out.println("4-Exit");
                System.out.println("");        
              int choice = Stdin.readInteger();
              while (choice != 5)
             switch (choice) {
                 case 1:
             L.PrintAStudent(int L);
             break;
              case 2:
            L.PrintAll();
            break;     
              case 3:
              L.DisplayGPA();
              break;
                 case 3:
                System.exit(0);
               break;
               default:
               System.out.println("wrong Number");
              System.out.println("Enter a number between 1 to 4 ");
               System.out.println("Enter 4 to Exit");
                break;
                System.out.println("");
                System.out.println("Choose a number between 1 to 4");
                System.out.println("1-Print Info of A Student ");          
                System.out.println("2-Print Info of All Students ");                          
               System.out.println("3-Display grade of A Specific student");                           
                System.out.println("4-Exit");
                System.out.println(""); 
                choice = Stdin.readInteger();
         }// end method menu
         public static void main(String args[ ])
         { studentList myList = new studentList();//myList object is created
    myList.menu();
                             }//end main
    }// end of class ListTest
              

    you have mentioned about the class "studentList" but that class is not to be found in the code you have pasted. its instead "ListTest". And the "menu" function seems to b a part of "ListTest" class. Can you provide the structure of the classes "studentList" and "Student" so that the problem can be more clearly understood?
    also you are using the variable "Stdin" in the line int choice = Stdin.readInteger(); where as you have not declared this variable.
    in the "switch" statement you are calling two different functions for the same case "3" where as it should be "case 3" and "case 4" respectively.
    in the "main" you are calling the "menu" function without any parameter while you actually want to pass argument of type "studentList".

  • Applied an update to an app that records blood pressure. Am unable to retr ieve previously stored info. When following directions in update I cannot "add" data to import because message states data are stored elsewhere and I cannot find where. Help?

    Applied an update to an app that records blood pressure. Am unable to retrieve previously stored info. When following directions in update, I cannot "add" data to import because message states data are stored elsewhere, and I cannot find where. Help?

    You'll have to contact the app developer for help with this.

  • Cannot find the class file for com.sap.portal.services.api.connectorgateway

    Hi,
    I was trying the "How to BI JAVA SDK in a Portal iView and get the following error.
    The project was not built since its classpath is incomplete. Cannot find the class file for com.sap.portal.services.api.connectorgateway.IConnectorGatewayService. Fix the classpath and try rebuilding this project.
    I have the following in my portalapp.xml file
    <property name="SharingReference" value="com.sap.portal.ivs.connectorservice"/>
    and i have also added the jar file "com.sap.portal.ivs.connectorservice_api" in the set of lib's
    Has some faced a similar issue? or can someone suggest how I could possibly resolve this.
    Thanks,
    Smitha

    Hi Smitha:
       My webdynpro dc was build failed for "This compilation unit indirectly references the missing type com.sap.engine.services.webservices.espbase.client.dynamic.content.GenericObject (typically some required class file is referencing a type outside the classpath)".
    How should i do?  Thank you!

  • Why IE5 could not find applet class but Netscape can ?

    Hi,
    I have an applet which is running fine on Netscripts6,
    But not on IE5.
    <APPLET codebase="http://10.1.1.1/demo/" code="ClientApplet.class" HEIGHT=300 WIDTH=300>
    <PARAM NAME="relay" VALUE="1">
    I have all class files under demo directory(the same directory as html file).
    IE5.0 still could not find applet class but Netscript can.

    are you sure its failing to load your classes or is it failing to load a class you are using?
    Remember IE only uses things from 1.1 so simple things like component.getHeight() does not work you have to use size().height
    Its woth enabling the java console and viewing the exact problem.

Maybe you are looking for

  • Can't get messages from icloud

    I have me.com account and it was working fine, I tried to send and email with a big file attached but it could not send it. After that I delete the message and tried to send a new mail but it is working as it is reading mail but it doesn't do anythin

  • ChaRM transport not getting created

    Hi Experts, I am in SP20 EHP1. I am configuring ChRm flow. I have made the copy of SDHF to ZSHF. I have completed all the configurations.  I have made the copy of all the actions & statuses. I am having two actions in ZSHF while creating the transpor

  • How to properly close task flow opened in new window?

    Have a question on the best practice to properly close a task flow when it has been opened in a new window. We are opening multiple bounded task flows concurrently in new windows but want to make sure the task flows are properly cleaned up. Scenario

  • Writeback issue

    Hi, i'm implementing writeback functionality. I have a table with an update button. Clicking on i update table with modification made by users on records. My table contains also a flag column. If user insert YES, it means that modifications are accep

  • Corrupt Winword source files

    Hello to all RoboHelp gurus & users I did not find anything about this in the archives so here is my current issue. I am fine tuning the formatting before releasing one of my CHM Help File (HTML Help File generated with RH for Word X5.0.1 and Word 20