vishal gaiky

Greenhorn
+ Follow
since Jun 06, 2012
Merit badge: grant badges
For More
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 vishal gaiky

403 Access Denied
11 years ago
so what should i do to make different set of radio button ...means one set of radio button for each iteration.
11 years ago
i want to display any 25 questions...5 questions per page..and total five pages.
11 years ago
hello friedns,
i am developing one application on test in which i want to show question and four options..i am using


but i am not able to select one radio button in each row...only one radio button is getting selected for all rows..i want to select one radio button for each row of option
11 years ago
hello friends i want to display radio button in columns of displaytag table...how to achieve it..
please help me
11 years ago
i want to use pagination also so i cant use other tag than display tag..i want pagination + radio button to options
11 years ago
hello friends,
i have one database in that i have 100 questions..out or hudred i want to show any25 rows..and out of 25 row i want to show 1-5 number rows of database compulsary..how to achieve it
11 years ago
hello friends,

i am developing one online exam application using struts i want to use pagination to show five pages and on each page i want to show 5 questions..now problem is that i am using display tag but i dont know how to iterate it for rows only..i want to show data on rows not on columns like

1. question text.
radio button 1
radio button 2
radio button 3
radio button 4

2. question text.
radio button 1
radio button 2
radio button 3
radio button 4

3. question text.
radio button 1
radio button 2
radio button 3
radio button 4


like above
11 years ago
thank you chetan..i will try your advice and will let you know..thank you once again..
11 years ago
hey friends please help me..i m stuck in this problem from last two days..please help me
11 years ago
i tried with absolute path also but it didnt work..actully i want to take excel file from user in jsp page using upload file option
11 years ago
FileInputStream myInput = new FileInputStream(filename);

i have used this in above code
11 years ago
this is my action class but i am getting error at FileInputStream myInput = new FileInputStream(filename); in following code as FILENOTFOUNDEXception..help me




public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception
{
String target="";
FileForm myForm=(FileForm)form;
FormFile myFile = myForm.getTheFile();
StoreExcel storeExcel=new StoreExcel();
File file = new File(myFile.getFileName());


// String fileNamee="C:\\Book1.xls";
System.out.println("file name ----"+fileNamee);
String fileName=myFile.getFileName();
/

Vector dataHolder=read(fileName);
saveToDatabase(dataHolder);
return mapping.findForward("success");

}
public Vector read(String fileName)
{
Vector cellVectorHolder = new Vector();
try{


FileInputStream myInput = new FileInputStream(filename);// giving error at this line...filenotfound exception can anybody help me


POIFSFileSystem myFileSystem = new POIFSFileSystem(myInput);
HSSFWorkbook myWorkBook = new HSSFWorkbook(myFileSystem);
HSSFSheet mySheet = myWorkBook.getSheetAt(0);
Iterator rowIter = mySheet.rowIterator();
while(rowIter.hasNext()){
HSSFRow myRow = (HSSFRow) rowIter.next();
Iterator cellIter = myRow.cellIterator();
Vector cellStoreVector=new Vector();
while(cellIter.hasNext()){
HSSFCell myCell = (HSSFCell) cellIter.next();
cellStoreVector.addElement(myCell);
}
cellVectorHolder.addElement(cellStoreVector);
}
}catch (Exception e){e.printStackTrace(); }
return cellVectorHolder;
}
private void saveToDatabase(Vector dataHolder) {
String username="";
String password="";
for (int i=0;i<dataHolder.size(); i++){
Vector cellStoreVector=(Vector)dataHolder.elementAt(i);
for (int j=0; j < cellStoreVector.size();j++){
HSSFCell myCell = (HSSFCell)cellStoreVector.elementAt(j);
String st = myCell.toString();
username=st.substring(0,1);
password=st.substring(0);
}
try{
BaseDao dao=new BaseDao();
Connection conn=(Connection) dao.getConnection();
Statement stat=(Statement) conn.createStatement();
int k=stat.executeUpdate("insert into USER_TABLE(username,password) value('"+username+"','"+password+"')");
System.out.println("Data is inserted");
stat.close();
conn.close();
}
catch(Exception e){}
}
}





}

11 years ago
hello friends... i want to take excel file from user and store its data into database table..how i will achieve it..kindly help me..thank you in advance
11 years ago