Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2007

Tip: Looking for answers? Try searching our database.

JSP Questions

Thread view: 
jwren - 22 Oct 2007 22:32 GMT
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
Arne Vajhøj - 22 Oct 2007 23:56 GMT
> 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
Lew - 23 Oct 2007 01:51 GMT
jwren wrote:
>> 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.

And is much more powerful and flexible.

jwren wrote:
>> 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..

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

What are you trying to do with it in Java?

jwren wrote:
>> Does JRE1.4 have an alternative to C#'s using statement?

> 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.

Signature

Lew

jwren - 23 Oct 2007 02:14 GMT
Hi Lew,

Is 1.6 backward compatible with 1.4?

> >> JRE1.4 can't support Nullable<T>, so what is the best practice for
> >> representing null value types?
[quoted text clipped - 4 lines]
>
> 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
Arne Vajhøj - 23 Oct 2007 02:17 GMT
> Is 1.6 backward compatible with 1.4?

For most practical purposes yes.

Arne
Lew - 23 Oct 2007 04:55 GMT
> Hi Lew,
>
[quoted text clipped - 9 lines]
> 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.

Signature

Lew

Arne Vajhøj - 27 Oct 2007 18:18 GMT
> 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).

>   <http://java.sun.com/javase/6/docs/api/java/sql/ResultSet.html>

Similar to .NET DataReader.

>   <http://java.sun.com/javase/6/docs/api/javax/sql/RowSet.html>

Somewhat similar to .NET DataSet.

Arne
David Segall - 23 Oct 2007 07:50 GMT
>> 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.
And there's a drag and drop GUI development tool with remote debugging
for JSF. <http://www.netbeans.org/products/visualweb/>


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.