• Post Reply Bookmark Topic Watch Topic
  • New Topic

can I get an array back using Java WebServlet? wrong technology?

 
matthew Greenhorn
Greenhorn
Posts: 3
jQuery Tomcat Server Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi,

First post here; I am new to Java, Webservices, JavaScript etc ; I've had a 2 week introduction to Java as part of an MSc course.

I now have a 2 month project to develop a web site to display some markers using GoogleMaps. I've setup Eclipse and Tomcat7 on ubuntu following the excellent tutorials on Marty Hall's coreservlets pages, and am working through his ajax tutorials.

As far as I can see so far (I've got to ajax-basics-2) the only thing I can back from the server is from text strings to write into the html page. Is this correct?

The data I need to display in GoogleMaps would most logically be recovered into an array on the server, and I'd want to to get this back - somehow - into JavaScript on the Client side browser for display by GoogleMaps. Can this be done using Servlets? Or should I be using something else to achieve this?

My first post here; I could really use some guidance from all you experts. (my supervisor is a hard core biologist, has great vision of what he wants but no knowledge about what's needed to implement it).

Not looking for quick and easy; willingly and able to work 24/7 on this - just need some guidance!

M


 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can this be done using Servlets?


Sure, sounds like a RESTful style service returning JSON formatted data.

People using the Jersey open source toolkit do this all the time.

Bill
 
matthew Greenhorn
Greenhorn
Posts: 3
jQuery Tomcat Server Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
William Brogden wrote:
Can this be done using Servlets?


Sure, sounds like a RESTful style service returning JSON formatted data.

People using the Jersey open source toolkit do this all the time.

Bill


Thanks Bill for that quick reply. Looks like some more reading and learning coming up for me!

Would you say that Jersey as the reference implementation is most widely used/supported?
(-: this basically means "Am I going to find quality tutorials for Jersey?" I'm finding Marty Hall's
tutorials pretty on-the-nail; a lot of online stuff goes over my head (it's early days on a STEEP
learning curve)

M
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have not looked at the current state of the tutorials, I do know that the users mailing list is very active with participation by the developers.

Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!