Is Java fully object-oriented?

Can anyone help me to change this php code file into fully java code file?

  • I am working on java gmail like chat application for my project. I found a source code which is in PHP. So, i have to change it to java now. 10 marks for anyone can provide me with the full java code. Thanks. Source code: <html> <head> <script type="text/javascript" src="prototype/prototype.js"></script> <script type="text/javascript"> // <![CDATA[ document.observe('dom:loaded', function() { function sendForm(event){ // we stop the default submit behaviour Event.stop(event); var linebr=document.createElement('br'); var oOptions = { method: "POST", parameters: Form.serialize("chatForm"), asynchronous: true, onFailure: function (oXHR) { $('send_status').update(oXHR.statusText)… }, onLoading: function (oXHR) { $('send_status').update('Sending data ... Loading...'); document.getElementById('line').value = ''; }, onSuccess: function(oXHR) { $('chat_history').innerHTML = $('chat_history').innerHTML + oXHR.responseText; $('send_status').update(''); $('chat_history').scrollTop = $('chat_history').scrollHeight; // scroll div to end document.getElementById('line').focus(); // set the focus to the text chat area } }; var oRequest = new Ajax.Updater({success: oOptions.onSuccess.bindAsEventListener(o… 'poc/chat/post', oOptions); } Event.observe('chat_submit', 'click', sendForm, false); }); // ]]> function refreshChatHistory(){ document.getElementById('line').focus(); // set the focus to the text chat area var oOptions = { method: "GET", frequency: 3, decay: 1, insertion: Insertion.Bottom, asynchronous: true, onFailure: function (oXHR) { $('send_status').update(oXHR.statusText)… }, onSuccess: function(oXHR) { // $('chat_history').innerHTML = $('chat_history').innerHTML + oXHR.responseText; $('send_status').update(''); $('chat_history').scrollTop = $('chat_history').scrollHeight; // scroll div to end } }; var oRequest = new Ajax.PeriodicalUpdater('chat_history', 'poc/chat/post' , oOptions); } </script> </head> <body onload="refreshChatHistory()"> .... ... .. </body> </html>

  • Answer:

    You need to convert PHP to JSP As they are server side pages. You can do it if you can understand PHP code http://www.roseindia.net/jsp/jsp.htm I have noticed so many peoples out here are asking for spoon feeding ,i dont know why are they asking for this. We are not that free to code you simple jsps and else.Why dont you give yourself a try with jsp or explain your problems to respective professors. Yet you have genuine problems with jsp code please feel free to ask me. Hope this helps Cheers:)

mag at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

That's not PHP, that's HTML and JavaScript. If you're writing a chat program in Java, you really don't need that code at all. What you WILL need is: 1) A knowledge of Java... don't make a chat program until you know Java and Object-Oriented concepts very well. 2) Knowledge of Java GUI (Swing). 3) Knowledge of Java networking functions. You can Google "how to make a Java chat client" and you should get some results. However, if you can't differentiate between HTML, PHP, JavaScript, and Java, I would recommend that you do not embark on a chat program.

chat or "gmail" takes server-side code. It does get involved so that a ring of participants are granted preferences about whom is broadcasting and about whom is listening. It's simple enough to write your own server, or use a full-blown setup like GlassFish. Your PHP code above is only half of the code needed. For a primitive Chat setup with textbook explanations, search for "The Black Art of Java Game Programming."

You may contact a java expert live at website like ijug.net ,etc .

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.