• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need to create a service using servlets to embed widgets on any foreign server/website

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its required to create a service to embed widgets on any foreign website(server), using servlets where i'll pass encrypted widgetId and in turn i will get html for displaying it on screen. Also a refresh button with the embedded widget is to be provided so as to fetch updated computed data. The point is that user should copy some html/script code and place it on his website.

I am thinking of following approach.

An empty span with id, followed by a js script to make ajax call to the server to get widget HTML.

Any better approach to this problem?
Kindly ask for clarifications if required.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One of the problems with mixing your own content into the same document is that your elements are subject to the CSS and script of the page. If this could be an issue, one way to isolate your elements is to display them in an iframe which will contain its own document.
 
Devanshu Kashyap
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Bear,
Yes I did the same and it worked. and regarding the refresh problem to get updated computed value i used meta tag.

 
Hot dog! An advertiser loves us THIS much:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic