I haven’t done Java in a long time - bare with me.
I have a Java program that I need put on the web. How does one do this? This program will supposedly read a smartcard and get information from it. I need this information then sent to my script upon form submission.
You need a webserver. Such as Tomcat or Glassfish, which require it to be packaged as a WAR.
I have no idea what your project looks like, but if it isn’t already set up to be packaged as a WAR it’s probably going to be a simple task. It’s going to require some learning and boilerplating. Java is not good at just throwing simple scripts on the web, it’s more for large established apps. Looking for shortcuts to do this is probably just going to lead you down a path of overly complicated convoluted middleware that doesn’t get you anywhere. If it’s not a native web app, your best bet is probably going to be to write your own PHP script (or whatever your main language is) to interface with the Java app.
Also, forget about JSPs. They used in conjunction with Servlets, they probably don’t work the way you think they do. I’m only saying this because I’ve seen other people unfamiliar with the Java landscape get confused by this.
Unfortunately due to the nature of this program, this can only be done in Java or .NET. You will have to trust me when I say there is no other language possible.
And .NET is ruled out due to the servers we run. We have 1 server that can run .NET and that’s not one I’m allowed to do willy nilly tests on. This will have to be Java.
Ignorance here - is it possible to just have this script and run it as a Java applet? I know security concerns would normally go against this; however this will be a closed application.
The script is already made. I just need to make it workable on the web. However that goes. The program doesn’t look to be built to allow it to be ran on the web (took a year of Java and this doesn’t look like it has web capabilities.)
The script I found is simply from a PDF documentation guide with a sample demo. It has some include statements, then begins writing some classes and println’s.
The exec function looks promising though. I’d just make my .java file into a .jar and php exec it? Any other strings attached?
Edit-going to lunch. Chicken parm is calling my name.
Pretty much. It interfaces with it just like you would on the command line. As far as strings attached, Not that → I ← know of, but there may be. I’ve only done that a couple times.