Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

querying html/servlet

 
Wen Yen
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I have a servlet that currently queries from an oracle database and a wicket that creates the connection to the servlet using the java.url package.
Is there a way to maybe save an instance of the servlet and get the results that way or directly through the connection made using java.url?

Mahalo
 
Nishan Patel
Ranch Hand
Posts: 689
Eclipse IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi,

First you remove your database connection code from your servlet to another POJO java class.

That java class contains only your business logic. make object of your java class and call method from your servlet.

That makes your code better and make better maintainable.

So, seprate your business logic from servlet controller to another java class model.

And then get result pass through the request object and forward to jsp.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic