Member Avatar for amogh.max

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"%>

Recommended Answers

All 3 Replies

so, you've found the syntax for servlet ... why not use it, that's what it's for. call your other class from within that servlet.

Member Avatar for amogh.max

actually i am in confusion about what to do.My main goal here is to get a jframe to display my MS acess database(with a button on my website that opens the jFrame) coulmn wise and that it updates in realtime.So i want code 1>a button that connects to the Jframe...2>Jframe code that displays ms access database.thank you.even the syntax for both would do so that i can replace the placeholder values with my own values.

a JFrame? why would you use a JFrame? why not just use the jsp, that's what it's there for.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.