Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 14 of 14

Thread: Making a web site in Java

  1. #1
    Member
    Join Date
    Apr 2014
    Posts
    219
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default Making a web site in Java

    This might make me look pretty silly but I was curious if there was a way to make a dynamic web page in java. Basically only using pure Java, with only HTML5, CSS and mySQL.


  2. #2
    Senior Member
    Join Date
    Jul 2013
    Location
    Europe
    Posts
    666
    Thanks
    0
    Thanked 121 Times in 105 Posts

    Default Re: Making a web site in Java

    A website usually consists of 2 sides, the server and the client code.
    Today most servers are actually written in pure java. But the client code, that is what is being transported over the internet, is written in a combination of HTML, CSS, javascript, php, ruby, etc.
    If you also want the client code to be java you could try out jsp's or jsf's, or creating a java applet embedded in a HTML site.

  3. #3
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Making a web site in Java

    There are two sides to a website:

    The front-end: This is the html, css, and javascript that you see.

    The server-side: This is the code that runs on the server that does stuff like connect to databases, *serve* data to the frontend to make pages dynamic, etc.

    You can write the server side in JavaEE. In fact that's one of the main uses of Java. Google is your friend.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  4. #4
    Member
    Join Date
    Apr 2014
    Posts
    219
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default Re: Making a web site in Java

    Thank you. Learning JavaEE next. Just glad I can do this all in one place. I just want to use JavaEE, mySQl for back-end, and HTML, CSS for front-end. I learned PHP but forgot a lot of it and been really focusing on Java SE and keeping my C++ knowledge relevant while I finish school. I don’t really want to use ruby or PHP, is it essential that I incorporate them into the site?

  5. #5
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Making a web site in Java

    Quote Originally Posted by jocdrew21 View Post
    I don’t really want to use ruby or PHP, is it essential that I incorporate them into the site?
    Nope.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  6. #6
    Senior Member
    Join Date
    Jul 2013
    Location
    Europe
    Posts
    666
    Thanks
    0
    Thanked 121 Times in 105 Posts

    Default Re: Making a web site in Java

    Scripting languages like ruby, php, javascript, etc are almost all interchangeable. You are *probably* going to need at least one of them, otherwise your websites wont feel very "dynamic" (which is what people like nowadays apparently), but it is not at all necessary.

  7. #7
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Making a web site in Java

    Quote Originally Posted by Cornix View Post
    You are *probably* going to need at least one of them, otherwise your websites wont feel very "dynamic" (which is what people like nowadays apparently), but it is not at all necessary.
    The word "dynamic" is one of those words that's thrown around so much that it doesn't have any actual meaning anymore.

    One use of the word (and the way I took it) when referring to a "dynamic webpage" is a webpage whose data depends on something from the server. Compare that to a "static webpage" that always shows the same data no matter who is logged in, what time it is, etc.

    You can create that kind of dynamic webpage without any fancy graphics or scripting languages.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  8. #8
    Senior Member
    Join Date
    Jul 2013
    Location
    Europe
    Posts
    666
    Thanks
    0
    Thanked 121 Times in 105 Posts

    Default Re: Making a web site in Java

    Yes, thats true.

    The way I meant it was less of the computer science definition and more of the user experience definition. The user wants to see some flashy effects, moving parts, translucency changes, color changes, and all that fancy bs that nobody really needs but everybody suddenly wants.

  9. #9
    Member
    Join Date
    Apr 2014
    Posts
    219
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default Re: Making a web site in Java

    CSS does something javascript does and the less javascript I use the better. Now every browser works well with javascript. So are as moving parts and making it more flashy i could always through in some abobe flash correct?

  10. #10
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Making a web site in Java

    Quote Originally Posted by jocdrew21 View Post
    CSS does something javascript does and the less javascript I use the better. Now every browser works well with javascript. So are as moving parts and making it more flashy i could always through in some abobe flash correct?
    Not really. Flash is on its way out, and html5, css, and javascript are the standard frontend "languages" as they have the most cross-platform support (think mobile devices here).

    What exactly is your end goal? I would argue that it's best to not worry about flashy animations and whatnot until you have the basic server/client communication working.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  11. #11
    Member
    Join Date
    Apr 2014
    Posts
    219
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default Re: Making a web site in Java

    What exactly is your end goal? I would argue that it's best to not worry about flashy animations and whatnot until you have the basic server/client communication working.
    End goal is to have a easy to use website, one that I can put my projects on. For example lets say a employer is reading my CV and I list this page. They can go to it and have an idea of who I am, what I am working on and be able to have a quick assessment without wasting their time.

    Found some really neat JavaEE clips and just bought a book. Hopefully it is not a huge learning curve because I have a lot on my plate. I am self studying SAP back end and OSGI for a up coming internship plus writing my thesis with project for my capstone and taking two other 4 level classes. I work 14 hours a day on top of this with a family.

  12. #12
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Making a web site in Java

    Quote Originally Posted by jocdrew21 View Post
    End goal is to have a easy to use website, one that I can put my projects on. For example lets say a employer is reading my CV and I list this page. They can go to it and have an idea of who I am, what I am working on and be able to have a quick assessment without wasting their time.
    Then honestly, it might be better to just start with static html and css. It doesn't sound like you have any use for a server (other than to host your files), and all you really need is a collection of webpages that contain some static content.

    You can always start with static pages and then convert them to something more dynamic once you have a need.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  13. #13
    Member jdv's Avatar
    Join Date
    Jul 2014
    Location
    This Land
    Posts
    73
    Thanks
    0
    Thanked 5 Times in 5 Posts

    Default Re: Making a web site in Java

    Quote Originally Posted by jocdrew21 View Post
    End goal is to have a easy to use website, one that I can put my projects on. For example lets say a employer is reading my CV and I list this page. They can go to it and have an idea of who I am, what I am working on and be able to have a quick assessment without wasting their time.
    While it might be nice to showcase your Java servlet experience with a home-grown web app, if the aim is to showcase your projects, then this is exactly what folks are using GitHub for.

    Java web apps are subtle and quick to anger, and rolling your own is not adding content to your web presence. Employers want to see evidence of flexible thinking, problem solving and the ability to complete projects that scratch an itch you have. So, being able to see the history of changes and wiki-style notes is more important than saying you built a web app to... display the web app.

  14. The Following User Says Thank You to jdv For This Useful Post:

    GregBrannon (August 1st, 2014)

  15. #14
    Member
    Join Date
    Apr 2014
    Posts
    219
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default Re: Making a web site in Java

    You have a point there.

Similar Threads

  1. How can I search for specific content on a web site?
    By MrJava in forum What's Wrong With My Code?
    Replies: 1
    Last Post: January 29th, 2014, 11:31 AM
  2. Making sns site
    By pusheeeen in forum What's Wrong With My Code?
    Replies: 0
    Last Post: October 21st, 2013, 08:33 AM
  3. how to transform an html file to a web site in java
    By nasi in forum Java Theory & Questions
    Replies: 9
    Last Post: March 28th, 2010, 11:06 PM
  4. Best way to automatically login user from a customer's web site.
    By ess_stegra in forum JavaServer Pages: JSP & JSTL
    Replies: 2
    Last Post: February 2nd, 2010, 12:16 PM