JSP Questions

J

jwren

Hey guys,

I am working on a JSP website on JRE1.4. I am trying to find some
good packages to use to speed up development because the project
currently uses no framework whatsoever. Would anyone mind
recommending some good packages? So far Struts looks worthwhile.

Since I am from a C# background:

JRE1.4 can't support Nullable<T>, so what is the best practice for
representing null value types?

Does JRE1.4 have an alternative to C#'s using statement?

Thanks in advance,
James
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

jwren said:
I am working on a JSP website on JRE1.4. I am trying to find some
good packages to use to speed up development because the project
currently uses no framework whatsoever. Would anyone mind
recommending some good packages? So far Struts looks worthwhile.

JSF will probably look more ASP.NET like to you.
Since I am from a C# background:

JRE1.4 can't support Nullable<T>, so what is the best practice for
representing null value types?

Use the wrapper classes Integer, Double etc..
Does JRE1.4 have an alternative to C#'s using statement?

No.

You will need to use try finally.

Arne
 
L

Lew

JSF will probably look more ASP.NET like to you.

And is much more powerful and flexible.
Use the wrapper classes Integer, Double etc..

There is no direct Java equivalent to C#'s Nullable<T>.

What are you trying to do with it in Java?
No.

You will need to use try finally.

And should use Java 6, the current version. Java 1.4 is in End-of-Life, it
lacks generics and other useful features, and it is slower than later
versions. Particularly coming from C#, you should find Java 5 or 6 much more
comfortable than the obsolescent version.

P.S., Arne is known to be very knowledgeable about both C# and Java.
 
J

jwren

Hi Lew,

Is 1.6 backward compatible with 1.4?
There is no direct Java equivalent to C#'s Nullable<T>.

What are you trying to do with it in Java?

I need it for database access. Using the wrappers as Arne suggested
sounds like a good enough solution.

Thanks,
James
 
L

Lew

jwren said:
Hi Lew,

Is 1.6 backward compatible with 1.4?


I need it for database access. Using the wrappers as Arne suggested
sounds like a good enough solution.

FYI, for DATETIME in JDBC there is the java.sql.Date type.

The java.sql package has classes and interfaces to support DB access, and they
impose certain idioms on things like setting PreparedStatement
<http://java.sun.com/javase/6/docs/api/java/sql/PreparedStatement.html>
positional paramaters or retrieving columns from a ResultSet
<http://java.sun.com/javase/6/docs/api/java/sql/ResultSet.html>
or its RowSet subtype
<http://java.sun.com/javase/6/docs/api/javax/sql/RowSet.html>
.. They indicate what Java types canonically map to which SQL types. The Java
Persistence API (JPA) also resolves certain fundamental matters of
object-relational mapping.
 
G

Guest

Lew said:
FYI, for DATETIME in JDBC there is the java.sql.Date type.

Or java.sql.Timestamp if the tim eportion is needed.
The java.sql package has classes and interfaces to support DB access,
and they impose certain idioms on things like setting PreparedStatement
<http://java.sun.com/javase/6/docs/api/java/sql/PreparedStatement.html>
positional paramaters or retrieving columns from a ResultSet

It is very similar to .NET Parameters. The biggest difference is
that JDBC PreparedStatement is always positional, while in .NET it
uses names for some provides and positions for other provides
(a bit tricky, because it always allows names, but it really uses
positions for the last category).

Similar to .NET DataReader.

Somewhat similar to .NET DataSet.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top