Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 6th, 2001, 09:41 AM
JavaRUS JavaRUS is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: Russia
Posts: 0 JavaRUS User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Post

Sorry for my English(I am from Russia).
I have one small question:
how can I call a servlet from html page, but not reload this page?
(not using frame and applet, this is a plain html page)

In principle, I have answer to this question, but I want to hear more versions of solving this problem.

Thank you.

Reply With Quote
  #2  
Old March 7th, 2001, 12:36 AM
ajitrm ajitrm is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Location: Ahmedabad,Gujarat,India
Posts: 2 ajitrm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
If u r using a servletrunner, then u can call the servlet from the html like this:
If u have a form inside the html, u r form tag will look like this:
<form action="http://localhost:8080/servlet/servletname" method=post>

This will ensure that only post requests can be sent. So u can't reload the serlvet.

Reply With Quote
  #3  
Old March 7th, 2001, 08:43 AM
JavaRUS JavaRUS is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: Russia
Posts: 0 JavaRUS User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ajitrm, DON'T RELOAD THE PAGE!!!

Reply With Quote
  #4  
Old March 8th, 2001, 04:52 AM
ajitrm ajitrm is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Location: Ahmedabad,Gujarat,India
Posts: 2 ajitrm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I don't understand what u mean by not reloading. U have written about reloading not me.


Reply With Quote
  #5  
Old March 8th, 2001, 12:28 PM
JavaRUS JavaRUS is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: Russia
Posts: 0 JavaRUS User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Usually, when you send data on the server, then your web-page (html-page) is REFRESHED(updated, RELOAD, renew). But I want to send data on the server without REFRESHING this page.

My english is very bad!

Reply With Quote
  #6  
Old March 15th, 2001, 06:49 AM
Torakh Torakh is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Posts: 0 Torakh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Torakh
Hi!

One idea is to have the <form>-tag which calls the servlet in a separate "invisible" frame, i.e <frameset cols="100%,*">, and have a JavaScript alter and submit the form when some event is triggered. This way, the shown HTML-page won't be reloaded/refreshed.

(Other methods than using a form is possible with JavaScript...)

Hope this helps!

Reply With Quote
  #7  
Old March 15th, 2001, 06:59 AM
JavaRUS JavaRUS is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: Russia
Posts: 0 JavaRUS User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Torakh, good idea.

Anybody else?

Reply With Quote
  #8  
Old March 15th, 2001, 02:24 PM
epl epl is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: Dublin
Posts: 413 epl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 18 m 18 sec
Reputation Power: 13
Lots of javascript options...
Do you need to be cross-browser compatible?
Do you need to receive information or just send it?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > How can I call a servlet from html page?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap