Gavi Raaghav

Ranch Hand
+ Follow
since Apr 28, 2005
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Gavi Raaghav

What is the best way of implementing the site search feature similar to on various sites like where the user can enter a search string to be searched within

The application which requires this feature will be hosted on WAS5.1 base edition.
Thanks for the response Bear.
Actually when the pop up opens , till the time the data is rendered an image of "Report generating" is displayed to the user.This is done using AJAX.
May be that is blocking the request.
Even otherwise how does the request behave? Can there be multiple request for the same user getting processed at the same time?
17 years ago
We are building a web application using struts and websphere. One of the modules is that of report generation.
From the parent screen when the user clicks on run report button a new window opens up which displays the result after some time (time taken to get the data from the database). While the first report is getting generated if the user clicks again on the run report button another pop up opens up which has the same behaviour.
The problem is if there are 2 pop up openened and the report is still not generated the parent screen hangs that is if the user clicks on a button on the parent screen the application does not responds.
However as soon as 1 of the reports gets generated the parent application starts responding.
Why is this happening? Is it because of request object not free or something else?
17 years ago
In our struts based web application we have to generate reports which contains different graphs,pie charts and bar graphs.
Which API/product is best suitable for it and is also free.
I am currently evaluation JFreeChart.
17 years ago
I have a servlet in which in the init method some master data is getting cached.
The problem is that whenever in WSAD i save a resouce in the web project this particular servlet gets destroyed and the init method gets called again thereby rebuilding the entire cache.
The servlet gets loaded on startup.
17 years ago
We are developing a web app using Struts and WAS 5.1. The requirement is that the user can input data in multiple languages like english,japanese and the same needs to be displayed back according to the locale of the user.
Static data is not a problem as its getting rendered properly through resource bundle.
I am storing data in UTF-8 format in the database.
For dynamic data I�ve created a filter which intercepts every request and converts the encoding to UTF-8.
When I am retrieving the property corresponding to Japanese character in my action class, its not coming in proper format.
I.e. JVM is not able to recognize the proper format.
One thing, when I am directly providing some Japanese character (copy & paste) in the SQL server database, then on the front end, it is displayed in proper format.
I.e. things are working fine from back end to front end but not vice-verca.
So I am not sure whether problem is with request-response or from JVM side!!

I am sure i am missing something while sending the data from the front end to the DB so that its not getting stored in UTF-8 format.
Any pointers will be highly appreciated.
17 years ago
So i guess its the behavious of the IE because Firefox just keeps rendering the data the moment it receives it.
17 years ago
I have a jsppage which depending upon the user selection may show a lot of data.
Whenever there is a lot of data which gets displayed in the table the data appears at one shot and does not trickle through in installments the way it does in firefox browser.
Is there a way to keep flushing the data as it keeps coming becuase when i view source of the page i can see the entire data set but its still not rendered by that time on the browser.
17 years ago
I am using http and since its just data capture windows the users are more comfortable hitting the browser back button.
if it is a property of the browser then shudnt every website behave in the same way but it dosen't.
17 years ago
Whenever the user hits the browser back button the jsp page expires and needs to be refreshed in order to get the data.
I am not using any measure(response.setHeader) to expire the page explicitly.I am using Struts and Websphere5.1 and IE 6.0

Is there any setting in WAS which needs to be configured in order to avoid this?
17 years ago
I was able to solve this problem but now encountering a diff problem. When on windows the open/save dialog box opens and so does the excel but on a linux box although the open/save dialog box opens once but the excelopens in the browser itself.
Is that a linux problem?
17 years ago
I just stripped that piece of code as it was not relevant to the question which i have posted
17 years ago
I just stripped out that exception handling peice of code as that is not relevent to the question which i am asking.
17 years ago
The requirement is to generate a .csv file when click on a hyperlink and after clicking the Open/Save dialog box should open allowing the user to either open the fileor save on the hard disc.
Following piece of code achieves all the above but the problem is when you click on the "open" on the Open/Save dialog box then it pops up again and then when you click on Open gain then the file opens up. Please let me know what needs to be done in the following code snippet to fix this problem:

import java.util.*;
import java.lang.StringBuffer;
import java.lang.Object;
import java.util.Random;
import java.util.ArrayList;

FileOutputStream fout;

int i;
Random rand = new Random();
int randomInteger = rand.nextInt();
String sFileName = "Excel"+randomInteger+".csv";
File nameOfFile1 = new File("../ExcelDir");
File nameOfFile = new File("../ExcelDir",sFileName);


fout = new FileOutputStream(nameOfFile);
} catch(FileNotFoundException e) {


StringBuffer SessionContent = new StringBuffer();
String sFileContent = SessionContent.toString();
byte[] objStrArr = sFileContent.getBytes();

} catch(IOException e) {


obj_HttpServletResponse.setHeader("Content-disposition","attachment;filename=\"" +sFileName+ "\"");
InputStream in = new FileInputStream(nameOfFile);
ServletOutputStream outs = obj_HttpServletResponse.getOutputStream();
int bit = 256;

try {
while ((bit) >= 0) {
bit =;

} catch (IOException e) {
17 years ago
I have achieved internationalization for every european language but i am struggling with the japanese language.
I have maintained ApplicatioResources_ja properties file and have mentioned the unicode for all the values but still it shows up junk values on the screen.
I am using struts 1.1 and WSAD 5.1.2. I am using UTF-8 in the jsp as the charset.
I cant understand whats going wrong.
18 years ago