Web development help needed?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sl1ver
    New Member
    • Mar 2009
    • 196

    Web development help needed?

    say i add a textbox in html and a button, how do i assign functions to it

    e.g. how will i write a piece of code that will know when the button has been pressed and will set a label to what was typed in the textbox?
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    You can do all that using Javascript which is not Java. So you want to ask that in the Javascript forum.

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      It would be a good idea to describe what you've tried so far to solve the problem.

      Right now you're pretty much asking "how to write a program" and so we have no idea where to begin...

      Please take the time to research the problem before you post your question. The experts here are more than willing to help you with a specific problem but you have to do your part to learn the basics.

      I would recommend starting with some basic JSP tutorials (just google for some). Start with print "Hello World" into the web page and the move up to "Hello username" where username is retrieved from the textbox.

      (here's an example of a tutorial that you could have found by googling)

      Comment

      • Sl1ver
        New Member
        • Mar 2009
        • 196

        #4
        Thanx for the reply and the tutorial. I created a username field on index.jsp
        How do i call the webservice if the form is processed.
        And i created a connection to the database using a function within netbeans. and it created a datasource. how do i connect the webservice to the datasource? just 2 very simple questions i need help with

        Comment

        • Sl1ver
          New Member
          • Mar 2009
          • 196

          #5
          thanx for the help everyone, i found the perfect example i needed @ http://www.netbeans.org/kb/55/mysql-webapp.html#

          Comment

          • Frinavale
            Recognized Expert Expert
            • Oct 2006
            • 9749

            #6
            I'm happy you found a resource that helped you!

            I hope you understand that there's a difference between JSP pages and Web Services. If you have the time I'd recommend you research web services because they are really cool!

            -Frinny

            Comment

            • Sl1ver
              New Member
              • Mar 2009
              • 196

              #7
              Yes, i do understand the difference. I just need a example of the basic of how they interact and how to do some basic stuff in web service. Im busy with a auction website as a project. but after that i will defenitly look deeper into web service as im very inetersted in web development

              Comment

              • Frinavale
                Recognized Expert Expert
                • Oct 2006
                • 9749

                #8
                They aren't really that basic...

                I don't know what your experience is with Web Services so I'm not sure were to begin to help you.

                What do you already know?
                What have you tried to do so far with web services? What do you want to do with them?

                -Frinny

                Comment

                • Sl1ver
                  New Member
                  • Mar 2009
                  • 196

                  #9
                  I looked into a lil C# webservices never really worked with them until now that i have to do thisrpoject. with this tut i got now, i will know the basics. and it looks like most in Netbeans webservices is programmed in java. And i think the web service is there to make a website(applica tion) more dynamic in forms of communicating. I just need to know how to connect to the database and perform basic query's asked from a jsp page and return a result, and the tutorial pretty much shows me that. Not looking into hectic webservices for now

                  Comment

                  • Sl1ver
                    New Member
                    • Mar 2009
                    • 196

                    #10
                    Sorry, whent through the tut and doesn't use web services. Can you maybe just explain where to create a connection to the jdbc:odbc driver in netbeans and a simple method that uses the connection?

                    Comment

                    • Frinavale
                      Recognized Expert Expert
                      • Oct 2006
                      • 9749

                      #11
                      Haha, I didn't understand what "tut" was 'til just now!

                      When should your application be connecting to the database?

                      -Frinny

                      Comment

                      • Sl1ver
                        New Member
                        • Mar 2009
                        • 196

                        #12
                        lol, all data in the project should use web services, so i think the jsp pages should only call the web services and th webservice will make the connection. So i guess a connection should be made everytime the webservice is called(everytim e a method from the service is called)

                        Comment

                        • Frinavale
                          Recognized Expert Expert
                          • Oct 2006
                          • 9749

                          #13
                          I thought you said that you didn't want to get into the chaos of learning Web Services in Java right now?

                          You know what....you need to take a step back for a second and learn Web Services if it's a requirement in your application.

                          Just create a simple "Hello World" web service first and then modify it to do other things (like connect to a database).

                          You're just going to get overwhelmed if you start learning everything at the same time...well, at least I would.

                          My Java skills are a little rusty but you should probably check out the javax-jws package. It's used to create web services in Java.

                          Check out this tutorial on creating a web service with netbeans (found it on the netbeans site). It explains how to create, deploy, and consume a web service in detail.

                          Once you have a working web service we can look into connecting it to a database...howe ver, it seems pretty straight forward to me on how to do this (use the jdbc driver to connect to your database, retrieve what you need, and return it...make sure you have the jdbc driver installed on the server).

                          -Frinny

                          Comment

                          Working...