Java on Web

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • DaWaN

    Java on Web

    I've done a lot of java programming but never done any for the web.
    For most of what I've done was with Swing.

    So how difficult/different is it to still do some Java apps for the web from
    Swing?

    --

    =============== ============
    DaWaN
    webmaster@dawan .com




  • Herman Timmermans

    #2
    Re: Java on Web

    DaWaN wrote:
    [color=blue]
    > I've done a lot of java programming but never done any for the web.
    > For most of what I've done was with Swing.
    >
    > So how difficult/different is it to still do some Java apps for the web
    > from Swing?
    >[/color]
    Depends, but I would suggest that you learn first about the meaning of
    URL's, the http protocol, and make sure that you understand the meaning of
    request headers and response headers, make sure you understand the GET and
    POST methods.
    Then start looking at the URL classes, URLConnection, URLEncoder and
    URLDecoder, HttpURLConnecti on, URLStreamHandle r and URLStreamHandle rFactory
    classes.
    A very good book I can recommend is Java Network Programming (O'Reilly) from
    Elliotte Rusty Harold.

    If you go for Swing-less web application, go for Servlets, JSP and a MVC
    framework like Struts.

    Hope this gets you started,
    Brgds Herman
    --
    Suse Linux Professional 8.1 on Athlon 1.1 Ghz 512 Mb
    Anti Spam = remove the "dot" and the "at"
    Registered Linux User #264690

    Comment

    • Denz

      #3
      Re: Java on Web

      It all depends exactly what you mean by programming for the web? But i take
      it from you post your interest is in java applets accessible over the web to
      run in a browser? Not so different to regular swing apps, plus the html page
      code to contain the app.

      Then theres server side programming to create dynamic web pages- using jsp
      and java servlets. For this you will also need an understanding of html of
      course, and set youself up with a web server. Linux with the j2sdk, Apache
      web server, Tomcat for the jsp pages, and MySQL for database access works
      well for me...

      "DaWaN" <dawan57@hotmai l.com> wrote in message
      news:ZK2dnRye9d [email protected] ...[color=blue]
      > I've done a lot of java programming but never done any for the web.
      > For most of what I've done was with Swing.
      >
      > So how difficult/different is it to still do some Java apps for the web[/color]
      from[color=blue]
      > Swing?
      >
      > --
      >
      > =============== ============
      > DaWaN
      > webmaster@dawan .com
      >
      >
      >
      >
      >[/color]


      Comment

      • DaWaN

        #4
        Re: Java on Web

        Thanks for the replies.

        What I meant was how can I use the regular Java to create programs with the
        browser as the interface?

        I've done a lotta programming myself and do program for the web with PHP and
        done some with C. But for example when I used C I had to rap the programs in
        shell files as .cgi files so they're accessible by the web.

        So how can you make a program that is written in Java (including all
        necessary HTML outputs from the Java program itself) to be used from a
        browser?


        Thanks in advance.

        =============== ============
        DaWaN
        webmaster@dawan .com



        "DaWaN" <dawan57@hotmai l.com> wrote in message
        news:ZK2dnRye9d [email protected] ...[color=blue]
        > I've done a lot of java programming but never done any for the web.
        > For most of what I've done was with Swing.
        >
        > So how difficult/different is it to still do some Java apps for the web[/color]
        from[color=blue]
        > Swing?
        >
        > --
        >
        > =============== ============
        > DaWaN
        > webmaster@dawan .com
        >
        >
        >
        >[/color]


        Comment

        • Raymond DeCampo

          #5
          Re: Java on Web

          DaWaN wrote:[color=blue]
          > Thanks for the replies.
          >
          > What I meant was how can I use the regular Java to create programs with the
          > browser as the interface?
          >
          > I've done a lotta programming myself and do program for the web with PHP and
          > done some with C. But for example when I used C I had to rap the programs in
          > shell files as .cgi files so they're accessible by the web.
          >
          > So how can you make a program that is written in Java (including all
          > necessary HTML outputs from the Java program itself) to be used from a
          > browser?
          >
          >[/color]

          Swing is not the right technology for this. What you are interested in
          is servlets and JSPs. You will need a servlet container for them to run
          in; try Tomcat from apache.org for a freely available one to get you
          started. Use the tutorials on java.sun.com to get started on servlets
          and JSPs. (Although the servlet API is pretty straightforward , if you
          are a seasoned programmer you can probably get it going right away.)

          Ray

          Comment

          • Herman Timmermans

            #6
            Re: Java on Web

            DaWaN wrote:
            [color=blue]
            > Thanks for the replies.
            >
            > What I meant was how can I use the regular Java to create programs with
            > the browser as the interface?
            >
            > I've done a lotta programming myself and do program for the web with PHP
            > and done some with C. But for example when I used C I had to rap the
            > programs in shell files as .cgi files so they're accessible by the web.
            >
            > So how can you make a program that is written in Java (including all
            > necessary HTML outputs from the Java program itself) to be used from a
            > browser?
            >
            >
            > Thanks in advance.
            >
            > =============== ============
            > DaWaN
            > webmaster@dawan .com
            >
            >
            >
            > "DaWaN" <dawan57@hotmai l.com> wrote in message
            > news:ZK2dnRye9d [email protected] ...[color=green]
            >> I've done a lot of java programming but never done any for the web.
            >> For most of what I've done was with Swing.
            >>
            >> So how difficult/different is it to still do some Java apps for the web[/color]
            > from[color=green]
            >> Swing?
            >>
            >> --
            >>
            >> =============== ============
            >> DaWaN
            >> webmaster@dawan .com
            >>
            >>
            >>
            >>[/color][/color]
            The easiest way is probably to use JSP/Servlets and deploy them in a
            JSP/Servlet container like Tomcat or Jetty.
            Brgds, Herman
            --
            Suse Linux Professional 8.1 on Athlon 1.1 Ghz 512 Mb
            Anti Spam = remove the "dot" and the "at"
            Registered Linux User #264690

            Comment

            Working...