I can certainly answer the second one, but I'll defer the first one to
others more comfortable with the Servlet spec than I.

Using stored procs does for you what using methods to access private data
does within Java classes: it helps encapsulate the details of the
underlying database schema. By using stored procs to obtain and/or
manipulate the entities within the database, your DBAs can shuffle the
schema around as necessary (to optimize for size, speed, certain queries,
whatever is necessary) without having to recompile SQL code. (Other
approaches to achieve this same effect include placing the SQL within text
files that the application simply reads and executes, but then if the SQL
changes, all of those "SQL properties" files require updating--not a
simple chore.)

Since you're using Oracle, you may as well make use of Oracle's rather
powerful PL/SQL language and syntax. Note that you're still using
JDBC--you're just using it to make stored proc calls, instead of directly
executing SQL statements.

Ted Neward
http://www.javageeks.com/~tneward


On Thu, 11 Nov 1999, Lalith Jayaweera wrote:

> Hi
>  I need Ur help to sort it out following twoe two questions .
>
> (1) How can we pass a variable which is used in one servlet to another
> servlet which will be used later.What am currently doing is creating a
> session object and putting the value and getting the value back when
> necessary.Is there any otherway that I can use instead of this one.
>
> (2)Rather than using jdbc..  for database access(writing sqlcodes well
> within the servlet) is there any advantage if I can use stored
> procedures.(am using
> oracle as my database server);
>
>
> Thanks in Advance
> lalith
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to