sanat meher

Greenhorn
+ Follow
since Nov 06, 2008
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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sanat meher

hi..

how can i get those check box value in the target servlet/jsp using request.getParameter ?

Regards,
Sanat
12 years ago
JSP
i got your idea.but dont understand how to implement it.Here calling to the main() is part of the body of the main() function itself.So how can we call the routine from main().
Please specify the code for the same.

Regards,
Sanat
12 years ago
Hi all,

I have a java program which runs repeatedly by calling to main functions in a loop based on a condition ..But after running for some time(say 30 minutes),it shows the follwing error and it terminate the program execution.But as per my requirement i want to run this program for several hours or time without showing any error and terminating the program.

Exception in thread "main" java.lang.StackOverflowError
at sun.nio.cs.StreamEncoder$CharsetSE.implWrite(Unknown Source)
at sun.nio.cs.StreamEncoder.write(Unknown Source)
at java.io.OutputStreamWriter.write(Unknown Source)
at java.io.BufferedWriter.flushBuffer(Unknown Source)
at java.io.PrintStream.write(Unknown Source)
at java.io.PrintStream.print(Unknown Source)
at java.io.PrintStream.println(Unknown Source)
at pitstop.automation1.main(automation1.java:18)
at pitstop.automation1.main(automation1.java:298)
at pitstop.automation1.main(automation1.java:298)
at pitstop.automation1.main(automation1.java:298)
at pitstop.automation1.main(automation1.java:298)
at pitstop.automation1.main(automation1.java:298)
at pitstop.automation1.main(automation1.java:298)
at pitstop.automation1.main(automation1.java:298)
at pitstop.automation1.main(automation1.java:298)
at pitstop.automation1.main(automation1.java:298)
at pitstop.automation1.main(automation1.java:298)
at pitstop.automation1.main(automation1.java:298)


Could anyone please tell me what is the exact reason for this and how to fix this error.

The code for the same program is below:



Here i am calling the main function again and again using automation1.main(args) at line no 299 and 304.

Please help me in this issue.


Thanks,
Sanat
>
12 years ago
Hi everyone,

Could anyone tell me how to write to a csv file using java.
I am reading the content of a csv file and based on some criteria i m writing to anothor csv file.But i m not able to write the entire content to the new file.
I m just able to write the ist line of the csv.Other lines are not written.Please guide me where to make the change.

The code is like this:



Thanks n regards,
Sanat>
12 years ago
Hi everyone,

Could anyone help me on the below problem..

I want to search a file with a particular extension(say .txt) on a particular location i.e inside a folder(C:\xyz\abc).
Here i want to search and return wheather any .txt file exists iniside the folder abc.
I tried the following code,but its not working because i have not specified any file name.(I have supplied only extension here)
File f1 = new File("C:\\WINDOWS\\*.txt");
System.out.println(f1.exists() ? "exists" : "does not exist");

I want a boolean value about wheather any .txt file exists or not in that folder.
Please guide me how to find that type of file in that location.

Thanks and regards,
Sanat
12 years ago
Hi everyone,

Can anybody tell me how to upload a file using jsp.I m trying to upload one image file using <input type="file" name="file" id="button6" value="Browse" />
and submitting the form to upload page.jsp where i m retriving the submitted path value using request.getParameter("file") and then storing it onto database.but when I upload using <file> tag, it's does not upload file from client machine but only from server machine ... So I just only got no file found error(IOexception file not found). ... How should I do?

The code for uploadpage.jsp is as follows:




Could anyone help me out how to resolve this issue.

Thanks,
Sanat
12 years ago
JSP
Hi all,

Can anybody tell me how to make a row disappear on click of checkbox and clicking or submiting the form.

I have a form which shows the data from a table in the database in tabular fashion(row and columnwise).And corresponding to one column i have associated a checkbox fro each row of the datable.So when i select one or more than one checkbox,and click on the submit button,it will perform some action and display those selected items in the same form or different form.but i click the submit button,then those selected rows are still there and when i refresh the page then only those are getting disappeared.but i want those selected columns to be disappeared instantly on clicking the submit button without refeshing the page repeatedly.
Can anybody tell me how to do the same.

My code is like this:





Regards,
Sanat
12 years ago
JSP
iterator.next() is not working multiple times means that i m not able to use this method more than once in the same while loop.
Anyway the problem is solved now.
I made this change as follows:



By storing the iterator.next() value in a string,we can use and pass that value any number of time.


Regards,
Sanat kumar Meher
12 years ago
JSP
Hi friends,

i want to pass values through diffrent hyperlink.The scenario is like this.
I have a tabular data with checkbox corresponding to each row.When i ll select the checkboxes,then those values shouldbe displayed on the same page and the corresponding hyperlink is also there through the same value.I have used iterator to pass multiple values,but the selected checkbox values are not being displayed because iterator.next is not working multiple times.
can anybody guide me how to display multiple values and also pass values through that hyperlink..

The code for the same is here :


thanks,
Sanat

[ November 17, 2008: Message edited by: sanat meher ]
[ November 18, 2008: Message edited by: sanat meher ]
12 years ago
JSP
Hi everyone,

Can anybody help me out how to get the value of the checkbox value in a variable using getparameter or anything else in jsp..
The scenario is like this,I have list of data that is displayed in tabular form(row n column wise)and those data are retrived from the database only..In one column,i have check boxes corresponding to each row.So when i select check boxes(more than one),then that corresponding row values should be retrived and to be displayed in anothor page or frame.But i dont know how to retrive those values in jsp..

The code for those tabular data is like this:


Thanks in advance,
Sanat

[ November 14, 2008: Message edited by: sanat meher ]

[ November 14, 2008: Message edited by: sanat meher ]
[ November 14, 2008: Message edited by: Bear Bibeault ]
12 years ago
JSP
thanks everyone.
I think i have to validate this using javascript.I dont have any other option.

I dont know WEB 2 for now,but expecting to learn it.

Thanks
Sanat
12 years ago
Hi,
When i enter the nonnumeric string also,it shows the numberformatexception,it means that it is unable to parse the string to number.

Validating the field with java script will do..but i need some alternate solution for the same in java.

Thanks
Sanat
12 years ago
Can anybody help me how to solve the numberformatexception..

I have a form in which i have different types of field.One of them is to input the number in the textfield.
After i submit the form,I get that value using the following code in anothor jsp page.

String totalpages = request.getParameter("totalpage");
int totalpage = Integer.parseInt(totalpages);

But the problem is that,when i leave this textbox empty without entering any value and submit the form,i get the numberformat exception because of the empty string "".How to parse this one?
12 years ago
thanks for your suggestions. yes i need more help on the 2nd approach..

thanks,
Sanat Kumar Meher
12 years ago
JSP
hi all,

Can anybody tell me how to post the form data to two action with one button. i.e. When i click or enter the submit button,then the form data should be submited to two actions say 1.jsp and 2.jsp.
And in both the jsp pages i should be able to retrive the form data from the source form using request.getparameter().

Thanks in advance..
Sanat Kumar Meher

[ November 06, 2008: Message edited by: sanat meher ]
[ November 07, 2008: Message edited by: Bear Bibeault ]
12 years ago
JSP