Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

totally stuck  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
playgame.jsp


and the GameServlet:


I can not retrieve info from the database that is being created... Can someone help me with this...
 
Author and ninkuma
Marshal
Posts: 66783
168
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66783
168
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You seem to have stuck a lot of Java into the page as JavaScript. Can you spend a bit more time explaining your environment and what you are trying to do?
 
Dillon Millsap
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's currently a web application in Google. Here's the link to the "game": islandtest11.appspot.com/

I'm new to Java and have done tons of searches on trying to learn datastore but it's fairly new and not much out there for it...
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66783
168
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, step 1. Learn the difference between Java and JavaScript. Despite their name, they have nothing at all to do with each other.

Step 2: Learn a bit more about JSP and Servlets. Modern JSP should have no Java code in the JSP. All the Java should be in the servlet controller for the JSP page.

I always recommend that JSP novices read these article to get a good start:
  • The Secret Life of JSPs
  • The Front Man

  •  
    Dillon Millsap
    Greenhorn
    Posts: 4
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Okay, so basically everything that is in that function, needs to be in a seperate Servlet.

    So how do I go to the Servlet from the onclick on the button?
     
    Sheriff
    Posts: 23640
    48
    Eclipse IDE Firefox Browser MySQL Database
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    The usual way. Your <form> element should have an action which causes it to send a request to the servlet when the button is clicked. That's the most ordinary way to make an HTML form do something.
     
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!