473,395 Members | 1,401 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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
we*******@dawan.com


Jul 17 '05 #1
5 1688
DaWaN wrote:
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?

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, HttpURLConnection, URLStreamHandler and URLStreamHandlerFactory
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
Jul 17 '05 #2
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" <da*****@hotmail.com> wrote in message
news:ZK********************@giganews.com...
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
we*******@dawan.com


Jul 17 '05 #3
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
we*******@dawan.com

"DaWaN" <da*****@hotmail.com> wrote in message
news:ZK********************@giganews.com...
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
we*******@dawan.com

Jul 17 '05 #4
DaWaN wrote:
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?


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

Jul 17 '05 #5
DaWaN wrote:
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
we*******@dawan.com

"DaWaN" <da*****@hotmail.com> wrote in message
news:ZK********************@giganews.com...
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
we*******@dawan.com

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
Jul 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ravi Tallury | last post by:
Hi We are having issues with our application, certain portions of it stop responding while the rest of the application is fine. I am attaching the Java Core dump. If someone can let me know what...
1
by: ptaz | last post by:
Hi I'm trying to run a web page but I get the following error. Ca anyone please tell me a solution to this. Thanks Ptaz HTTP Status 500 - type Exception report
11
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in...
0
by: mailkhurana | last post by:
Hii , I am trying to use a type 2 driver to connect to DB2 0n AIX 5 I have a small java test to class to establish a conneciton with the db .. I am NOT using WAS or any appserver When I try to...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
12
by: Mark Fink | last post by:
I wrote a Jython class that inherits from a Java class and (thats the plan) overrides one method. Everything should stay the same. If I run this nothing happens whereas if I run the Java class it...
0
by: jaywak | last post by:
Just tried running some code on Linux (2.4.21-32.0.1.EL and Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)) and Windows XPSP2 (with Java HotSpot(TM) Client VM (build...
1
by: jaimemartin | last post by:
hello, I want to validate an xml by means of a schema (xsd). To do that first of all I´m using a SchemaFactory. The problem is that if I run the code in Windows all works fine, but If I run it in...
0
oll3i
by: oll3i | last post by:
package library.common; import java.sql.ResultSet; public interface LibraryInterface { public ResultSet getBookByAuthor(String author); public ResultSet getBookByName(String name);
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.