Forums Register Login

is applet what I'm looking for?

+Pie Number of slices to send: Send
Hello,
I have a .java file which has been built into a .class file, and now I want this to be called on the click of a button on the HTML page. Is 'applet' the answer to this ? I searched around this question on the internet prior to posting but every applet tutorial I see is related to graphics and drawing blocks etc.

Please note that my java file does not have any graphics, it's just a simple stand-alone code which opens a file and displays it's contents on the terminal. Would like to now see the output on the browser.

Please advise.
Thanks.
+Pie Number of slices to send: Send
Hi Welcome to the Ranch.

You may like to work through these tutorials (HTML5 especially). http://www.w3schools.com/html/default.asp


The solution is a bit more complex than you are anticipating, I'm afraid.
+Pie Number of slices to send: Send
Applets generally aren't the answer any more these days. Let's take a step back and tell us what the underlying problem is you're trying to solve. Java code generating output for a browser is generally part of a server-side web app.
+Pie Number of slices to send: Send
Aftab,

As Ulf pointed out, you should not be thinking in the direction of Applets these days.

You can consider jsp/servlet combination as an option.
+Pie Number of slices to send: Send
 

Ulf Dittmer wrote:Applets generally aren't the answer any more these days. Let's take a step back and tell us what the underlying problem is you're trying to solve. Java code generating output for a browser is generally part of a server-side web app.


Ulf, thanks for the reply.
The underlying problem :
1. The html page has a text field where you can input some text.
2. This text is then transferred to a php script which parses the text and finds the important words(removes unnecessary words like articles/prepositions)
This is in php and has to be kept that way because I have this php script which I wouldn't like to rewrite right now
I would like to call something like php5 myscript.php
Had it been say C, I would have called system("php5 myscript.php");
3. Finally these important words generated from the php script are transferred to a Java program which matches them with a pool of words and tries to find synonyms of these words.

So, basically something like Language Processing.

Is there a way I can accomplish this in a short time. I will definitely learn JSP/servlets in the days to come but I'm not sure I'll be able to finish this quickly in JSP/servlets right now

Balagopal Kannampallil wrote:Aftab,
As Ulf pointed out, you should not be thinking in the direction of Applets these days.
You can consider jsp/servlet combination as an option.


Thanks for the reply Balagopal.
Yes, I shall put in my effort to learn JSP and Servlets, that' something I really want to learn. Thanks for the direction.
+Pie Number of slices to send: Send
Too bad you want to keep that PHP script, otherwise I would have suggested Java and the Lucene library, which can do all kinds of nifty things with language processing, including synonyms.
That feels good. Thanks. Here's a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 513 times.
Similar Threads
HELP MAHA,,TONY,,FRANK!!!
please help me with actionlistener
Can an entire application be designed and implemented using Servlets
PLEASE HELP! FRANK
please guys help me!!Moderators welcome(maha anna)
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 02:15:34.