• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

I want to write a jsp in servlet

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I want to have a jsp in servlet.when i call that servlet, in built jsp should call database, fetch values and load it in jsp.

Suggest me how to approach this.

Thanks,
ramesh
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there a good reason to do this ? Why don't you call the database stuff from a servlet and pass the data to a JSP ?
 
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ramesh,

What are you trying to do here?
A Jsp in Servlet, that to for Database operations.

I want to have a jsp in servlet.when i call that servlet, in built jsp should call database, fetch values and load it in jsp.



Hmmm, Definatly not a good Architecture. Infact if I may say so, there is no Architecture at all.

What comprise your UI here?

JSP/JSF -> Servlet -> Facade -> DAO -> Database
is the flow we generally follow.

If you some specific business requirement to do stuff like you have decided to do, Pls elaborate more
[ July 31, 2006: Message edited by: Rewa Dev ]
 
rames tirrupur
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Yes. what satao is telling right and I need the same to be done.

Suggestion on this how to approach.

Thanks,
Ramesh
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look at the API for the RequestDispatcher interface.

If you look up MVC or "Model View Controller" you will find lots of information on this subject.
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You may also find this article interesting.
 
reply
    Bookmark Topic Watch Topic
  • New Topic