Adwait Patankar

Greenhorn
+ Follow
since Jan 30, 2006
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 Adwait Patankar

Hi,

We have an application supporting different languages.
In order to set the bounds of the tooltip, we require is to calculate the width based on the width of the string.

I'm doing the following :
----------------------------------
FontMetrics fm = getFontMetrics(this.cellFont);
int width = fm.stringWidth(tip);
----------------------------------

Issue is : length of the string and Font remaining same, if any accented character appears in the string, width returned is same. But while actual display of accented characters it is taking more space.
Hence my strings are getting cut when shown in the tooltip.

Is there any known issue for stringWidth() method of FontMetrics?
16 years ago
When we open an excel file thru IE 5.5 from my application
the file download dialog box open once but in IE 6.0 the same dialog box opening twice with a security warning "Some files can harm your computer ....."

After clicking "open" on second attempt it opens the excel file.

Any solution to avoid this ?

my code:

response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment; filename=\""+runId+".xls\"");
response.setContentLength(byteArrayOutputStream.size());
ServletOutputStream ouputStream = response.getOutputStream();
ouputStream.write(byteArrayOutputStream.toByteArray(), 0, byteArrayOutputStream.size());
ouputStream.flush();
ouputStream.close();

where byteArrayOutputStream is output after exporting from jasper report.

Thanks in advance
17 years ago
As per the requirement I supposed to show a report in html page with a print option. I want the report to be printed automatically by clicking the print button without having the user to change "page setup" - "orientation".

How do I control the page to be printed landscape, when print button is clicked.

Thanks in advance.

Adwait
Hi,

After migration of our project from WAS 4 to WAS 5.0, we imported the ear file in wsad. Now if i make a change to a java file and rebuild project it compiles all the classes in the classpath. As there are more than 2k java files in my project, it takes considerable time.

Is there any setting in wsad which i'm unaware of that avoids these compilations.

Thanks in advance

Regards,
Adwait
18 years ago
Hi Merrill,
Thanks for the prompt reply. I had already tried using with <a> and it works fine. I just wanted to know whether we can use <html:link> struts tag for the same.
Regards,
Adwait
18 years ago
Hi,

I need to call a javascript function in the href of my <html:link>. The javascript function needs to be passed a property in my form.
I'm trying with the following code :

<html:link href="javascript:test('<bean:write name="LoginForm" property="ename"/>')">

I'm getting the following exception:

[1/30/06 18:51:51:336 IST] 64d7befc WebGroup E SRVE0026E: [Servlet Error]-[/pages/details.jsp(32,66) Attribute LoginForm has no value]: org.apache.jasper.compiler.ParseException: /pages/details.jsp(32,66) Attribute LoginForm has no value.

Is it possible to include a struts tag inside another. The exception is because of mismatch of quotes. Can anybody suggest a solution for the same.

Thanks in advance.
Adwait
18 years ago