944,111 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 12843
  • Java RSS
Dec 12th, 2004
0

How to call Client.java from HTML?

Expand Post »
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:

html Syntax (Toggle Plain Text)
  1. <form method="get"
  2. <if true then action="
  3. :?: *****This is were I need to access Client side server ****** "
  4. else action= "file:///K:/web-content/Client side/Run.html"
  5. name="clientForm"
  6. enctype="text/plain"
  7. <label>Last Name: </label>
  8. <input onkeyup="autotab(this, document.clientForm.userId)"
  9. type="text"
  10. name="userId"
  11. value="" size="62"
  12. maxlength="30"
  13. tabindex="1"><br>
  14. <spacer type="VERTICAL"><br>
  15. <label>Password: </label>
  16. <input onkeyup="autotab(this, document.clientForm.login)"
  17. type="password"
  18. name="password"
  19. value="" size="62"
  20. maxlength="30"
  21. tabindex="2"><br>
  22. <spacer size="25" type="HORIZONTAL"><br>
  23. <spacer size="25" type="vertical"><br>
  24. <input onclick="return submitform()"
  25. type="image"
  26. name="SUBMIT"
  27. value="Submit"
  28. src="file:///K:/web-content/Common%20files/submit_button.gif"
  29. tabindex="3" border="0" height="34" width="72">
  30. </form>
Last edited by peter_budo; Dec 23rd, 2011 at 3:54 am. Reason: Adding code tags to old post
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
dragonspectrum is offline Offline
2 posts
since Dec 2004
Dec 12th, 2004
0

Re: How to call Client.java from HTML?

This isn't Java

Anyway, what are you trying to do?
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Dec 12th, 2004
0

Re: How to call Client.java from HTML?

Clientside server? Isn't that an oxymoron? I think you are getting Java confused with JavaScript.
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 163
The Queen of DaniWeb
cscgal is offline Offline
13,646 posts
since Feb 2002
Dec 14th, 2004
0

Re: How to call Client.java from HTML?

Well, clientside Java does exist but not in this context.
Think applets, desktop applications, etc. but not Javascript (which this is).

Of course a clientside serverfile I find weird indeed
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Dec 14th, 2004
0

Re: How to call Client.java from HTML?

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?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
dragonspectrum is offline Offline
2 posts
since Dec 2004
May 8th, 2009
0

Re: How to call Client.java from HTML?

you can use DWR(Direct Web Remoting ) approach or use inline frames to call java from HTML.

please refer this site.
<URL SNIPPED>
Last edited by peter_budo; Dec 23rd, 2011 at 3:55 am. Reason: URL snipped
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rativerma is offline Offline
1 posts
since May 2009
May 8th, 2009
1

Re: How to call Client.java from HTML?

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.
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 874
Code tags enforcer
peter_budo is offline Offline
6,659 posts
since Dec 2004
May 9th, 2009
0

Re: How to call Client.java from HTML?

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>
I think you should learn JSP/Servlet - a web technology of Java Framework.

If your java class is an applet then you may put following code in your html/jsp page.

Java Syntax (Toggle Plain Text)
  1. <applet code="packagename.classname" width="100px" height="100px"></applet>
Moderator
Reputation Points: 2136
Solved Threads: 1228
Posting Genius
adatapost is offline Offline
6,527 posts
since Oct 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
This thread is currently closed and is not accepting any new replies.
Previous Thread in Java Forum Timeline: Encryption and Decryption
Next Thread in Java Forum Timeline: Application not authorized to access the restricted API





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC