When the MVC pattern is employed and EJB is absented, the DAO pattern shall be
utilized. With this system design, the
DB routines are isolated from the rest of system for the purpose of "robust" as you
mentioned. In the future, you only
need to write another set of DAO implemention if you deci
Vernon:
Agreed. We use Struts (as our MVC framework), and then a data access
layer (we call persistables) that uses the PreparedStatements. Our JSPs
only get data to render *after* the business logic has decided that all
logic has been performed successfully.
The end-result is easily compartm
In general, it isn't a good idea to have SQL statements in JSP files. A good practise
is using Mode 2. The Struts is a
popular Mode 2 framework. If your application is very small and it won't grow into a
big one, you can get around using
Mode 1. In the situation, the SQL tags of JSTL will be a
Hi,
On 25 Nov 2002 at 4:57, javaholic wrote:
Your problem is really a JSP one rather than a postgres problem, and probably doesn't
really belong on this list. That said, I know much more java/jsp than I do postgres,
so I'll
try and help.
> I have some jsp code that should insert a user name
Actually, we use JDBC Prepared Statements for this type of work. You
put a query with '?' in as placeholders and then add in the values and
the library takes care of the encoding issues. This avoids the double
encoding of (encode X as String, decode string and encode as SQL X on
the line). T
On Monday 25 Nov 2002 12:57 pm, javaholic wrote:
> Hi All,
>
> I have some jsp code that should insert a user name and password into
> a table called login.
>
> Instead of inserting the values given by the client, it insert the
> literal string 'username' and 'password. The problem is somewhere in
Title: RE: [SQL] How does postgres handle non literal string values
I'm guessing it would have to be more like:
<%
String insertString =
"INSERT INTO \"login\" (\'user\', \'password\')
VALUES ('
Hi All,
I have some jsp code that should insert a user name and password into
a table called login.
Instead of inserting the values given by the client, it insert the
literal string 'username' and 'password. The problem is somewhere in
the INSERT statement.
Here is the code:
<%@page contentType