Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I want to write a jsp in servlet

 
rames tirrupur
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • 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
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • 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 ?
 
Pratibha Malhotra
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • 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.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65227
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may also find this article interesting.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic