Hi everyone, i m new to JSP, i want to create table in jsp,attribute will be selected by the Excel sheet which resides on server. client will see the table and he/she can edit or reset the table and these modification will be saved on server.next time when same user will ligin he/she should see the same table edited by him.
can anyone plz help me
thanks in advance

A JSP just formats your output into (usually) html, so learn about html tables...

Your servlets that process the data would get a LOT of fields back though, if you represented every cell as a form field (which you'd have to do).

If you want to work with Excel, you should look at using ASP rather than JSP... there are many ActiveX controls which would allow the Excel sheet to edited inplace on the browser...

Now that I said that, I have to ask why, why, why, why, why....

As much as hate to admit it, jwenting is right on this one...

You will need tobuilt the table in html, but the number of rows and columns may be somewhat dynamic if you wish to have an Excel file, or similar as the source...

You will need to process the data source, Excel file, on the server, and generate the appropriate table in your servlet... then I recommedn saving the table code to a bean, and then use the bean on your page to show the table...

You will have a lot of fields, and they may be dynamic, to process when the use saves the data... do this without naming everyone of them... use a naming convention and then loop through all fields sent from your form, check that the names match the convention and process each one based on the name... for example...

us column & row like Excel does so field a1 = first row first column... etc... That means you only have to write the rpocessing code once.... not handle 200+ individual fields...

Then the question why, why, why, why... Why the heck are you using an Excel file on the sever with Java... CSV would even be better... better yet an Access db file... and better than that... a real RDBMS....

Peace,

thanks for replying. dear its my requirement that i have to work with excel.i have to automate to excel sheet which will be in different format.excel sheets will be on server. for the better performance i m converting into Accessl. ok i m telling wati have done till now. i m able to create and fetch data from excel to acess. and also i m showing these data to client after loging. next iissue i have to do that client will edit those cells data based on his requirement and every time some validation will perform at the client side itself. after entering data he cant sve/reset his data on server. next time when he will login he should see updated data.
plz reply me . i will be very thankful.

thanks

If you want to work with Excel, you should look at using ASP rather than JSP... there are many ActiveX controls which would allow the Excel sheet to edited inplace on the browser...

Now that I said that, I have to ask why, why, why, why, why....

As much as hate to admit it, jwenting is right on this one...

You will need tobuilt the table in html, but the number of rows and columns may be somewhat dynamic if you wish to have an Excel file, or similar as the source...

You will need to process the data source, Excel file, on the server, and generate the appropriate table in your servlet... then I recommedn saving the table code to a bean, and then use the bean on your page to show the table...

You will have a lot of fields, and they may be dynamic, to process when the use saves the data... do this without naming everyone of them... use a naming convention and then loop through all fields sent from your form, check that the names match the convention and process each one based on the name... for example...

us column & row like Excel does so field a1 = first row first column... etc... That means you only have to write the rpocessing code once.... not handle 200+ individual fields...

Then the question why, why, why, why... Why the heck are you using an Excel file on the sever with Java... CSV would even be better... better yet an Access db file... and better than that... a real RDBMS....

Peace,

thanks for replying. dear its my requirement that i have to work with excel.i have to automate to excel sheet which will be in different format.excel sheets will be on server. for the better performance i m converting into Accessl. ok i m telling wati have done till now. i m able to create and fetch data from excel to acess. and also i m showing these data to client after loging. next iissue i have to do that client will edit those cells data based on his requirement and every time some validation will perform at the client side itself. after entering data he cant sve/reset his data on server. next time when he will login he should see updated data.
plz reply me . i will be very thankful.
:D

thanks

OK, so you have the excel converted to Access and I assume you can access the Access to query the data. That is a confusing statement... anyway, you will want to format a table that can be included in your page. Format the full table on the server side, and add a text input field to each cell, name each cell, how you need to, i.e. like Excel does. And set your data as the "value" of the text input field. This will give you a pseudo spreadsheet look...

Then use onChange, to check the values of each cell... you could even use Ajax to send the update in each cell to the server as it is edited - as soon as your Javascript has validated it... Then your server side only has to process 1 field at a time...

Of course, unless the requirement says you must present the data as a spreadsheet, I would recommend reformatting it into a label=value type format... but that really depends on the "nature" of the data...

If you must make it look like a spreadsheet, then be sure you have the tab order down to be spreadsheet intuitive... It should be ok with default behavior but just be sure...

;-)

This article has been dead for over six months. Start a new discussion instead.