Arathi Raj

Ranch Hand
+ Follow
since Nov 22, 2002
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 Arathi Raj

Hi,
I have a below method.
The input to this method comes from file. What happens is if the input is say 20083030, then it is conveting to 06/30/2010. Which is not right. Is there any alternative to fix this issue.

public static String getFormattedDate(String s) {
String retDate = null;
if(s == null || s.equalsIgnoreCase(""))
return retDate;
if(s.startsWith("*"))
return s;
SimpleDateFormat format = new SimpleDateFormat("MM/dd/yyyy");
SimpleDateFormat format1 = new SimpleDateFormat("yyyyMMdd");
try {

Date dt = format1.parse(s);

retDate = format.format(dt);
} catch (ParseException e) {
e.printStackTrace();
}

Thanks

return retDate;
}
12 years ago
Hi

Can you tell me the difference between struts and JSF? Is it possible to get rich user interface using JSF or do we have to go with AJAX?

Currently we are working on application which requires tabs. Which technology is good to get more naviagtion


Thanks
12 years ago
Here is the code

statement = conn.createStatement(ResultSet.TYPE_FORWARD_ONLY,ResultSet.CONCUR_READ_ONLY);
statement.setFetchSize(3000);
rset = statement.executeQuery(sqlQuery);

//writing data to a text file saved on the server.

out = new BufferedWriter(new FileWriter(outfilename));
while (rset.next ())
{
count++;

out.write(rset.getString (1) + "\t");

out.write(rset.getString (2) + "\t");
out.write(rset.getString (3) + "\t");
}

out.write(rset.getString (4) + "\t");
if (rset.getString(5) != null)
{
out.write(StringUtil.removeDuplicateWhitespace(rset.getString (5)) + "\t");
}
else
{
out.write(rset.getString (5) + "\t");
}

if (rset.getString(6) != null)
{
out.write(StringUtil.removeDuplicateWhitespace(rset.getString (6)) + "\t");

}
else
{
out.write(rset.getString (6) + "\t");

}

out.write(rset.getString (7) + "\n");

}

rset.close();
statement.close()
We are actually reading directly from results set and transferring data to text file.
Hi,

I have a issue, where we are running a query which returns around 25,000 records or more at a time. Storing that in results set and reading one by one to out put to PDF document is giving out of memory isssue. Can you guys tell me what is the other alternative we can do in order to avoid out of memory problem .

I changed the heap size but still it didnot solve the problem.

Thanks
Hi,

We have application running on tomcat server. That application mainly used to run reports in form of pdf and excel. it talks to 3 differnt databases to get the data and outputs to pdf and excel. Most of the time application runs fine , but in few cases it throws out of memory. I increased the heap size to 1 GB but still the same problem.

The other thing apart from above application we are running 3 other different applications on same tomcat server.

Of all we have two versions of tomcat installed on same server and in each versions of tomcat we have 3 to 4 applications running.

Now my concern is it because of our setup does it leads to out of memory problem or what others things might cause the problem.

Let me know how we can improve the performance.

Thanks
12 years ago
Hi,

I am new to ACEGI. I want to know what is the necessity of using acegi when we can use form based authentication directly.
I know acegi supports all type of authentications. what way does it make diffrence in developing web application.

Say I devleoped web application with user mgmt running on tomcat server. I can force the security on tomcat server by using form based authetication right. Do explain me in detail

Thanks
Arathi
12 years ago
Hi,

Why does the following program display the value for 'g' as 113.99999999999
instead of 114? The program works fine with all the values except for 113,114,115. Can any body tell me what is wrong? It gives problem when I try to multiply by 100.

public class doubleString{

public static void main(String[] args)
{
Double d = new Double(1.14);
double f = d.doubleValue();
System.out.println("f*100 = " + f);
double g= d.doubleValue()*100.0;
System.out.println("g ="+ g);
}

}
13 years ago
Yes. It includes those header information. Code doesnt explicitly define that.

Thanks
13 years ago
Can some one answer me what to do in the about situation I have explained

Thanks
13 years ago

Originally posted by Paul Clapham:
The message doesn't make sense without the headers. Why would you want to remove them?





Hi
The problem I have is when I receive email, The body of email also includes those header information

Example,
I receive email as below
"
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

This email is in reference to the documents.
"


So I just want to display as

" This email is in reference to the documents. ",
and not those headers.
How to get rid of those from emails

Thanks
13 years ago
Hi,

I have program which sends email. The email that being sent has body along with which it also includes following headers.

Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Can anyone tell me how we can remove above from emails that are being sent?. I just want to send the message but not the headers.
13 years ago
Hi,

Can you tell me under what oop concept does overloading and overriding belongs to. ?
13 years ago
Hi,

I want to know how to make 1000 users to access the website at a same time. can we do it by using threads. Are do we have to do something webserver configuration.

Thanks
14 years ago
Hi,

Can anyone tell me why do we have to use struts when we have java bean?
14 years ago