Please Help Me Out In Beans

hai every one ....
i created three files and saved in respective areas
new.jsp--->C:\Tomcat 5.0\webapps\ROOT
one.html--->C:\Tomcat 5.0\webapps\ROOT
MyBean.java--->C:\Tomcat 5.0\webapps\ROOT
MyBean.class--->C:\Tomcat 5.0\webapps\ROOT\WEB-INF\classes
this is the coding part------------------------------------------------------------------------- -------------------------------------------------------------------------------- --------------------------------
--------------------------------new.jsp---------------------------------------- ---
<%@page contentType="text/html"%>
<%@ page import="javax.servlet.*" %>
<%@ page import="javax.servlet.http.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="java.util.*" %>
<%@ page language="java" %>
<html>
<body>
<jsp:useBean id= "mars" scope="session" class="MyBean"/>
<jsp:setProperty name ="mars" property="cname" value=request.getParameter("cname");/>
<jsp:setProperty name ="mars" property="cid" value=request.getParameter("cid");/>
</body>
</html>
---------------------------------one.html-------------------------------------- -
<html>
<body bgcolor="667788">
<form method="post" action="new.jsp">
<table>
<tr>
<td>
name
</td>
<td>
<input type="text" name="cname">
</td>
</tr>
<tr>
<td>
id
</td>
<td>
<input type="text" name="cid">
</td>
</tr>
<tr>
<td>
<input type="submit" value="submit">
</td>
</tr>
</table>
</form>
</body>
</html>
--------------------------------mybean.java------------------------------------ ---
import java.util.*;
import java.sql.*;
import java.io.*;
public class MyBean implements Serializable
private String cname;
private String cid;
public MyBean()
cname = "";
cid = "";
public String getCname()
return cname;
public String getCid()
return cid;
public void setCname(String x)
cname=x;
public void setCid(String y)
cid=y;
public boolean insertDB()
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
String query = "insert into apply(name,email) values( ?,? )";
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc:odbc:mysqlDSN","","");
PreparedStatement pstmt = con.prepareStatement(query);
pstmt.setString(1,cname);
pstmt.setString(2,cid);
int count = pstmt.executeUpdate();
if(count != 1)
return false;
pstmt.close();
con.close();
catch(Exception e){
System.out.println(e.getMessage());
return false;
return true;
im getting this error when i press submit
--------------------------------ERROR------------------------------------------ --
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: /new.jsp(21,22) equal symbol expected
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.jav a:83)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:402)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:126)
org.apache.jasper.compiler.Parser.parseAttribute(Parser.java:238)
org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:188)
org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:201)
org.apache.jasper.compiler.ParserController.getPageEncodingForJspSyntax(ParserC ontroller.java:449)
org.apache.jasper.compiler.ParserController.determineSyntaxAndEncoding(ParserCo ntroller.java:419)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:203)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:137)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:237)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:552)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
note The full stack trace of the root cause is available in the Tomcat logs.
Apache Tomcat/5.0.18
------------------------------------------------->>>><<<<<<<<<<<-----------------------------------------
please help me out.....
any kind of help is appriciated
Rakesh

For visual beans, check out jsp:plugin
This will convert you bean to an applet.
For non-visual beans, check out jsp:useBean

Similar Messages

  • My iPhone 6 ear speaker is not working properly I couldn't able to hear any thing from ear speaker to lissen I had to put on loud speaker or to use handsfree please help me out with this problem if some body have answer?

    My iPhone 6 ear speaker is not working properly I couldn't able to hear any thing from ear speaker to listen I had to put on loud speaker or to use hands free please help me out with this problem if some body have answer?

    Hi Venkata from NZ,
    If you are having an issue with the speaker on your iPhone, I would suggest that you troubleshoot using the steps in this article - 
    If you hear no sound or distorted sound from your iPhone, iPad, or iPod touch speaker - Apple Support
    Thanks for using Apple Support Communities.
    Best,
    Brett L 

  • WHEN I USED TO CONNECT INTERNET FROM MY IPHONE 4S PERSONAL HOTSPOT VIA USB, AN ICON IN THE NETWORK PREFERENCE NAMED "IPHONE" GETS OPENED.... BUT NOW THIS IS NOT HAPPENING AND I AM NOT ABLE TO CONNECCT PERSONAL HOTSPOT VIA USB CABLE. PLEASE HELP ME OUT

    WHEN I USED TO CONNECT INTERNET FROM MY IPHONE 4S PERSONAL HOTSPOT VIA USB, AN ICON IN THE NETWORK PREFERENCE NAMED "IPHONE" APPEARS.... BUT NOW THIS IS NOT HAPPENING AND I AM NOT ABLE TO CONNECT PERSONAL HOTSPOT VIA USB CABLE. PLEASE HELP ME OUT???

    Please don't shout!   Using all uppercase means shouting on the internet.  If your keyboard is stuck please say so, otherwise people will think you are being obnoxious.
    Now the first question is, when you are saying connecting to personal hotspot, have you always been using the iPhone to connect to the internet?   Are you someplace where the only place to connect is available via tethering to the iPhone's celluar network?  Or do you have other options?

  • Please Help me Out APPLE TEAM :(

    Hi,
    I recevied an iPhone 5 as a gift in the month of january from my friend from US. Am in INDIA and am using it in INDIA only. It was perfectly working fine until i upgraded it to ios 7 beta version through a third party. i saw one of my fried doing this and it was working fine for his device. So out of curiosity i too tried d same as a result of which my device just showed me an apple LOGO and after that nothing happend. I got worried and called the customer support people. They adviced me to downgrade it to ios 6.1.4 using the factory resetting option. I did the same as they directed me to do. the phone was successfully restored. Now here comes the problem. The device says that "this iphone has been activated with t****@icloud.com, so please enter that valid id. If i enter my apple id it returs an error stating that this [email protected] cannot be used to activate this phone. but other than this particular id if i give any other id it throws "Invalid Id or Password".  One of the Customer support person told me that this cannot be replaced in INDIA, you need to send it to US to get it replaced. I tried this option as well. The person from US said that this device cannot be replaced as this one is a software issue, and he suggested me to wait till ios7 gets released. I called the customer support people again and they said that this might be due to the software corruption so please do wait till ios 7 gets released and after that resotring the device to factory settings it must work. Now i restored the device using factory restoring to ios 7. My device has been restored to ios 7. But still i am facing the same issue. Really frustrated to the core. can someone help me fix this. Now the customer support person is telling to send the device to US again and have a check with them. jun, july, august and spet. 4 months of no iphone and its just lying as a toy inside my cupboard which is of no use. Frrl like crying.the customer support people in INDIA told me that there is an option of paid replacement in INDIA for the software issues, but he is not sure whthr this option is available in US. So please someone tell me what can be done, am ready for the paid replacement as well.
    Thanks In Advance
    Thinnappan Muthu
    +91 - 9994998464

    This is what you get from them ALL THE TIME. Exactly the same reply:
    Please include the line below in follow-up emails for this request.
    Follow-up: 1299**1
    Dear Kevin,
    Thank you for your email. To find more information on this issue, you may refer to the iTunes Connect Developer Guide: <https://itunesconnect.apple.com/docs/iTunesConnect_DeveloperGuide.pdf>. Should you require additional assistance, please contact iTunes Connect Support by accessing the Contact Us module in iTunes Connect : <http://www.apple.com/itunes/go/itunesconnect/contactus>.
    Best Regards,
    Yana
    iOS Developer Program
    I have told these guys in my every email that the link is not helping please look into it and tell us what is the problem as there are no issues from our end. My IT team has looked over it about 100 times!
    Please help me out already!
    Message was edited by: KevinGupta

  • Importing all my music to iTunes(Please help me out)

    Hello,
    I just purchased a 20gb ipod today and am havintg some trouble importing all of my music. I have complete music library's in "RealPlayer" "Winamp" and "Windows Media Player", it doesnt matter which one of these i import from(whatevers easier i guess). I have tried the add folder option on "Documents and settings", "my documents" and "program files" and it has only imported around 600 of the 3600 songs in my music library.
    Also, i have read pages and pages on this board trying to find an answer. I saw one post which talked about this very issue but it was never resolved. It confronted importing from windows media to iTunes and the answer was to highlight all the music and drag it over to iTunes. This Does Not Work. I highlight all my song, hold down on the mouse and move it over to the iTunes box. However once i leave the Windows media box the arrow from my mouse turns into a circle w/a line acrosse, not allowing me to drag it.
    Please Give me an answer on how I can import all my music to iTunes. If you do I will kiss your feet and applaud your genious.
    Please help me out.
    Josh

    Hi,
    No. I never found a solution to the problem to import my music libary from Realplayer to itunes.
    I have exhausted everything that I know and have read as tips from this and other posts.
    Please come back to post an answer if you find a solution and I will do the same.
    I am going to go ahead and just synch to Realplayer to fill up my ipod. Then I will see if I can switch to itunes for all future synching and hope that I can find a way not to lose the music on my ipod that came from Realplayer. If this doesn't work, I will have to stick with Realplayer as my main music interface and synching for ipod.
    Jeff

  • HT1212 My iPod touch is disabled after too many attempts and I want to enable it without getting it clear so can you please help me out in this....

    My iPod touch is disabled after too many attempts and I want to enable it without getting it clear so can you please help me out in this....

    A data recovery company MAY be able to do it for a price. The Disabled is a very good security feature.
    JWhy not just restore from the last backup you have?
    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen                         
    If recovery mode does not work try DFU mode.                        
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings        
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: How to back up     
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:
      Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • Can you please help me out the Info Cubes info for Budget Execution?????

    Hi,
       Can you please help me out the Info Cubes info for Budget Execution and Cash Management.
    Thanks in advance,
    Andy

    Take the memory card out of the camer and put it in a card reader.  When it mounts on the desktop select it and try to change the name.  However, that might make it incompatible with the camera.  You'll just have to try and see.
    OT

  • Please help me out guys....

    Hey guys... i'm new to the forums but i need to some help. I have searched and searched on this subject and have tried a lot. My ipod was dead for a long time and i tried to charge it the other day, but got the "connect to itunes" message to restore it. so i did... itunes finally read it but read it as "ipod" and not what it usually is. So i triend to restore it and i got the 1418 error. Did research on that, uninstalled itunes/reinstalled and of course didn't work. uninstalled the usb drive and reinstalled it. nothing seems to work, and the ipod isn't showing up in my computer either. only shows up if i'm lucky in itunes. please help me out there guys... if i can fix it i would be really happy, if its garbage then just tell me. thanks again. btw... i have a 30gb video.... hope this is the right section

    We do need the actual DMP file as it contains the only record of the sequence of events leading up to the crash, what drivers were loaded, and what was responsible.  
    We prefer at least 2 DMP files to spot trends and confirm the cause.
    Please follow our instructions for finding and uploading the files we need to help you fix your computer. They can be found here
    If you have any questions about the procedure please ask
    Wanikiya and Dyami--Team Zigzag

  • I can not get my ipod touch/iphone 5s to sync to itunes i have tried everything i can think of reset ipod,redownload itunes check linking cable usb port ect... if anyone out there is or has gone through this please help me out thx

    can someone please help me out!!!!

    See
    iOS: Device not recognized in iTunes for Windows
    - I would start with
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    or              
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
    However, after your remove the Apple software components also remove the iCloud Control Panel via Windows Programs and Features app in the Window Control Panel. Then reinstall all the Apple software components
    - New cable and different USB port
    - Run this and see if the results help with determine the cause
    iTunes for Windows: Device Sync Tests
    Also see:
    Troubleshooting issues with iTunes for Windows updates
    - Try on another computer to help determine if computer or iPod problem

  • HT2534 I am using iPod Touch (4th Generation). I tried the above mentioned step 5-7 times, but I am not able to see the "none" option. Please help me out.

    Hi,
    I did all the steps, that were mentioned above, but still I am not getting free option.
    Please help me out.
    Thanks

    Did you create a new account using an email address not used with Apple before?
    Maybe your county does not allow a None.
    I am in the US and created a None account using those instructions.

  • TS3074 im can u please help me out this issue im trying to install iTunes  in windows 7 some error showing " windows installer package problem DLL require to complete this installation" this message showing.

    im can u please help me out this issue im trying to install iTunes  in windows 7 some error showing " windows installer package problem DLL require to complete this installation" this message showing.

    Try the following user tip:
    " ... A DLL required for this installation to complete could not be run ..." error messages when installing iTunes for Windows

  • HT201177 My new MacBook Retina cannot play any videos on any browser. This includes the Apple videos. It keeps saying Missing Plug-In. I am not sure what I am supposed to do. Can someone please help me out?

    My new MacBook Retina cannot play any videos on any browser. This includes the Apple videos. It keeps saying Missing Plug-In. I am not sure what I am supposed to do. Can someone please help me out?

    My iPod mini, 4gb is hard to get serviced obviously because they dont make them anymore
    It is as simple to get it serviced as the day you purchased it.
    How is it hard to get it serviced?
    How long have you had your iPod?
    i get maybe 4-5 hours of battery life, maybe even 6 if im lucky
    That is not good but it's not "terrible".
    If you've had it less than a year, send it back to Apple to replace the battery.
    thought that i might buy an attachment type accesorie that i plug into the usb port on my ipod
    It's called a dock connector, not a USB port.
    i found a product in the online store, that i guess you place the ipod mini on, and it gives you up to 20 or so more hours of time but then it says that you have to have a firewire port or cable?
    What is it? The firewire port is on the computer, not the iPod.
    If the original battery is going bad, the first thing to do is get that sorted out.

  • The built-in mic in g50 122ca laptop model is not working. please help me out.

    the built-in mic in g50 122ca laptop model is not working. please help me out. OS: Windows Vista (32-bit)

    here is a sample code .
    so far you procedure looks good but
    i bet you have to specify the name of report , instead of 'filename'.
    see this
    Plist_id := GET_PARAMETER_LIST('P_name');
    IF NOT ID_NULL(Plist_id) THEN
    DESTROY_PARAMETER_LIST(Plist_id);
    END IF;
    Plist_id := CREATE_PARAMETER_LIST('P_name');
    ADD_PARAMETER( Plist_id, 'P_Receive_date', TEXT_PARAMETER, TO_CHAR(Receive_date,'mm/dd/yyyy'));
    ADD_PARAMETER( Plist_id, 'P_Hearing_date', TEXT_PARAMETER, TO_CHAR(Hearing_date,'mm/dd/yyyy'));
    ADD_PARAMETER( Plist_id, 'P_Hearing_time', TEXT_PARAMETER, TO_CHAR(Hearing_time,'mm/dd/yyyy'));
    ADD_PARAMETER( Plist_id, 'P_Issue_date', TEXT_PARAMETER, TO_CHAR(Issue_date,'mm/dd/yyyy'));
    ADD_PARAMETER( Plist_id, 'P_Workshop_date', TEXT_PARAMETER, TO_CHAR(Workshop_date,'mm/dd/yyyy'));
    -- RUN_PRODCT(REPORTS,'..\Reports\Pro_License',SYNCHRONOUS, RUNTIME, FILESYSTEM, Plist_id, NULL);
    -- here Pro_License is the name of report.
    did you tried to see if the parameter passed using a message ?
    try
    message('parameter name'); pause; write this before "run_report".

  • I have buy 4s it's unlocked and its working with different carriers in Bahrain but in Pakistan I try to use different carriers's sims but its showing sim is not valid , not compatible? any one please help me out this

    I have buy 4s it's unlocked and its working ok with different carriers in Bahrain, but in Pakistan I try to use different carriers's sims but its showing sim is not valid , not compatible? any one please help me out this?

    Try restoring the iPhone to factory settings. If you are having difficult restoring, put the iPhone into Recovery Mode and see if that then works:
    http://support.apple.com/kb/ht1808
    If not, or if a restore to factory settings does not fix the problem, then your iPhone may have a hardware problem. You can only get the iPhone serviced by Apple in Canada, so you will have to take the iPhone there or send it to someone you know in Canada who can get the iPhone serviced and send it back to you. The only option for getting service in Pakistan would be to pay some unauthorized repair shop to attempt a repair, after which Apple will no longer provide any service even in Canada.
    Regards.

  • I have the new ipad / ipad3 . I upgraded to ios7 but I didn't get pages and numbers apps free, but my colleague who is using ipad4 with ios7 it is free. more over my ipad is not showing airdrop facility. please help me out in how to rectify those

    please help me out somebody. I need pages and numbers apps immediately. I have ipad3 with ios7 running in it. Apple announced iPhoto, iMovie, Keynote, pages, numbers all are free for ios7 users. but for me it's not like that. shall I download or should I wait. in my ipad airdrop also not coming. but my colleague has both apps also comin for free and airdrop also coming who has ipad4  with same version of ios7.0.2

    They are free to iOS 7 users who have activated their NEW device on Sept 1 2013 or after. They are NOT automatically free with iOS 7.
    AirDrop is only compatible with iPad 4th gen and iPad mini. iPad 3rd gen and below do contain the necessary hardware for AirDrop. Also, AirDrop is only compatible between iOS devices. You cannot AirDrop between iOS device and Mac OS.

Maybe you are looking for

  • Changing background color in JTable, only changes one row at a time...

    I'm trying to change the color of rows when the 5th column meets certain criteria. I think I'm very close, but I've hit a wall. What's happening is the row will change color as intended when the text in the 5th column is "KEY WORD", but when I type "

  • PDF scanned by Epson v. Canon annotate by PDFPen (not)  viewable in Preview

    My question relates to the applications PDPen and Preview, and the scanners and scanning software of Epson and Canon. When I had an Epson print-scan-copy machine, I would scan originals into multi-page PDF files and I would page-number and annotate t

  • Interactive Reporting - Dragging a Pie Chart into a Report

    I have a report that contains about 5 charts at the end of all the tables containing data (the charts are in the report footer). I have created a new pie chart and want to drag it into the report footer as well. When I drag it in, it goes at the very

  • I updated to itunes 11 and all my purchased music is gone.

    After I updated my computer to itunes 11 all of my purchased music disapeared. When I go to the itunes store however, it lists all of my purchases, but when I try to download them again it tells me I have to purchase them again....Is there anyway of

  • Need go_form with no_activate

    I have a requirement in which I have to first open a Child Form from a Parent Form. Then I want to access objects in the Child Form from Parent form. For example, I want to insert a record into a block present in Child Form by executing statements fr