Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #29883

Re: Java Web

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!usenetcore.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail
NNTP-Posting-Date Mon, 01 Sep 2014 09:04:31 -0500
Date Mon, 01 Sep 2014 15:04:29 +0100
From lipska the kat <lipskathekat@example.com>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1
MIME-Version 1.0
Newsgroups comp.lang.java.programmer
Subject Re: Java Web
References <65c74098-cda8-482d-844d-8577ee514ef3@googlegroups.com>
In-Reply-To <65c74098-cda8-482d-844d-8577ee514ef3@googlegroups.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Message-ID <kZadnXohJMhy4ZnJnZ2dnUVZ8r2dnZ2d@bt.com> (permalink)
Lines 47
X-Usenet-Provider http://www.giganews.com
X-AuthenticatedUsername NoAuthUser
X-Trace sv3-bebgR3W+GPONKMbdR3dJNR61hmqgz8dLf7uKCRt1uVAYCgcVjJgVtiOdXmulQrFve/ujceENtIBjrOK!5U4WpfPrSFWS0T+u9X/pqIqxtvdTbaR8TghmfzQGhLVfN+AT6xMMiOyUb9t1oDyhtzYUqzm7NKM=
X-Complaints-To abuse@btinternet.com
X-DMCA-Complaints-To abuse@btinternet.com
X-Abuse-and-DMCA-Info Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info Otherwise we will be unable to process your complaint properly
X-Postfilter 1.3.40
X-Original-Bytes 2830
Xref csiph.com comp.lang.java.programmer:29883

Show key headers only | View raw


On 01/09/14 14:15, sundu104ece@gmail.com wrote:
> Hi everyone,
>
> I am having confusions over jsp and jdbc.
> i am doing a small application in java web.I am having jdbc code which connects and retrieves the data from database.
> My questions:
>
> 1)Where do i have to write jdbc code?either in jsp or servlet or some other?
> 2)How can i display those data by jsp.
>
>
> Thanks in advance.

Try searching the interweb for "how to write a java web app"
The first non ad hit I got was
http://docs.oracle.com/javaee/1.4/tutorial/doc/WebApp.html
there are many others

Think of a web application as a multi layered entity
each layer should be as decoupled from the others as possible

In fact you should really develop your business components so that they 
can be used regardless of interface. The WWW is just one possible 
delivery mechanism.

It's a bit of a 'big question' really.
I'll give you a hint.

The persistance layer is one layer.
You need to be able to use your database access code from multiple 
possible interfaces, not just web apps?
So where do you think this code should go?

In a Servlet? well not really, this ties your code to a web application.
In a jsp? most certainly not, a jsp is a presentation layer technology
What does this leave?

...

So, now we wait for the howls of derision from the 'experts' on this 
list. No matter, it's an architectural decision you have to make and 
some architects just build *stupid* buildings.

-- 
lipska the kat - treacherous feline.
Proudly nominated for IPOTY 2014 - LIGAF
GNU/Linux user #560883 - linuxcounter.net

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Java Web sundu104ece@gmail.com - 2014-09-01 06:15 -0700
  Re: Java Web lipska the kat <lipskathekat@example.com> - 2014-09-01 15:04 +0100

csiph-web