Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

duhit Choudhary

Ranch Hand
+ Follow
since Apr 01, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by duhit Choudhary

ok.. i got it.
with .equals()!!!
9 years ago
JSP

Bear Bibeault wrote:getParameterValues() returns a string array. If that's not what you want, why are you calling it?





this will not helping me at all... the final thing i want to do is to:


But it is not going inside if(). What i am doing wrong here
9 years ago
JSP

Bear Bibeault wrote:You must use the name, not the value of the radio button.



I have used name with following line of code


But now the problem is it is not giving the string value. i used toString() method for it but still not getting the string. what should i do???
9 years ago
JSP
Hello All,
I made two radio buttons as:


but when i tried to fetch the value of radio button via following line of code:


I got NullPointerException on the same line. So can anyone tell me the right way to get the value of radio button.

Thanks in Advance
9 years ago
JSP

Ulf Dittmer wrote:
It could be that all you need to do is to switch lines 7 and 8, lines 12 and 13, and lines 17 and 18.



I have done that but still getting same exception..

Ulf Dittmer wrote:You can only have a single open ResultSet per Statement at any given time. Obtaining another ResultSet will lead to the previously obtained ResultSet being closed. So this code has problems in lines 8, 13 and 18.



thanks.. i knew this.. can you tell me how to resolve this because i am not getting it at all...
Hello all,

When I tried to execute this code:



I am getting the Following exception...

java.sql.SQLException: Operation not allowed after ResultSet closed
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919)
at com.mysql.jdbc.ResultSetImpl.checkClosed(ResultSetImpl.java:803)
at com.mysql.jdbc.ResultSetImpl.checkRowPos(ResultSetImpl.java:851)
at com.mysql.jdbc.ResultSetImpl.getObject(ResultSetImpl.java:4881)
at bot.MessageUser.cleanUserDetails(MessageUser.java:110)
at bot.JavaBotMainForm.actionPerformed(JavaBotMainForm.java:433)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:723)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:682)
at java.awt.EventQueue$3.run(EventQueue.java:680)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:696)
at java.awt.EventQueue$4.run(EventQueue.java:694)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:693)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)



Please help where I am doing wrong. though the output is self explaining but i am still not able to get why i am getting this...

Thanks in Advance
Hi all,
I wrote a program to insert user details from a website into a database table. all the program is working fine except a thing, which is, the database is not taking the correct value although i am getting the correct value at the console..
here is my code and details:



and the line from where i am inserting the data into database is:



the above code is in separate class and there is another class where i defined setter getter methods:



dto is the object of the class in which i have defined setter getter methods.

now the output i m getting on console is:

Collinsville, IL
United States
Address : Collinsville, IL
United States

but on the database table it is entering oly first line of the output at Address column... like- Collinsville, IL
please help me out to get the correct and full data in the table..

Thanks in advance
Hi all,
I am getting error while executing the program given below




and the error is:
java.io.FileNotFoundException: C:\BlackList.propeties (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:97)
at test.TestNew.main(TestNew.java:20)
please let me know what i am doing wrong. i alreasy check the file anem and its location which is correct. in the 16th line.
Thanks in advance.
9 years ago
ok.. now to be more precise can we directly got those values from website and put it in notepad???
i am getting all the data from a website. url and its id. now i wnt to get these two column value in the notepad & want to end it up in notepad?? i think now you got my point!!!

Ulf Dittmer wrote:
What does it mean to "insert data into Notepad"? Do you want to create a text file that can be edited in Notepad? While there are ways to use JDBC to insert data into an Excel file, AFAIK, the same isn't true for text files. But you can use the classes in the java.io package to create and write to text files.



i just want to insert the column values with the column name same in the database.. isn't it possible?
Hi all,
I have to upload the data from database(MYSQL) into the notepad.the data is coming from website which i m entering into the database but at the same time i want to fetch the same dta from database and upload that itno the notepad. Please tell me how to do it.

here is what i am doing...


in the line where i am inserting data, i am trying to insert that data into an excel sheet but i want to do the same in notepad.. what to do and where do i need to change the code??

thanks in advance..
thanks to all of you.. i'll try to do all of your methods and will see which one is working for me !!!
9 years ago