943,632 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 10079
  • Java RSS
Dec 10th, 2007
-1

how to close the application using java

Expand Post »
hi masijade,
tell me how to close the application using java.
Similar Threads
Reputation Points: 1
Solved Threads: 0
Junior Poster in Training
hidash_in is offline Offline
85 posts
since Oct 2007
Dec 10th, 2007
0

Re: how to close the application using java

You can't. You aren't opening it with Java either. You are simply telling the browser what is being sent (the content type) and letting the browser decide how to display it. In this regard, Java has nothing to do with it.

Assuming that this question is related to
http://www.daniweb.com/forums/thread100436.html
Last edited by masijade; Dec 10th, 2007 at 4:02 am. Reason: typos
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006
Dec 11th, 2007
0

Re: how to close the application using java

k,
see i can open an application from jsp page through java coding now i want to close that opened application from the same jsp page through java.
can u understand my question.
if yes, send some related codes for this problem.
Reputation Points: 1
Solved Threads: 0
Junior Poster in Training
hidash_in is offline Offline
85 posts
since Oct 2007
Dec 11th, 2007
0

Re: how to close the application using java

But, you are not opening the application with Java. That is exactly what I said in the last post. You are simply setting a content-type type (and filename with extension since windows is stupid enough to need this info) and then passing the file through byte for byte. How the file gets displayed on the client is determined by the browser.

I tell you what, change your file settings remove the ".xls" association. Then access an excel sheet using your JSP and tell us what happens. The browser displays a bunch of BS in the browser, rather than using excel to display the sheet, doesn't it?

Like I said, you are not opening excel on the client in your Java code, you are simply letting the browser know what it is you are sending, and the browser is deciding how to open it.

It's not that hard to understand.
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006
Jul 16th, 2008
0

Re: how to close the application using java

heyy, but do u know how to close internet explorer using java program, which i opened using the syntax:
Java Syntax (Toggle Plain Text)
  1. Runtime.getRuntime().exec(browserCommand+" "+Url_name);

Please let me know guys.. I want to know..
Sirius
Reputation Points: 10
Solved Threads: 0
Newbie Poster
siriussnivelle is offline Offline
1 posts
since Jul 2008
Jul 16th, 2008
1

Re: how to close the application using java

Java Syntax (Toggle Plain Text)
  1. Process p = Runtime.getRuntime().exec(browserCommand+" "+Url_name);
  2. p.destroy();
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006
Jul 19th, 2008
0

Re: how to close the application using java

What `masijade` is trying to say is that, JSP is a server - side scripting language. You can't only affect the server with it, to control the client side, you need to use a client-side scripts such as JavaScript, etc.
Reputation Points: 40
Solved Threads: 12
Junior Poster
ChaseVoid is offline Offline
116 posts
since Aug 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC