• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

implementing java apps on web page

 
james santiago
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
good afternoon people, i am in desperate need of help! i am new to java so bare with me!
i have created a java app that gives an estimated price for services and sends all the inputted information via email to the owner of the web site. problem : the app works great in eclipse, but as soon as i get it on a web page the information never gets sent!

any help in pointing me in the right direction would be great!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65335
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you putting a "Java program" on a web page?

You need to give us details before we can help.
 
james santiago
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
using the applet tag in a simpe html form
 
james santiago
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


this is the program that i made
 
salvin francis
Bartender
Posts: 1335
11
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi James, welcome to code ranch, Your code tags were a bit incorrect, so I fixed them.
JAva Applets are a bit obsolete now. I doubt many sites actually use them.
 
james santiago
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks, so the way forward is using swing?
 
salvin francis
Bartender
Posts: 1335
11
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
james santiago wrote:thanks, so the way forward is using swing?

No,

If you are referring to client facing UI based code, then Java cannot be directly used on a webpage (other than the obsolete Applets). Swing is used for Desktop based applications and is not web based. If you are referring to Server side code, then Java is the way to go via using Servlets and JSP.

Now, there are other technologies such as GWT, which convert java to javascript and which allow you to write client facing code in java but I doubt that's what you are looking for.
 
Paul Clapham
Sheriff
Posts: 21551
33
Eclipse IDE Firefox Browser MySQL Database
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, actually you can use Swing to write applets. And if you were going to write an applet, that's what you would do because AWT has been obsolete since the turn of the last century. But yes, applets are basically dead and you'd do much better to write that sort of code on the server side, like Salvin suggests.

For the record, if you wanted to send an e-mail from an applet then that would require the applet to connect to a server which is different from the server where it was loaded from. Since that's an avenue for security violations to take place it would be necessary to sign the applet using a professional-level certificate and have the user agree to accept it -- but really, it's just better to put that sort of logic on your server.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic