Help me to solve this Jsp problem

//Class1.java
package p1.p2;
public class Class1 implements Serializable
private String name1,name2;
public void setName1(String name)
name1=name;
public String getName1()
return name1;
public void setName2(String name)
name2=name;
public String getName2()
return name2;
//Class2.java
package p1.p2;
public class Class2
String name1,name2;
public String insert(Class1 c1)
name1 = c1.getName();
name2 = c2.getName();
return name1;
//Class3.jsp
<%@ page import="p1.p2.*" %>
<html>
<form action="/bobby/Class3.jsp" method=post>
Name1 : <input type=text name="cn1">
Name2 : <input type=text name="cn2">
<input type=submit value="Click"/>
</form>
</html>
<%! String a,b,c; %>
<%
Class1 c1 = new Class1();
Class1 c2 = new Class2();
a=request.getParameter("cn1");
b=request.getParameter("cn2");
c1.setName(a);
c1.setName(b);
c=c2.insert(c1);
out.println(c);
%>
WHEN I RUN THE JSP PROGRAM I GOT THE FOLLOWING ERROR.TELL ME THE SOLUTION TO SOLVE THIS PROBLEM.
javax.servlet.ServletException:
p1.p2.Class2.insert(Lp1/p2/Class1;)Ljava/lang/String;
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl .java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.j ava:758)
org.apache.jsp.Class3_jsp._jspService(Class3_jsp.java:76)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
root cause
java.lang.NoSuchMethodError: p1.p2.Class2.insert(Lp1/p2/Class1;)Ljava/lang/String;
org.apache.jsp.Class3_jsp._jspService(Class3_jsp.java:67)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

First, please put your code inside code tags. There's a nice little button. All you have to do is paste your code, highlight it and press the little code button. Thanks.
I had to make some adjustments to your original post. Either you had some closing braces in the wrong place, or you hve no idea what you're doing. I'm going to assume that Class1 is in a file named p1/p2/Class1.java and Class2 is in p1/p2/Class2.java.
//Class1.java
package p1.p2;
public class Class1 implements Serializable
    private String name1,name2;
    public void setName1(String name)
        name1=name;
    public String getName1()
        return name1;
    public void setName2(String name)
        name2=name;
    public String getName2()
        return name2;
//Class2.java
package p1.p2;
public class Class2
    String name1,name2;
    public String insert(Class1 c1)
        name1 = c1.getName();
        name2 = c2.getName();
        return name1;
//Class3.jsp
<%@ page import="p1.p2.*" %>
<html>
<form action="/bobby/Class3.jsp" method=post>
Name1 : <input type=text name="cn1">
Name2 : <input type=text name="cn2">
<input type=submit value="Click"/>
</form>
</html>
<%! String a,b,c; %>
<%
    Class1 c1 = new Class1();
    Class1 c2 = new Class2(); //<-- problem here, do you see it?
    a=request.getParameter("cn1");
    b=request.getParameter("cn2");
    c1.setName(a);
    c1.setName(b);
    c=c2.insert(c1);
    out.println(c);
%>Note the I highlighted the problem above. HTH.

Similar Messages

  • Can  you help me to solve this problem (user-exit for xd02)

    Hi!
    can  you help me to solve this problem?
    transaction XD02
    To pass the length of the field to 7 max    for    KNA1-SORT   (Search criterion 1 )
    To pass the length of the field to 4  max   for   ADRC-SORT2  (Search criterion 2)
    It is not possible to save  the customer card as long as the search criterion is not univocal
    I seek one to use-exit .
    Thanks.

    Hi,
    Check the exit SAPMF02D.
    Regards,
    Surinder

  • Hello i have a unusual problem,anyway my iphone 4 wont turn on and when someone calls they hear ringing,but my phone doesent ring,so i open cimcas now ring off. Screen is just black,because it's turned off..Please help me to solve this problem..Thanks

    Hello i have a unusual problem,anyway my iphone 4 wont turn on and when  someone calls they hear ringing,but my phone doesent ring.So i poen simcase and now ring off. Screen is just  black,because it's turned off..Please help me to solve this  problem..Thanks

    As far as trying to power up your device, make sure it has a good charge and then hold the button on the top of the phone and the home button on the faceplate together until the apple appears on the screen.

  • Hi, when ever I'm using 3G, on my Iphone4 sim stops working and Network is lost, this started after I updated my phone with  6.0.1(10A523)version. Please help how to solve this problem.

    Hi, when ever I'm using 3G, on my Iphone4 sim stops working and network is lost, this started after I updated my phone with  6.0.1(10A523)version. Please help how to solve this problem. Thanks.

    Photos/videos in the Camera Roll are not synced. Photos/videos in the Camera Roll are not touched with the iTunes sync process. Photos/videos in the Camera Roll can be imported by your computer which is not handled by iTunes. Most importing software includes an option to delete the photos/videos from the Camera Roll after the import process is complete. If is my understanding that some Windows import software supports importing photos from the Camera Roll, but not videos. Regardless, the import software should not delete the photos/videos from the Camera Roll unless you set the app to do so.
    Photos/videos in the Camera Roll are included with your iPhone's backup. If you synced your iPhone with iTunes before the videos on the Camera Roll went missing and you haven't synced your iPhone with iTunes since they went missing, you can try restoring the iPhone with iTunes from the iPhone's backup. Don't sync the iPhone with iTunes again and decline the prompt to update the iPhone's backup after selecting Restore.

  • Hello Experts Please help me to solve this problem.

    Hello Experts,
    I am getting a problem while installing the SOLUTION MANAGER 4.0.
    in step 17/45 IMPORT ABAP :
    the problem is :
    ERROR 2008-04-29 03:10:28.110
    CJS-30023  Process call '/usr/sap/SLM/SYS/exe/run/R3load -testconnect' exits with error code 2. For details see log file(s) R3load.exe.log.
    when i saw R3load.exe.log file it has the following contain :
    sapparam: sapargv( argc, argv) has not been called.
    sapparam(1c): No Profile used.
    sapparam: SAPSYSTEMNAME neither in Profile nor in Commandline
    /usr/sap/SLM/SYS/exe/run/R3load: START OF LOG: 20080428095833
    /usr/sap/SLM/SYS/exe/run/R3load: sccsid @(#) $Id: //bas/700_REL/src/R3ld/R3load/R3ldmain.c#13 $ SAP
    /usr/sap/SLM/SYS/exe/run/R3load: version R7.00/V1.4 [UNICODE]
    Compiled Jul 14 2007 02:19:03
    /usr/sap/SLM/SYS/exe/run/R3load -testconnect
    DbSl Trace: OCI-call 'OCIServerAttach' failed with rc=12505
    DbSl Trace: CONNECT failed with sql error '12505'
    DbSl Trace: OCI-call 'OCIServerAttach' failed with rc=12505
    DbSl Trace: CONNECT failed with sql error '12505'
    (DB) ERROR: db_connect rc = 256
    DbSl Trace: OCI-call 'OCIServerAttach' failed with rc=12505
    DbSl Trace: CONNECT failed with sql error '12505'
    DbSl Trace: OCI-call 'OCIServerAttach' failed with rc=12505
    DbSl Trace: CONNECT failed with sql error '12505'
    (DB) ERROR: DbSlErrorMsg rc = 99
    /usr/sap/SLM/SYS/exe/run/R3load: job finished with 1 error(s)
    /usr/sap/SLM/SYS/exe/run/R3load: END OF LOG: 20080428095834
    Please can any body help me to solve this problem.
    waiting for fast response, as my installtion is pending due to this problem.
    have a nice day.
    Regards,
    Shivendra.

    Hi,
    The following should be verified:
    (1) check what DB instances the listener currently is aware of.  This can be done with the command 'lsnrctl services'.
    (in case you listener does not have the default name LISTENER, then use 'lsnrctl services <listener name>' )
    (2) Perhaps there is an issue with the dynamic instance registration, even though the error code is different, you should nevertheless check the points from note #563574.
    (3) Verfiy the value of the parameter local_listener (see mentioned note). Since you have changed the listener, the parameter might still be wrong.
    In case local_listener is correcly set you should give the command
      ALTER SYSTEM REGISTER;
    a try.
    Best Regards,
    Michael

  • Please help me to solve this problem.

    Hi , can someone help me to solve the following problem:
    1) I wrote two different client and server program, (Using UDP)
    2) In the server side for testig I wrote some code like when a client sending message to server
    a) server find on the database only senders IP address then server return the message to sender
    b) Again if server find out other IP address too then it returns to them too
    3) but it working for (a) , but not for (b)
    4) Actually, its sending message but client not getting it
    So, can some tell me, how to modify server or client side
    Server wont reply the msg to the same IP address/ Sender who sent the message.
    Server will reply the message to other person..
    For example, Alace, Bob and Carrry are three clients. Alace, Bob, and Carry are online now. When they get online server save there IP address.
    Now, Bob sends a message to server , then server will send the message to Alace and Carry. Not to the sender Bob.
    Thanks]
    I am giveing a pice of coding of server side
    else
    IPAddressObject addressObjectt;
    onlineUserList.reset();
    for(int i=0; i<onlineUserList.lengthIs(); i++)
    addressObjectt=(IPAddressObject)onlineUserList.getNextItem();
    IPAddress=addressObjectt.getAddress();
    System.out.println("\n this is not same : "+IPAddress);
    if(addressObject.compareTo(addressObjectt)!=0)
    System.out.println("\n this is not same : "+sentence);
    String cSentence=sentence.toUpperCase();
    sendData=cSentence.getBytes();
    DatagramPacket sendPacket= new DatagramPacket(sendData, sendData.length, IPAddress,port);
    System.out.println("\n aaaaaaa : "+IPAddress);
    client.send(sendPacket);
    else
    System.out.println("\n this is same : "+sentence);
    String cSentence= sentence.toUpperCase();
    sendData=cSentence.getBytes();
    DatagramPacket sendPacket= new DatagramPacket(sendData, sendData.length, IPAddress,port);
    client.send(sendPacket);
    System.out.println("\n this is same : "+cSentence);
    }//for
    }//else
    Edited by: kidylimp on Apr 8, 2008 12:16 PM

    This looks suspiciously like a cross-post
    [http://forum.java.sun.com/thread.jspa?threadID=5283608]

  • TS1363 My iPod Nano 7th Generation couldn't be detected by iTunes when I plugged in. I tried resolving the issue by uninstalling the iTunes and then install it back again but yet still the same problem exist. Can you please help me to solve this issue?

    My iPod Nano 7th Generation couldn't be detected by iTunes when I plugged in. I tried resolving the issue by uninstalling the iTunes and then install it back again but yet still the same problem exist. Can you please help me to solve this issue? I have already updated to the latest version of iTunes on my Windows 8 and I cannot synchronize my iPod for the time being. Please do help me to solve this problem. Thank You.

    uninstall all iTunes,5 programes,this worked for me after reinstall them

  • My Creative Cloud subscription has expired, and I assigned the monthly payment, but I can not open any progam creative cloud, I need help how to solve this problem

    my Creative Cloud subscription has expired, and I assigned the monthly payment, but I can not open any progam creative cloud, I need help how to solve this problem

    Carlos-
    Start by signing out and back in to see if it will see the subscription: 
    How to sign in and sign out of creative cloud (activate/deactivate)
    If the apps are installed fine and close after launch see this link:
    CC applications close immediately after launch
    If the problem is something different, please let us know the error you see or what is happening on the screen so we can advise  you on a solution
    Pattie

  • ýesterday  my iphone 5c screen  suddendly  shows connect to itune and i try to restore it using itune but halfway i got a message error occured (14). please help me in solving this problem.

    ýesterday  my iphone 5c screen  suddendly  shows connect to itune and i try to restore it using itune but halfway i got a message error occured (14). please help me in solving this problem.

    what did you learn when you search the internet for iPhone error 14?

  • Hello Sorry for the inconvenience, but I have a problem in Java I can not open files, audio chat, which type of jnlp after the last update of the Java 2012-004 Please help me in solving this problem.

    Hello Sorry for the inconvenience, but I have a problem in Java I can not open files, audio chat, which type of jnlp after the last update of the Java 2012-004
    Please help me in solving this problem. 

    Make sure Java is enable in your browser's security settings.
    Open Java Preferences (in Utilities folder)
    Make sure Web-start applications are enabled.
    Drag Java 32-bit to the top of the list.
    jnlp isn't an audio file format. It's just a java web-start program (Java Network Launching Protocol).

  • We have 'CS6' version of Adobe. We are facing a problem with 'Acrobat Pro'. Every month that is stop working and everytime need to install. Kindly help us regarding solving this problem...

    We have 'CS6' version of Adobe. We are facing a problem with 'Acrobat Pro'. Every month that is stop working and everytime need to install. Kindly help us regarding solving this problem...

    Your Acrobat is running in Trial Mode.  Try this KB: Creative Cloud applications unexpectedly revert to trial mode | CS6, CCM
    If it doesn't work you need to contact Adobe Support for assistance.

  • Hello to everyone : I have a problem every time I try to open iTunes for windows 8 64bit... Program stops to work every time trying to access to the store... Is anyone able to help me to solve this issue? Thank you so much...

    Hello to everyone : I have a problem every time I try to open iTunes for windows 8 64bit... Program stops to work every time trying to access to the store... Is anyone able to help me to solve this issue? Thank you so much...
    N.B. iTunes version is the last one available from https://apple.com/it

    Hey sweetcake74,
    Thanks for the question. I understand you are experiencing performance issues with iTunes for Windows. The following articles may help to resolve your issue:
    iTunes for Windows Vista, Windows 7, or Windows 8: Fix unexpected quits or launch issues
    http://support.apple.com/kb/TS1717
    Thanks,
    Matt M.

  • My iphone 3gs is upgraded to ios 6.1.3 from ios 5.0.1 then it continues to shutting down then turning on i think that ios 6 is cannot carry by my iphone help me to solve this problem tnx

    my iphone 3gs is upgraded to ios 6.1.3 from ios 5.0.1 then it continues to shutting down then turning on i think that ios 6 is cannot carry by my iphone help me to solve this problem tnx

    See Here  >  http://support.apple.com/kb/HT1808
    You may need to try this More than Once...  Be sure to Follow ALL the Steps...
    Pay particular attention to Steps 3 and 4.
    When prompted... Choose Restore as New ( not from backup.)

  • Hi,I have 4s,I have a problem since 2days that the ring tone,lock sound,password sound,volume button and slide,calls flash,all sometimes working and sometimes not,plz help me to solve this problem.thanks

    HI
    i have iPhone 4s with iOS 8.1.3 , since 2 days I'm facing a problem that the ring tone,lock button sound,password sound,volume buttons,slide volume and incoming call flash,
    all these not working properly , sometimes it will work and sometimes it will not, I tried to restart the phone many times but I didn't fix the problem
    plz help me to solve this problem

    Try to reset the phone by holding the sleep and home button for about 10sec, until the Apple logo comes back again. You will not lose any data by resetting, but it can cure some glitches.
    If this does not help, setting it up as new device would be the next step:
    How to erase your iOS device and then set it up as a new device or restore it from backups

  • Help me for solve this Question this is my problem

    help me for solve this Question this is my problem
    i installed EBS 11i fresh not vision
    i did cart of account and did set of book
    then assigned it with profile option gl set of books name
    and when enter to make ajournal appeare this messege
    [http://www9.0zz0.com/2009/10/06/03/232202588.jpg]
    [http://www9.0zz0.com/2009/10/06/03/634050066.jpg]

    Hi,
    Not sure why are you getting this kind of error (which is pointing to a URL with Jpg file) while creating a journal.
    Could you please bounce your server once and try..
    Please let us know if the error/warning stopping you to enter a journal in GL??
    We don't think profile option is a show stopper here.... We assume that you have assigned Sets of Books, MO: Operating unit & HR USer Profile option at Responsibility level correctly....
    Regards,
    S.P DASH

Maybe you are looking for

  • Can't download songs from itunes match

    Hi, I have activated itunes match and since then all my problems started. I have purchased the 2nd law from itunes and am trying to download the album to my iphone. Somehow only 3 songs have downloaded and have ben trying over and over to download th

  • How many applications can be installed?

    I have a medical users that uses Epocrates, Tarascan, Clinical Consult, and Sandoth. The phone 8330 gets slowed down and I am assuming this is a memory problem.  So i need to confirm this so i can recommend a diferrent platform for her if necessary.

  • Transparent JTabbed Pane

    Is there a way to make a JTabbed Pane transparent, include the tabs?

  • Problems with Photomerge in CS4

    I'm using Photoshop on Vista 32. When I try to do a photomerge either from PS or Bridge, it does its stuff, then closes everything immediately. Reboots / changed options make no difference. Any ideas?

  • Can't burn CDs with Matsushita UJ-845 Driver

    I have an iMac 17" with a Matsushita UJ-845 Driver. Every time I try to burn a CD or a DVD I get an error which says : The attempt to burn a disc failed. The device failed to calibrate the laser power level for this media. I don't know what goes wron