Senthilkumar Adaickalam

Greenhorn
+ Follow
since Nov 08, 2004
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 Senthilkumar Adaickalam

Hi,

we have developed a web application using struts 1.38 + spring + hibernate and we now want to migrate it into Struts 2. I went thro the struts 2 documentation and understand that formbeans have been removed completely from the framework. Without formbean, its fine for the forms having few fields but what will happen if the form has more number of data. Do we need to add setters and getters in action class for each field? If yes, i feel it decreases the productivity compare to the struts 1's dyna action forms where we just define the form in struts-config.xml.

Please clarify.
16 years ago
Hi Rohit,

You are allowed to have only one element under the <SOAP:BODY> element of your soap message and which should be defined by your schema. Please put the price and volume elements into the single element and try.
16 years ago
Hi All,

I need to display the search results using struts and display tag. Following are the ways i have in mind to implement this but i would like to know the best optimal solution before start my development.

1) retreive the complete search results and store into the HttpSession object.
This may be a performance bottleneck if concurrent sessions opened.

2) retrieve the records from database on demand (let say 10 records per user hit).
Results in more number of costly database calls.

3) retreive the part from database and store into the HttpSession object, let say my search results in 1000 matching records and i will get the first 100 records from the database and put it in the HttpSession object. When the user clicks on page 11, i will query the database again and retreive another 100 recods and store/overwrite into HttpSession object.
I think this is the better approach among the above three.

Please let me know if you have any other better solution and how to implement.
16 years ago
Hi Satish,

You can use Spring and Hibernate combination which reduces lots of your coding & testing effort. Handling transactions, persistence, etc are made simple and configurable using the xml files. The spring framework provides xxxTemplate for DAO supports, where xxx can be any of Hibernate, JDBC, JTO, ect.
Hi Nanda,

displaytag.jar needs to be included in your classpath and you can download from the following url

http://displaytag.sourceforge.net/10/install.html

Regards,
Senthil
16 years ago
Hi Merrill & Brent,

Thank you for taking your valuable time to answer. I really appriciate it. As you suggested, have decided to save my lists that do not change at application level (as an attribute in servlet context).

Regards,
Senthil
16 years ago
hi nanda,

to use display tag, you need to have the jar file in your classpath.
16 years ago
Hi Merrill,

Thanks for your input.

What do you suggest on using java cache. I think if we put the object in application scope it will be alive irrespective of whether its being used or not, but the cache will keep cleaning the objects if not used for some time set in the cache property file.
16 years ago
Hi,

In your jsp, add the taglib tag to import display tag library and add the code similar to the below one.

<display:table class="simple" name="yourList" align="center">
<display:column property="yourName" title="your Name" />
<display:column property="yourDesignation" title="your Designation" />
<display:column property="yourOrg" title="your Org" />
<display:column property="yourDOB" title="your Birth Date" />
<display:column property="yourSex" title="your Sex" />
</display:table>
16 years ago
Hi,

I need to develop a search functionality using struts framework and hibernate. My search page has almost all html controls like text, checkbox, radio, select and multiple select. I need to populate all these html controls (except text) from database while retreiving the search page for the first time. Do I need to keep all these information in the form bean or in the session. i dont want to add much into the session as each select is having a lengthy list, eg, country list, birth year etc. And at the same time i dont want to keep this information into the form bean (i think all these list of informations are only meant for user selection and are irrelevent to the form, form should hold only the data to be sent to the server)

Please suggest me the more efficient way from the performance point of view.

Thanks and Regards,
Senthil
16 years ago
Hi Young,

I need to display the summary of transactions in the excel sheet. I have tried with both POI and JXL to complete this functionality. Its working fine in my dev machine(Windows). But when i moved to the prod env (unix machine), its dispayed the data as shown below. My code goes as below:

response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition",
"attachment; filename=sampleName.xls");

//JXL
WritableWorkbook w = Workbook.createWorkbook(response.getOutputStream());
WritableSheet s = w.createSheet("Cards", 0);
s.addCell(new Label(0, 0, "columnValue"));
w.write();
w.close();

//POI
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet("Cards");
HSSFRow row = sheet.createRow((short)0);
row.createCell((short)0).setCellValue("columnValue");
FileOutputStream fileOut = new FileOutputStream("cards.xls");
wb.write(fileOut);
fileOut.close();


I am creating the workbook by reading the data from the .csv file which is stored on the weblogic5.1 server.
17 years ago
The excel report is displayed as junk data as shown below irrespective of the api i am using in the unix environment. But the same code is working fine in the windows env. i have tried with POI and JXL APIs.

I guess i need to do some additional config for content type. Pls help me asap.

������>�� ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� ������\pJava Excel API v2.6 B�a=���=h\:�#8X@�"��1���Arial1���Arial1���Arial1���Arial��� � ��� � ��� � ��� � ��� � ��� � ��� � ��� � ��� � ��� � ��� � ��� � ��� � ��� � ��� � � � �+�� � �)�� � �,�� � �*�� � � �� � ������������������`�U* Shell Cards�,� #.Detail Card Information Display Card NumberAccountNameCard NoMedia Vehicle No Driver NameMax Qty Daily Limit Weekly Limit Monthly Limit Txn per DaySuperRegularDieselKeroseneLubes Card ExpiryCurrent Status Vehicle No.2 Vehicle No.3 Vehicle No.4 Vehicle No.5 Vehicle No.6 Vehicle No.7 Vehicle No.8 Vehicle No.9 Vehicle No.10Site-Region Restriction Site-Region 1 Site-Region 2 Site-Region 3 Site-Region 4 Site-Region 5 Site-Region 6 Site-Region 7 Site-Region 8 Site-Region 9Site-Region 107002481 81180 1182481180 TARGET LLCF Magnetic 5407 DS 700.0NO Aug-2004 Card Expired new card issued 7002481 81180 118325408 DS607002481 81180 118405553 DS7002481 81180 11857406 MA50Feb-20057002481 81180 118658475 AS40Jun-20057077481 81180 11875S3630 SSFeb-2006 new card not issued 7002481 81180 118815024 AKL.V.7380Mar-20067027481 81180 11896G8938 SSMR.YOUSUF SHAMMAS0Apr-20067027481 81180 119044435 M TARGET L.L.C.May-20067002481 81180 11915 Smart Card1644 BKL.V.7680.0560.02480.02.0Jan-2009"Active - Delivered on 27/Feb/2005N7002481 81180 119235093 BKL.V- 7560.0420.01860.07002481 81180 119495016 AWOct-2009"Active - Delivered on 03/Oct/20057002481 81180 119561841 MD50.0Mar-2010"Active - Delivered on 11/Mar/20067077481 81180 11966OPEN7002481 81180 11972773 MDC-26"Active - Delivered on 21/Mar/20067002481 81180 11980L.V-82100.07002481 81180 119984136 WKL.V-85"Active - Delivered on 02/Apr/20067002481 81180 120042656 HWL.V-77100Apr-2010"Active - Delivered on 12/Apr/20067002481 81180 217329977 AB SUBARU S/W7077481 81180 21767EMERGENCY CARD7002481 81180 2182370.0490.02170.0Sep-2008"Active - Delivered on 28/Aug/20047002481 81180 218317002481 81180 218497002481 81180 21856Feb-2009 Terminated7002481 81180 2186440.0Jun-2009"Active - Delivered on 25/Jun/20057077481 81180 21874120.0Feb-2010"Active - Delivered on 27/Feb/20067002481 81180 218807027481 81180 21895"Active - Delivered on 08/May/20067027481 81180 21903May-2010"Active - Delivered on 28/May/20067077481 81180 31550Apr-20057077481 81180 315687077481 81180 31592"Damaged on 17/Mar/2004 - reissued7077481 81180 316187027481 81180 31654Oct-20057002481 81180 316818480 ASTARGET CO.L.L.C7027481 81180 317202563 ABBMWMay-20057002481 81180 317317077481 81180 317667002481 81180 317803868 DK7002481 81180 406415580 AK7002481 81180 41284 17027 MCTMITSUBISHI P/U"Damaged on 19/Jul/2003 - reissued7002481 81180 413429297 AB7002481 81180 413758569 HKM.A.N.WATER TANKER7002481 81180 41409"Damaged on 31/May/2003 - reissued7002481 81180 41417274 HKL.V.63Sep-20057002481 81180 415167480 AK2007077481 81180 41559Apr-2009"Active - Delivered on 15/May/20057077481 81180 41567"Active - Delivered on 25/Apr/20057077481 81180 415917077481 81180 416177027481 81180 41638MR.HANI JUMAN ASHOUR RAJAB7002481 81180 416494722 MKNov-20057002481 81180 41664713 HM"Blocked on 25/Aug/2004 - reissued 7002481 81180 416807002481 81180 506407002481 81180 507079089 BK HINO TIPPER7002481 81180 5072395 HKL.V.067002481 81180 50749273 HK7002481 81180 507569094 BKMITSUBISHI ROSA BUS7002481 81180 510104491 RKL.V.557002481 81180 510364755 WKL.V.527002481 81180 512267860 HKSCANIA PRIME MOVER7002481 81180 51283840 RKJul-20057002481 81180 513661068Jan-20067002481 81180 51374May-2009"Active - Delivered on 10/Oct/20057002481 81180 513905579 AK907002481 81180 51408 Suspended7002481 81180 51416Sep-20097002481 81180 51424270 HKL.V.647002481 81180 514322874 DKL.V.657002481 81180 514403867 DK7077481 81180 515907077481 81180 516087002481 81180 51648Nov-2009"Active - Delivered on 18/Feb/20067002481 81180 51663Aug-20087002481 81180 516973400 HK ASHWAK LILAND200.01400.06200.07002481 81180 517132651 MKHYUNDAI7002481 81180 607067002481 81180 607487002481 81180 610357002481 81180 6122<$5"Active - Delivered on 28/May/20057002481 81180 61282Jul-20097002481 81180 61365350.01550.0Jan-20107002481 81180 6139990.07002481 81180 614317002481 81180 614497077481 81180 616077002481 81180 61712"Active - Delivered on 22/Sep/20057002481 81180 709943377Dec-2004"Blocked on 19/Jul/2003 - reissued 7002481 81180 809937002481 81180 90992"Active - Delivered on 30/Jul/2005�*� Owx �� 2Aip���<e���%M|���(P[�x �� .G o� �� � (A i� �� � <Q y� �� . VU }�
17 years ago
Hi,

I am trying to generate the excel report using POI and the environment is Java1.3, WebLogic5.1 on UNIX m/c.

I am able to generate the report successfully in windows environment: Windows XP, JBOSS and Java1.4.

In the Unix env, i am getting the excel document with junk data displayed on it.

Pls help me.
Hi,

I need to read the Excel sheet and send all the data to the database. I had tried with examples from the net but couldnt able to solve it. The Excel Sheet is having around 50+ rows and having 5-10 uneven columns spread over the rows.

For ex, the rows looks like,
Company Name:--------------- Year Established:---------------
Address:--------------------------- Ownership: Public--------
City------------------------------------- State---------------------- Private-------
Country------------------------------- Website----------------- Other-------

The value of Owenership should be either public or private or other.

How do I read this XL and put the data into the database?

Thanks in Advance
Senthil
19 years ago