Re: MySQL

2001-03-29 Thread Christophe Vigny

I'm using : org.gjt.mm.mysql.Driver it work fine for me, very fast.

but I have a problem :
when I do ;
Context env = (Context) new InitialContext().lookup("java:comp/env");
DataSource source = (DataSource) env.lookup("jdbc/db");
Connection conn = source.getConnection();


   Statement stmt = conn.createStatement ();



  StringBuffer sql = new StringBuffer("");
  sql.append("SELECT *");
  sql.append(" FROM table");
  sql.append(" ...");
  ResultSet rs = stmt.executeQuery (sql.toString());

in a .jsp page it work fine but when I put that in a business bean who
do the same thing and return a ResultSet I have :

500 Servlet Exception
java.lang.NullPointerException
 at com.artprice.web.DBbean.artistSearch(DBbean.java:55)
 at _jsp._artprice._recArti__jsp._jspService(/artprice/recArti.jsp:39)
 at com.caucho.jsp.JavaPage.service(JavaPage.java:87)
 at com.caucho.jsp.JavaPage.subservice(JavaPage.java:81)
 at com.caucho.jsp.Page.service(Page.java:407)
 at
com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:136)

 at com.caucho.server.http.Invocation.service(Invocation.java:259)
 at
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:146)

 at
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:238)
 at
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:157)

 at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
 at java.lang.Thread.run(Thread.java:484)

it happen on then line :
ResultSet rs = stmt.executeQuery (sql.toString());

I'am using resin.
I don't understand, some help please.

James Bell a écrit :

> Hi everyone I want to use MySQL with Struts.  Although not a Struts
> specific question, what jdbc driver is the best to use.  I downloaded
> the driver from caucho and noticed that it was marked as
> experimental.  I know that may mean that it is still a good driver.
> But I would like an independent opionion. Thanks in AdvanceJames Bell




Re: Template -struts-template and generated HTML / templating using PUSH model

2001-03-28 Thread Christophe Vigny

J'espere, que cela prendra en compte l'internationnalisation. Les fichiers de
resources, ne permettent pas de gerer des pages stylisées.

Ce qui m'interesserait, dans un systeme de templates, ce sont des feuilles de style
(pas xsl) qui s'appliqueraient sur des beans, et qui permettrait au graphiste de
définir globalement comment s'affiche l'objet, puis de l'utiliser via des tags.

a+


Cedric Dumoulin a écrit :

>   Hi Vincent,
>
>   Have a look to Components proposal. Components proposal can be seen as
> "extended templates". With Components you can define your template's
> contents/attributes in a separate file, and insert content by using its name. A
> content, named a component, can also inherit from other definitions. Components
> proposal also contains other features.
>   See (main site) http://www.lifl.fr/~dumoulin/components
>  (mirror) http://www.geocities.com/cedricdumoulin/components/
>
>   I am currently working on the possibility to define or modify the
> template/component inside the action or inside the jsp. This will be available
> soon (see a previous mail 'Re: PROPOSAL: Template Screens').
>   Furthermore, useful Components features will be progressively introduce in
> Struts version 1.1
>
>   For your first question, see intermixed.
>
>   Cedric
>
> Vincent Harcq wrote:
>
> > Hi,
> >
> > 1. I am beginning to look at Templating mechanism and so use the example
> > struts-template using version pre-beta-2 (23/03/01).
> > The result is a strange for me.  Can somebody explain me this.
> > On the first page, when I look at the generated code (look at the end of
> > message), I got something where the side-bar.jsp and header.jsp is included
> > BEFORE the  tag; while from what I see in chapterTemplate.jsp, the
> >  should appear first.
> > Is there a problem somewhere ?  Does somebody is aware of that ?  Is it my
> > browser ?
> >
>
>   What jsp server do you use ? This happens because your server doesn't flush
> included page.
>   You can try to use the components library instead of template one, it is fully
> compatible.
>
> >
> > 2. I was also thinking about another mean of doing templating.  The fact
> > that I have two create each 2 files (introduction.jsp and introduction.html)
> > is not really needed if you consider you have a little number of different
> > templates to work with.
> > Say you have only two templates (side-bar header content footer) (left-bar
> > header content right-bar footer), it is too much for me to create each time
> > the page that will use template:put.
> > I have done that before I used Struts in a "request processor" by setting
> > the value of a "content" field, forwarding to one of two pages template1.jsp
> > and template2.jsp that uses jsp include tags.
> > My plan was to do that in the findForward() method of ActionForwards and
> > forward all the time to one of the 2 template pages that I have and setting
> > the "content" value before.
> > To speak "philosophically", but wishing to not re-open this debate, the PUSH
> > method is for me more convenient that the "PULL" one for Page Templating
> > Mechanism.  But I do not want to "mix" Velocity and Struts only""" to
> > solve this templating problem.
> >
>
> >
> > Any ideas ?
> >
> > HTML generated:
> > ---
> >
> > Topics
> >   
> > 
> > Introduction 
> >
> > 
> > Using Templates 
> >
> > 
> > Optional Content 
> > 
> > ... and more ...
> >   
> >
> > 
> >
> >   
> >   
> >
> > 
> > 
> >  . . .
> >
> > _
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com




cvs trouble

2001-03-26 Thread Christophe Vigny

it is impossible to log into the cvs :

D:\java\strut>c:\bin\cvs -d
:pserver:[EMAIL PROTECTED]:/home/cvspublic
login
(Logging in to [EMAIL PROTECTED])
CVS password: anoncvs
cvs [login aborted]: could not open //.cvspass: No such file or
directory


D:\java\strut>c:\bin\cvs -d
:pserver:[EMAIL PROTECTED]:/home/cvspublic
checkout jakarta-struts
cvs checkout: authorization failed: server jakarta.apache.org rejected
access to
 /home/cvspublic for user anoncvs
cvs checkout: used empty password; try "cvs login" with a real password


and when I don't use, a password :
D:\java\strut>c:\bin\cvs -d
:pserver:[EMAIL PROTECTED]:/home/cvspublic
login
(Logging in to [EMAIL PROTECTED])
CVS password:
cvs login: authorization failed: server jakarta.apache.org rejected
access to /h
ome/cvspublic for user anoncvs

D:\java\strut>c:\bin\cvs -d
:pserver:[EMAIL PROTECTED]:/home/cvspublic
checkout jakarta-struts
cvs checkout: authorization failed: server jakarta.apache.org rejected
access to
 /home/cvspublic for user anoncvs
cvs checkout: used empty password; try "cvs login" with a real password
D:\java\strut>

please help




walking tour

2001-03-26 Thread Christophe Vigny

hello,

in the walking tour off the example demo I have found :

"Note that direct access to the DatabaseServlet should really be handled
by a business-logic bean, and NOT by LoginAction. To quote the example's
author "This should be considered a bug in the example."

Interesting, should we have the same example, with a database login in a
business-logic bean, in order to understand how to structure, all the
element.




Re: Performance of struts

2001-03-20 Thread Christophe Vigny

You have forgoten

www.jboss.org an open source ejb container, it is release with tomcat.



Eric Brown a écrit :

> I haven't done any comparisons recently, but I think Resin from
> www.caucho.com is very reasonably priced and written specifically with
> performance in mind (from what I can tell). I've written a Java based http
> proxy server before and I can tell you that from looking at some of the
> things Resin has done, they know where Java's performance bottlenecks are.
> (For example, they translate all socket streams into byte arrays instead of
> using strings, etc.) They have some performance comparisons on their web
> site.
>
> Others are:
> Orion - Know nothing about
> BEA WebLogic - Very expensive, complex to deploy and performance is mediocre
> according to my sources
> ATG Dynamo - Expensive but good for commerce if needed. They are focused on
> commerce, so probably not focused on performance.
> Netscape/iPlanet - I've heard the performance is not impressive
> IBM WebSphere - This is an up-and-coming competitor to WebLogic and ATG. It
> used to be buggy and is still expensive. Performance is unknown, but I would
> favor Resin as it comes with source and is less expensive.
> Jrun - Priced reasonably. Nice integration with other Allaire products. No
> special commerce features. I think it has had some compatibility problems,
> but it seems a good engine these days. All the same, I don't think you can
> get source and I haven't done performance tests.
> Enhydra - This is just Tomcat. They have their own framework that is less
> comprehensive than struts called XMLC. Its big advantage is that it does a
> better job of separating UI from code.
>
> I think to some degree, it is equally important to look at the JVM you are
> running on. Consider looking at the Volano report at
> http://www.volano.com/report.html.
>
> My team is using Tomcat/Forte for development and will use Resin/Apache for
> deployment.
>
> Eric
>
> -Original Message-
> From: James Howe [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 19, 2001 2:16 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Performance of struts
>
> If Tomcat's performance is pretty awful, what are some JSP implementations
> (commercial or otherwise) that are particularly good?
>
> At 12:10 PM 3/19/2001 -0800, you wrote:
>
> >Struts based apps (or any app that uses custom tags heavily) are going to
> >be significantly impacted by the quality of the JSP implementation in your
> >container.  Which version are you using?  (NOTE:  Tomcat's performance
> >w.r.t. JSP pages is pretty awful, for example).
> >
> > > Thanks!
> > > keith
> > >
> > >
> > >
> >
> >Craig McClanahan
>
> James W. Howe   mailto:[EMAIL PROTECTED]
> Allen Creek Software, Inc.  pgpkey:
> http://ic.net/~jwh/pgpkey.html
> Ann Arbor, MI 48103




Connection Pool

2001-03-16 Thread Christophe Vigny

Where is the connection pool ?
in tomcat, in turbine or in strut ?




Strut / Turbine

2001-03-01 Thread Christophe Vigny

It seems that the database support is pretty lesser in strut than in turbine.

I'm wonder what is the better frame work to use, I want to build database driven web 
site in java
technologie.