Help coderanch get a
new server
by contributing to the fundraiser

Medha kamat

Greenhorn
+ Follow
since Aug 22, 2002
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 Medha kamat

I have a form that uploads a file.Form uses FormFile object for
uploading of the file.Uploading works just fine.Problem i am having is
while wrtitng an automated test.In the test i am seting a form using setActionForm.Now as i mentioned in this form i want to set a FormFile object and that's where i am struggling

HolidayFeedUploadForm holidayFeedForm = new HolidayFeedUploadForm();
DiskFileItem fileItem = new DiskFileItem("uploadFile","application/vnd.ms-excel,text/xml",true,
"myfileName",1200, null);
CommonsMultipartRequestHandler mp = new CommonsMultipartRequestHandler();
CommonsMultipartRequestHandler.CommonsFormFile dd = mp.new CommonsFormFile(fileItem);
setActionForm(holidayFeedForm);

It complains about visiblity of CommonsMultipartRequestHandler.
CommonsFormFile.I know that CommonsFormFile is an inner class and
package access is private.All i want to do is create a new FormFile
object and set it on the form.How would i achieve that?


Thanks
Medha
17 years ago
I have date fields on my form.Depending on locale it shows date in different formats.I would like to say what format it is by looking at locale.What i mean by that is if my locale date is in 29/07/05 the i want to print dd/mm/yy on form.How do i get locale date format style?
18 years ago
Thanks for the reply and yes i was thinking about the 'XDoclt in action'.But i would like to hear opinions from people who bought it.How good it is in terms of examples and how useful it was.
19 years ago
Hi

I never used xdoclets before and i would like to use them.But i just don't know where to start???I know what it is but couldn't find good,simple tutorials anywhere.I thought i will buy a book but on amazon i couldn't find a book with good review.

Please help me.Has anyone out there bought a book which you would recommend?

Medha
19 years ago
GenericServlet is protocol independent servlet which implements Servlet interface.HttpServlet extends GenericServlet and adds http specific tasks to it.It is an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A subclass of HttpServlet must override at least one method, usually one of these:

doGet if the servlet supports HTTP GET requests
doPost for HTTP POST requests
doPut for HTTP PUT requests
doDelete for HTTP DELETE requests
init and destroy to manage resources that are held for the life of the servlet getServletInfo which the servlet uses to provide information about itself
19 years ago
After clicking on form button i open a new window with window.open.This new window is made up of two frames.I am trying to load applet in one of the frames.When i try that it loads the applet but IE freezes and wouldn't let me do anything.I have to go in task manager and kill the task from there.
Is there any issue with loading applet in a frame?
Any help or direction on this would be appriciated.
Regards
Medha
20 years ago
i have a java based reporting system which finally generates reports in html
and u can see them in IE(we are on 5.5 at the moment).Generated reports contains table and charts.We use third party tool to generate charts which finally rendered as PNG images in html report.
My problem is when i save theses reports by doinf File->Save as in IE (i save it as web page complete).Ok so far so good..now if i opwn this report from where i saved it i get report with tables but no charts (shows broken image icon).So i went to the folder where it's saving all files and realised
that it is saving images as PNG though there size is 0.
Why isn't it downloading images???What's wrong?Any help would be appriciated.
Regards
Medha
Hi
i want to persist some data between sessions.I thaught i will use cookies but may be it's not a good idea to store such data (actually it's a java object that i want to persist)with cookies.
So what is a better way of storing such data?
All suggestions welcome!
Regards
Medha
20 years ago
Hi
Thanks for the reply.
I would like to explain what i am doing here.We have a reporting system and i want to store data (map of report id and parameters they selected to run the report) so that when user runs similar report parameters from last report would be given to user as default.
Yes i can write a cookie to make session persistance between browser.But i don't think serilalizing a object would be such a great idea as user can generate lot of reports and i don't want to keep serializing all these objects which will cause confusion is to which one to pick up..
Can u please explain to me how this can be done?
As a last option i am thinking of writing it to a database.
Regards
Medha
20 years ago
Hi
My system doesn't use any kind of session handling mechanism.So it's upto web server to handle this http session.Right now if i close browser window session expires.I want session to be persisted between browsers.
I know it can be done by cookie and URL rewritting and all.What i am intrested in knowing is ,is there any way it can be configured in a web serever to change it's session policies to persist between browser.If it can be done could u please tell me how?
i comment out section in server.xml to include peristance manager tag.But it's not working that way either..is this the right area of code..?
I use BES 5.1,web server is tomcat.
Regards
Medha
20 years ago
Hi Arun
Thanks for the reply.Ur right.I saw mailcap file and there is no entry for png type.I tried editing it with wordpad but then it saves that file in activation.jar and says file is saved without folder information...and it doesn't save it under right path
What is the best way to edit it?
Thanks
Medha
21 years ago
I am sending a mail through javamail.I can send mail with html message.But when i try to attach image with multipart i get following exception
javax.mail.SendFailedException: Sending failed;
[Mon Jul 14 14:25:21 BST 2003] stderr: nested exception is:
[Mon Jul 14 14:25:21 BST 2003] stderr: javax.mail.MessagingException: IOException while sending message;
[Mon Jul 14 14:25:21 BST 2003] stderr: nested exception is:
[Mon Jul 14 14:25:21 BST 2003] stderr: javax.activation.UnsupportedDataTypeException: no object DCH for MIME type image/png

I can send html message then why can't i attach image with the message.Image i am trying to attach is not on server but on outpout stream.I am doing following for the same.
imageBodyPart.setDataHandler(new DataHandler(out,"image/png"));
i have been going through lot of posting..so guys
i have made sure following is true
mail.jar and activation.jar are on classpath
And yes i did read the JavaMail API on sun's website.
Thanks
Medha
21 years ago
HI
Thanks for the reply.
Well i know i can open a new window on client side.I know javascript very well.But what i am tying to do here is very different.
I have swing component (not an applet).When user clicks on menu item user should get a new browser window.Java objects create HTML which should be opened in this window.So i want this to happen from within application.
Problem with Runtime.getRuntime().exec is it opens a browser window if none is open.But if browser window is open then it tries to display my HTML in a opened browser window.That not a good scenario as user might be browsing some important information from my system and it would get lost.
What i want is this HTML should always opened in a new window.
Any ideas or workaround...???Any other solution?

Thanks
Medha
21 years ago
Hi
Can anybody out there tell me how to open URL in new browser window from java application?
I am using Runtime.getRuntime().exec with rundll32 but this opens a URL in existing window.
Thanks
Medha Kamat
21 years ago
Hi
Thanks for the reply.
That's where the whole problem is.Before i had entirely different approach where my java objects were creating html file and then with the help of Runtime.exec() i managed to open this html file in a browser but it openes this html in a available browser window.(and not a new browser window which is essential requiremnet of user)
Do u know how to display html in a new browser window with Runtime.exec()..if u know it that would be great help.
Just a bit on what i am trying to do..
I have swing component i want when user clicks on one of the menus he/she should get result in a new browser window.The way i got it worked is i get to display result in a browser but Runtime.exec opens it in a existing browser window..
Well one more thing this is not a Applet.If it would have been a Applet i know the solution.(showDocument method of a AppletContext )

Any thaughts on this ..and i will be delighted.
Thanks
Medha
21 years ago