| | |
How to call Client.java from HTML?
![]() |
•
•
Join Date: Dec 2004
Posts: 2
Reputation:
Solved Threads: 0
I am trying to access a Clientside server file from an HTML file.
Can anyone help me with how to code it? :eek:
here is what I have:
<form method="get"
<if true then action="
*****This is were I need to access Client side server ****** "
else action= "file:///K:/web-content/Client side/Run.html"
name="clientForm"
enctype="text/plain"
<label>Last Name: </label>
<input onkeyup="autotab(this, document.clientForm.userId)"
type="text"
name="userId"
value="" size="62"
maxlength="30"
tabindex="1"><br>
<spacer type="VERTICAL"><br>
<label>Password: </label>
<input onkeyup="autotab(this, document.clientForm.login)"
type="password"
name="password"
value="" size="62"
maxlength="30"
tabindex="2"><br>
<spacer size="25" type="HORIZONTAL"><br>
<spacer size="25" type="vertical"><br>
<input onclick="return submitform()"
type="image"
name="SUBMIT"
value="Submit"
src="file:///K:/web-content/Common%20files/submit_button.gif"
tabindex="3" border="0" height="34" width="72">
</form>
Can anyone help me with how to code it? :eek:
here is what I have:
<form method="get"
<if true then action="
*****This is were I need to access Client side server ****** " else action= "file:///K:/web-content/Client side/Run.html"
name="clientForm"
enctype="text/plain"
<label>Last Name: </label>
<input onkeyup="autotab(this, document.clientForm.userId)"
type="text"
name="userId"
value="" size="62"
maxlength="30"
tabindex="1"><br>
<spacer type="VERTICAL"><br>
<label>Password: </label>
<input onkeyup="autotab(this, document.clientForm.login)"
type="password"
name="password"
value="" size="62"
maxlength="30"
tabindex="2"><br>
<spacer size="25" type="HORIZONTAL"><br>
<spacer size="25" type="vertical"><br>
<input onclick="return submitform()"
type="image"
name="SUBMIT"
value="Submit"
src="file:///K:/web-content/Common%20files/submit_button.gif"
tabindex="3" border="0" height="34" width="72">
</form>
•
•
Join Date: Dec 2004
Posts: 2
Reputation:
Solved Threads: 0
I am not confused about java, html, or javascript languages per say.
What I am trying to do is:
User interfaces <---> Client server <---->Server<---->databases
I am having trouble accessing the Client.java (my clientside server that does the communicating between the user interfaces and the Server. I am having a problem between one of my files that is wriiten in HTML that needs to call on Client.class.
I have no trouble with file communication between java files or javascriipt files. This is the first time I've had to write an HTML file to needs to call on a java file.I know that I must call a Javascript function, which in turn calls a Java method. The problem is that everything I've tried up to this time doesn't work. The code above is from a User interface written in an HTML file.
So I am asking for some help. Can you help?
What I am trying to do is:
User interfaces <---> Client server <---->Server<---->databases
I am having trouble accessing the Client.java (my clientside server that does the communicating between the user interfaces and the Server. I am having a problem between one of my files that is wriiten in HTML that needs to call on Client.class.
I have no trouble with file communication between java files or javascriipt files. This is the first time I've had to write an HTML file to needs to call on a java file.I know that I must call a Javascript function, which in turn calls a Java method. The problem is that everything I've tried up to this time doesn't work. The code above is from a User interface written in an HTML file.
So I am asking for some help. Can you help?
•
•
Join Date: May 2009
Posts: 1
Reputation:
Solved Threads: 0
you can use DWR(Direct Web Remoting ) approach or use inline frames to call java from HTML.
please refer this site.
http://directwebremoting.org/dwr/overview/dwr
please refer this site.
http://directwebremoting.org/dwr/overview/dwr
With your project advertisement you just broke this forum record of reopening oldest post, which is now 4 years and 5 months. Sorry for sarcasm, couldn't resist.
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
•
•
•
•
I am trying to access a Clientside server file from an HTML file.
Can anyone help me with how to code it? :eek:
here is what I have:
<form method="get"
<if true then action="
*****This is were I need to access Client side server ****** "
else action= "file:///K:/web-content/Client side/Run.html"
name="clientForm"
enctype="text/plain"
<label>Last Name: </label>
<input onkeyup="autotab(this, document.clientForm.userId)"
type="text"
name="userId"
value="" size="62"
maxlength="30"
tabindex="1"><br>
<spacer type="VERTICAL"><br>
<label>Password: </label>
<input onkeyup="autotab(this, document.clientForm.login)"
type="password"
name="password"
value="" size="62"
maxlength="30"
tabindex="2"><br>
<spacer size="25" type="HORIZONTAL"><br>
<spacer size="25" type="vertical"><br>
<input onclick="return submitform()"
type="image"
name="SUBMIT"
value="Submit"
src="file:///K:/web-content/Common%20files/submit_button.gif"
tabindex="3" border="0" height="34" width="72">
</form>
If your java class is an applet then you may put following code in your html/jsp page.
Java Syntax (Toggle Plain Text)
<applet code="packagename.classname" width="100px" height="100px"></applet>
Failure is not fatal, but failure to change might be. - John Wooden
![]() |
Similar Threads
- Cant call jflex from java program (Java)
- call the constructor of java class from script (Shell Scripting)
Other Threads in the Java Forum
- Previous Thread: help in converting a pacman applet to midlet
- Next Thread: Application not authorized to access the restricted API
| Thread Tools | Search this Thread |
911 actionlistener addressbook android api append applet application array arrays automation binary blackberry block bluetooth character chat class client code component consumer csv database desktop developmenthelp eclipse error fractal ftp game givemetehcodez graphics gui html ide image integer j2me j2seprojects japplet java javaarraylist javac javaee javaprojects jni jpanel julia lego linked linux list loops mac map method methods mobile netbeans newbie number objects online oriented panel printf problem program programming project projects properties recursion replaydirector reporting researchinmotion rotatetext rsa scanner se server set singleton sms sort sql string swing test textfields threads time title tree tutorial-sample ubuntu update windows working








I think you are getting Java confused with JavaScript.