tarun Mehra

Greenhorn
+ Follow
since May 30, 2001
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 tarun Mehra

hi,
I have a servlet waiting on the server. It creates a new MultipartRequest object. But I have previously used multipartRequest only with an html form that has enctype="multipart\formdata" and action is the servlet that does the processing. How do I do all this within a java application.
Thanx,
Tarun
18 years ago
hello all,
I am using a swing application to upload files to a server. How do I go about doing this? I am using a JFileChooser to allow the user to select files from his local machine. I have previously used Multipart request for uploading files using a servlet but have no clue for this one.
Please help me.
Thanx in advance.
Tarun.
18 years ago
Has anyone ever come up with a way to call a Perl program from Java? If so, how are input and output handled?
Thanks,
Tarun
19 years ago
hi everybody,
Can anyone tell me if this is possible. That is instead of capturing the string line by line, capture it all at once.
Thank you,
Tarun
19 years ago
I want to capture the entire content of a file into a single string. Is there a way to do it without doing it line by line through buffered reader's readLine() method. The readLine() method affects the performance considerably.
Thank you,
Tarun.
------------------
19 years ago
hey angela,
Thanx a bunch. I just never realised that there was a getFontMetrics method for the component class. And all this time I thought that it could be applied only to Graphics objects. This really solved my problem.
Thank you, I appreciate it.
tarun.
19 years ago
Hi angela,
Without creating or initiating Graphics objects , how can I just access FontMetrics or getFont method in class(mine is a servlet and nota class/applet)? It seems you hae figured that out. Please let me know too.
Than you,
tarun
19 years ago
Hey guys,
I am working on a project that requires measuring the fontmetrics and the string width in a servlet. I have already defined the font for my webpage using css. For the purpose of fontmetrics I define the same font using Java(Font f = new Font(...)). When I run the servlet it gives me an error that font not defined in font.properties.
Anybody got any suggestions?
Thank you,
Tarun Mehra.
19 years ago
hi guys,
One more question please. Is it a way to measure and manipulate the string width in html like there is in the fontMetrics class of java. I want to take the string out of the database and measure the string width in html after setting a particular font.
Please let me know if i can do this and how?
Thank you.
Hi everybody,
I have links on my page that open pop up windows when I click on them. The link is <a href=\"./WindowTest2?word="+sword+"\" onClick=\"return openWindow(this,'myPage')\">text</a>. This in a servlet class and the code for the 'openWindow' function is also inside the headers of this servlet. This servlet calss WindowTest2 that is another servlet. WindowTest2 makes database connections and gets the text out. I want to able to resize the pop up depending on the text. The code for opening the window that I am using is win = window.open(href, windowname, 'width=0,height=0,screenX=350,screenY=300,top=300,left=350,scrollbars=yes'); 350 by 300 is the initial sizing but I want to be able to manipulate it everytime depending on the test in the database that the WindowTest2 servlet pulls out.
Anybody got any ideas/suggestions.
Thank you,
Sincerely,
Tarun Mehra.
------------------
Hello,
I am using a number of servlets that connect to a database using another class x. The code for opening the database connection is in the constructor of class x. So everytime the servlets are loaded an instance of this class x is created and the database connection is opened. My question is how do I ensure that the resources are released at the end or is it alright to leave the database connection open. One of my thoughts was to close the connection in the finalize() method of the class x but that does not happen.
Your help will be greatly appreciated.
Thank you,
tarun
19 years ago
What changes do I make to tomcat so that it refreshes servlets. Right now it is not refreshing the files at all unless I renmae them which is a big hassle.
Thank you,
sincerely,
tarun
------------------
19 years ago