access remote database using applet

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • meatwad
    New Member
    • Nov 2006
    • 2

    #1

    access remote database using applet

    hi,

    i have a python script which (among other things) generates a web page. i would like to access a postgresql database on a remote machine and display query results dynamically on this web page. that is, i'd like to have a loop whereby i query the database and then update the web page based on the query--and ideally this would happen WITHOUT user interaction. i tried to make this happen in python but wasn't able to so i have since switched to making it an applet but i'm having difficulty querying a remote database from inside an applet. from everything i've read, i think what i need is a servlet. but before going down yet another path i thought i'd ask if anyone has some insight about this (?) that is, can a servlet actually sit on my web server, query my postgresql database and hand the results to my applet for display on a web page?? what seems like an easier solution (that i've seen mentioned) would be to have a signed applet but from what i can tell there is little certainty about this method...

    sorry this is so long!

    any input is greatly appreciated :)

    thanks
    sarah
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by meatwad
    hi,

    i have a python script which (among other things) generates a web page. i would like to access a postgresql database on a remote machine and display query results dynamically on this web page. that is, i'd like to have a loop whereby i query the database and then update the web page based on the query--and ideally this would happen WITHOUT user interaction. i tried to make this happen in python but wasn't able to so i have since switched to making it an applet but i'm having difficulty querying a remote database from inside an applet. from everything i've read, i think what i need is a servlet. but before going down yet another path i thought i'd ask if anyone has some insight about this (?) that is, can a servlet actually sit on my web server, query my postgresql database and hand the results to my applet for display on a web page?? what seems like an easier solution (that i've seen mentioned) would be to have a signed applet but from what i can tell there is little certainty about this method...

    sorry this is so long!

    any input is greatly appreciated :)

    thanks
    sarah
    Yeah, I'd go with the servlet. It has so many more capabilities. I would also suggest you consider displaying the data using jsps rather than applets.

    Comment

    • meatwad
      New Member
      • Nov 2006
      • 2

      #3
      Originally posted by r035198x
      Yeah, I'd go with the servlet. It has so many more capabilities. I would also suggest you consider displaying the data using jsps rather than applets.
      thanks for the input...do you know of any good links to tell me how to set up a servlet? i don't know how (at all!) also, why do you suggest jsp instead of applets? can i get the same graphical capabilities? i've fount the graphics of applets to be pretty good...but i don't know much about java server pages.

      sarah

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Originally posted by meatwad
        thanks for the input...do you know of any good links to tell me how to set up a servlet? i don't know how (at all!) also, why do you suggest jsp instead of applets? can i get the same graphical capabilities? i've fount the graphics of applets to be pretty good...but i don't know much about java server pages.

        sarah
        http://www.coreservlet s.com/Apache-Tomcat-Tutorial/

        I just prefer jsps because I can embed applets in them if I want. You will need to look a bit more into it before making a decision though.

        http://www.nyu.edu/classes/jcf/g22.3033-009/handouts/g22_3033_011_h3 2.htm

        Comment

        Working...