JSP Compilation Problem - Cannot Resolve Symbol

I cannot see the problem. Maybe I am not sober at 2:30 am.
<%
Collection postBeans = ( Collection )request.getAttribute( "PostBeans" );
Iterator iterator = postBeans.iterator();
int i = 0;
while( iterator.hasNext() )
      PostBean postBean = (PostBean)iterator.next();
   i++;
   String background;
   if ( postBean.getParentPostID() == 0 )
      background = "#FFCE9C";
   else
      if ( ( i%2 ) != 0 )
         background = "#EEEEEE";
      else
         background = "#FFFFFF";
%>
<table width="95%" border="0" cellspacing="1" cellpadding="5" align="center" bgcolor="#999999">
  <tr bgColor=<%=background%>>
  </tr>
</table>I got compilation error: cannot resolve symbol
symbol: background

I put the variable 'background' outside the while loop. The 'cannot resolve symbol' problem is gone. But, I got another compilation error:
>
unexpected type
required: variable
found : value
out.write("\r\n }\r\n i++;\r\n if ( postBean.getParentPostID() == 0 ) \r\n {\r\n background = \"#FFCE9C\";\r\n }\r\n else \r\n {\r\n if ((i%2) != 0) \r\n {\r\n background = \"#EEEEEE\";\r\n } \r\n else \r\n {\r\n background = \"#FFFFFF\";\r\n }\r\n }\r\n%>\r\n");
The code looks like:
<%
String background;
Collection postBeans = ( Collection )request.getAttribute( "PostBeans" );
Iterator iterator = postBeans.iterator();
int i = 0;
while( iterator.hasNext() )
      PostBean postBean = (PostBean)iterator.next();
   i++;
   if ( postBean.getParentPostID() == 0 )
      background = "#FFCE9C";
   else
      if ( ( i%2 ) != 0 )
         background = "#EEEEEE";
      else
         background = "#FFFFFF";
%>
<table width="95%" border="0" cellspacing="1" cellpadding="5" align="center" bgcolor="#999999">
  <tr bgColor=<%=background%>>
  </tr>
</table>

Similar Messages

  • Compilation problem (cannot resolve symbol)

    I have searched the Forums for "cannot resolve symbol" and as usual, many posts with no answers or just advise that noone ever comes back to say works. I am trying to compile this code:
    import java.io.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.naming.*;
    import org.acme.*;
    public class HelloOpenEJB extends HttpServlet {
    String factory = "org.openejb.client.LocalInitialContextFactory";
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException {
    PrintWriter out = response.getWriter();
    try{
    Properties p = new Properties();
    p.put(Context.INITIAL_CONTEXT_FACTORY, factory );
    InitialContext ctx = new InitialContext( p );
    //Lookup the bean using it's deployment id
    Object obj = ctx.lookup("/Hello");
    HelloHome ejbHome = (HelloHome) obj;
    //Use the HelloHome to create a HelloObject
    HelloHome ejbHome = (HelloHome)
    PortableRemoteObject.narrow(obj, HelloHome.class);
    //The part we've all been wainting for...
    out.println("<html>");
    out.println("<body>");
    out.println("<head>");
    out.println("<title>Hello World!</title>");
    out.println("</head>");
    out.println("<body>");
    out.println("<h1>"+ ejbObject.sayHello() +"</h1>");
    out.println("</body>");
    out.println("</html>");
    } catch (Exception e){
    response.setContentType("text/plain");
    e.printStackTrace(out);
    I'm running this on a Linux box. When I compile, I get this:
    HelloOpenEJB.java:28: ejbHome is already defined in doGet(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
    HelloHome ejbHome = (HelloHome)
    ^
    HelloOpenEJB.java:29: cannot resolve symbol
    symbol : variable PortableRemoteObject
    location: class HelloOpenEJB
    PortableRemoteObject.narrow(obj, HelloHome.class);
    ^
    HelloOpenEJB.java:38: cannot resolve symbol
    symbol : variable ejbObject
    location: class HelloOpenEJB
    out.println(""+ ejbObject.sayHello() +"");
    ^
    3 errors
    I don't know why any of these errors are occuring, besides the obvious responses given back from javac, so can someone help? Thanks, Jeremy

    The error message "x already defined in y" means that you're trying to use a name that already exists in the current scope. In your case you have:
    HelloHome ejbHome = (HelloHome) obj;
    //Use the HelloHome to create a HelloObject
    HelloHome ejbHome = (HelloHome)
    PortableRemoteObject.narrow(obj, HelloHome.class);Here you are trying to declare two instances of HelloHome with the same name.
    The reason that you would get "cannot resolve symbol" is that you are trying to access a variable or class that you haven't declared or imported.

  • Compiler error cannot resolve symbol

    Hi people,
    i'm having this compile time error that, when i create a class and calling that class in another class gives the error cannot resolve symbol classname and it also happened when i created a bean and referencing the bean class in another bean when i'm using Jsp. thanks in advance.

    It would be helpful if you post the exact error message. If you use a system Classpath, then it must contain the root directory for the package directory(s).
    For example, if the source code for a file starts with
    package my.package;
    and you have a directory structure c:\myjava\classes\my\package then the Classpath must contain c:\myjava\classes.

  • Newbie problem: "cannot resolve symbol"

    I'm working through some tutorials but I get errors even if i get the code CORRECT or I should say identical to the source code displayed on the web. For instance i get this:
    E:\Java\New>javac SwingUI.java
    SwingUI.java:41: not a statement
              WindowListener 1 = new WindowAdapter() {
    ^
    SwingUI.java:41: ';' expected
              WindowListener 1 = new WindowAdapter() {
    ^
    SwingUI.java:4: cannot resolve symbol
    symbol : class ActionListener
    location: class SwingUI
    class SwingUI extends JFrame implements ActionListener {
    ^
    SwingUI.java:25: cannot resolve symbol
    symbol : class ActionEvent
    location: class SwingUI
         public void actionPerformed(ActionEvent event){
    ^
    SwingUI.java:15: addActionListener(java.awt.event.ActionListener) in javax.swing.AbstractButton cannot be applied to (SwingUI)
              button.addActionListener(this);
    ^
    SwingUI.java:18: cannot resolve symbol
    symbol : class Borderlayout
    location: class SwingUI
              panel.setLayout(new Borderlayout());
    ^
    SwingUI.java:46: addWindowListener(java.awt.event.WindowListener) in java.awt.Window cannot be applied to (int)
              frame.addWindowListener(1);
    ^
    SwingUI.java:48: cannot resolve symbol
    symbol : variable set
    location: class SwingUI
              frame.set.Visible(true);
    ^
    8 errors
    The beginning of the code is:
    import java.awt.Color;
    import java.awt.BorderLayout;
    import java.awt.event.*;
    import javax.swing.*;
    class SwingUI extends JFrame implements ActionListener {
         JLabel text, clicked;
         JButton button, clickButton;
         JPanel panel;
         private boolean _clickMeMode = true;
         SwingUI(){
              text=new JLabel("I'm a simple program");
              button= new JButton("Click here!");
              button.addActionListener(this);
              panel =new JPanel();
              panel.setLayout(new Borderlayout());
              panel.setBackground(Color.white);
              getContentPane().add(panel);
              panel.add(BorderLayout.CENTER, text);
              panel.add(BorderLayout.SOUTH, button);
    To me it seems as if there is a problem with my environmental settings and/or with the "import" files, but wouldn't that yield different error messages?
    I'm running j2sdk1.4.0_01 on windows2000 professional
    I should say that simple programs compile without errors.
    thx
    /Hans

    The letter 'l' is very similar to the number 1 in certain fonts unfortunately.
    /Hans

  • Compiling error - cannot resolve symbol

    Hi,
    I am working on writing out this basic code for a project. When I compile, I get an error "Cannot resolve symbol" for the gpa variable. Please help!
    My intention is to use the hours and points from the crHours and nbrPoints methods, and use them to calculate GPA in the grPtAvg method:
    public class Student
         public static void main(String[]args)
    idNum();
    crHours();
    nbrpoints();
    gpa = grPtAvg(hours, points);
    System.out.println("Student's GPA is " + gpa);
    public static void idNum()
    int id = 2520;
    System.out.println("Student's ID is " + id);
    public static float crHours()
    float hours = 5;
    System.out.println("Student's credit hours are " + hours);
    return hours;
    public static float nbrpoints()
    float points = 22;
    System.out.println("Student's earned points are " + points);
    return points;
    public static float grPtAvg(float hours, float points)
    float gpa;
    gpa = points / hours;
    System.out.println("Student's computed GPA is " + gpa);
    return gpa;

    That's because you're doing the same thing (in a somewhat different way) with those.
    The variables: hours and points have already been returned to main methd, right?Yes, but then the main method ignores them.
    So, they should be available at this point in the code, is that right?Available in the sense that you can read them, but not in the sense that there are hours and points variables within scope in the main method.
    You want to do this:
    public static void main(String[] args) {
       idNum();
       float hours = crHours();
       float points = nbrpoints();
       //create a new float
       float myComputetdGpa = grPtAvg(hours, points);
       System.out.println("Student's GPA is " + myComputedGpa);
    }

  • Javac compiler Error - cannot resolve symbol - symbol  StringBuilder?

    Hi ,
    I am using hp - ux system with java version "1.4.2.06". when i try to compile a program called CharSequenceDemo.java which is found in the java tutorials at this link
    [CharSequenceDemo.java|http://java.sun.com/docs/books/tutorial/java/IandI/examples/CharSequenceDemo.java]
    i get the following error:
    $/opt/java1.4/bin/javac CharSequenceDemo.java
    CharSequenceDemo.java:38: cannot resolve symbol
    symbol : class StringBuilder
    location: class CharSequenceDemo
    StringBuilder sub =
    ^
    CharSequenceDemo.java:39: cannot resolve symbol
    symbol : class StringBuilder
    location: class CharSequenceDemo
    new StringBuilder(s.subSequence(fromEnd(end), fromEnd(start)));
    ^
    CharSequenceDemo.java:44: cannot resolve symbol
    symbol : class StringBuilder
    location: class CharSequenceDemo
    StringBuilder s = new StringBuilder(this.s);
    ^
    CharSequenceDemo.java:44: cannot resolve symbol
    symbol : class StringBuilder
    location: class CharSequenceDemo
    StringBuilder s = new StringBuilder(this.s);
    ^
    4 errors
    Please help on how to compile this program.

    I've been struggling with the same issue. The difference is that my system says I'm using version 1.6.0_05. I've tried running jucheck.exe. It tells me I've got the latest version installed.
    Here is the code:
    import java.lang.StringBuilder;
    import java.util.Formatter;
       public class UsingFormatter {
         public static void main(String[] args) {
           if (args.length != 1) {
             System.err.println("usage: " +
               "java format/UsingFormatter <format string>");
             System.exit(0);
           String format = args[0];
           StringBuilder stringBuilder = new StringBuilder();
           Formatter formatter = new Formatter(stringBuilder);
           formatter.format("Pi is approximately " + format +
             ", and e is about " + format, Math.PI, Math.E);
           System.out.println(stringBuilder);
       }When I type javac UsingFormatter.java, I get:
    UsingFormatter.java:1: cannot resolve symbol
    symbol : class StringBuilder
    location: package lang
    import java.lang.StringBuilder;
    ^
    UsingFormatter.java:2: cannot resolve symbol
    symbol : class Formatter
    location: package util
    import java.util.Formatter;
    ^
    UsingFormatter.java:14: cannot resolve symbol
    symbol : class StringBuilder
    location: class UsingFormatter
    StringBuilder stringBuilder = new StringBuilder();
    ^
    UsingFormatter.java:14: cannot resolve symbol
    symbol : class StringBuilder
    location: class UsingFormatter
    StringBuilder stringBuilder = new StringBuilder();
    ^
    UsingFormatter.java:15: cannot resolve symbol
    symbol : class Formatter
    location: class UsingFormatter
    Formatter formatter = new Formatter(stringBuilder);
    ^
    UsingFormatter.java:15: cannot resolve symbol
    symbol : class Formatter
    location: class UsingFormatter
    Formatter formatter = new Formatter(stringBuilder);
    ^
    6 errors
    The compiler refuses to recognize the symbols StringBuilder and Formatter.
    I have spent hours googling for an answer and trying every suggestion. Nothing works, not even the one about dropping the computer from the rooftop.
    Ultimately, what I'm trying to accomplish (in a different program) is to use a text file as a form letter template and replace the %s placeholders with stings from my form object.
    Any advice?
    Edited by: javastudent_99 on Apr 3, 2008 1:48 PM

  • Compile error - cannot resolve symbol

    Hello,
    I am trying this code although I get compile errors as stated.
    import java.util.Scanner;
    * Write a program that reads 10 numbers from the keyboard into
    * an array and then prints the list of numbers
    * Modify the above program so that it prints the numbers in reverse order
    class Keyboard
      public static void main (String[] argStrings)
         System.out.println("Enter 10 numbers please");
         Scanner scan = new Scanner(System.in);
         int[] newArray = new int[10];
         for(int i = 0; i < 10; i++)
              newArray[i] = scan.nextInt();
         System.out.println();
         for(int i = 9; i > 0; i--)
              System.out.print(newArray);
    System.out.println();
    I have googled for solutions but have had no luck or could not understand.
    Please could someone explain what is going on.
    Cheers

    E:\Documents and Settings\John\Desktop\Computing\Programming\Weeks\Week11\Keyboard.java:1: cannot resolve symbol
    symbol : class Scanner
    location: package util
    import java.util.Scanner;
    ^
    E:\Documents and Settings\John\Desktop\Computing\Programming\Weeks\Week11\Keyboard.java:15: cannot resolve symbol
    symbol : class Scanner
    location: class Keyboard
         Scanner scan = new Scanner(System.in);
    ^
    E:\Documents and Settings\John\Desktop\Computing\Programming\Weeks\Week11\Keyboard.java:15: cannot resolve symbol
    symbol : class Scanner
    location: class Keyboard
         Scanner scan = new Scanner(System.in);
    ^
    3 errors
    Tool completed with exit code 1
    cheers

  • Code won't compile!  (cannot resolve symbol)

    I'm having trouble compiling some code. Do any of you guys know why this won't work?
    * Simulation of one die (now modified for multiple with inheritance)
    * @author Kristian Hermansen
    * @version 3/14/2004 (Section 2 honors)
    public class Experiment1 extends DiceExperiment
    // instance variables
    int numSides = 6;
    int numDice = 1;
    int lowCombo = 1;
    Object[] obj;
    int[] array;
    public Experiment1()
    obj = new Object[lowCombo];
    array = new int[(numSides * numDice) + 1];
    for(int i=0; i < obj.length; i++)
    obj[i] = new Die();
    // this constructor takes arguments for number of number of dice, die sides,
    // and number of lowest side. Trying to be as generic as possible to permit
    // inheritance. We assume that all dice are the same for this application.
    public Experiment1(int dice, int sides, int low)
    numSides = sides;
    numDice = dice;
    lowCombo = numDice * low;
    obj = new Object[lowCombo];
    array = new int[(numSides * numDice) + 1];
    for(int i=0; i < obj.length; i++)
    obj[i] = new Die();
    // throws one die 2000 times and saves all the results in an int array
    public void runExperiment()
    int tally = 0;
    for(int i=0; i < 2000; i++)
    // this puts the counter for outcome k in the array indexed by k
    for(int j=0; j < obj.length; j++)
    tally += obj[j].roll();
    array[tally]++;
    makeBarGraph(array, lowCombo);
    The problem is in this line:
    tally += obj[j].roll();
    but it should work since I have the roll() method defined in the Die() class...
    * This class simulates a 6-sided die
    * @author Kristian Hermansen
    * @version 3/14/2004 (Section 2 Honors)
    import java.util.Random;
    public class Die
    // instance variables
    private static Random generator = new Random();
    private int num;
    * Constructor for objects of class Die
    public Die()
    // initialise instance variables
    num = roll();
    * This method simulates a roll
    public int roll()
    return (generator.nextInt(6) + 1);
    public String toString()
    return num + "";

    Bizarro World Error Message Theory: Error messages, whether from the compiler or the runtime, are not your enemy. They are the friend you know will always be honest with you, even when it hurts. They're telling you something's going wrong. Don't panic. It can be fixed.
    The error message will tell you exactly what it can't recognize.

  • Stop a known compile error (Cannot resolve symbol)

    I get a known compile error is their some way to stop this.
    Basically I call a reader in a method in my main class to be used in a threaded search.
    I only reset the reader when I want to so I can search for further results without starting from the start of the file again.
    I know that there is no way for the program to get to this point without having the filereader class loaded so I want to stop this error.
    Im thinking their is probably a way of putting in an if statement around my call to the search thread to check the object is in memory.
    Thanks for the help in advance.

    I get a known compile error is their some way to stop this. Yes, fix the code so it's syntactically correct. That's the only way to get rid of compiler errors.
    Im thinking their is probably a way of putting in an
    if statement around my call to the search thread to
    check the object is in memory.This isn't C/C++ with #define and #ifdef for preprocessor directives. What are you thinking?
    Fix your code and the compiler errors will go away.
    %

  • When i try to use max() & pow() in jdbc i get error "cannot resolve symbol"

    hi,
    when i tried to use pow() & max() in my jdbc programme i got compilation error "cannot resolve symbol".
    even i have imorted java.math
    this is the sample.
    pr1= (fy/(L*B*pow(10.0,-6.0))+((6*mx)/(L*B*B*pow(10.0,-6.0)))+((6*mz)/(B*L*L*pow(10.0,-6.0))));
    all of above are double.
    and with max();
    pr=max(pr1,pr2);
    all of above are double.
    please help.
    thanks in advance.
    satish

    hi
    Hartmut
    thanks hartmut;
    i am new in java so i have some problems, but thanks for helping me.
    please help me again.
    as i have already posted another probleme which i have with selecting 1000 rows 1 by 1 from a table & manipulate 1 by 1 on that and then store all manipulated row to another table.
    when i tried to do so i am able to select only 600 rows and manipulate them & store them.
    i did not get any exception or any error.
    can this possible that microsoft access driver has not that much capacity to provide 1000 rows or it is problem with jdbc.
    please help.
    satish
    thanks again.

  • JSP page "cannot resolve symbol"

    Hi,
    I'm using j2sdk1.4.2_01 and tomcat-5.0.13. I'm developing within Eclipse 3.0.0 with the Tomcat plugin.
    In my project ("Agenda2") i only created one class ("Persona"), that is correctely compiled (%TOMCAT_HOME%\webapps\Agenda2\WEB-INF\src\Persona.java results in %TOMCAT_HOME%\webapps\Agenda2\WEB-INF\classes\Persona.class, and 0 problems are shown in the Problems list.
    In %TOMCAT_HOME%\webapps\Agenda2 i have my Edit.jsp, that begins with these lines:
    <%@ page language="java" contentType="text/html" %>
    <HTML>
    <HEAD>
    <TITLE>Edit</TITLE>
    </HEAD>
    <BODY>
    <jsp:useBean id="personaAtt" class="Persona">
        <jsp:setProperty name="personaAtt" property="*" />
    </jsp:useBean>
    ....When i call the JSP from the browser, i get this error:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 8 in the jsp file: /Edit.jsp
    Generated servlet error:
        [javac] Compiling 1 source file
    C:\Programmi\Java\tomcat-5.0.13\webapps\Agenda2\work\org\apache\jsp\Edit_jsp.java:48: cannot resolve symbol
    symbol  : class Persona
    location: class org.apache.jsp.Edit_jsp
          Persona personaAtt = null;
          ^The error message mentions line 8, which is the one following <BODY>, that is
    <jsp:useBean id="personaAtt" class="Persona">My impression is that there is some path problem, but despite my tries i can't get it.
    The folders tree under %TOMCAT_HOME%\webapps\Agenda2\ is:
    -WEB-INF
    --classes
    --lib
    --src
    -work
    --org
    ---apache
    ----jspDoes anybody can see the problem ?

    Thanks! I'm going to try to put the class into a package as both you have suggested, and i'll post here the result.
    In the meantime i have a related newbie question:
    putting the class into a package, is this kind of a workaround, or it's the "normal thing" ?
    I mean, is it mandatory to put classes into a package in order to import them from JSP pages ?
    It was my understanding that it isn't mandatory, but - from your replies and many other posts in this forum - i'm starting to think that i'm wrong.

  • Error compiling EJB.jar  + cannot resolve symbol+while deploying

    I am getting following
    Error compiling EJB.jar , cannot resolve symbol ,Syntax error in source, am getting around 17 errors while deploying EAR generated using Jdev905 into standalone oc4jContainers(10g).
    Can anyone please help me out where is the problem.
    Regards,
    Anup

    cannot resolve symbol ,Syntax error in source
    indicates some jar file is not in the Classpath. Is j2ee.jar in the Classpath?

  • "cannot resolve symbol" when compiling a class that calls methods

    I am currently taking a Intro to Java class. This problem has my instructor baffled. If I have two classes saved in separate files, for example:
    one class might contain the constructor with get and set statements,
    the other class contains the main() method and calls the constructor.
    The first file compiles clean. When I compile the second file, I get the "cannot resolve symbol error" referring to the first class.
    If I copy both files to floppy and take them to school. I can compile and run them with no problem.
    If I copy the constructor file to the second file and delete the "public" from the class declaration of the constructor, it will compile and run at home.
    At home, I am running Windows ME. At school, Windows 2000 Professional.
    The textbook that we are using came with a CD from which I downloaded the SDK and Runtime Environment. I have tried uninstalling and reinstalling. I have also tried downloading directly from the Sun website and still the error persists.
    I came across a new twist tonight. I copied class files from the CD to my hard drive. 4 separate files. 3 of which are called by the 4th.
    I can run these with no problem.
    Any ideas, why I would have compile errors????
    Thanks!!

    Oooops ... violated....
    Well first a constructor should have the same name as the class name so in our case what we have actually created is a static method statementOfPhilosophy() in class SetUpSite and not a constructor.
    Now why does second class report unresolved symbol ???
    Look at this line
    Class XYZ=new XYZ();
    sounds familiar, well this is what is missing from your second class, since there is no object how can it call a method ...
    why the precompiled classes run is cuz they contain the right code perhaps so my suggestion to you is,
    1) Review the meaning and implementation of Constructors
    2) Ask your instructor to do the same ( no pun intended ... )
    3) Check out this for understanding PATH & CLASSPATH http://www.geocities.com/gaurav007_2000/java/
    4) Look at the "import" statement, when we have code in different files and we need to incorporate some code in another it is always a good idea to use import statement, that solves quite a few errors.
    5) Finally forgive any goof up on this reply, I have looked at source code after 12 months of hibernation post dot com doom ... so m a bit rusty... shall get better soon though :)
    warm regards and good wishes,
    Gaurav
    CW :-> Mother of all computer languages.
    I HAM ( Radio-Active )
    * OS has no significance in this error
    ** uninstalling and reinstalling ? r u nuttttttts ??? don't ever do that again unless your compiler fails to start, as long as it is giving a valid error it is working man ... all we need to do is to interpret the error and try to fix the code not the machine or compiler.

  • Problem using PixelGrabber ( cannot resolve symbol ) - newbie

    Hi All,
    I have a problem with my short program because the compiler write this (jdk1.4) :
    img.java:17: cannot resolve symbol
    symbol : constructor PixelGrabber (java.awt.Image,int,int,int,int,int[],int)
    location: class java.awt.image.PixelGrabber
    PixelGrabber pg = new PixelGrabber(image,0,0,image.getWidth(this
    ),image.getHeight(this),pixels,0);
    ^
    1 error
    ... And I wrote that in my code :
    ( all is OK, the bug is only when I uncomment the line where the PixelGrabber object
    is needed in my program ).
    Thanks if you have any idea of solution to solve this problem or a doc,
    ( I don't find the answer to my problem in http://java.sun.com/j2se/1.4/docs/api/java/awt/image/PixelGrabber.html ),
    import java.awt.*;
    import java.awt.image.*;
    import java.applet.*;
    import java.awt.image.PixelGrabber;
    public class img extends Applet {
    Image image;
    int pixels[];
    public void init() {
    image = getImage(getDocumentBase(), "rouge.jpg");
    pixels = new int[image.getWidth(this) * image.getHeight(this)];
    PixelGrabber pg = new PixelGrabber(image,0,0,image.getWidth(this),image.getHeight(this),pixels,0);
         pg.grabPixels();
    public void paint(Graphics g) {
              String s = Integer.toString(pixels[5], 16);
              g.drawString(s, 50, 50);

    Hi,
    PixelGrabber needs one more parameter scansize (width).
    change this line;
    PixelGrabber pg = new PixelGrabber(image,0,0,image.getWidth(this),image.getHeight(this),pixels,0);
    to:
    PixelGrabber pg = new PixelGrabber(image,0,0,image.getWidth(this),image.getHeight(this),pixels,0, image.getWidth(this)
    );

  • Java Bean Error in JSP: Cannot Resolve Symbol FirstBean

    I have created a java bean with following package statement
    package mybeans;
    and my bean name is
    FirstBean
    it compile secessfully and now my directory structure is following
    WebAppRootDir \ WEB-INF \ classes \ mybeans \ FirstBean.class
    I am using Tomcat 4.1 and in JSP i am declaring the bean with following line
    <jsp:useBean id="b" class="mybeans.FirstBean" />
    and tomcat 4.1 is failed to find this bean and giving me following error
    cannot resolve symbol
    symbol  : class StudentBean 
    location: package mybeans
    mybeans.FirstBean b = null;
    all my class and directory structure is ok i am puzzle why this error is coming, plz help me quickly i need solution quickly ...

    Error is for StudentBean, not for FirstBean. So check for it.

Maybe you are looking for

  • My iTouch4 no longer shows up under Devices in i-Tunes, nor will it sync?

    My iTouch 4 no longer shows up in iTunes as a device, nor does it sync, or create updates. Help?

  • HP 8500 A909g kills wirless network

    Hi all, I have a Telstra (Australia) mobile broadband modem.  The modem's built-in DHCP server assigns 10.0.0.1 to the printer,  10.0.0.2 to the old Compaq laptop and 10.0.0.3 to the new, replacement laptop, and HP Envy 17. The issue is that while th

  • There are no notifications for your produce

    Hi I have now  Lap VIEW 2013 and I tried to dowload LabVIEW Control Design and Simulation Module after following the process a message shows that "There are no notifications for your products". Even if I have closed window firewall and setted the fil

  • Why is hide not working in photomerge

    why is hide not working in photomerge

  • How can I load font in real device?

    I am building mobile text SMS in my native country language using j2me wireless toolkit. But I face one problem. Without installing font in windows font directory, I did not display my country font. I used Unicode for my project. My question is: * Ho