Develop a Simple Web Application

N

narke

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.
 
G

grasp06110

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
 
M

markspace

narke said:
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.
 
J

John B. Matthews

narke said:
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.
 
N

narke

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!
 
M

markspace

narke said:
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.
 
A

Arved Sandstrom

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,037
Messages
2,570,371
Members
47,014
Latest member
TashaMorei

Latest Threads

Top