Unable to fix this error : Can any one help!!

This error is comming:
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 13 in the jsp file: /form1.jsp
Generated servlet error:
C:\Apache\Tomcat5.0\work\Catalina\localhost\Bidding\org\apache\jsp\form1_jsp.java:68: cannot find symbol
symbol : variable userbean
location: class org.apache.jsp.form1_jsp
          userbean=(UserBean)ub.get(i);
^
An error occurred at line: 13 in the jsp file: /form1.jsp
Generated servlet error:
Note: C:\Apache\Tomcat5.0\work\Catalina\localhost\Bidding\org\apache\jsp\form1_jsp.java uses unchecked or unsafe operations.
An error occurred at line: 13 in the jsp file: /form1.jsp
Generated servlet error:
Note: Recompile with -Xlint:unchecked for details.
1 error
user.java
=======
import java.io.*;
import java.util.*;
import java.sql.*;
public class User implements Serializable
     //UserService userService;
     public User(){}
     public List<UserBean> getUsers()
          Connection con=null;
          List<UserBean> users=new ArrayList<UserBean>();
          try{
               Class.forName("com.mysql.jdbc.Driver");
                con= DriverManager.getConnection("jdbc:mysql://port number/Bidding","mysql","password");
               PreparedStatement ps=con.prepareStatement("select * from User");
               ResultSet rs=ps.executeQuery();
               UserBean userBean=new UserBean();
               while (rs.next())
               userBean.setUserEmailID(rs.getString(3));
               userBean.setUserPassword(rs.getString(4));
               users.add(userBean);
               catch(Exception e){
                        e.printStackTrace();
                         System.out.println(e);
                    }finally{
                         try{
                              con.close();
                         }catch(Exception e){
return users;
}//UserService
}//User------------------------------------------------------
my bean class(User.java)
====
package com.pennywise;
import java.io.*;
import java.util.*;
public class UserBean implements Serializable
     public UserBean(){}
     public void setUserEmailID(String s)
          ueid=s;
     public String getUserEmailID()
          return ueid;
     public void setUserPassword(String s)
          pwd=s;
     public String getUserPassword()
          return pwd;
     private String pwd,ueid;
LoginServlet.java
====
public class LoginServlet extends HttpServlet
{//�
     public void doGet(HttpServletRequest req,HttpServletResponse res)throws ServletException,IOException
          User users=new User();
     List<UserBean> userlist=users.getUsers();
     req.setAttribute("USERS_LIST", userlist);
form1.jsp
=======
<html>
<body>
     <%@ page import="java.util.*"%>
     <%@ page import="java.sql.*"%>
     <%@ page import="javax.servlet.http.*"%>
     <%@ page import="java.io.*"%>
     <%@ page import="com.pennywise.UserBean"%>
     <%
     List<UserBean> ub=(List<UserBean>)request.getAttribute("USERS_LIST");
     //UserBean userbean = null;
     out.println(ub);
     for (int i=0;i<ub.size();i++)
          userbean=(UserBean)ub.get(i);
          //out.println(userbean);
          String s1= userbean.getUserEmailID();
          String s2=userbean.getUserPassword();
          out.println(s1);
          out.println(s2);
     }%>
</body>
</html>

Uncomment this UserBean userBean=null; in form1.jsp and execute it again.

Similar Messages

  • Hai iam Iliyas . I try to restore ios 6.1.4 from ios7.0 but iam getting an error 3194 so how to fix this issue can any one help me plz....

    Hai Iam Iliya. Iam facing a problem with my Iphone that i tryed to restore back to ios 6.1.4 using itunes but it's giving me an error like "iphone cound not be restore due to an internal erroe 3194" so can any one help to fix my problem.. plzzz.

    You cannot go back to iOS 6. You have probably ruined your phone by trying to do that. We canno help you here. Sorry.

  • I am not able to register my Apple ID for iCloud and the error is "the maximum no of free accounts have been activated on this phone" can any one help me why I need to do

    I am not able to register my Apple ID for iCloud and the error is "the maximum no of free accounts have been activated on this phone" can any one help me why I need to do

    Sir, your Apple ID can be used as an iCloud account as well. They are both the same thing.
    You can learn more from --> Set up your Apple ID for iCloud and iTunes - Apple Support

  • HT204053 i got this massege on my iphone the maximum number of free accounts have been activated on this iphone can any one help?

    i got this massege on my iphone the maximum number of free accounts have been activated on this iphone can any one help?

    This restriction has no relation to creating free accounts, it means you may not sign in to another free account, on that iDevice because the serial number of the device (on apple's server) has their limit of free accounts associated to it. the only way around this is to use one of the three free accounts on the device which the server has associated, OR have apple reset the account/remove the restriction for that serial number...This has been posted in dozens of discussions, but they continue to ingnore the problem, what's worse is the telephone support is RUDE about it if you inquire.

  • My iphone 5s is in recovery mode and when i try to restore it itunes says it cant because an unknown error can any one help ????

    help

    Hi annmarie186,
    If you are having issues restoring your iPhone, you may find the following articles helpful:
    Apple Support: If you can't update or restore your iOS device
    http://support.apple.com/kb/ht1808
    Apple Support: Resolve iOS update and restore errors in iTunes
    http://support.apple.com/kb/ts1275
    Regards,
    - Brenden

  • Can any one help me to code a browser

    hi ,
    I am Anil, I am doing an application in java. it needs a browser as IE or Morzilla . i tried to implement the browser using jdic.
    i add jdic.jar files as a external jar file and added it to my project. when i run the program in eclipse it works fine. when i want to create a jar file to my application it shows the follwing error..
    when i click on that jar file , it shows a Java Virtual Machine Launcher dialog box and in that dialog box it shows error Could not Find the main class. Program will exit ..
    this is the error.
    can any one help me to over come the error or any alternative method to implement a browser..

    DarrylBurke wrote:
    Corss poster!
    [http://www.java-forums.org/advanced-java/30298-how-write-job-aggregator-java-j2ee.html]
    dbNot anymore, Fubarable has axed that thread.

  • Hi i am getting an error like this while installing Live Cycle Server " The file merge_modules\lc11_common_iam_zip does not exist This file is required sucessfullly run the  Live Cycle Installer.Can any one help me on resolving this issue it would be of g

    Hi i am getting an error like this while installing Live Cycle Server " The file merge_modules\lc11_common_iam_zip does not exist This file is required sucessfullly run the  Live Cycle Installer.Can any one help me on resolving this issue it would be of great help..thanks .

    I think in your situation it would be worth trying the things listed under the event. It does have to do with FRS and it's easy to do. I've used it to fix journal errors after a server unexpectedly restarts and sysvol stops replicating.  I
    could see where it could fix your issue, and if it doesn't, you're out 5 minutes. :)
    The listed registry key does not exist
    Expand HKEY_LOCAL_MACHINE. 
    Click down the key path: 
       "System\CurrentControlSet\Services\NtFrs\Parameters" 
    Double click on the value name 
       "Enable Journal Wrap Automatic Restore" 
     

  • I can't sync my iPad to the iTunes it's give me an unknown error  message 0xe8000012 I don't know how to fix it and where is the problem could be need format or the problem is in the charging port please can any one help me

    I can't sync my iPad to the iTunes it's give me an unknown error  message 0xe8000012 I don't know how to fix it and where is the problem could be need format or the problem is in the charging port please can any one help me

    Unknown Error containing "0xE" when restoring
    To resolve this issue, follow the steps in iPhone, iPad, iPod touch: Unknown error containing '0xE' when connecting. If you have a Windows computer with an Intel® 5 series/3400 series chipset, you may need updates for your chipset drivers. See iTunes for Windows: Issues syncing iOS devices with P55 and related Intel Chipsets for more information.
    From Here  >  http://support.apple.com/kb/TS3694

  • I am restoreing my iphone 3g and on the instaling frameware i keep getting a code 1604 can any one help me with what i am ment to do when i get this error

    as title can any one help me thank you

    Error 1604
    This error is often related to USB timing. Try changing USB ports, using a different dock connector to USB cable, and other available USB troubleshooting steps (troubleshooting USB connections. If you are using a dock, bypass it and connect directly to the white Apple USB dock connector cable. If the issue persists on a known-good computer, the device may need service.
    If the issue is not resolved by USB isolation troubleshooting, and another computer is not available, try these steps to resolve the issue:
    Connect the device to iTunes, confirm that the device is in Recovery Mode. If it's not in Recovery Mode, put it into Recovery Mode.
    Restore and wait for the error.
    When prompted, click OK.
    Close and reopen iTunes while the device remains connected.
    The device should now be recognized in Recovery Mode again.
    Try to restore again.
    If the steps above do not resolve the issue, try restoring using a known-good USB cable, computer, and network connection.

  • Hi i am unable to send mail from yahoo mail id.can any one help on this?

    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    import java.io.*;
    import java.util.Properties;
    public class MailClient
      public void sendMail(String mailServer, String from, String to,
                                 String subject, String messageBody,
                                 String[] attachments) throws
    MessagingException, AddressException
             // Setup mail server
             Properties props = System.getProperties();
             props.put("mail.smtp.host", mailServer);
             // Get a mail session
             Session session = Session.getDefaultInstance(props, null);
             // Define a new mail message
             Message message = new MimeMessage(session);
             message.setFrom(new InternetAddress(from));
             message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
             message.setSubject(subject);
             // Create a message part to represent the body text
             BodyPart messageBodyPart = new MimeBodyPart();
             messageBodyPart.setText(messageBody);
             //use a MimeMultipart as we need to handle the file attachments
             Multipart multipart = new MimeMultipart();
             //add the message body to the mime message
             multipart.addBodyPart(messageBodyPart);
             // add any file attachments to the message
             addAtachments(attachments, multipart);
             // Put all message parts in the message
             message.setContent(multipart);
             // Send the message
             Transport.send(message);
         protected void addAtachments(String[] attachments, Multipart multipart)
                         throws MessagingException, AddressException
             for(int i = 0; i<= attachments.length -1; i++)
                 String filename = attachments;
    MimeBodyPart attachmentBodyPart = new MimeBodyPart();
    //use a JAF FileDataSource as it does MIME type detection
    DataSource source = new FileDataSource(filename);
    attachmentBodyPart.setDataHandler(new DataHandler(source));
    //assume that the filename you want to send is the same as the
    //actual file name - could alter this to remove the file path
    attachmentBodyPart.setFileName(filename);
    //add the attachment
    multipart.addBodyPart(attachmentBodyPart);
    public static void main(String[] args)
    try
    MailClient client = new MailClient();
    String server="pop3.yahoo.com";
    String from="[email protected]";
    String to = "[email protected]";
    String subject="Test";
    String message="Testing";
    String[] filenames = {"c:\\gopi.txt"};
    client.sendMail(server,from,to,subject,message,filenames);
    catch(Exception e)
    e.printStackTrace(System.out);     
    while compliling this one its compiled succesfully but i am getting exception at run time like..D:\mail>java MailClient
    Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/activation/re
    gistries/MailcapFile
    at javax.activation.MailcapCommandMap.loadFile(MailcapCommandMap.java:275)
    at javax.activation.MailcapCommandMap.<init>(MailcapCommandMap.java:128)
    at javax.activation.CommandMap.getDefaultCommandMap(CommandMap.java:44)
    at javax.activation.DataHandler.getCommandMap(DataHandler.java:136)
    at javax.activation.DataHandler.getDataContentHandler(DataHandler.java:568)
    at javax.activation.DataHandler.getContent(DataHandler.java:501)
    at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1253)
    at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:2012)
    at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1980)
    at javax.mail.Transport.send(Transport.java:97)
    at MailClient.sendMail(MailClient.java:35)
    at MailClient.main(MailClient.java:72)
    can any one help on this....plz
    thanks in advance
    Edited by: Konapalli.Gopi on May 20, 2010 5:42 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Something's wrong with your CLASSPATH.
    If you're not using JDK 6, you need to include activation.jar in your CLASSPATH.
    If you've got any other jar files that define the javax.mail.* or javax.activation.* classes
    in your CLASSPATH (such as javaee.jar or j2ee.jar), remove them.

  • I can no longer back up my iphone to my computer on selecting 'sync'. I can back up to iCloud but I get an error message telling me I cannot backup to my Mac. Can any one help? It's driving me crazy!

    I can no longer back up my iphone to my computer on selecting 'sync'. I can back up to iCloud but I get an error message telling me I cannot backup to my Mac. Can any one help? It's driving me crazy!

    Hello joelfromn. charleston,
    It seems you are unable to activate iMessage on a device with no carrier service. The following article provides information regarding activation issues:
    If you get an error when trying to activate iMessage or FaceTime - Apple Support
    Check your device settings
    Make sure that you’re connected to a cellular data or Wi-Fi network. If you're using an iPhone, you'll need SMS messaging to activate your phone number with iMessage and FaceTime. Depending on your carrier, you might be charged for this SMS.
    Go to Settings > General > Date & Time and make sure that your time zone is set up correctly.
    Thank you for contributing to Apple Support Communities.
    Cheers,
    Bobby_D

  • I cannot install latest itunes to my Sony notebook which is running on traditional chinese windows 7 64-bit, the error message is something like unrecognized windows package, can any one help me or has similar experience? Thanks.

    I cannot install latest itunes to my Sony notebook which is running on traditional chinese windows 7 64-bit, the error message is something like unrecognized windows package, can any one help me or has similar experience? Thanks.

    iTunes 9.0.x is certainly compatible with Win7 64 bit since I use that exact setup on 3 different PCs. Two suggestions for your installation problems:
    1)Download a new copy of the 64 bit installer from Apple then, instead of just running the itunes installer right click on it and try 'run as adminstrator'. In my experience that clears up a world of problems with program installation in Win7 and Vista. This is necessary even if you're already logged in as an administrator.
    2) Try the previous version of iTunes (9.0.3). You can get a copy at http://www.oldapps.com/itunes.php?old_itunes=54 again right click on the file and "run as administrator"
    Good luck, hope this helps.
    Lil

  • TRYING TO DOWNLAOD DIGITAL COPY OF PROMETHEUS ONTO ITUNES. KEEP GETTING AN ERROR MESSAGE OF 5000. CAN ANY ONE HELP?

    TRYING TO DOWNLAOD DIGITAL COPY OF PROMETHEUS ONTO ITUNES. KEEP GETTING AN ERROR MESSAGE OF 5000. CAN ANY ONE HELP?

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • Can any one help? "Windows cannot repair this computer automatically."

    I have a laptop satellite L455-S5000.
    And when I try and trun on my computer a black screen comes on that says "windows is loading files..."
    and after it loads a window pops up saying "startup repair is checking your computer for problems..."
    and after that gets done it says "Windows cannot repair this computer automatically" so I click "Send information about this problem (recommended)" and then I click "finish" then it shuts down. when I try turning it back on it does the same thing over. Please can any one help me fix it? Im really clueless about computers and I have know Idea what is wrong with it, or how to even go about fixing it. thanks.

    _Ashley_
    Turn the laptop off, hold down F8, turn the laptop on and let go of F8 when you see the Advanced Boot Options.
    In here, choose Repair Your Computer then press enter, follow the prompts, choose System Restore and restore your laptop to a point before the problems started.
    If the laptop cant get you there, a system recovery starts the laptop from it's factory state but you loose your programs and files doing that. Holding the "0" beside "9" while you turn the laptop on boots the laptop from its recovery partition if you accept data loss.

  • Can any one help me in this code

    Hi all,
    I have created a selection screen and my aim is to display some fields or some block dynamically by choosing some radio button is it possible.
    can any one help me in this.
    REPORT  z_g_test.
    TABLES: spfli,sbook,sscrfields.
    SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS:s_carrid FOR spfli-carrid.
    SELECTION-SCREEN END OF BLOCK 1.
    PARAMETERS:rad1 RADIOBUTTON GROUP g1 USER-COMMAND us1,
               rad2 RADIOBUTTON GROUP g1 DEFAULT 'X' .
    SELECTION-SCREEN BEGIN OF SCREEN 001 as subscreen ."WITH FRAME TITLE text-002.
    SELECT-OPTIONS: s_fldate FOR sbook-fldate.
    SELECTION-SCREEN END OF SCREEN 001.
    DATA ok_code LIKE sy-ucomm.
    INITIALIZATION.
    START-OF-SELECTION.
      SELECT * FROM spfli WHERE carrid IN s_carrid.
      ENDSELECT.
    END-OF-SELECTION.
      WRITE:spfli-carrid.
    AT SELECTION-SCREEN.
      CASE sscrfields-ucomm.
          WHEN'US1'.
    *      call screen 001 starting at 55 40.
      ENDCASE.
    Is i am going on the right way
    Regards,
    Lisa.
    Message was edited by: Lisa Roy
    Message was edited by: Lisa Roy
    Message was edited by: Lisa Roy

    This is what I meant. Copy this and try as it is and see if it serves your purpose.
    REPORT ztest1 .
    TABLES: spfli, sscrfields, sbook.
    SELECTION-SCREEN BEGIN OF TABBED BLOCK tabb1 FOR 4 LINES.
    SELECTION-SCREEN TAB (25) tabs1 USER-COMMAND ucomm1
                         DEFAULT SCREEN 001.
    SELECTION-SCREEN TAB (25) tabs2 USER-COMMAND ucomm2
                         DEFAULT SCREEN 002.
    SELECTION-SCREEN END OF BLOCK tabb1.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE abc.
    PARAMETERS: p_date LIKE sy-datum.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF SCREEN 001 AS SUBSCREEN .
    SELECT-OPTIONS: s_fldate FOR sbook-fldate.
    SELECTION-SCREEN END OF SCREEN 001.
    SELECTION-SCREEN BEGIN OF SCREEN 002 AS SUBSCREEN .
    SELECT-OPTIONS:s_carrid FOR spfli-carrid.
    SELECTION-SCREEN END OF SCREEN 002.
    INITIALIZATION.
      tabs1 = 'Search by flight date'.
      tabs2 = 'Search by flight number'.
      abc   = 'Some other parameters'.
    AT SELECTION-SCREEN OUTPUT.
      CASE sscrfields-ucomm.
        WHEN 'UCOMM1'.
          tabb1-prog = sy-repid.
          tabb1-dynnr   = 001.
          tabb1-activetab = 'TABS1'.
        WHEN 'UCOMM2'.
          tabb1-prog = sy-repid.
          tabb1-dynnr   = 002.
          tabb1-activetab = 'TABS2'.
      ENDCASE.

Maybe you are looking for

  • Line Number in JTextPane

    Hi Experts; How do I add a caret listener on this code so that it will just add a number when the user goes to the next line. import java.awt.*; import javax.swing.*; public class LineNumber extends JComponent      private final static Color DEFAULT_

  • Error in ODI  ,using source EBS and target  planning

    Hi, I am in FDM ERPI integrator,source is EBS and target is Planning ,I didn't get the data from source and I got this below error, Execution error : java.lang.Exception :the scenario did not end properly. at.java.lang.Thread.run(Unknown Source) pls

  • SPEED SPEED SPEED

    hi all. how do i get my mac to run faster? all programmes run slow. i am a graphic designer so i have Adobe CS2 quark etc.. PLEASE HELP dwhuggs!

  • How big a deal is the shared memory for video editing

    Hi, It looks like the portable Mac I have been waiting for has been released. The one thing that I am wondering about is the shared video? memory. How big a deal is it? It looks like it should not be an issue with iMovie. How about FCE? With the Macb

  • Sorting records dynamically in REF cursor, based upon a dynamic field

    Hi, I have a REF CURSOR built by using row type, table type and PIPELINE function. I have opened the ref cursor now. I would like to update a field called 'RANK' based upon 'RATIO' field in the REF CURSOR. i.e order the records in the ref cursor by R