dear ,
i created a HTML page for entering the booth number an password. The entered details are passed to a
servlet using
< FORM ACTION="login" METHOD="POST"> written inside html page
Where login is the name given to the servlet which connects the Database and verify the password in the DB table.
Then the appropriate message is displayed.
It's coded through the servlet ( no explicit html page is created for it)
using
out.println("<html>"); ................ in the servlet.
......................................................
out.println("<FORM ACTION=\"voterlogin\" METHOD=\"POST\">");
..................
out.println("Your Booth is Connected To The Server</H1>\n");
.....................................
out.println("<INPUT TYPE=Submit VALUE=\" OK \">");
When i press the submit button in the message window, it should get the
applet display for entering the voter's password.
voterlogin is another servlet, inside which i wrote the code for the next display window
out.println("<html>");
out.println("<head>");
...........................
out.println("<P><APPLET CodeBase=.. CODE=\"voterpassword.class\" WIDTH=500 HEIGHT=500</APPLET><P>");
where voterpassword is an applet for displaying voter's password entry.
Here the problem comes
I am not able to get the applet displayed in the web-browser.
Where the problem lies. ???
How to write the CodeBase
Where exactly should i put the applet file in the
TomCat directory
TomCat Root Context
<Context path="election" docBase="/election" debug="0" />
Directory structure is
webapps
|
--- election
|
---- WEB-INF
|
---- classes
|
----- OVS
where OVS is the package i used for classes which is used to enter initial details into the Database, like details about the election.
I put the servlets in the same directory, so inorder to keep that order, i created the OVS directory in webserver and put the servlets into OVS in the webserver.
Now the question is where to place applets in the webserver and
how to write the code in servlets so that applet will be displayed in the web-browser. ( also, How to write the CodeBase)