Develop a Simple Web Application

Discussion in 'Java' started by narke, Aug 17, 2010.

  1. narke

    narke Guest

    Hi, guys

    I am not new to Java but new to the java web application development.
    Now I wish I can make a simple web application for my team member's use,
    it just query some information from other sources (files). I am
    thinking about Java. Do you think what tool set I should go to learn
    and how quick I can finished the job? (If there is no web and just a
    console application, that will take me one or two days to get it done).

    Thanks in advance.

    --
    Life is the only flaw in an otherwise perfect nonexistence
    -- Schopenhauer

    narke
    narke, Aug 17, 2010
    #1
    1. Advertising

  2. narke

    grasp06110 Guest

    On Aug 17, 4:49 am, narke <> wrote:
    > Hi, guys
    >
    > I am not new to Java but new to the java web application development.
    > Now I wish I can make a simple web application for my team member's use,
    > it just query some information from other sources (files).  I am
    > thinking about Java.  Do you think what tool set I should go to learn
    > and how quick I can finished the job? (If there is no web and just a
    > console application, that will take me one or two days to get it done).
    >
    > Thanks in advance.
    >
    > --
    > Life is the only flaw in an otherwise perfect nonexistence
    >    -- Schopenhauer
    >
    > narke


    I would start with finding a place to host what you're planning on
    putting on the web. Who ever is going to host it will be able to let
    you know what they can/will host. I would also recommend getting
    started with Tomcat from Apache. You should be able to download and
    install with out much trouble (the only thing that seems to ever be a
    problem is making sure that Java is installed on the machine hosting
    Tomcat and that the JAVA_HOME (system) variable has been defined).
    For web development I use Eclipse. A lot of people I know also
    recommend My Eclipse.

    John
    grasp06110, Aug 17, 2010
    #2
    1. Advertising

  3. narke

    markspace Guest

    narke wrote:
    > Hi, guys
    >
    > I am not new to Java but new to the java web application development.
    > Now I wish I can make a simple web application for my team member's use,
    > it just query some information from other sources (files). I am
    > thinking about Java. Do you think what tool set I should go to learn
    > and how quick I can finished the job? (If there is no web and just a
    > console application, that will take me one or two days to get it done).



    If this is for your fellow team members' use, then I assume you'll be
    running on your own internal intra-net. You can just set up Tomcat on
    any machine to be a server. It might help during development to only
    set Tomcat up on your own machine, and just allow your team to test run
    on your machine initialy. Then set up on a seperate server.

    Anyway, it should take any more than one day to turn a command line app
    into a web app. Maybe less, as there are tools to help you format web
    pages, and formatting text to stdout can be a pain. You might actually
    gain time. However if you are completely new I can't say how long it'll
    take to learn what you need to know.

    The basic plan is to map out your user input and output "screens". If
    it was a console app, I'd call them screens. In a web app, they're
    pages. Then check out one of the IDEs and see how long it takes for you
    to turn those screens into JSP. Once you have that the rest of the app
    should be the same (in a general, fundamental sort of way) as the
    console app.

    I'll point you at the NetBeans tutorial for web apps. NetBeans is very
    easy to use for simple web apps, and Sun supports NetBeans heavily and
    it uses all of Sun's standards, so you get the most compatible sort of
    app from it.

    <http://netbeans.org/kb/trails/java-ee.html>

    Try to stay away from technologies like Java Server Faces (JSF) and
    Enterprise Java Beans (EJB) for now. For a two-day app from a novice,
    they're needless complication. Just use JSPs, Servlets and in the JSPs
    try to stick to EL (Expression Language). It's the easiest of the
    dynamic HTML to use and should be the fastest to implement. Don't use a
    lot of fancy tag-libs to do processing in the HTML/JSP, it's usually
    questionable practice and it'll be easier on you, knowing mostly Java
    right now, to just use Java to do that stuff.
    markspace, Aug 17, 2010
    #3
  4. In article <>,
    narke <> wrote:

    > I am not new to Java but new to the java web application development.
    > Now I wish I can make a simple web application for my team member's use,
    > it just query some information from other sources (files). I am
    > thinking about Java. Do you think what tool set I should go to learn
    > and how quick I can finished the job? (If there is no web and just a
    > console application, that will take me one or two days to get it done).


    I'll endorse John's & markspace's Tomcat suggestion. If you look in
    webapps/examples/WEB-INF/classes, you'll see the source for the
    included examples.

    Here's a very primitive example of displaying a command line result
    in a Java servlet:

    <http://groups.google.com/group/comp.lang.java.programmer/msg/9fe6bb022349464b>

    Warning: Don't make the executed command a servlet parameter.

    --
    John B. Matthews
    trashgod at gmail dot com
    <http://sites.google.com/site/drjohnbmatthews>
    John B. Matthews, Aug 17, 2010
    #4
  5. narke

    narke Guest

    On 2010-08-17, markspace <> wrote:
    > narke wrote:
    >> Hi, guys
    >>
    >> I am not new to Java but new to the java web application development.
    >> Now I wish I can make a simple web application for my team member's use,
    >> it just query some information from other sources (files). I am
    >> thinking about Java. Do you think what tool set I should go to learn
    >> and how quick I can finished the job? (If there is no web and just a
    >> console application, that will take me one or two days to get it done).

    >
    >
    > If this is for your fellow team members' use, then I assume you'll be
    > running on your own internal intra-net. You can just set up Tomcat on
    > any machine to be a server. It might help during development to only
    > set Tomcat up on your own machine, and just allow your team to test run
    > on your machine initialy. Then set up on a seperate server.
    >
    > Anyway, it should take any more than one day to turn a command line app
    > into a web app. Maybe less, as there are tools to help you format web
    > pages, and formatting text to stdout can be a pain. You might actually
    > gain time. However if you are completely new I can't say how long it'll
    > take to learn what you need to know.
    >
    > The basic plan is to map out your user input and output "screens". If
    > it was a console app, I'd call them screens. In a web app, they're
    > pages. Then check out one of the IDEs and see how long it takes for you
    > to turn those screens into JSP. Once you have that the rest of the app
    > should be the same (in a general, fundamental sort of way) as the
    > console app.
    >
    > I'll point you at the NetBeans tutorial for web apps. NetBeans is very
    > easy to use for simple web apps, and Sun supports NetBeans heavily and
    > it uses all of Sun's standards, so you get the most compatible sort of
    > app from it.
    >
    ><http://netbeans.org/kb/trails/java-ee.html>
    >
    > Try to stay away from technologies like Java Server Faces (JSF) and
    > Enterprise Java Beans (EJB) for now. For a two-day app from a novice,
    > they're needless complication. Just use JSPs, Servlets and in the JSPs
    > try to stick to EL (Expression Language). It's the easiest of the
    > dynamic HTML to use and should be the fastest to implement. Don't use a
    > lot of fancy tag-libs to do processing in the HTML/JSP, it's usually
    > questionable practice and it'll be easier on you, knowing mostly Java
    > right now, to just use Java to do that stuff.



    Hi, Markspace

    You advices are very useful, thank you so much! When you say there are
    tools that can help me for web page formating and JSP things, did you
    mean the NetBeans? For some reasons, I may like to use Eclipse, do you
    think there will be big difference, or in other word, can the Eclipse do
    a well job as web page formating and JSP compositing tool?

    Another thing is Servlets, although I familiar to Java language, I don't
    however familiar to Servlet, where is a good start point?

    Have a nice day!

    --
    Life is the only flaw in an otherwise perfect nonexistence
    -- Schopenhauer

    narke
    narke, Aug 19, 2010
    #5
  6. narke

    narke Guest

    On 2010-08-17, John B. Matthews <> wrote:
    > In article <>,
    > narke <> wrote:
    >
    >> I am not new to Java but new to the java web application development.
    >> Now I wish I can make a simple web application for my team member's use,
    >> it just query some information from other sources (files). I am
    >> thinking about Java. Do you think what tool set I should go to learn
    >> and how quick I can finished the job? (If there is no web and just a
    >> console application, that will take me one or two days to get it done).

    >
    > I'll endorse John's & markspace's Tomcat suggestion. If you look in
    > webapps/examples/WEB-INF/classes, you'll see the source for the
    > included examples.
    >
    > Here's a very primitive example of displaying a command line result
    > in a Java servlet:
    >
    ><http://groups.google.com/group/comp.lang.java.programmer/msg/9fe6bb022349464b>
    >
    > Warning: Don't make the executed command a servlet parameter.
    >


    John,

    Many thanks for the pointing me to the examples!


    --
    Life is the only flaw in an otherwise perfect nonexistence
    -- Schopenhauer

    narke
    narke, Aug 19, 2010
    #6
  7. narke

    markspace Guest

    narke wrote:

    > can the Eclipse do
    > a well job as web page formating and JSP compositing tool?



    I'm sure it can. I don't know Eclipse as well as NetBeans myself, but
    there's lots of folks here who use Eclipse a lot, it seems to work very
    well for them.


    >
    > Another thing is Servlets, although I familiar to Java language, I don't
    > however familiar to Servlet, where is a good start point?


    Try this:

    <http://download.oracle.com/javaee/5/tutorial/doc/bnafd.html>

    A servlet is just an abstract class, which you override to provide the
    functions you want. Then the container (Tomcat in this example) calls
    your servlet class when a URL is invoked by a browser

    Here is the regular old Java API for HttpServlet:

    <http://download.oracle.com/javaee/6/api/javax/servlet/http/HttpServlet.html>

    Normally you choose only one method, like doPost() or doGet(), and
    override that one only. The rest of HttpServlet's methods are
    implemented by the base class to "do the right thing."

    That's servlets in a very small nutshell.
    markspace, Aug 19, 2010
    #7
  8. narke wrote:
    [ SNIP ]
    > You advices are very useful, thank you so much! When you say there

    [ ed: Markspace's advice, incidentally :)) ]
    > are tools that can help me for web page formating and JSP things, did
    > you mean the NetBeans? For some reasons, I may like to use Eclipse,
    > do you think there will be big difference, or in other word, can the
    > Eclipse do a well job as web page formating and JSP compositing tool?

    [ SNIP ]

    I'll refer you to
    http://stackoverflow.com/questions/54868/what-is-the-best-html-editor-for-eclipse,
    which seems to be a decent discussion of Eclipse as an HTML editor
    (including WYSIWYG capabilities, such as they might be). I myself use
    Eclipse extensively at work for J2EE/Java EE; my page work for years has
    been almost exclusively Facelets XHTML, so not only do I barely use any HTML
    editor capabilities I don't use WYSIWYG at all...assuming it exists even for
    what I do. So I forbear from direct comment on Eclipse as a WYSIWYG HTML
    editor. For all I know one or more of those suggestions in the provided link
    is a good one.

    AHS
    --
    Before a man speaks it is always safe to assume that he is a fool.
    After he speaks, it is seldom necessary to assume it. -- H.L. Mencken
    Arved Sandstrom, Aug 19, 2010
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michal A. Valasek
    Replies:
    1
    Views:
    373
    Don Chen
    Aug 9, 2003
  2. MS News \(MS ILM\)
    Replies:
    0
    Views:
    343
    MS News \(MS ILM\)
    Aug 9, 2003
  3. Sanjeev
    Replies:
    1
    Views:
    306
    Arne Vajhøj
    Feb 29, 2008
  4. John Reid
    Replies:
    6
    Views:
    1,517
    limodou
    Sep 13, 2011
  5. Pradeep Belagapu
    Replies:
    5
    Views:
    129
    Jeremy McAnally
    Mar 25, 2008
Loading...

Share This Page