jeudi 19 février 2015

Calling a java file in jsp simplest way

I have created the following button:



<form method="post" action="website.sup">
<input type="submit" id="btn1" name="btn1"/>
</form>


I am trying to call a ".java" file when i press this button. Sample of my .java code :



package website;
import javax.swing.*
public class sup implements Runnable{...


How do i call my java file?


Additional info: My java file generates a jFrame to display real time data. From my search efforts i found syntax only for "servlet". I have imported in my .jsp file using this code:



<%@page contentType="text/html" pageEncoding="UTF-8" import = "javax.swing.*, java.sql.*, java.util.*, javax.comm.*, java.io.*, website.sup"%>




Aucun commentaire:

Enregistrer un commentaire