Re: some best practices questions

2004-07-07 Thread bryan
I myself get caching with hibernate which I am using for persistance 
but I wanted the more fine grained control like this so that I could page 
back and forth using displaytag.org. 

here is my jsp code for paging, hope this shows why I am doing it. I guess 
my code is more for implimenting a client view than for heavy duty caching.

snip=
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/c" prefix="c" %>
<%@ taglib uri="/tags/displaytag-el-12" prefix="display" %>













=snip

Cause everything is cached it is a snip to move back and forth through
the records.

--b


On Wed, 07 Jul 2004 08:41:39 -0700, Michael McGrady
<[EMAIL PROTECTED]> wrote:
> I, for one and one only, think that this sort of thing is directly
> addressing the most common recurrent question on this list.  So, if
> anything, this de-spams the list.  Thanks for the suggestion.
> 
> At 04:57 AM 7/7/2004, you wrote:
> >Sorry if this is considered spamming the list 
> >
> >Speaking of storing stuff in session scope. I've developed what I think is
> >a handy class which I think it useful for
> >when I want to store something like a search in a session variable.
> >
> >For instance if I want to page through it ( using displaytags.org (10 out
> >of 10)) or simply if I don't want to fetch
> >from the database time and time again.
> >By default the data expires on an hourly basis. And if a different
> >combination of parameters is sent it expires
> >the cached stuff.
> >
> >Here is the class
> >
> >snip=
> >package ie.jestate.struts.client;
> >
> >import java.util.Date;
> >
> >/**
> >* @author Bryan Hunt
> >*/
> >//TODO:Perhaps I should be generating a MD5 or something but I can't see a
> >good reason to use any more CPU
> >
> >public class HashGenerator {
> >
> >private StringBuffer buffer;
> >
> >
> >/**
> > *
> > */
> >public HashGenerator() {
> >super();
> >buffer = new StringBuffer(50);
> >// TODO Auto-generated constructor stub
> >}
> >
> >/**
> > * @param urbanAreas
> > */
> >public void add(Integer[] array,String fieldname) {
> >for (int i = 0; i < array.length; i++) {
> >Integer integer = array[i];
> >buffer.append(integer);
> >}
> >buffer.append(fieldname);
> >buffer.append("-");
> >}
> >
> >/**
> > * @param priceRangeStart
> > */
> >public void add(Integer integer,String fieldname) {
> >// TODO Auto-generated method stub
> >buffer.append(integer);
> >buffer.append(fieldname);
> >buffer.append("-");
> >}
> >
> >/**
> > * @return
> > */
> >public String getHash() {
> >
> >//I append the hour onto the end of the string so that a hash will
> >//only be good for a max of one hour.
> >Date date = new Date();
> >
> >return buffer.toString()+ "-" + new Integer(date.getHours());
> >}
> >
> >}
> >
> >=snip
> >
> >And here is example usage.
> >snip=
> >/*
> >* Created on 24-Jun-2004
> >*/
> >package ie.jestate.struts.client;
> >
> >import ie.jestate.struts.BaseAction;
> >
> >import java.util.Set;
> >
> >import javax.servlet.http.HttpServletRequest;
> >import javax.servlet.http.HttpServletResponse;
> >import javax.servlet.http.HttpSession;
> >
> >import org.apache.struts.action.ActionForm;
> >import org.apache.struts.action.ActionForward;
> >import org.apache.struts.action.ActionMapping;
> >import org.apache.struts.action.DynaActionForm;
> >
> >/**
> >* @author Bryan Hunt
> >  *
> >*/
> >public class ForSaleSearchAction extends BaseAction {
> >
> >/* (non-Javadoc)
> > * @see
> > org.apache.struts.action.Action#execute(org.apache.struts.action.ActionMapping,
> > org.apache.struts.action.ActionForm,
> > javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
> > */
> >public ActionForward execute(
> >ActionMapping actionMapping,
> >

Re: Re: validation wierdness possibly related to multiple struts config files

2004-07-14 Thread bryan
I am using a nightly build from about 1 week ago. I never updated my
dtd for validator though. Im going to do that and check out your
suggestion. Never occured to me that it mightnt be backwards
compatatable.

--b

On Tue, 13 Jul 2004 15:52:41 -0400, Bill Siggelkow
<[EMAIL PROTECTED]> wrote:
> Are you using Struts 1.2 or the nightly build? I had this issue the
> other day and I think I got around it by using the new  element
> instead of  -- simply change arg0 to arg in your validation.xml.
> 
> 
> 
> Or you can try using the new position attribute:
> 
> 
> 
> Bill Siggelkow
> 
> 
> 
> 
> Bryan Hunt wrote:
> > I have the following jsp page
> > snip=
> > 
> >  
> >
> >  
> >
> >  
> >
> >   > key="label.oldPassword"/>:
> >  
> >
> >  
> > etc etc etc
> > =snip
> >
> > I have 4 struts config files default.xml,client.xml,admin.xml,sales.xml
> >
> > They are declared as so in my web.xml file.
> > snip=
> > 
> > config
> > /WEB-INF/struts/default.xml,
> > /WEB-INF/struts/client.xml,
> > /WEB-INF/struts/sales.xml,
> > /WEB-INF/struts/admin.xml
> > 
> > 
> > =snip
> >
> > The default.xml contains the following lines which work just fine for
> > everything else
> > snip=
> > 
> >
> > 
> >
> >  
> > > value="/WEB-INF/tiles/default-defs.xml,/WEB-INF/tiles/client-defs.xml,/WEB-INF/tiles/sales-defs.xml,/WEB-INF/tiles/admin-defs.xml"
> > />
> >
> >
> >  
> >
> >   
> > > value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
> >  
> > =snip
> >
> > My validation.xml file has the following relevant lines ...
> > snip=
> >  
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > =snip
> >
> > My ApplicationResources.properties file has the following content
> > snip=
> > label.oldPassword=Old Password
> > label.newPassword=New Password
> > label.confirmNewPassword=Confirm New Password
> > errors.required={0} is required.
> > errors.minlength={0} cannot be less than {1} characters.
> >
> > =snip
> > Now everything works fine including the labels (ie  > key="label.oldPassword"/> ) but when
> > the form is submitted but not all the fields are filled out I get the
> > following messages ( output from .
> >
> > null is required.
> > null is required.
> > null is required.
> >
> > Is this possibly a Struts bug or is it too late in the day and I drink
> > to many units at the weekend being an Irishman ?
> >
> > --b
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OT/ Tomcat, Hibernate and MYSQL problem ( byte to blob )

2004-07-30 Thread bryan
I am using the following mysql driver 

-rwxr-xr-x1 Administ Aucun  321671 Jul  2 13:47 /c/bryan-website/jakarta
-tomcat-5.0.14/common/lib/mysql-connector-java-3.1.1-alpha-bin.jar

and it has worked fine for me previously .

I would carry out some checks on the struts action to verify the size
of the data.

Also check for the following 
 wrote:
> Hi Bryan
> 
> Just downloaded the latest, but the action just prints a test message..
> 
> System.out.println("at least i managed to get called");
> 
> The problem isn't with form file, thats fine.. Its when I try and save
> to the db
> 
> //hibernate stuff
> 
> /**
> * @hibernate.property column="image" type="blob"
> */
> public byte[] getImage() {
> return image;
> }
> 
> public void setImage(byte[] image) {
> this.image = image;
> }
> 
> Now i created a custom user type like were required with older versions
> of hibernate..
> 
> /**
> * @hibernate.property column="image"
> type="com.sparrow.hibernate.type.Image"
> */
> 
> http://www.hibernate.org/73.html
> 
> but when i try and save now i get a null pointer exception with not
> much else to go on (before it was a class cast exception). I'd have
> thought that creating a custom user type was a bit old hat as 2.0 loved
> it..
> 
> The only other thing i can think its down to is the jdbc driver.. Which
> i'm investigating now.
> 
> 
> 
> 
> On 30 Jul 2004, at 12:08, Bryan Hunt wrote:
> 
> > My app is able to do it no problem, back and forth.
> >
> > You can get the source code from http://jestate.revoltingdigits.com/
> >
> > ie.jestate.struts.action.ImageUploadAction
> >
> > My code is a  mess at the moment but that code is working.
> >
> > --b
> >
> >
> > Mark Lowe wrote:
> >
> >> I've had the same thing happen using DBCP and C3PO, I believe its the
> >> driver rather than the pooling. As I said we've a app thats live, and
> >> i haven't touched it in months using DBCP.
> >>
> >> [OT] subject change.. Have you had any joy with byte[] to blob
> >> mapping for file uploads with hibernate 2.1.4? I created a custom
> >> usertype, but i get a npe. 2.0 delbt with life, but things appear to
> >> have taken a step backwards. (please dont make me go the the scary
> >> hibernate forum :) )
> >>
> >>
> >> On 30 Jul 2004, at 11:34, Joe Hertz wrote:
> >>
> >>> I noticed this behavior with 3.0.14.
> >>>
> >>> This _really_ sounds like this entry in the Hibernate FAQ to me:
> >>>
> >>> http://www.hibernate.org/117.html#A13
> >>>
> >>> I wouldn't use DBCP though as Gavin King is apparently fed up with
> >>> it,
> >>> and built-in support for it is being yanked in the next major
> >>> version of
> >>> Hibernate.
> >>>
> >>>> -Original Message-
> >>>> From: Marco Mistroni [mailto:[EMAIL PROTECTED]
> >>>> Sent: Friday, July 30, 2004 5:08 AM
> >>>> To: 'Struts Users Mailing List'
> >>>> Subject: RE: OT/ Tomcat, Hibernate and MYSQL problem
> >>>>
> >>>>
> >>>> Hello,
> >>>> If I remember correct, mysql connector 3.0.11
> >>>>
> >>>> Regards
> >>>> marco
> >>>>
> >>>> -Original Message-
> >>>> From: Mark Lowe [mailto:[EMAIL PROTECTED]
> >>>> Sent: 30 July 2004 09:36
> >>>> To: Struts Users Mailing List
> >>>> Subject: Re: OT/ Tomcat, Hibernate and MYSQL problem
> >>>>
> >>>> Marco
> >>>>
> >>>> What jdbc driver are you using?
> >>>>
> >>>> They was a shady version 3 behaving like this.
> >>>>
> >>>>
> >>>> On 30 Jul 2004, at 10:05, Joe Hertz wrote:
> >>>>
> >>>>> Hibernate's internal connection pooling isn't meant for production
> >>>>> because it does things just like that.
> >>>>>
> >>>>> Suggest you use c3p0 for the pooling.
> >>>>>
> >>>>>> From my hibernate.cfg.xml, I only had to add this:
> >>>>>
> >>>>>
> >>>>>5
> >>>>>20
> >>>>>1800
> >>>>>   

Re: eclipse3.0 struts plugin

2004-08-04 Thread bryan
I've used them all , nitrox is the best but costs 399

On Wed, 4 Aug 2004 00:55:47 +0800, char <[EMAIL PROTECTED]> wrote:
> thanks all .
> thanks Erez and James
> 
> but Which is the better between  myEclipse  and Struts Console
> 
> and which can support jstl better?
> 
> 
> 
> 
> - Original Message -
> From: "James Holmes" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, August 03, 2004 11:34 PM
> Subject: RE: eclipse3.0 struts plugin
> 
> > Struts Console works with all versions of Eclipse from 1.0 all the way
> > through the latest nightly builds. Additionally Struts Console has support
> > for Struts, Tiles and Validator configuration files.
> >
> > http://www.jamesholmes.com/struts/
> >
> > -James
> >
> > -Original Message-
> > From: char [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, August 03, 2004 10:18 AM
> > To: [EMAIL PROTECTED]
> > Subject: eclipse3.0 struts plugin
> >
> > hi all.
> >
> >   May anybody tell me a struts plugin can use in eclipse3.0RC1.
> >
> >   I have download the easystruts plugin ,
> >
> >   but very unlucky, It can only support eclipse 2.0
> >
> >   kind regards, Thanks
> >
> > char
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Re: HTTP Compression

2004-08-06 Thread bryan
If only someone would do such a thing ! They would be rich beyond their wildest 
dreams. And they would probably use clustered linux servers in such a way that
they could retrieve such information in a fraction of a second. 

Results 1 - 10 of about 7,410 for compression servlet filter. (0.40 seconds)

Seriously... why do people keep replying to stuff that could just as easily be 
found on google ? 

I never ask anything on this list unless I'm certain that the answer isn't on 
google. 

Why do people keep replying to questions where the person asking
the question can't be arsed doing so and just wants someone else to write 
their code for them. 

If you can't be bothered making the slightest effort. 

a) Quit your job
b) Choose alternative career from list 

1_ Dishwasher
2_ Action hero 
3_ Captain of luxury boat
4_ Insert your career of choice here 

--b

- Original Message -
From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Fri, 6 Aug 2004 08:22:19 -0400
Subject: [OT]  Re: HTTP Compression
To: Struts Users Mailing List <[EMAIL PROTECTED]>

 
If only someone would invent the technology that will allow us to
query the vastness known as the Internet with a search string like,
oh, "servlet filter" or even "compression servlet filter".
 
 
 
 
 "Shailender Jain" <[EMAIL PROTECTED]> 

08/06/2004 08:10 AM 
 
Please respond to
 "Struts Users Mailing List" <[EMAIL PROTECTED]> 
 
 
To Struts Users Mailing List <[EMAIL PROTECTED]> 
 
cc 
 
Subject Re: HTTP Compression 
 
 


 
 
 

 Any pointers for these Servlet filter
 I have no idea how to approach.
 
 Emmanouil Batsis wrote:
 
 > Shailender Jain wrote:
 >
 > >Hi,
 > >
 > >I know this is not the right place to ask this question.
 > >
 > >Has anybody ever used HTTP compression and image compression techniques
 > >so that the web page is downloaded extremely fast.
 > >
 > >
 >
 > The usual way is to use a Servlet filter to compress the right content
 > for the right clients. There is little or no meaning in compressing
 > binary files (like images).
 >
 > Cheers,
 >
 > Manos
 >
 > -
 > To unsubscribe, e-mail: [EMAIL PROTECTED]
 > For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tool to convert HTML to Struts JSP's?

2004-08-06 Thread bryan
Your methodology is wrong. You should create the pages etc and the logic flow 
yourself throughout the application.

Use css for everything so that the designer can just give u a stylesheet. 

Use the tiles framework to use global templates. 

--b

On Fri, 6 Aug 2004 15:17:15 +0100, Adam Lipscombe
<[EMAIL PROTECTED]> wrote:
> 
> 
> I need to convert the tags, for example  -> 
> 
> Thanks - Adam
> 
> 
> 
> 
> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Vic Cekvenich
> Sent: 06 August 2004 14:31
> To: [EMAIL PROTECTED]
> Subject: Re: Tool to convert HTML to Struts JSP's?
> 
> ren *.html *.jsp
> 
> Adam Lipscombe wrote:
> > Folks,
> >
> >
> > My Web Designer is supplying HTML files straight from DreamWeaver. I
> > need to convert them to JSP for use with Struts 1.1.
> >
> > If there a tool to assist with this? (doing it by hand is going to be
> > tedious)
> >
> >
> > Previous list answers include Struts Console from James Holmes. I
> > downloaded this but I cant see how it will help. It appears to be a
> > GUI for the struts config file.
> >
> >
> >
> > TIA -Adam
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: very dynamic forms

2004-08-06 Thread bryan
Wouldn't it be so cool if you could take something like a graph of
hibernate objects and
have a form dynamically generated for u.

With dhtml or something so that you could populate the whole graph in
one user form ?

For example a House object that had a set of rooms, each room with
it's own description.

The dhtm generated by the form could expand out so that the user could add an 
arbitrary number of rooms each with their own description. 

The whole thing could get filled out in a single http request. 

This would greatly reduce the use case for creating a house. 

Has anyone ever developed anything like this ?

--b


On Fri, 06 Aug 2004 11:54:01 -0700, Michael McGrady
<[EMAIL PROTECTED]> wrote:
> How do map based forms farm the values from the request?
> 
> At 09:13 AM 8/6/2004, you wrote:
> >For me it was very painless and although there aren't lots of big "killer"
> >features - there are IMO lots of little ones that make this a good upgrade.
> >
> >Niall
> >
> >- Original Message -
> >From: "Dean A. Hoover" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Sent: Friday, August 06, 2004 4:49 PM
> >Subject: Re: very dynamic forms
> >
> >
> > > Thanks. I am looking at Niall's Lazy stuff, but I like your idea.
> > > I will add it to my list of investigations and experiments. I've
> > > written quite a bit to struts 1.1. Is there a downside to upgrading?
> > >
> > > Thanks.
> > > Dean
> > >
> > > Kevin A. Palfreyman wrote:
> > >
> > > >Dean,
> > > >I do a similar thing with Struts 1.1, and I use an ordinary struts form
> > > >(a subclass of ValidatorActionForm) that has a DynaBean as one of its
> > > >fields.  To match this, my DTO also has the same field as a DynaBean,
> > > >and we just have to be a bit more clever when we copy properties between
> > > >the two.  The "schema" of the DynaBeans are configured entirely
> > > >separately from the rest of the Struts stuff, and should be fairly
> > > >easily done from a DB. In an upcoming version, the shape of the
> > > >DynaBeans will be determined from data from a remote corba service.
> > > >
> > > >Unfortunately, this is all product specific (closed source), so I can't
> > > >just pass it on (it wouldn't be useful to you anyway in its current
> > > >form).  But it should encourage you that it can be done.
> > > >
> > > >>From a quick read of his web page, Niall's Lazy stuff looks very
> > > >promising.  If I were starting again, I might have a look to see if that
> > > >would fit.
> > > >
> > > >Good luck,
> > > >
> > > > Kev
> > > >
> > > >
> > > >
> > > >>-Original Message-
> > > >>From: Dean A. Hoover [mailto:[EMAIL PROTECTED]
> > > >>Sent: 06 August 2004 15:47
> > > >>To: Struts Users Mailing List
> > > >>Subject: Re: very dynamic forms
> > > >>
> > > >>What I need to do is construct a form that has a variety of
> > > >>text input forms on it that are determined at run-time. I
> > > >>know how to do this in jsp but I need to provide an
> > > >>ActionForm that conforms to that form.
> > > >>I got several useful replies last night and am investigating them.
> > > >>
> > > >>Dean
> > > >>
> > > >>Michael McGrady wrote:
> > > >>
> > > >>
> > > >>
> > > >>>That makes sense, but his other comments seem to negate that.  He
> > > >>>says, e.g., that "[w]hat would come out of the query would
> > > >>>
> > > >>>
> > > >>be label,
> > > >>
> > > >>
> > > >>>form position, variable name,etc, etc.".  These are things
> > > >>>
> > > >>>
> > > >>that are on
> > > >>
> > > >>
> > > >>>the page form, not on some dynamic class handling the form.  He
> > > >>>specifically rejects dynamic class structures in fact when he says
> > > >>>that he has worked with DynaActionForm and ActionForm and that they
> > > >>>don't fit the bill.  I think he is focusing on the idea of having
> > > >>>changing variables on the page form and how to handle this on the
> > > >>>backend.  Is that right, Dean?
> > > >>>
> > > >>>Michael
> > > >>>
> > > >>>At 01:40 AM 8/6/2004, you wrote:
> > > >>>
> > > >>>
> > > >>>
> > > I thought that
> > > 
> > > " I want to build one on-the-fly according to
> > > 
> > > 
> > > >>"configuration" stuff
> > > >>
> > > >>
> > > stored in a database, that can change. "
> > > 
> > > was pretty clear, especially after he pointed out the
> > > 
> > > 
> > > >>DynaActionForms
> > > >>
> > > >>
> > > weren't what he was looking for because they came from
> > > 
> > > 
> > > >>struts config.
> > > >>
> > > >>
> > > But maybe it's just me - I'm used to wondering about what (weird
> > > stuff) I can do in Struts.
> > > 
> > > 
> > > 
> > > 
> > > >At 05:00 PM 8/5/2004, you wrote:
> > > >
> > > >
> > > >
> > > >>Suppose I want to construct a form based on a query to a
> > > >>database. What would come out of the query would
> > > >>
> > > >>
> > > >>be label,
> > > >>
> > > >>
> > > >>>

Re: very dynamic forms

2004-08-06 Thread bryan
Just to clarify 

Struts can map form to dyanmic object . 

It would be cool if it could map to a graph of such objects. 

I know the functionality doesn't exist but I think it's a cool idea.

You could have a tag like this on the page. 



then an xml file like so 

  


  






and then you had a method that you could call 

ArbitraryForm arbitraryForm  = (ArbitraryForm) form;
House house  = arbitraryForm.deserialise(); // or whatever 
houseDAO.storeNewHouse(house);

I guess I just am in *love* with hibenate at the moment



--b


On Fri, 6 Aug 2004 21:09:14 +0200, bryan <[EMAIL PROTECTED]> wrote:
> Wouldn't it be so cool if you could take something like a graph of
> hibernate objects and
> have a form dynamically generated for u.
> 
> With dhtml or something so that you could populate the whole graph in
> one user form ?
> 
> For example a House object that had a set of rooms, each room with
> it's own description.
> 
> The dhtm generated by the form could expand out so that the user could add an
> arbitrary number of rooms each with their own description.
> 
> The whole thing could get filled out in a single http request.
> 
> This would greatly reduce the use case for creating a house.
> 
> Has anyone ever developed anything like this ?
> 
> --b
> 
> 
> 
> 
> On Fri, 06 Aug 2004 11:54:01 -0700, Michael McGrady
> <[EMAIL PROTECTED]> wrote:
> > How do map based forms farm the values from the request?
> >
> > At 09:13 AM 8/6/2004, you wrote:
> > >For me it was very painless and although there aren't lots of big "killer"
> > >features - there are IMO lots of little ones that make this a good upgrade.
> > >
> > >Niall
> > >
> > >- Original Message -
> > >From: "Dean A. Hoover" <[EMAIL PROTECTED]>
> > >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > >Sent: Friday, August 06, 2004 4:49 PM
> > >Subject: Re: very dynamic forms
> > >
> > >
> > > > Thanks. I am looking   at Niall's Lazy stuff, but I like your idea.
> > > > I will add it to my list o   f investigations and experiments. I've
> > > > written quite a bit to struts 1.1. Is there a downside to upgrading?
> > > >
> > > > Thanks.
> > > > Dean
> > > >
> > > > Kevin A. Palfreyman wrote:
> > > >
> > > > >Dean,
> > > > >I do a similar thing with Struts 1.1, and I use an ordinary struts form
> > > > >(a subclass of ValidatorActionForm) that has a DynaBean as one of its
> > > > >fields.  To match this, my DTO also has the same field as a DynaBean,
> > > > >and we just have to be a bit more clever when we copy properties between
> > > > >the two.  The "schema" of the DynaBeans are configured entirely
> > > > >separately from the rest of the Struts stuff, and should be fairly
> > > > >easily done from a DB. In an upcoming version, the shape of the
> > > > >DynaBeans will be determined from data from a remote corba service.
> > > > >
> > > > >Unfortunately, this is all product specific (closed source), so I can't
> > > > >just pass it on (it wouldn't be useful to you anyway in its current
> > > > >form).  But it should encourage you that it can be done.
> > > > >
> > > > >>From a quick read of his web page, Niall's Lazy stuff looks very
> > > > >promising.  If I were starting again, I might have a look to see if that
> > > > >would fit.
> > > > >
> > > > >Good luck,
> > > > >
> > > > > Kev
> > > > >
> > > > >
> > > > >
> > > > >>-Original Message-
> > > > >>From: Dean A. Hoover [mailto:[EMAIL PROTECTED]
> > > > >>Sent: 06 August 2004 15:47
> > > > >>To: Struts Users Mailing List
> > > > >>Subject: Re: very dynamic forms
> > > > >>
> > > > >>What I need to do is construct a form that has a variety of
> > > > >>text input forms on it that are determined at run-time. I
> > > > >>know how to do this in jsp but I need to provide an
> > > > >>ActionForm that conforms to that form.
> > > > >>I got several useful replies last night and am investigating them.
> > > > >>
> > > > >>Dean
> > > > >>
> > > > >

using Pojo as actionForm

2004-11-09 Thread bryan
Ok , I admit I may have lost the plot somewhat/somewhere ... but am I
on the right track at all here ? Also I just signed up to the list and
caught the last post about VO but the answers aren't archived anywhere
yet. Would appreciate if someone forwarded me that conversation.

In my struts-config.xml file 


  


In my strutstestcase class  

ProfileDTO profileDTO = new ProfileDTO();

profileDTO.setUsername("bryanhunt");

BeanValidatorForm beanValidatorForm = new BeanValidatorForm(profileDTO);

setActionForm(beanValidatorForm);

actionPerform();

and in the action itself ... 

BeanValidatorForm beanValidatorForm = (BeanValidatorForm) form;

logger.debug(form);

WrapDynaBean bean = (WrapDynaBean) beanValidatorForm.getInstance();
logger.debug(bean.getInstance());

but the username field is null .. 

Am I on anything like the right path here ? I want to pass the POJO
straight to my service layer after struts validation. I know this
stuff has just been added in so I'm not really finding much
documentation on it.

If anyone can point me in the right direction I would be happy to add
a page to the wiki.

Thanks 

Bryan Hunt
-- 
http://www.revoltingdigits.com
https://www.jestate.dev.java.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OT: hosting recommendations?

2004-11-12 Thread bryan
Get some friends together and get yourselves a linux box hosted on
rackspace, jave is too resource hungry to get cheap virtual server
type offerings for it. That is why the world uses php or if you just
wanna demo your stuff why not get ADSL

--b


On Fri, 12 Nov 2004 11:34:52 -0800 (PST), Woodchuck
<[EMAIL PROTECTED]> wrote:
> hihi all,
> 
> can anyone recommend hosters that are Tomcat/Java friendly and offer
> private JVMs for cheap monthly cost?  (cheap to me is $0 - $20/month
> range)
> 
> i went to servlets.com and visited many of the hosters on their list
> but most of them seem to still have the legacy offerings that are
> stingy on space and transfer allowances.  it was either that or they
> charge a lot ($50+/month) for private JVMs.
> 
> thanks in advance,
> woodchuck
> 
> __
> Do you Yahoo!?
> Check out the new Yahoo! Front Page.
> www.yahoo.com
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
http://www.revoltingdigits.com
https://jestate.dev.java.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OT: hosting recommendations?

2004-11-15 Thread bryan
"security issues"  if that's their response then they are clowns,
pure and simple. I wouldn't trust someone like that to change a
lightbulb.

--b


On Mon, 15 Nov 2004 09:50:09 +0100, Jesse Alexander (KBSA 21)
<[EMAIL PROTECTED]> wrote:
> most hosting providers I have talked to talk about "security issues"
> when you ask them to provide Java-webhosting. ;-)
> 
> check out: 
> <http://www.i-quest.ch/index.cfm?content=dienstleistungen&page=_dienstleistungen/webhosting_linux>
> Yes, it is a swiss company... with swiss server placement...
> The "Linux business"-package should around 300 US$ (per year), the
> "Linux Professional" is about 120US$ (rough estimate)
> This is a package similar to those php-webhosting packages. Their
> dedicated servers start at about 70$ a month.
> 
> Less... then server4free (mentioned in some earlier post in this
> mailing list) "might" be the way for you...
> 
> good luck
> Alexander
> 
> 
> 
> -Original Message-
> From: Woodchuck [mailto:[EMAIL PROTECTED]
> Sent: Friday, November 12, 2004 10:14 PM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: Re: OT: hosting recommendations?
> 
> rackspace must be some serious hosting... they start at a whopping
> $350/month... lol, if i win the lottery i will sign up with them! :)
> 
> you're right, there seems to be very economical hosting for php.  why
> is that?  i don't know anything about php, can it do everything that
> struts can?  is it difficult to learn?  what is the differences, pros
> and cons between php and struts?  (other than i can get php hosting
> plans for less than $10/month!!!)  :)
> 
> thanks,
> woodchuck
> 
> --- bryan <[EMAIL PROTECTED]> wrote:
> 
> > Get some friends together and get yourselves a linux box hosted on
> > rackspace, jave is too resource hungry to get cheap virtual server
> > type offerings for it. That is why the world uses php or if you just
> > wanna demo your stuff why not get ADSL
> >
> > --b
> >
> >
> > On Fri, 12 Nov 2004 11:34:52 -0800 (PST), Woodchuck
> > <[EMAIL PROTECTED]> wrote:
> > > hihi all,
> > >
> > > can anyone recommend hosters that are Tomcat/Java friendly and
> > offer
> > > private JVMs for cheap monthly cost?  (cheap to me is $0 -
> > $20/month
> > > range)
> > >
> > > i went to servlets.com and visited many of the hosters on their
> > list
> > > but most of them seem to still have the legacy offerings that are
> > > stingy on space and transfer allowances.  it was either that or
> > they
> > > charge a lot ($50+/month) for private JVMs.
> > >
> > > thanks in advance,
> > > woodchuck
> > >
> > > __
> > > Do you Yahoo!?
> > > Check out the new Yahoo! Front Page.
> > > www.yahoo.com
> > >
> > >
> > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > http://www.revoltingdigits.com
> > https://jestate.dev.java.net
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> __
> Do you Yahoo!?
> Check out the new Yahoo! Front Page.
> www.yahoo.com
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> 
> 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
http://www.revoltingdigits.com
https://jestate.dev.java.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] User Preference System Design

2004-11-17 Thread bryan
If you have a good learner and familiar with Dependancy injection/IOC
I would recomend you look at acegi.

It has a steep initial learning curve but there is no need that it
doesn't satisfy, I think it is the most flexible and advanced security
system/framework I've ever seen, providing security all the way down
to method invokations and object collection filtering.

It is 1000 times better than CMS ( although it does allow you to use
CMS as well ).

http://acegisecurity.sourceforge.net/

Yours 

Bryan Hunt


On Wed, 17 Nov 2004 10:44:04 +, Adam Hardy
<[EMAIL PROTECTED]> wrote:
> Hi Julian,
> 
> you should take a look at CMS (container-managed security) as this is
> probably the most effective solution - integrated, portable, widespread
> etc.
> 
> Try either tomcat's website for documentation there, or even look in the
>   servlet spec from Sun, or in your appserver's docs, to see if it suits
> your needs.
> 
> Struts has many features that allows you to leverage CMS in the ways you
>   say you require.
> 
> Persistence of your user info & groups or roles etc is done under CMS in
> whichever way you choose - there are various 'realm' implementations
> which allow database stores, XML files, LDAP or bespoke solutions.
> 
> HTH
> Adam
> 
> 
> 
> On 11/17/2004 03:09 AM Julian wrote:
> > Hi, I am a Struts Newbie and would appreciate if
> > anyone could give me some pointers on a user
> > preferences/ configuration system design.  Perhaps a
> > link to a good resource?  I have an ASP system with
> > several levels of "users" that are as broad as an
> > organization and as fine-grained as an individual
> > person with one role.  I would like to have a
> > preference system that can handle configuration and
> > preference issues for the different levels of the
> > application.  The information stored in these
> > configurations range from font colors and alert boxes
> > to the availability of various modules in the web
> > application.  Currently the information is stored in
> > xml files on the server's hard disk, but this will not
> > suit a distributable environment.  Any suggestions are
> > greatly appreciated.
> >
> > Thanks in Advance,
> > Julian
> >
> > =
> > Live simply so others may simply live.
> >
> > -Ghandi
> >
> > Pluralitas non est ponenda sine neccesitate.
> > "Entities should not be multiplied unneccesarily"
> >
> > -William of Occam
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
http://www.revoltingdigits.com
https://jestate.dev.java.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with Tomcat 5.5

2004-11-19 Thread bryan
unless you download the compat package it will not run under jre less than 1.5/5

--b


On Thu, 18 Nov 2004 09:59:01 -0600, Vic <[EMAIL PROTECTED]> wrote:
> 5.5 needs JDK1.5 Afaik.
> .V
> 
> 
> 
> Peter Neu wrote:
> > Hello everybody,
> >
> > I just switched to Tomcat 5.5 while still using the old JDK 1.4.2_04 .
> > The Struts Version
> > I use is 1.1. When I run my application on the new Tomcat I get this
> > error :
> >
> > Error instantiating servlet class org.apache.struts.action.ActionServlet
> >
> > Can anybody tell what I can change in order to run my application on
> > Tomcat 5.5 ?
> >
> > Regards,
> >
> > Peter
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
http://www.revoltingdigits.com
https://jestate.dev.java.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with Tomcat 5.5

2004-11-22 Thread bryan
you probably just had a messed up web.xml. here is a working one from
my project.



On Fri, 19 Nov 2004 18:57:59 +0100, Peter Neu <[EMAIL PROTECTED]> wrote:
> Hello Bryan,
> 
> this is what I did in the first place. Any chance that my changes
> didn't have any effect?
> 
> Peter.
> 
> 
> 
> >unless you download the compat package it will not run under jre less than 
> >1.5/5
> >
> >--b
> >
> >
> >On Thu, 18 Nov 2004 09:59:01 -0600, Vic <[EMAIL PROTECTED]> wrote:
> >
> >
> >>5.5 needs JDK1.5 Afaik.
> >>.V
> >>
> >>
> >>
> >>Peter Neu wrote:
> >>
> >>
> >>>Hello everybody,
> >>>
> >>>I just switched to Tomcat 5.5 while still using the old JDK 1.4.2_04 .
> >>>The Struts Version
> >>>I use is 1.1. When I run my application on the new Tomcat I get this
> >>>error :
> >>>
> >>>Error instantiating servlet class org.apache.struts.action.ActionServlet
> >>>
> >>>Can anybody tell what I can change in order to run my application on
> >>>Tomcat 5.5 ?
> >>>
> >>>Regards,
> >>>
> >>>Peter
> >>>
> >>>
> >>-
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >>
> >
> >
> >
> >
> 
> 
> -
> 
> 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
http://www.revoltingdigits.com
https://jestate.dev.java.net

http://java.sun.com/dtd/web-app_2_3.dtd'>

 JEstate Real Estate Application  
  	
		contextConfigLocation
		classpath:ie/jestate/spring/live.xml
	
 

Acegi Authentication Processing Filter
net.sf.acegisecurity.util.FilterToBeanProxy

targetClass
net.sf.acegisecurity.ui.webapp.AuthenticationProcessingFilter




Acegi Security System for Spring Auto Integration Filter
net.sf.acegisecurity.util.FilterToBeanProxy

targetClass
net.sf.acegisecurity.ui.AutoIntegrationFilter




Acegi HTTP Request Security Filter
net.sf.acegisecurity.util.FilterToBeanProxy

targetClass
net.sf.acegisecurity.intercept.web.SecurityEnforcementFilter


	

  Acegi Authentication Processing Filter
  /*



  Acegi Security System for Spring Auto Integration Filter
  /*



  Acegi HTTP Request Security Filter
  /*




org.springframework.web.context.ContextLoaderListener






   
  action
  org.apache.struts.action.ActionServlet
  
 config
 /WEB-INF/struts-config.xml
  
  
 debug
 3
  
  
 detail
 3
  
  
 config/client
 /WEB-INF/struts-config-client.xml
  
  
 config/admin
 /WEB-INF/struts-config-admin.xml
  
  0
   
   
  action
  *.do
   
   
   	
	
		/struts-bean
	/WEB-INF/tags/struts-bean.tld
	
	
		/struts-html
	/WEB-INF/tags/struts-html.tld
	
	
		/struts-logic
	/WEB-INF/tags/struts-logic.tld
	
	
		/struts-nested
	/WEB-INF/tags/struts-nested.tld
	
	
		/struts-tiles
	/WEB-INF/tags/struts-tiles.tld
	
	
		/authz
	/WEB-INF/tags/authz.tld
	
	
		/c
	/WEB-INF/tags/c.tld
	
	
	/displaytag-11
		/WEB-INF/tags/displaytag-11.tld
	

	/displaytag-12
		/WEB-INF/tags/displaytag-12.tld
	

	/displaytag-el-12
		/WEB-INF/tags/displaytag-el-12.tld
	



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Searching pattern/best-practise for forms

2004-11-29 Thread bryan
And if actionForms just used reflection ( to detect if there was a
validate method ) or had to implement an interface rather than having
to inherit from a base class you and everyone else wouldn't have to do
this ...

--b 

> Then lookin into the DispatchAction class of struts, and you'll need the
> BeanUtils class to copy the properties from your ActionForm objects to
> your transport objects within your struts Actions.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Automatic logging

2004-11-30 Thread bryan
to summarise ... use spring or use log4j with eclipse plugin.

--b


On Mon, 29 Nov 2004 17:34:29 -0600, Joe Germuska <[EMAIL PROTECTED]> wrote:
> >>Would there be a simpler way of enabling automatic logging across
> >>entire application so that I do not have to modify all of my classes
> >>and JSP pages?
> 
> Sounds like the textbook use case for aspect oriented programming.
> Logging is about the only thing they all talk about!
> 
> But realistically, I'm with Eddie -- what logging can you really
> apply consistently and automatically in a way that is more useful
> than noisy?  If you have a bunch of fairly repetitive stuff spit out,
> then finding the real information is fairly tedious.
> 
> On the other hand, I don't find it all that burdensome to establish a
> static log instance for each class and toss around a few
> log.debug(...) lines, especially when I'm working on figuring out
> someone elses ill-documented code!
> 
> Unfortunately, I don't know a whole lot about AOP, but there has been
> plenty written about it in the last couple of years if you decide to
> look further.
> 
> Joe
> 
> --
> Joe Germuska
> [EMAIL PROTECTED]
> http://blog.germuska.com
> "Narrow minds are weapons made for mass destruction"  -The Ex
> 


-- 
http://www.revoltingdigits.com
https://jestate.dev.java.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Automatic logging

2004-11-30 Thread bryan
Incidentally I use a HUGE amount of AOP stuff and logging is the only
thing I am not using with it.

I use AOP for the following 

Declarative security management ( down to filtering returned
Collections by an ACL )

Declarative transaction management ( so that I don't have any
transaction management garbage in my code )

Automatically managing hibernate sessions.

In fact anywhere that you find yourself writing more boilerplate than
business code or repeating the same code again and again and again ...
you might find AOP saves you a lot of time and energy.

--b



On Mon, 29 Nov 2004 17:34:29 -0600, Joe Germuska <[EMAIL PROTECTED]> wrote:
> >>Would there be a simpler way of enabling automatic logging across
> >>entire application so that I do not have to modify all of my classes
> >>and JSP pages?
> 
> Sounds like the textbook use case for aspect oriented programming.
> Logging is about the only thing they all talk about!
> 
> But realistically, I'm with Eddie -- what logging can you really
> apply consistently and automatically in a way that is more useful
> than noisy?  If you have a bunch of fairly repetitive stuff spit out,
> then finding the real information is fairly tedious.
> 
> On the other hand, I don't find it all that burdensome to establish a
> static log instance for each class and toss around a few
> log.debug(...) lines, especially when I'm working on figuring out
> someone elses ill-documented code!
> 
> Unfortunately, I don't know a whole lot about AOP, but there has been
> plenty written about it in the last couple of years if you decide to
> look further.
> 
> Joe
> 
> --
> Joe Germuska
> [EMAIL PROTECTED]
> http://blog.germuska.com
> "Narrow minds are weapons made for mass destruction"  -The Ex
> 


-- 
http://www.revoltingdigits.com
https://jestate.dev.java.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Way OT: Win a free Sony Portable PlayStation

2004-12-06 Thread bryan
someone unsubscribe this muppet.

--b


On Sat, 04 Dec 2004 10:33:50 -0600, Vic <[EMAIL PROTECTED]> wrote:
> http://contests.1up.com
> 
> All you have to do is:
> #1: register
> #2: invite most other people to register
> So if you have free time and a fast conection . . .
> 
> I love MLM.
> 
> All I want for X-Mass is a Sony Portable PlayStation, it be sooo cl
> on a plane to have that before others. Check me out while I pretend to
> ignore you.
> Goodbye Solitaire and Tux Racer.
> 
> .V
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
http://www.revoltingdigits.com
https://jestate.dev.java.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT]Threads and Servlets Question

2004-12-06 Thread bryan
because you should use a message driven bean to do something like that.

--b


On Mon, 6 Dec 2004 11:48:15 -0700, Jim Barrows <[EMAIL PROTECTED]> wrote:
> Okay... I know I've read this somewhere, but can't remember.
> Why is it recommended you NOT start a thread inside a servlet, which would 
> translate to "Why is it a bad idea to start a thread inside an action?".
> And, can you point me at some documentation?
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
http://www.revoltingdigits.com
https://jestate.dev.java.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT]Threads and Servlets Question

2004-12-06 Thread bryan
threads are also a finite resource  ( particularly on Linux ).

--b


On Mon, 6 Dec 2004 21:13:57 +0100, bryan <[EMAIL PROTECTED]> wrote:
> because you should use a message driven bean to do something like that.
> 
> --b
> 
> 
> 
> 
> On Mon, 6 Dec 2004 11:48:15 -0700, Jim Barrows <[EMAIL PROTECTED]> wrote:
> > Okay... I know I've read this somewhere, but can't remember.
> > Why is it recommended you NOT start a thread inside a servlet, which would 
> > translate to "Why is it a bad idea to start a thread inside an action?".
> > And, can you point me at some documentation?
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> --
> http://www.revoltingdigits.com
> https://jestate.dev.java.net
> 


-- 
http://www.revoltingdigits.com
https://jestate.dev.java.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT]Threads and Servlets Question

2004-12-07 Thread bryan
Object creation with modern JVM's is not that big a problem.

--b


On Mon, 6 Dec 2004 15:18:12 -0500, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> I don't understand your response.   Memory (physical and virtual) are also
> finite resources.  Does this mean that instantiating new objects is a Bad
> Thing within an action?
> 
> Dennis
> 
> bryan <[EMAIL PROTECTED]>
> 12/06/2004 03:14 PM
> Please respond to
> "Struts Users Mailing List" <[EMAIL PROTECTED]>
> 
> To
> Struts Users Mailing List <[EMAIL PROTECTED]>
> cc
> 
> Subject
> Re: [OT]Threads and Servlets Question
> 
> 
> 
> 
> threads are also a finite resource  ( particularly on Linux ).
> 
> --b
> 
> On Mon, 6 Dec 2004 21:13:57 +0100, bryan <[EMAIL PROTECTED]> wrote:
> > because you should use a message driven bean to do something like that.
> >
> > --b
> >
> >
> >
> >
> > On Mon, 6 Dec 2004 11:48:15 -0700, Jim Barrows <[EMAIL PROTECTED]>
> wrote:
> > > Okay... I know I've read this somewhere, but can't remember.
> > > Why is it recommended you NOT start a thread inside a servlet, which
> would translate to "Why is it a bad idea to start a thread inside an
> action?".
> > > And, can you point me at some documentation?
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > http://www.revoltingdigits.com
> > https://jestate.dev.java.net
> >
> 
> --
> http://www.revoltingdigits.com
> https://jestate.dev.java.net
> 
> -
> 
> 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
http://www.revoltingdigits.com
https://jestate.dev.java.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT]Threads and Servlets Question

2004-12-07 Thread bryan
> Threads rule!
> 
> Seriously though... only use threads if you know how they work :)

Or if your using a modern linux kernel . + 2.6 
Otherwise you can say bye bye to your server .

--b

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT]Threads and Servlets Question

2004-12-07 Thread bryan
yes, also your better off storing to a database if your using j2ee. 

--b


On Mon, 6 Dec 2004 14:39:46 -0600, Jan Fetyko <[EMAIL PROTECTED]> wrote:
> This is interesting,
> 
> let me ask another related question :
> 
> What about a thread (started from the Action) that just resizes an image and 
> saves it to a file system ? Would that be also a bad idea ?
> 
> Jano
> 
> On Mon, 6 Dec 2004 15:18:12 -0500
> 
> 
> [EMAIL PROTECTED] wrote:
> 
> >I don't understand your response.   Memory (physical and virtual) are also
> >finite resources.  Does this mean that instantiating new objects is a Bad
> >Thing within an action?
> >
> >Dennis
> >
> >
> >
> >
> >bryan <[EMAIL PROTECTED]>
> >12/06/2004 03:14 PM
> >Please respond to
> >"Struts Users Mailing List" <[EMAIL PROTECTED]>
> >
> >
> >To
> >Struts Users Mailing List <[EMAIL PROTECTED]>
> >cc
> >
> >Subject
> >Re: [OT]Threads and Servlets Question
> >
> >
> >
> >
> >
> >
> >threads are also a finite resource  ( particularly on Linux ).
> >
> >--b
> >
> >
> >On Mon, 6 Dec 2004 21:13:57 +0100, bryan <[EMAIL PROTECTED]> wrote:
> >> because you should use a message driven bean to do something like that.
> >>
> >> --b
> >>
> >>
> >>
> >>
> >> On Mon, 6 Dec 2004 11:48:15 -0700, Jim Barrows <[EMAIL PROTECTED]>
> >wrote:
> >> > Okay... I know I've read this somewhere, but can't remember.
> >> > Why is it recommended you NOT start a thread inside a servlet, which
> >would translate to "Why is it a bad idea to start a thread inside an
> >action?".
> >> > And, can you point me at some documentation?
> >> >
> >> > -
> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> > For additional commands, e-mail: [EMAIL PROTECTED]
> >> >
> >> >
> >>
> >>
> >> --
> >> http://www.revoltingdigits.com
> >> https://jestate.dev.java.net
> >>
> >
> >
> >--
> >http://www.revoltingdigits.com
> >https://jestate.dev.java.net
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
http://www.revoltingdigits.com
https://jestate.dev.java.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Where to store and how to retrieve Images for web app

2004-12-07 Thread bryan
1) Store them to your relational database, 
2) Add oscache to your web application. 
3) Change your web.xml so that it contains the following filters.


CacheFilter
com.opensymphony.oscache.web.filter.CacheFilter



  CacheFilter
  /customer/displayImage.do


4) Now you have relational database storage, all the fun, and none of the pain.

5) You can configure oscache in a variety of ways, check out
opensymphony website/google for more.

Bryan
-- 
http://www.revoltingdigits.com
https://jestate.dev.java.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Localize a dropdown select list

2004-12-14 Thread bryan
Is this possible with struts ?  i don't find a mention of it but can't
imagine it hasn't been implemented.

For example in the jsp 

 
   


Which generates the following ... 
type.yes
type.no
type.option_to_build
type.undefined

Is it possible to map type.no to a value in the resource bundles ??

--b

-- 
http://www.revoltingdigits.com
https://jestate.dev.java.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Localize a dropdown select list

2004-12-15 Thread bryan
If I were to speculate which would be more usefull to the community,
implementing something basic like this or creating support for JSF I
would imagine that this would
probably be more useful.

This reminds me of my skateboarding days, before learning how to do a
360 fakie kickflip it's kinda usefull to learn how to do an ollie 

Thanks Niall.

--b


On Wed, 15 Dec 2004 00:24:11 -, Niall Pemberton
<[EMAIL PROTECTED]> wrote:
> It has come up before:
> 
> http://issues.apache.org/bugzilla/show_bug.cgi?id=9748
> http://issues.apache.org/bugzilla/show_bug.cgi?id=17600
> 
> but it hasn't been implemented in Struts
> 
> Niall
> 
> - Original Message -
> From: "bryan" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Tuesday, December 14, 2004 8:10 PM
> Subject: Localize a dropdown select list
> 
> > Is this possible with struts ?  i don't find a mention of it but can't
> > imagine it hasn't been implemented.
> >
> > For example in the jsp
> >
> >  
> > > value="name" label="name"/>
> > 
> >
> > Which generates the following ...
> > type.yes
> > type.no
> > type.option_to_build
> > type.undefined
> >
> > Is it possible to map type.no to a value in the resource bundles ??
> >
> > --b
> >
> > --
> > http://www.revoltingdigits.com
> > https://jestate.dev.java.net
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
http://www.revoltingdigits.com
https://jestate.dev.java.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OJB && struts

2004-12-17 Thread bryan
Spring makes it incredibly easy to work with hibernate, if you want to
switch to jdo or ejb3 at a later stage it makes it as easy as it could
possibly be.

There is a page on the hibernate site on the topic. 

http://www.hibernate.org/110.html

It also allows you to remove all your transaction code from your
classes and specify it in the xml file ( using wildcards )

Incidentally EJB3 is going to be largely based on hibernate and sun
have already signaled their intention that JDO and EJB are going to be
dropped and a new standard created most likely playing catchup with
Hibernate.

Using JDO just because it is a "standard" is a bad idea, I've been
there before and have difficulty trusting anything that gets designed
by some self interested group of big companies, usually so they can
make sure that your code only works with their libraries or IDE or app
server because at the end of the day you usually have to do something
that ties you to their implementation.

Runtime bytecode enhancement via cglib etc is the name of the game,
having to add another pre-processing stage to your development cycle (
as you must do with most implementations of jdo is s 2002 ).

Another thing EJB3 makes heavy use of IOC ( playing catchup with .NET
in this regard ),
if you don't "dig" IOC yet you need to start getting a handle on it
and Spring is probably the
best way to do this. 

Another thing .. once your using springframework with Hibernate for a
while you will sooner or later start asking yourself another question
... I'll leave it up to you to figure out what it is.

Bonne Chance

Bryan





> To bryan : spring/hibernate
> What's the added value with spring? Have you got an article or an
> example about that ?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Preview of an Image and text

2004-12-17 Thread bryan
hey ! cool solution !! Works on Firefox as well !

--b


On Fri, 17 Dec 2004 12:14:06 -0500, Frank W. Zammetti
<[EMAIL PROTECTED]> wrote:
> You might consider doing it all on the client...
> 
> 
> 
> test
> 
> function preview() {
> lyrPreview.innerHTML = "";
> lyrPreview.innerHTML += "Some message text...
"; > lyrPreview.innerHTML += " "\">"; > } > > > > Select file, then click button to preview: > > > > > > Preview: > > > > > Works on IE, can't say whether it does on anything else. Of course, > this will only work if you have enough information to construct the > complete preview on the client at that point, but you could > alternatively submit the form, then in the reply construct the file:// > reference to the image as I've done above. That would probably give you > the best of both worlds, and also remove any cross-browser concerns. > But, if you can do it without touching the server, so much the better I > figure. > > -- > Frank W. Zammetti > Founder and Chief Software Architect > Omnytex Technologies > http://www.omnytex.com > > uma.k wrote: > > Hi, > > I have a form where the user is given the option to select a file to > > upload(normally gif or jpg) before the user submits the file to the server, > > I wanted to show him a preview of his message and image. > > > > How do I do that? Where do I store the image temporarly? > > > > Any solutions? > > > > Uma > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- http://www.revoltingdigits.com https://jestate.dev.java.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: OJB && struts

2004-12-15 Thread bryan
If you have a choice I recommend you use spring/hibernate before you
go any further.

--b


On Wed, 15 Dec 2004 09:41:51 GMT, liooil <[EMAIL PROTECTED]> wrote:
> Hello world,
> 
> I'm trying to connect my web to my db through OJB ...
> I found many threads relative to this topic (persistence, ...,
> whatever, ...)
> And after that, i feel fuzzy about all mentioned patterns :
> DAO, Broker, Business Delagate, and so on ...
> 
> At this moment, i'm stuck with my ODMG/OJB Struts plugIn (like in
> Cavaness's Beer4all) and i don't how i could connect that to my
> DAO pattern.
> 
> Code Exemples on topice are not numerous. Or they just ignore the
> whole chain needed for reliable production web.
> 
> Any comments, links are welcome
> 
> thx,
> 
> liooil,
> 
> ___[ Pub ]
> Inscrivez-vous gratuitement sur Tandaime, Le site de rencontres !
> http://rencontre.rencontres.com/index.php?origine=4
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
http://www.revoltingdigits.com
https://jestate.dev.java.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Annotations and Struts

2004-12-15 Thread bryan
yet 99.% of the time all that people want to do are CRUD actions ..

--b


On Wed, 15 Dec 2004 14:20:23 +0800, Andrew Hill
<[EMAIL PROTECTED]> wrote:
> Im not so sure that would work too well as the actionforms are
> representations of the view state, and whats in a form on the view
> doesnt necessarily correspond directly to the objects that are modelled
> at the business tier, and often contains other stuff that is view
> specific, or exists to workaround view layer issues (like the need for a
> reset method).
> 
> Mike Duffy wrote:
> 
> > The Austin JUG meeting tonight featured the J2SE 5.0 presentation from Sum.
> >
> > I am currently using the new annotations feature on a test project using 
> > EJB 3.0 and JBoss.  It is
> > very cool; just annotate your entity beans and the server does all the 
> > database mappings.
> >
> > As I was listening to tonight's presentation, I thought it would be a good 
> > idea to annotate the
> > same entity beans with "formParameter" annotations; i.e., do away with form 
> > beans and the mapping
> > of form beans to business model objects.
> >
> > I know this is exactly what is planned for JSF (making the backing beans 
> > and entity beans one in
> > the same); however, I do not want to move to JSF at this time (maybe the 
> > change will be worth
> > while when JSF truly has some rich client components; until then, why make 
> > such a radical change
> > from something that is working well).
> >
> > In any case, has anyone given serious thought to doing away with form beans 
> > in Struts and moving
> > to annotations?
> >
> > Mike
> >
> >
> >
> > __
> > Do you Yahoo!?
> > Send holiday email and support a worthy cause. Do good.
> > http://celebrity.mail.yahoo.com
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
http://www.revoltingdigits.com
https://jestate.dev.java.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Localize a dropdown select list

2004-12-16 Thread bryan
Thank you Jack, that's very kind of you, I will take a look at
modifying the taglib this afternoon.

--b


On Wed, 15 Dec 2004 15:46:09 -0800, Dakota Jack <[EMAIL PROTECTED]> wrote:
> Hi, Bryan,
> 
> I could not agree more.  But, you might as well bang your head against
> the wall as play Cassandra to this version of the Trojan Horse (JSF).
> What I do in these cases is to just extend the tags.  This one is
> fairly easy.  Here is a sample early method I built off of which you
> can modify with extensions of the Struts tags to suit your taste:
> 
>  public List getLocalizedLabelValueList(HttpServletRequest request,
> List   keys)
>  throws IOException,
> ServletException {
>List labelValueList = Collections.synchronizedList(new
> LinkedList());
>HttpSession  session= request.getSession();
>Locale   locale =
> (Locale)session.getAttribute(Globals.LOCALE_KEY);
>Iterator iterator   = keys.iterator();
>MessageResources messages   = this.getResources(request);
> 
>while(iterator.hasNext()) {
>  String value = ((String)iterator.next());
>  String label = convertToUTF8(messages.getMessage(locale,value));
>  labelValueList.add(new LabelValueBean(label,value));
>}
> 
>return labelValueList;
>  }
> 
> Jack
> 
> 
> On Wed, 15 Dec 2004 10:59:37 +0100, bryan <[EMAIL PROTECTED]> wrote:
> > If I were to speculate which would be more usefull to the community,
> > implementing something basic like this or creating support for JSF I
> > would imagine that this would
> > probably be more useful.
> >
> > This reminds me of my skateboarding days, before learning how to do a
> > 360 fakie kickflip it's kinda usefull to learn how to do an ollie 
> >
> > Thanks Niall.
> >
> > --b
> >
> > On Wed, 15 Dec 2004 00:24:11 -, Niall Pemberton
> > <[EMAIL PROTECTED]> wrote:
> > > It has come up before:
> > >
> > > http://issues.apache.org/bugzilla/show_bug.cgi?id=9748
> > > http://issues.apache.org/bugzilla/show_bug.cgi?id=17600
> > >
> > > but it hasn't been implemented in Struts
> > >
> > > Niall
> > >
> > > - Original Message -
> > > From: "bryan" <[EMAIL PROTECTED]>
> > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > Sent: Tuesday, December 14, 2004 8:10 PM
> > > Subject: Localize a dropdown select list
> > >
> > > > Is this possible with struts ?  i don't find a mention of it but can't
> > > > imagine it hasn't been implemented.
> > > >
> > > > For example in the jsp
> > > >
> > > >  
> > > > > > > value="name" label="name"/>
> > > > 
> > > >
> > > > Which generates the following ...
> > > >  > > > value="type.yes">type.yes
> > > > type.no
> > > > type.option_to_build
> > > > type.undefined
> > > >
> > > > Is it possible to map type.no to a value in the resource bundles ??
> > > >
> > > > --b
> > > >
> > > > --
> > > > http://www.revoltingdigits.com
> > > > https://jestate.dev.java.net
> > > >
> > > > -
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> > --
> > http://www.revoltingdigits.com
> > https://jestate.dev.java.net
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> -- 
> "You can lead a horse to water but you cannot make it float on its back."
> 
> ~Dakota Jack~
> 
> "You can't wake a person who is pretending to be asleep."
> 
> ~Native Proverb~
> 
> "Each man is good in His sight. It is not necessary for eagles to be crows."
> 
> ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> 


-- 
http://www.revoltingdigits.com
https://jestate.dev.java.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Preview of an Image and text

2004-12-18 Thread bryan
Works good with firefox as well , seems like a damned good simple
solution to me.

Hey did you see Brady Hegberg's post for dynamic dropdown list's, I
reckon you'll like it as well,
also cross platform.


If you wanted to be a bit more ambitious you could also try implimenting
this:
http://developer.apple.com/internet/webcontent/xmlhttpreq.html

Brady

--b


On Fri, 17 Dec 2004 12:14:06 -0500, Frank W. Zammetti
<[EMAIL PROTECTED]> wrote:
> You might consider doing it all on the client...
> 
> 
> 
> test
> 
> function preview() {
> lyrPreview.innerHTML = "";
> lyrPreview.innerHTML += "Some message text...
"; > lyrPreview.innerHTML += " "\">"; > } > > > > Select file, then click button to preview: > > > > > > Preview: > > > > > Works on IE, can't say whether it does on anything else. Of course, > this will only work if you have enough information to construct the > complete preview on the client at that point, but you could > alternatively submit the form, then in the reply construct the file:// > reference to the image as I've done above. That would probably give you > the best of both worlds, and also remove any cross-browser concerns. > But, if you can do it without touching the server, so much the better I > figure. > > -- > Frank W. Zammetti > Founder and Chief Software Architect > Omnytex Technologies > http://www.omnytex.com > > uma.k wrote: > > Hi, > > I have a form where the user is given the option to select a file to > > upload(normally gif or jpg) before the user submits the file to the server, > > I wanted to show him a preview of his message and image. > > > > How do I do that? Where do I store the image temporarly? > > > > Any solutions? > > > > Uma > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- http://www.revoltingdigits.com https://jestate.dev.java.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: New to Struts & seeking advice

2005-01-05 Thread bryan
Hibernate is mature because it works, unlike "mature" EJB,

--b


On Tue, 4 Jan 2005 09:55:34 -0700, Jim Barrows <[EMAIL PROTECTED]> wrote:
> 
> 
> > -Original Message-
> > From: Mark McWiggins [mailto:[EMAIL PROTECTED]
> > Sent: Monday, January 03, 2005 6:19 PM
> > To: user@struts.apache.org
> > Subject: New to Struts & seeking advice
> >
> >
> > Hi All,
> >
> > I've developed several web applications over the last 10
> > years, mostly
> > based on Perl CGI. The 2003 project I did
> > made me swear off CGI and look for something that does a
> > better job of
> > maintaining session and data across pages,
> > among other things. Struts seems to fit the bill.
> >
> > But: what's a recommended set of tools to use? I've been
> > working a bit
> > with Netbeans 4.0 on sample applications and
> > it does a fine job building a .WAR file for deployment. But
> > it doesn't
> > seem to have enough smarts to see when something
> > is broken enough that Tomcat (v 5.0.28) chokes on it with an
> > unhelpful
> > error message. Also, I tried installing the Struts Console
> > into this version of Netbeans and got:
> >
> > Warning - could not install some modules:
> >Struts Console - No module providing the capability
> > org.openide.compiler.CompilationEngine could be found.
> >Struts Console - No module providing the capability
> > org.openide.TopManager could be found.
> >Struts Console - The module named org.openide.deprecated was
> > needed and not found.
> >Struts Console - The module named org.openide.compiler
> > was needed
> > and not found.
> >Struts Console - The module named
> > org.openide.execution.deprecated was needed and not found.
> >
> > So:
> >
> > *Is Eclipse or something else clearly better and more
> > Struts-capable?
> 
> I like Eclipse with the MyEclipse plug-ins for struts.  I also use the spring 
> plugin, and I forget which of the hibernate plugins as well.  Commonclipse is 
> one of those plugins in you thinks you'll never use until you install it, 
> hten you wonder why it wasn't made part of Eclipse.
> 
> 
> > *Is AppFuse worth using as a basis for a real app? I tried
> > working through the tutorial and got it going,
> >   but it is based on Hibernate and I was told that
> > Hibernate may
> > not be mature enough for deployment?
> 
> I don't know who told you either of those, but both statement are wrong.  
> AppFuse can use Hibernate, iBatis or JDBC.  Says so right on the box.  
> Hibernate is more then mature enough for deploymnet.  Matt Raible uses both 
> appfuse and Hibernate for his production projects.
> 
> > *   Any other tools or techniques that you fervently recommend or
> > recommend avoiding?
> 
> Appfuse is nice if you want something that is IDE agnostic.  Spring is 
> massively cool for wiring everything together.
> Avoid Websphere on the AS400 (can't tell you about Websphere on any other 
> platform).  Avoid Java on the AS400 in general.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
http://www.revoltingdigits.com
https://jestate.dev.java.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OT and not URGENT : CMS Driven static site and Struts

2005-01-18 Thread bryan
erm I suppose except for gmail that is ... 

--b

>> My definition of a good web site includes "No Javascript".


On Tue, 18 Jan 2005 13:28:21 -0600, Vic <[EMAIL PROTECTED]> wrote:
> http://www.opensourcecms.com
> I use Drupal.
> hth,
> .V
> 
> Jim Barrows wrote:
> 
> >On Tue, 18 Jan 2005 13:49:11 -0500, Erik Weber <[EMAIL PROTECTED]> wrote:
> >
> >
> >>Jim Barrows wrote:
> >>
> >>
> >>
> >>>On Tue, 18 Jan 2005 06:24:01 -0800 (PST), nitin dubey
> >>><[EMAIL PROTECTED]> wrote:
> >>>
> >>>
> >>>
> >>>
> >>I respectfully disagree with this (unless you guys are talking about
> >>some other specific product or framework that I'm not recognizing) so I
> >>thought you should hear another opinion. I use Struts and like it, and
> >>would even go so far as to say it's the first thing I would consider in
> >>many situations, but I wouldn't tell you that you can't build a good Web
> >>app without it (or any other framework for that matter). I have built
> >>
> >>
> >
> >Building a web app without a pre-built, done ofr you  framework?
> >It's kind of like the difference between going to the tire store and
> >buying a tire, as opposed to sticking a spigot in a rubber tree (or
> >however they get rubber these days), and building it yourself.
> >Then you get into what happens to those who come after you?  The one
> >thing I hate doing is trying to figure out someonelses undocumented
> >framework.  Where do you go for help?  Who's responsible for fixing
> >it?  Where does your client get your expertise if your not available?
> >If I'm not writing business specific code, I'm wasting my clients
> >money.  I use other peoples well known and documented frameworks
> >whenever possible.
> >
> >
> >
> >
> >>some nice Web applications that didn't use any controller framework
> >>(other than my own) or even any tags or any JavaScript for that matter.
> >>
> >>
> >
> >My definition of a good web site includes "No Javascript".
> >
> >
> 
> --
> RiA-SoA w/JDNC  forums
> - help develop a community
> My blog 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
http://www.revoltingdigits.com
https://jestate.dev.java.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: EJB + Struts + Hibernate

2004-06-27 Thread Bryan Hunt
I don't believe it is unless you feel that the application will need to 
be distributed across a cluster.

I use the (excellent) spring framework ( springframework.org ) so that I 
can plug into a EJB layer if necessary in the future.

--b
Irfandhy Franciscus wrote:
Hi,
Does any of you guys has eve developed Web Apps using Struts and 
hibernate ? If you have, do you think EJB is a necessary  layer on  
top of hibernate ?

Thanks in advance  ^^
Regards,
Irfandhy Franciscus
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: EJB + Struts + Hibernate

2004-06-28 Thread Bryan Hunt
Spring is ultra cool. The most usefull thing that I'm doing with it is 
using it's built in hibernate support rather than creating 
and having to manage my own session factory code. It also allows u to 
manage your transactions in the xml config file
and use aspect oriented programming for stuff like security or 
performance monitoring the guy who started it is
called Rod Johnson and he's a real enterprise java guru.

It also allows IOC ( inversion of control ) which minus all the bullshit 
and hype words allows you to break your application
into really small completely independant components which allows you to 
really easily switch things like persistance layers,
unit test without loads of hassle, use mock objects during development 
etc etc.

Basically it turns everything into ultra loosely coupled beans
In short the struts --> spring --> hibernate works like a dream and if 
you don't like any component it is very easy to switch
them out.

--b
Michael McGrady wrote:
What's so special about SPRING?  I am always interested in application 
frameworks.  Can anyone give a quick synopsis of the pluses and minuses?

Micahel
At 07:42 AM 6/27/2004, Mark Lowe wrote:
+1
You'll want to look at spring whether you want to use EJB or Hibernate.
On 27 Jun 2004, at 16:02, Bryan Hunt wrote:
I don't believe it is unless you feel that the application will need 
to be distributed across a cluster.

I use the (excellent) spring framework ( springframework.org ) so 
that I can plug into a EJB layer if necessary in the future.

--b
Irfandhy Franciscus wrote:
Hi,
Does any of you guys has eve developed Web Apps using Struts and 
hibernate ? If you have, do you think EJB is a necessary  layer on
top of hibernate ?

Thanks in advance  ^^
Regards,
Irfandhy Franciscus
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: RE : Struts, XDoclet, and Maven...

2004-06-28 Thread Bryan Hunt
I second that !
--b
Navjot Singh wrote:
i agree with rick here.
I also tried using struts-config.xml using xdoclet. In the end it 
turns out to be a futile exercise. Moreover, using modules makes 
working with xdoclet more cumbersome. It's EASY to write the config 
yourself.

Some may say that it will be useful to generate the Struts form class 
and it's tags in struts-config.xml FROM the entity bean you just 
created. But ,tell me frankly, how many times we have forms that 
correspond one-to-one with our entity schema.

Use xdoclet only where it makes sense to use.
my 2 cents
navjot singh
Rick Reumann wrote:
Andy Akins wrote:
but I'm fairly new to Maven but have coded two simple struts
apps with
it - and XDoclet is brand new to me. I'm looking to combine
all of the
above (and eventually Hibernate - but that's for a later day).


I don't see what advantage using XDoclet with Struts is? If someone 
can show me how it helps I'd love to see it. On this one project I 
inherited, it uses XDoclet with Struts and it makes things worse. For 
example, I like having a nice config file that I can modify 
(strut-config), yet with XDoclet, the struts config action mappings 
are generated by action mapping definitions defined at the top of the 
actual Action opbjects. That makes no sense to me. Now in order to 
change a return value, you have to modify source code versus just 
modifying a config file. I can see the benefit for XDoclet in other 
projects (ie EJB code generation) but for Struts I still haven't 
found where it helps, but I'm willing to be enlightened:)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] Anatomy of a long URL

2004-06-28 Thread Bryan Hunt
I know that the sun link does not authenticate your current client session.
I know that because I wanted to download the JDK for linux.
I wanted to download it directly to the server but they have that stupid
web page based download.
I got the whole url, ssh'd into my server and used wget to download it
in 3 minutes rather than in an hour on my dsl connection and then have
to send it to my server.
I think someone in sun just wanted to create something fancy regardless of
what the customers wanted just so he/she could put it on their cv.
I hate these long urls, they wrap right arround a ssh session and are very
unfriendly for people working with consoles.
--b
Daniel Perry wrote:
I dont think there is any information out there of the type you're
requesting (it's not really a 'pattern').
Long URLs are long because there is a lot of information to transfer.
The big long codes given in urls are often are often hashes (eg session
id!).  These are made long so that it's hard to randomly enter a code and
guess a correct one.
There's no reason to use long urls unless you have a reason! There are often
security reasons (eg hashes/tokens), where you dont want people to be able
to fiddle with the link.  take a bank for example - you dont want to
encourace hacking by putting:
viewtransaction.do?transactionId=18374
(of course i'm assuming that any actions such as these would check that you
own the transaction using session info!!!)
instead do somthing like viewtransaction.do?massive_code_here
and it instantly puts people off changing stuff.
As for suns example, i think sun counts you downloading stuff like J2EE SDK
as 'purchasing' it.  I think part of the reason for that link is to try and
stop anyone from downloading the file and "stealing" it!
Also bear in mind that places such as sun, amazon, etc have massive sites,
with many servers and an immense amount of information.  They need to be
able to track you, accross the site.  Some sites try and do this using big
codes that only the server understands, others tend to use nested
directories, eg:
http://news.bbc.co.uk/1/hi/world/middle_east/3845517.stm
Daniel.
 

-Original Message-
From: Robert Taylor [mailto:[EMAIL PROTECTED]
Sent: 28 June 2004 14:51
To: [EMAIL PROTECTED]
Subject: [OT] Anatomy of a long URL
I'm not sure the subject of this email is indicative of my
question, but I have always wondered why amazon, sun, and some financial
institutions,
use long URL's for invoking actions. My only guess, since I've
only worked at small companies where all the applications pretty much
run on
one machine, is that the URL contains either encoded/sensitive
information or contains session information. I'm just wondering why
the heck does
it look so darn complex.
For example, I just downloaded Sun's J2EE 1.4 SDK
http://192.18.97.53/ECom/EComTicketServlet/BEGINjsecom16c.sun.com-
   

9660%3A40e01d9a%3A3099733a3e651ac9/-2147483648/428874567/1/483962/
483914/428874567/2ts+/westCoastFSEND/j2eesdk-1.4_01-oth-JPR/j2eesdk-1.4_01-o
th-JPR:1/j2eesdk-1_4_01-windows.exe
after the "/-" then there appears to be some random numbers delimited by
forward slashes.
Is this some technique for sharing sessions across different applications?
My apologies if this is one of those things that "everone" know's about
except me.
I really wasnn't sure how to google on this topic either, so if there is
some general
documentation I missed, please point me to it.
robert
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Regarding DynaActionForms

2004-06-29 Thread Bryan Hunt
This sounds a little like ... please write the application for me 
there is plenty of stuff that can be found on
google that is exactly like this ...

--b

Ashutosh Satyam wrote:
I need a sample jsp page where someone can show me,
how i can retrieve the values populated in a dynaactionform.
Also, once I get the resultset after qureying the DB.
How exactly the benas will be populated to be used in pages
Kindly provide inputs on the same.
Regards,
Ashutosh 

-Original Message-
From: Marco Mistroni [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 29, 2004 1:58 PM
To: 'Struts Users Mailing List'
Subject: RE: Regarding DynaActionForms
Hi,
It's exactly the same as Actionform. Struts
Will treat ur dynaactionform as a normal action form.
Beware though that you may encounter problems if some of the
Fields of your actionforms are null..
Regards
marco
-Original Message-
From: Ashutosh Satyam [mailto:[EMAIL PROTECTED] 
Sent: 29 June 2004 06:03
To: Struts Users Mailing List
Subject: Regarding DynaActionForms

Hi,
I'm a novice as far as usage of tag libraries are concerned.
I intend to use DynaActionForm in my application. Would someone 
explain how this could be used in conjunction with available struts 
tag library to populate the beans?

For simplicity, consider a simple application, which stores User
information 
like name, id and password. How during modification, these tag libraries
in 
combination with DynaActionForm can be used to pre populate my JSP page.

The application will read the values from a database.
Any pointer on this will be greatly appreciated.
Regards,
Ashutosh


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Regarding DynaActionForms

2004-06-29 Thread Bryan Hunt
The point is to use google first and then go to a mailing list
for specific questions and clarification.
Asking smart questions on mailing lists by eric stallman.
http://www.catb.org/~esr/faqs/smart-questions.html 
<http://www.catb.org/%7Eesr/faqs/smart-questions.html>

--b
Ashutosh Satyam wrote:
I never meant to write an application for me.
I suppose mailing list are meant for where one
can get pin point information.
If Google was the only solution then there is
no point for the existence of any forum like this.
-Original Message-
From: Bryan Hunt [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 29, 2004 2:47 PM
To: Struts Users Mailing List
Subject: Re: Regarding DynaActionForms
This sounds a little like ... please write the application for me 
there is plenty of stuff that can be found on
google that is exactly like this ...

--b

Ashutosh Satyam wrote:
 

I need a sample jsp page where someone can show me,
how i can retrieve the values populated in a dynaactionform.
Also, once I get the resultset after qureying the DB.
How exactly the benas will be populated to be used in pages
Kindly provide inputs on the same.
Regards,
Ashutosh 

-Original Message-
From: Marco Mistroni [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 29, 2004 1:58 PM
To: 'Struts Users Mailing List'
Subject: RE: Regarding DynaActionForms
Hi,
It's exactly the same as Actionform. Struts
Will treat ur dynaactionform as a normal action form.
Beware though that you may encounter problems if some of the
Fields of your actionforms are null..
Regards
marco
-Original Message-
From: Ashutosh Satyam [mailto:[EMAIL PROTECTED] 
Sent: 29 June 2004 06:03
To: Struts Users Mailing List
Subject: Regarding DynaActionForms

Hi,
I'm a novice as far as usage of tag libraries are concerned.
I intend to use DynaActionForm in my application. Would someone 
explain how this could be used in conjunction with available struts 
tag library to populate the beans?

For simplicity, consider a simple application, which stores User
information 
like name, id and password. How during modification, these tag libraries
in 
combination with DynaActionForm can be used to pre populate my JSP page.

The application will read the values from a database.
Any pointer on this will be greatly appreciated.
Regards,
Ashutosh


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

   

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



OT:Re: Struts, Dreamweaver, and JSP

2004-06-30 Thread Bryan Hunt
i don't know if this will be usefull to anyone but i do this so that the 
pages are usually compiled allready by the time I look at them.

while [ 1 ]; do wget -r http://localhost:8080/myapplication/; sleep 15; 
done

--bryan
McCormack, Chris wrote:
use wget -r http://www.site.co.uk to save your html to disk then run the validator 
over the saved files.
Chris
-Original Message-
From: Jim Barrows [mailto:[EMAIL PROTECTED]
Sent: 29 June 2004 16:40
To: Struts Users Mailing List
Subject: RE: Struts, Dreamweaver, and JSP
 

-Original Message-
From: josh [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 29, 2004 8:24 AM
To: Struts Users Mailing List
Subject: RE: Struts, Dreamweaver, and JSP
On Tue, 2004-06-29 at 10:13, McCormack, Chris wrote:
   

Are there any tools that allow one to validate the html 
   

that is generated by the jsp/struts tags?
   

http://validator.w3.org/
 

Ok, perhaps I didn't phrase that correctly.  Are there any tools that
allow one to validate a JSP.  I know that the resulting HTML 
depends on
the underlying java code and so validation is a problem, but I am
looking for something to make this easier.  I thought that 
perhaps there
was a better way than having to click through the app, saving the HTML
source for each page, then running through a standard validator.  Or
maybe this is just wishful thinking.
   

I typically validate the surrounding html, and hope that struts/jstl is generating good html. If it's not, then there is probably little I can do anyway.   I have also been known to employ a web crawling tool to crawl the site and save the pages to disk and then run validation on those pages.  It's a shell script I wrote though.  

 


   

hth
Chris
-Original Message-
From: josh [mailto:[EMAIL PROTECTED]
Sent: 29 June 2004 16:11
To: Struts Users Mailing List
Subject: Struts, Dreamweaver, and JSP
I am resposible for the visual aspect of a number of struts based
applications and I was wondering if anyone knows of any way 
 

to deal with
   

struts tag standards and jsp tag standards in dreamweaver.  
 

I also have
   

to do validation to ensure the apps are compliant and 
 

accessible.  Are
   

there any tools that allow one to validate the html that is 
 

generated by
   

the jsp/struts tags?
josh
***
***
This e-mail and its attachments are confidential
and are intended for the above named recipient
only. If this has come to you in error, please 
notify the sender immediately and delete this 
e-mail from your system.
You must take no action based on this, nor must 
you copy or disclose it or any part of its contents 
to any person or organisation.
Statements and opinions contained in this email may 
not necessarily represent those of Littlewoods.
Please note that e-mail communications may be monitored.
The registered office of Littlewoods Limited and its
subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
Registered number of Littlewoods Limited is 262152.



 

-
   

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

--
Joshua Cronemeyer
Developer
accessKansas - a service of the Information Network of Kansas, Inc.
www.accesskansas.org <http://www.accesskansas.org/>
785-296-2816 (phone)
785-296-5563 (fax)
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
***
CONFIDENTIALITY NOTICE:
This E-mail and any attachments are confidential.  If you are not the
intended recipient, you do not have permission to disclose, copy,
distribute, or open any attachments.  If you have received this E-mail
in
error, please notify us immediately by returning it to the sender and
delete
this copy from your system.
Thank you.
accessKansas
***
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
***
This e-mail and its attachments are confidential
and are intended for the above named recipient
only. If this has come to you in error, please 
notify the sender immediately and delete this 
e-mail from your system.
You must take no action based on this, nor must 
you copy or disclose it or any part of its contents 
to any person or organisation.
Statements and opinions contained in this email may 
not necessarily represent those of Littlewoods.
Please note that e-mail communications may be monitored.
The registered office of Littlewoods Limited and its
subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
Registered number 

returning to the calling page

2004-06-30 Thread Bryan Hunt
Hi ,
I have the following action
http://localhost:8080/jestate-jsp/client-property-view-for-rent-action.do?id=1
On this page I have a form for adding a house to the shopping basket.
The shopping basket is displayed all the time on the left side of the site.
When someone calls this action ( client-add-to-basket.do ) I wanted the 
house
to be added to the basket and then have them bounce back to the original 
page.

I did try this approach 
if (mapping.getInput() != null) {
   //  return new ActionForward(mapping.getInput());
   return mapping.getInputForward();
   } else //we're fucked ! 
   {
   System.out.println("we're fscked ");
   return null;
   }

. but it didn't seem to work, I believe I would have to specify the 
input in the struts config
file and I intend for this page to be called from any page in the 
application.

Anyone got any suggestions ?
--b
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: returning to the calling page

2004-06-30 Thread Bryan Hunt
sorry i'm irish, we curse a lot. slaps self on wrist 
--b
Michael McGrady wrote:
I really hate to have to address this, Brian, but this language is 
clearly inappropriate for a public forum.

Michael
At 05:35 AM 6/23/2004, you wrote:
Hi ,
I have the following action
http://localhost:8080/jestate-jsp/client-property-view-for-rent-action.do?id=1 

On this page I have a form for adding a house to the shopping basket.
The shopping basket is displayed all the time on the left side of the 
site.

When someone calls this action ( client-add-to-basket.do ) I wanted 
the house
to be added to the basket and then have them bounce back to the 
original page.

I did try this approach 
if (mapping.getInput() != null) {
   //  return new ActionForward(mapping.getInput());
   return mapping.getInputForward();
   } else //we're fucked !{
   System.out.println("we're fscked ");
   return null;
   }
. but it didn't seem to work, I believe I would have to specify 
the input in the struts config
file and I intend for this page to be called from any page in the 
application.

Anyone got any suggestions ?
--b
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


unable to set html-el:link parameters

2004-07-01 Thread Bryan Hunt
Good evening list users.
I have been trying to get html-el to work with JSTL in order to create a 
hyperlink. I am
getting the following error message

[ServletException in:/client/basket.jsp] Cannot find bean 
[EMAIL PROTECTED] in any scope'

Here is the code.
snip=
 
 
 
   
  

   
  
 
 
=snip

The ${property.id} is printed out just fine.
The ${property.name} is printed out just fine.
I am slowly going nuts, I've been trying to get this to work for hours 
now. I've never spent so much time on a hyperlink
in my life ... ;-)  Is this a abnormal behavior or do I just stay up 
past my bedtime to ofter ?

--b
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: unable to set html-el:link parameters

2004-07-01 Thread Bryan Hunt
Cheers Mark,
You were correct, it is now working. Here is the correct code
snip=



  
 
   
  
 


=snip

I can't help but think that the workings of this tag are a little 
convoluted.

--b

Mark Lowe wrote:
opps..
You need to access a method in you ForRentalProperty class if there's 
a getId() method then add paramProperty="id"


On 1 Jul 2004, at 19:17, Mark Lowe wrote:
Seeing as you're using jstl, there's more that one way but you might



">
or perhaps

But i haven't used the htm-el lib in a while so could be wrong.
Mark

On 24 Jun 2004, at 19:06, Bryan Hunt wrote:
Good evening list users.
I have been trying to get html-el to work with JSTL in order to 
create a hyperlink. I am
getting the following error message

[ServletException in:/client/basket.jsp] Cannot find bean 
[EMAIL PROTECTED] in any scope'

Here is the code.
snip=
 
 
 
   
  

   
  
 
 
=snip

The ${property.id} is printed out just fine.
The ${property.name} is printed out just fine.
I am slowly going nuts, I've been trying to get this to work for 
hours now. I've never spent so much time on a hyperlink
in my life ... ;-)  Is this a abnormal behavior or do I just stay up 
past my bedtime to ofter ?

--b
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Nitrox? Anyone?

2004-07-01 Thread Bryan Hunt
That is so wierd, they don't sell it outside the USA on their website so 
I had to order it by email.

I just got my licence key one second before your email ...
Personally I think it's a really good product and that's why I'm buying it.
--b
John McGrath wrote:
Anyone have any experience with the Nitrox Struts editor for Eclipse? If
so, is it worth the money?
best,
John

John McGrath
[EMAIL PROTECTED]
508 289 3781 (w)
508 274 4698 (m)
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: why do we need to integrate tomcat with apache webserver and how.pls urgent

2004-07-05 Thread Bryan Hunt
Ganesh,
After looking on google for aprox 60 seconds I found this page
http://jakarta.apache.org/tomcat/faq/connectors.html
Check on google first in future and stop expecting us to do your job for 
you.

This list is run by volunteers, not by your personal assistants.
--b
McCormack, Chris wrote:
This is the third time this has been posted isn't it ? 
IIRC it was answered quite well the second time it was asked. Look in to modjk and read the tomcat faq/manual.

Chris McCormack
-Original Message-
From: ganesh gadi [mailto:[EMAIL PROTECTED]
Sent: 05 July 2004 15:20
To: [EMAIL PROTECTED]
Cc: user
Subject: why do we need to integrate tomcat with apache webserver and
how.pls urgent
Hi List.
I've small doubt why we need to configure tomcat with apache  
webserver. 

what is the neccessity of integration tomcat with apache web server.
and also pls give me the steps to integrate it in details.
I am using 

OS :: windows 2000 Server
Apache HTTP Server v2.0.49
tomcat 5.0.16
JBuilder x Enterprise..
Please tell me neccesary steps to configure
awaiting ur reply
Ganesh


-
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
***
This e-mail and its attachments are confidential
and are intended for the above named recipient
only. If this has come to you in error, please 
notify the sender immediately and delete this 
e-mail from your system.
You must take no action based on this, nor must 
you copy or disclose it or any part of its contents 
to any person or organisation.
Statements and opinions contained in this email may 
not necessarily represent those of Littlewoods.
Please note that e-mail communications may be monitored.
The registered office of Littlewoods Limited and its
subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
Registered number of Littlewoods Limited is 262152.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Book recommendations

2004-07-06 Thread Bryan Hunt
I would suggest Struts , the complete reference by James Holmes.
It is incredibly clearly laid out and has a section on JSTL as well.
It is good as both an introduction and a reference.
Out of the last 5 tech books that I have bought ( not including
J2EE design and Development by Rod Johnson) it is the only
one worth the paper it was printed on.
--b
Davis, Nick wrote:
Hi All,
I am looking for a good Struts book. Does anyone have any recommendations?
-Nick
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] Speaking of "gratuitously difficult".....

2004-07-06 Thread Bryan Hunt
Forget about it, the only way to do it without tearing your hair out is 
to use ANT
and XDoclet.

J2EE is all about "wasting time on stuff that should be simple".
My 2 c, unless you need session beans it is better to use tomcat as your 
web container
and hibernate for persistance.

Use the spring framework for flexibility in case you need to change your 
mind later.

--b
Mike Duffy wrote:
Speaking of "gratuitously difficult".
Has anyone ever messed with the "deploytool" in J2EE?
AHHGGG
I just want to deploy a simple war file.  I googled around and I could not even find 
good
documentation (Sun or elsewhere).
Does anyone know of a good plugin for Eclipse that creates war files?  I guess 
JBuilder has a good
war file creation utility.
Basically, shouldn't I be able to jar up everything in a webapp directory as long as I 
add the
correct "deployment descripter"?  I could not find an example of doing this.
Also, is it possible to create a war file that has a "context.xml" file?
I hate wasting time on stuff that should be simple.
Mike

--- Craig McClanahan <[EMAIL PROTECTED]> wrote:
 

Bryan Hunt wrote:
   

I think someone in sun just wanted to create something fancy 
regardless of
what the customers wanted just so he/she could put it on their cv.
 

Anyone who thinks this is the real reason hasn't read the technology 
export restriction regulations that apply to US companies.  The 
restrictions apply to the geographic location of the downloader, and 
don't have anything to do with sessions or trying to make it more 
gratuitously difficult to use command line tools.

Craig McClanahan
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   



__
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: some best practices questions

2004-07-07 Thread Bryan Hunt
Sorry if this is considered spamming the list 
Speaking of storing stuff in session scope. I've developed what I think 
is a handy class which I think it useful for
when I want to store something like a search in a session variable.

For instance if I want to page through it ( using displaytags.org (10 
out of 10)) or simply if I don't want to fetch
from the database time and time again.
By default the data expires on an hourly basis. And if a different 
combination of parameters is sent it expires
the cached stuff.

Here is the class
snip=
package ie.jestate.struts.client;
import java.util.Date;
/**
* @author Bryan Hunt
*/
//TODO:Perhaps I should be generating a MD5 or something but I can't see 
a good reason to use any more CPU

public class HashGenerator {
  
   private StringBuffer buffer;
  
  
   /**
*
*/
   public HashGenerator() {
   super();
   buffer = new StringBuffer(50);
   // TODO Auto-generated constructor stub
   }

   /**
* @param urbanAreas
*/
   public void add(Integer[] array,String fieldname) {
   for (int i = 0; i < array.length; i++) {
   Integer integer = array[i];
   buffer.append(integer);
   }
   buffer.append(fieldname);
   buffer.append("-");
   }
   /**
* @param priceRangeStart
*/
   public void add(Integer integer,String fieldname) {
   // TODO Auto-generated method stub
   buffer.append(integer);
   buffer.append(fieldname);
   buffer.append("-");
   }
   /**
* @return
*/
   public String getHash() {
  
   //I append the hour onto the end of the string so that a hash will
   //only be good for a max of one hour.
   Date date = new Date();
  
   return buffer.toString()+ "-" + new Integer(date.getHours());
   }

}
=snip
And here is example usage.
snip=
/*
* Created on 24-Jun-2004
*/
package ie.jestate.struts.client;
import ie.jestate.struts.BaseAction;
import java.util.Set;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.DynaActionForm;
/**
* @author Bryan Hunt
 *
*/
public class ForSaleSearchAction extends BaseAction {
   /* (non-Javadoc)
* @see 
org.apache.struts.action.Action#execute(org.apache.struts.action.ActionMapping, 
org.apache.struts.action.ActionForm, 
javax.servlet.http.HttpServletRequest, 
javax.servlet.http.HttpServletResponse)
*/
   public ActionForward execute(
   ActionMapping actionMapping,
   ActionForm actionForm,
   HttpServletRequest request,
   HttpServletResponse response)
   throws Exception {

   //TODO: Database based initialization of the countries collection
   DynaActionForm dynaform = (DynaActionForm) actionForm;
   HttpSession session = request.getSession();
   String forSalePropertiesSearchCheckSum = (String) 
session.getAttribute(Constants.FOR_SALE_CHECK_SUM);
   String newForSalePropertiesSearchCheckSum = null;
  
   Integer[] urbanAreas = (Integer[]) dynaform.get("urbanAreas");
   Integer priceRangeStart = (Integer) dynaform.get("priceRangeStart");
   Integer priceRangeEnd = (Integer) dynaform.get("priceRangeEnd");
   Integer[] propertyTypes = (Integer[]) dynaform.get("propertyTypes");
  
   HashGenerator hashGenerator = new HashGenerator();
   hashGenerator.add(urbanAreas,"urbanAreas");
   hashGenerator.add(priceRangeStart,"priceRangeStart");
   hashGenerator.add(priceRangeEnd,"priceRangeEnd");
   hashGenerator.add(propertyTypes,"propertyTypes");
   newForSalePropertiesSearchCheckSum = 
hashGenerator.getHash();
  
   if(forSalePropertiesSearchCheckSum != null && 
forSalePropertiesSearchCheckSum.equals(newForSalePropertiesSearchCheckSum)) 
{
   System.out.println("Checksums match");
   }
  
   if (forSalePropertiesSearchCheckSum == null
   || 
!forSalePropertiesSearchCheckSum.equals(newForSalePropertiesSearchCheckSum)){

   Set forSaleProperties =
   findForSaleProperties(
   urbanAreas,
   priceRangeStart,
   priceRangeEnd,
   propertyTypes);
   
session.setAttribute(Constants.FOR_SALE_PROPERTIES_SEARCH_RESULT, 
forSaleProperties);
   session.setAttribute(
   Constants.FOR_SALE_CHECK_SUM,
   newForSalePropertiesSearchCheckSum);
//TODO:Add logging functionality
   System.out.println("Returning fresh search results");
  
   } else
   /*

using Constants from JSTL .....

2004-07-07 Thread Bryan Hunt
Ok, tearing my hair out right now and extremely confused.
If you look at the Java Technology Forums you will see a rather nice 
little pattern that
someone called evnafets has created, it allows you to use a single 
Constants class
both in your Actions and in your JSP pages ...

It uses reflection to add it's static final members to a map which can 
then be accessed by JSTL like so


The address is 
http://forum.java.sun.com/thread.jsp?forum=45&thread=508847&message=2415101 


This works with a lot of stuff but the jstl and struts tags seem to be a 
little inconsistent in their behaviors.

For example this works ...
snip=

   

=snip

But for some reason ( my stupidity and the time of the evening ) I 
cannot get this to work.
snip=


=snip

or like this
snip=


=snip

I'm starting to feel like I'm back in my Perl days again  Is there a 
way that I can dereference these
beans or do I have to use sloppy string literals in my jstl code ?

Any suggestions or am I just stupid to want to do this ?
--b


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: using Constants from JSTL .....

2004-07-07 Thread Bryan Hunt
Just as an addition I can do this





   

And it works fine, but really what I am trying to get here is the value 
of using Constants in
both my Actions and my ( JSTL based ) jsp's.

Perhaps this is just something that never occured to the writers of the 
JSTL spec ?

--b

Bryan Hunt wrote:
Ok, tearing my hair out right now and extremely confused.
If you look at the Java Technology Forums you will see a rather nice 
little pattern that
someone called evnafets has created, it allows you to use a single 
Constants class
both in your Actions and in your JSP pages ...

It uses reflection to add it's static final members to a map which can 
then be accessed by JSTL lik

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: using Constants from JSTL .....

2004-07-08 Thread Bryan Hunt
Hmmm, that gives me no error but no result either  I put in the 
following code to test it and just got blank
screen.
snip=






   

=snip

If I substitute the following line instead it works fine.

This line of code ...

Outputs
EMAIL_NOTIFICATIONS
on the screen.
I think this is starting to look like it just isn't going to work, I 
don't think that jstl is too smart about dynamic
variables like this. I tried the other suggestion as well (

c:set var="const" value="${scope['Constants']}"/>

)
But it didn't work either, this is starting to look as though it will be 
so convoluted that I might as well not be trying to use constants anyhow 
as I will have to look up the file anyway I might as well just use 
string literals. 

Cause it isn't scriptlet I wont get auto-completion anyhow. I'm going 
to try the suggestion from Rick Reumann and then I'm gonna throw my 
computer out the window.

--b


Denis Avdic wrote:
Have you tried 

?

On Wed, 07 Jul 2004 20:12:02 +0200, Bryan Hunt
<[EMAIL PROTECTED]> wrote:
 

Just as an addition I can do this





  

And it works fine, but really what I am trying to get here is the value
of using Constants in
both my Actions and my ( JSTL based ) jsp's.
Perhaps this is just something that never occured to the writers of the
JSTL spec ?
--b

Bryan Hunt wrote:
   

Ok, tearing my hair out right now and extremely confused.
If you look at the Java Technology Forums you will see a rather nice
little pattern that
someone called evnafets has created, it allows you to use a single
Constants class
both in your Actions and in your JSP pages ...
It uses reflection to add it's static final members to a map which can
then be accessed by JSTL lik
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   

 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: OT: RE: Spring or Tapestry Framework

2004-07-08 Thread Bryan Hunt
The predecessor is such a cool book that it's probably a collectors item.
--b
Joe Germuska wrote:
At 4:19 PM -0400 7/7/04, [EMAIL PROTECTED] wrote:
Also, I'm sure Rod's new book includes solutions that leverage 
Spring: 
http://www.bookpool.com/.x/h9a6d8t7p6/ss/1?qs=EJB+without+J2EE&Go.x=0&Go.y=0&Go=Go 

BTW, BookPool has this book at 50% off, saving 7.19 over Amazons 
price.  That's just crazy.

Especially because they're asking $10 more for the 2003 predecessor 
which is presumably obsoleted by this!

In case anyone is still asking the original question that spawned this 
thread, note that Tapestry is a more elaborate framework which 
probably is an alternative to Struts, not something you'd use with 
Struts.  At least, I've never heard of anyone doing that.

HiveMind is a piece of Tapestry which has been factored out and which 
more accurately "peers" to Spring -- although Spring has an MVC layer 
which "peers" to Tapestry and Struts.  Yes, confusing.  Still, I think 
at the level at which the original question targetted, a more accurate 
comparison would be between Spring and HiveMind.

I have no experience with HiveMind.  I've been pretty happy using 
Spring as a lightweight configuration management tool for wiring 
together beans at initialization time.

Joe
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: some best practices questions

2004-07-08 Thread Bryan Hunt
The main arguments that people have against session storage is the following
a) Excessive memory consumption limits scallability.
True, just don't go crazy storing whole db's and stuff in there.
b) Sessions can not be shared by webservers in clustered environment.
Clustered webservers with shared sessions are such a myth/stupid idea.
Do it like hotmail.
   1) Request comes in to one of the front processor machines selected by
   DNS server with multiple resolves for the same address.
   2) Choose a machine that that has resources to spare.
   3) Users session is on that machine. The url for that machine is
   machine123.msn.com.
   4) User logs off, the next time they come back their session is on
   some other machine.
I fail to see what the point of sharing sessions between machines is ?
Even if the machine crashes, they just enter in the initial address (ie
hotmail.com ) and get sent to a working machine.
So my point is ... what's so bad about sessions ? 

Also if session ties you to a machine then file storage is twice as bad.
--b


[EMAIL PROTECTED] wrote:
I think, performance wise File I/O is not the right idea. 

What do you say ?
-Original Message-
From: Christina Siena [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 08, 2004 8:16 AM
To: Struts Users Mailing List
Subject: Re: some best practices questions

I have an idea how to persist the data that I currently place in session
scope but I need to run it by someone.
Recall when I said that placing data in session scope is frowned upon by
some members of my team? Well no one said anything about not using Java
serialization. Why couldn't I serialize the 
same data that I currently keep in session scope? I've already
implemented a solution for streaming images so creating a temp file
should not be a problem. Here is what I think I will need:

In the action where the data is first retrieved:
 try {
  final String prefix = "myVehicleLineMap";
  final String suffix = null;
  File file = File.createTempFile(prefix, suffix);
  FileOutputStream fileOutputStream = new FileOutputStream(file);
  ObjectOutputStream objectOutputStream = new
ObjectOutputStream(fileOutputStream);
  objectOutputStream.writeObject(myMap);
  objectOutputStream.flush();
  myForm.setTempFileName(file.getAbsolutePath());
 } catch (Exception e) {
  System.out.println(this.getClass().getName() + "==>> " +
e.toString());
 }
In the action where the data needs to be re-accessed to prepare the page
for re-display:
 try {
  FileInputStream fileInputStream = new
FileInputStream(myForm.getTempFileName()); 
  ObjectInputStream objectInputStream = new
ObjectInputStream(fileInputStream); 
  SortedMap myMap = (SortedMap) objectInputStream.readObject(); 
  // use myMap as before (when in session scope)
 } catch (Exception e) {
  System.out.println(this.getClass().getName() + "==>> " +
e.toString());
 }

This is just an idea at this point, so I would welcome any feedback. I'm
not sure if this will work or if its feasible, but at least it may
generate some more ideas.
 - Original Message - 
 From: Michael McGrady 
 To: Struts Users Mailing List 
 Sent: Tuesday, July 06, 2004 11:59 PM
 Subject: Re: some best practices questions

 Ever thought about creating a new scope managed by your own manager
from 
 application scope?  That is an approach I have been thinking of more
and 
 more as of late.

 At 08:35 PM 7/6/2004, you wrote:
 >I used hidden select lists to restore user selections since I wasn't 
 >"allowed" to place the whole form in session scope. The 
 >management/maintenance of user selections was indeed ugly (but its
done 
 >and works fine). My question has to do with the data retrieved from
the db 
 >(from which the user makes selections). For example, when the form is

 >initially displayed, I populate a list of vehicle lines (i.e. Focus, 
 >Mustang, Freestar, and so on). The user can copy a vehicle line from
the 
 >source list to the target list. The target list consists of user 
 >selections. When the page needs to be re-displayed as a result of
some 
 >other query, I needed to re-populate the list of vehicle lines (the
source 
 >list). I felt that re-retrieving the same vehicle lines from the db
again 
 >was silly (since I got it once I simply put a map in session and use
it 
 >when needed). When posting the form, the list of label value beans is
no 
 >longer available in the action, so my options were: (1) either store
in 
 >hidden lists (concatenating the key with the description) or (2) 
 >re-retrieve the vehicle lines from the db or (3) place them in
session the 
 >first they are retrieved and get them from session scope. I chose the

 >third and wondered about some best practices others have used in
similar 
 >situations.
 >   - Original Message -
 >   From: Rick Reumann
 >   To: Struts Users Mailing List
 >   Sent: Tuesday, July 06, 2004 10:58 PM
 >   Subject: Re: some best practices questions
 >
 >
 >   Christina Siena wrote:
 >
 >   > I recently developed an a

Re: using Constants from JSTL .....

2004-07-08 Thread Bryan Hunt
Uh oh, I just realised that is the exact same as mine just implimented 
differently.


Will output the string value but will not be able to be used to resolve 
the bean by that
name.

I'm giving up on JSTL constants.  Nice idea ... but too expensive on my 
hairline.

--b
Rick Reumann wrote:
On Wed, 07 Jul 2004 20:12:02 +0200, Bryan Hunt 
<[EMAIL PROTECTED]>  wrote:

And it works fine, but really what I am trying to get here is the 
value  of using Constants in
both my Actions and my ( JSTL based ) jsp's.

You need to have all your Constants in a Map that is in application 
scope.  Kris Schneider posted this great piece of code to add to your 
Constants  file to return all your constants as a Map. At app start up 
I have a  servlet that does several things, one of which call the 
properties method  to put all the stuff in a Map and then you can just 
put that in scope:

//in some servlet at startup:
ServletContext context = contextEvent.getServletContext();
context.setAttribute("CONSTANTS", UIConstants.getConstantsMap());
(Below you don't need to do like I have. I had other reasons to do it 
this  way at the time. But just provide the getConstantFieldsAsMap() 
method )

//example class: UIConstants
private static Map constantsMap;
static {
constantsMap = getConstantFieldsAsMap(UIConstants.class);
}
public static Map getConstantsMap() {
return constantsMap;
}
//all your constants:
public final static String WHATEVER = "whatever";
//this does the work.. thanks Kris
private static Map getConstantFieldsAsMap(Class cls) {
Map propMap = null;
try {
Field[] allFields = cls.getDeclaredFields();
int numFields = allFields.length;
propMap = new HashMap(numFields);
for(int i = 0; i < numFields; i++) {
Field f = allFields[i];
int mods = f.getModifiers();
if(Modifier.isPublic(mods) && Modifier.isStatic(mods) &&  
Modifier.isFinal(mods)) {
String name = f.getName();
Object value = f.get(null);
log.debug("Putting name = " + name + " and value=" + 
value  + " into propMap");
propMap.put(name, value);
}
}
} catch(IllegalAccessException ie) {
log.error("Problem loading constantFieldsAsMap " + ie);
}
return Collections.unmodifiableMap(propMap);
}

//end class
Now in JSP you can just do:

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


OT:SOLUTION:Re: Why Ajp13Connector.class is not found in tomcat-jk.jar inTomca 5.x but in Tomca 4.x

2004-07-10 Thread Bryan Hunt
I know the solution, for u *NIX users 
vi ~/.procmailrc
snip=
:0 h
*^Subject:.*I can't bother my ass looking on google so I send noise to 
the list 
/dev/null
=snip

--b
Robert Taylor wrote:
http://jakarta.apache.org/site/mail2.html#Tomcat
 

-Original Message-
From: ganesh gadi [mailto:[EMAIL PROTECTED]
Sent: Saturday, July 10, 2004 6:31 AM
To: Struts Users Mailing List
Subject: Why Ajp13Connector.class is not found in tomcat-jk.jar inTomca
5.x but in Tomca 4.x

Hi List,
i'm using Tomcat 5.0.19 server.
I need to connect Ajp13Connector through Tomcat 5.0.19
I configured in Tomcat.
But while i'm running ,NoClassDefFoundException is getting.i.e.,Ajp13Connector.class is not 
available in "tomcat-jk.jar"
But the class is available in Tomcat 4.x in the same jar file(tomcat-jk.jar).
Why didn't I find that file in Tomcat 5.x
I redownload tomcat 5.x again but i got the same problem.
Please give me the solution for that.
awaiting for u reply.
Thanks
Ganesh
		
-
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
   

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


validation wierdness possibly related to multiple struts config files

2004-07-13 Thread Bryan Hunt
I have the following jsp page
snip=

 
   
 
   
 
   
 :
 
   
 
etc etc etc
=snip

I have 4 struts config files default.xml,client.xml,admin.xml,sales.xml
They are declared as so in my web.xml file.
snip=

config
/WEB-INF/struts/default.xml,
/WEB-INF/struts/client.xml,
/WEB-INF/struts/sales.xml,
/WEB-INF/struts/admin.xml


=snip
The default.xml contains the following lines which work just fine for 
everything else
snip=



 
   
   
   
 

  
   
 
=snip

My validation.xml file has the following relevant lines ...
snip=
 
   
   
   
   
   
   
   
   
   
   
=snip
My ApplicationResources.properties file has the following content
snip=
label.oldPassword=Old Password
label.newPassword=New Password
label.confirmNewPassword=Confirm New Password
errors.required={0} is required.
errors.minlength={0} cannot be less than {1} characters.
=snip
Now everything works fine including the labels (ie  ) but when
the form is submitted but not all the fields are filled out I get the 
following messages ( output from .

null is required.
null is required.
null is required.
Is this possibly a Struts bug or is it too late in the day and I drink 
to many units at the weekend being an Irishman ?

--b
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


OT:Re: FW: Lesbian & gays Mpeg

2004-07-13 Thread Bryan Hunt
Well that won the prize for most OT message ..
It beat the hibernate/linux/coffee machine questions 
--b
malcolm wrote:
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] Editor for Struts/J2ee apps

2004-07-15 Thread Bryan Hunt
Nitrox from M4 ... best that I've seen (for struts) . Better than 
MyEclipse but does not support code completion within JSP's
or debugging ( from what I can see ) .

--b
Navjot Singh wrote:
hi,
I am starting a j2ee app(servlets,jsp.taglibs,ejb,jms,jaxp) with 
struts as web framework and i need to decide on the IDE that i should 
use.

May i have your inputs on pros/cons on IDEs that you are using. Any 
specific inputs on IDEA/MyEclipse are most welcome.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: examples of struts??

2004-07-15 Thread Bryan Hunt
http://aerlingus.com 
The finest of Irish airlines, to be sure , to be sure !
--b
Lykins Don H Contr AFSAC/ITS wrote:
What real-world web sites are using struts?
Can someone point me to some sites and do you know which packages/classes are used?
also, which is the most popular/beneficial class in use today?
Don Lykins
AFSAC
937-257-4295 x4539
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: validation wierdness possibly related to multiple struts config files

2004-07-15 Thread Bryan Hunt
Thank you Bill, your answer was correct. I've found that 
commons-validator as distibuted with the latest
1.2.1 version of struts doesn't include the 
http://jakarta.apache.org/commons/dtds/validator_1_2_0.dtd
file. So despite my specifying the DTD like so
snip=


 "-//Apache Software Foundation//DTD Commons Validator Rules 
Configuration 1.0//EN"
 "http://jakarta.apache.org/commons/dtds/validator_1_2_0.dtd";>
=snip

I've copied the following files over to my libs dir.
snip=
08/07/2004  09:26  358,273 antlr.jar
08/07/2004  09:26  118,726 commons-beanutils.jar
08/07/2004  09:26  165,119 commons-collections.jar
08/07/2004  09:26  109,096 commons-digester.jar
08/07/2004  09:26   22,379 commons-fileupload.jar
08/07/2004  09:26   38,015 commons-logging.jar
08/07/2004  09:26   84,260 commons-validator.jar
08/07/2004  09:26   65,425 jakarta-oro.jar
08/07/2004  09:26  520,842 struts.jar
=snip
It still appears to be still validating using an old dtd and throws the 
following exception.

wierd ... wierd ... wierd
15-Jul-2004 13:22:07 org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 30 column 21: The content of element type 
"field" mu
st match "(msg|arg0|arg1|arg2|arg3|var)*".
org.xml.sax.SAXParseException: The content of element type "field" must 
match "(
msg|arg0|arg1|arg2|arg3|var)*".
   at 
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Un
known Source)
   at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
   at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown 
Source)
   at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown 
Source)
   at 
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown S
ource)
   at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown 
Source)

   at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknow
n Source)
   at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
   at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source)
   at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
   at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
   at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
   at org.apache.commons.digester.Digester.parse(Digester.java:1581)
   at 
org.apache.commons.validator.ValidatorResources.(ValidatorResou
rces.java:153)
   at 
org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPl
ugIn.java:233)
   at 
org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java
:164)
   at 
org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServle
t.java:839)
   at 
org.apache.struts.action.ActionServlet.init(ActionServlet.java:332)
   at javax.servlet.GenericServlet.init(GenericServlet.java:256)
   at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
java:1044)
   at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:88
7)
   at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
t.java:3853)
   at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4
168)
   at 
org.apache.catalina.core.StandardContext.reload(StandardContext.java:
2897)
   at 
org.apache.catalina.core.StandardContext.backgroundProcess(StandardCo
ntext.java:4472)
   at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p
rocessChildren(ContainerBase.java:1658)
   at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p
rocessChildren(ContainerBase.java:1667)
   at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p

I've tried getting the latest version from 
http://cvs.apache.org/builds/jakarta-commons/nightly/commons-validator/
and despite it including the 1.2 dtd the problem persists, perhaps I am 
brain dead but I can't figure this out.

--b
Bill Siggelkow wrote:
Are you using Struts 1.2 or the nightly build? I had this issue the 
other day and I think I got around it by using the new  element 
instead of  -- simply change arg0 to arg in your validation.xml.


Or you can try using the new position attribute:

Bill Siggelkow
Bryan Hunt wrote:
I have the following jsp page
snip=

 
   
 
   
 
   
 :
 
   
 
etc etc etc
=snip

I have 4 struts config files default.xml,client.xml,admin.xml,sales.xml
They are declared as so in my web.xml file.
snip=

config
/WEB-INF/struts/default.xml,
/WEB-INF/struts/client.xml,
/WEB-INF/struts/sales.xml,
/

Re: [OT] Editor for Struts/J2ee apps

2004-07-15 Thread Bryan Hunt
sorry should have said M7
--b
Bryan Hunt wrote:
Nitrox from M4 ... best that I've seen (for struts) . Better than 
MyEclipse but does not support code completion within JSP's
or debugging ( from what I can see ) .

--b
Navjot Singh wrote:
hi,
I am starting a j2ee app(servlets,jsp.taglibs,ejb,jms,jaxp) with 
struts as web framework and i need to decide on the IDE that i should 
use.

May i have your inputs on pros/cons on IDEs that you are using. Any 
specific inputs on IDEA/MyEclipse are most welcome.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: validation wierdness possibly related to multiple struts config files

2004-07-15 Thread Bryan Hunt
Ok , dunno who to report this to but this validator stuff needs to be 
looked at before this
is released to the public cause it's a bit of a mess.

Just noticed that the version of validator-rules that is distributed is 
for the validator_1_1.dtd version.

I think somebody needs to take a little look at this. It doesn't seem to 
know whether to do
1.1 or 1.2 stuff. Some of the behaviour is from one and some from the 
other.

--b
Bryan Hunt wrote:
Thank you Bill, your answer was correct. I've found that 
commons-validator as distibuted with the latest
1.2.1 version of struts doesn't include the 
http://jakarta.apache.org/commons/dtds/validator_1_2_0.dtd
file. So despite my specifying the DTD like so
snip=


 "-//Apache Software Foundation//DTD Commons Validator Rules 
Configuration 1.0//EN"
 "http://jakarta.apache.org/commons/dtds/validator_1_2_0.dtd";>
=snip

I've copied the following files over to my libs dir.
snip=
08/07/2004  09:26  358,273 antlr.jar
08/07/2004  09:26  118,726 commons-beanutils.jar
08/07/2004  09:26  165,119 commons-collections.jar
08/07/2004  09:26  109,096 commons-digester.jar
08/07/2004  09:26   22,379 commons-fileupload.jar
08/07/2004  09:26   38,015 commons-logging.jar
08/07/2004  09:26   84,260 commons-validator.jar
08/07/2004  09:26   65,425 jakarta-oro.jar
08/07/2004  09:26  520,842 struts.jar
=snip

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] Best practice for background service

2004-07-15 Thread Bryan Hunt
better idea , integrate the spring framwork and use the built in support 
for quartz scheduling.

http://www.springframework.org/docs/reference/index.html
http://www.springframework.org/docs/reference/scheduling.html
--b
*
*
Jan Behrens wrote:
Hi list,
I am coding an app where I rely on a background service to check regularly
for new mail. I want to instantiate my service component (the one checking
for mail) when the context is loaded and have it running in a background
thread. I have done only very limited coding with threads so far :(
What I plan to do is to create a controller servlet that is loaded on
startup and that creates instances of all my services. All services extend
Thread and are started by invoking the run() method when the controller
servlet starts. Would that work? How would I then set the intervall on which
my mail service checks for new mail? Could this be done using
sleep(interval)?
I wonder whether anyone has tips on this for a newbie or if there is such a
thing as a best practice on this.
TIA, Jan
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: validation wierdness possibly related to multiple struts config files

2004-07-15 Thread Bryan Hunt
finally solved it.
When you have the following DTD definition in your validation.xml file
snip=
http://jakarta.apache.org/commons/dtds/validator_1_2_0.dtd";>
=snip
It breaks.
When you have the following DTD definition in your validation.xml file *
*snip=
http://jakarta.apache.org/commons/dtds/validator_1_1.dtd";>
=snip*
*It works
When you have the following DTD definition in your validation.xml file
snip=
http://jakarta.apache.org/commons/dtds/validator_1_2_0.dtd";>
=snip
It works.
--b
Bryan Hunt wrote:
Ok , dunno who to report this to but this validator stuff needs to be 
looked at before this
is released to the public cause it's a bit of a mess.

Just noticed that the version of validator-rules that is distributed 
is for the validator_1_1.dtd version.

I think somebody needs to take a little look at this. It doesn't seem 
to know whether to do
1.1 or 1.2 stuff. Some of the behaviour is from one and some from the 
other.

--b
Bryan Hunt wrote:
Thank you Bill, your answer was correct. I've found that 
commons-validator as distibuted with the latest
1.2.1 version of struts doesn't include the 
http://jakarta.apache.org/commons/dtds/validator_1_2_0.dtd
file. So despite my specifying the DTD like so
snip=


 "-//Apache Software Foundation//DTD Commons Validator Rules 
Configuration 1.0//EN"
 "http://jakarta.apache.org/commons/dtds/validator_1_2_0.dtd";>
=snip

I've copied the following files over to my libs dir.
snip=
08/07/2004  09:26  358,273 antlr.jar
08/07/2004  09:26  118,726 commons-beanutils.jar
08/07/2004  09:26  165,119 commons-collections.jar
08/07/2004  09:26  109,096 commons-digester.jar
08/07/2004  09:26   22,379 commons-fileupload.jar
08/07/2004  09:26   38,015 commons-logging.jar
08/07/2004  09:26   84,260 commons-validator.jar
08/07/2004  09:26   65,425 jakarta-oro.jar
08/07/2004  09:26  520,842 struts.jar
=snip

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] Editor for Struts/J2ee apps

2004-07-15 Thread Bryan Hunt
I dunno, it's a good product and I really like it but I've never seen 
any awareness of jsp editing.

I've been using it for a while now as well.
And cause it hasn't ever indicated that it understands scriptlets I've 
never used it for debugging.

Then again, I'm aiming for zero java code in my jsp's.
--b
[EMAIL PROTECTED] wrote:
NitroX DOES support code completion: http://www.m7.com/appxray.jsp
If you get a moment, you should view the video of the demo.  However, 
I've heard that the new offering from Sun is good as well:
http://www.demosondemand.com/clients/m7/001/page/demo.asp

To be fair, I'm _still_ using Idea (and _still_ lovin' it).
Dennis

*Bryan Hunt <[EMAIL PROTECTED]>*
07/15/2004 06:53 AM
Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>

To
Struts Users Mailing List <[EMAIL PROTECTED]>
cc

Subject
Re: [OT] Editor for Struts/J2ee apps




Nitrox from M4 ... best that I've seen (for struts) . Better than
MyEclipse but does not support code completion within JSP's
or debugging ( from what I can see ) .
--b
Navjot Singh wrote:
> hi,
>
> I am starting a j2ee app(servlets,jsp.taglibs,ejb,jms,jaxp) with
> struts as web framework and i need to decide on the IDE that i should
> use.
>
> May i have your inputs on pros/cons on IDEs that you are using. Any
> specific inputs on IDEA/MyEclipse are most welcome.
>
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: validation wierdness possibly related to multiple struts config files

2004-07-15 Thread Bryan Hunt
h ... if i put that in mine I get a file not found exception the 
commons-validator jar doesn't include that one.
with this definition it seems to be working ok for the time being

http://jakarta.apache.org/commons/dtds/validator_1_2_0.dtd";>
curse these dtd's :-) 

--b


Niall Pemberton wrote:
I got confused recently about validator versions  - validator 1.1.3 has just
been released and thats what Struts 1.2.1 uses - validator 1.2 is still in
development so you need to be using
http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd";>
Niall
- Original Message - 
From: "Bryan Hunt" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, July 15, 2004 2:20 PM
Subject: Re: validation wierdness possibly related to multiple struts config
files

 

finally solved it.
When you have the following DTD definition in your validation.xml file
snip=
http://jakarta.apache.org/commons/dtds/validator_1_2_0.dtd";>
=snip
It breaks.
When you have the following DTD definition in your validation.xml file *
*snip=
http://jakarta.apache.org/commons/dtds/validator_1_1.dtd";>
=snip*
*It works
When you have the following DTD definition in your validation.xml file
snip=
http://jakarta.apache.org/commons/dtds/validator_1_2_0.dtd";>
=snip
It works.
--b
Bryan Hunt wrote:
   

Ok , dunno who to report this to but this validator stuff needs to be
looked at before this
is released to the public cause it's a bit of a mess.
Just noticed that the version of validator-rules that is distributed
is for the validator_1_1.dtd version.
I think somebody needs to take a little look at this. It doesn't seem
to know whether to do
1.1 or 1.2 stuff. Some of the behaviour is from one and some from the
other.
--b
Bryan Hunt wrote:
 

Thank you Bill, your answer was correct. I've found that
commons-validator as distibuted with the latest
1.2.1 version of struts doesn't include the
http://jakarta.apache.org/commons/dtds/validator_1_2_0.dtd
file. So despite my specifying the DTD like so
snip=
http://jakarta.apache.org/commons/dtds/validator_1_2_0.dtd";>
=snip
I've copied the following files over to my libs dir.
snip=
08/07/2004  09:26  358,273 antlr.jar
08/07/2004  09:26  118,726 commons-beanutils.jar
08/07/2004  09:26  165,119 commons-collections.jar
08/07/2004  09:26  109,096 commons-digester.jar
08/07/2004  09:26   22,379 commons-fileupload.jar
08/07/2004  09:26   38,015 commons-logging.jar
08/07/2004  09:26   84,260 commons-validator.jar
08/07/2004  09:26   65,425 jakarta-oro.jar
08/07/2004  09:26  520,842 struts.jar
=snip
   

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

   


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tiles, Validation and reuse of HTML Form

2004-07-15 Thread Bryan Hunt
I do it with a seperate action for each use case. I find it tedious but 
have not found a better way.

--b
Josh Holtzman wrote:
Hello All,

I've tried to search the list archives for previous threads on this topic,
but it appears the search feature is not working.

We are building a simple website that offers about a half dozen products for
sale. 


We have one dedicated page layout (the product page) that contains a photo
and description of the product.  On this page there is also a list of the
other 5 products.  By clicking on any one of these products, the page is
refreshed, and the new product information appears in the same layout.  Also
on this page is an HTML form that is used to add items to the shopping cart.
From this form a user can choose any one of the 6 products from a select
menu, type a quantity, and submit the form.. To add items to the shopping
cart.  This form is the same on all the product pages.

For the sake of GUI reuse and maintenance, we have implemented the site with
tiles.  For this particular page we have created a base template named
"website.product" containing the header, footer, body layout, and html form
tiles.  For each of the 6 products we have extended this base template, and
added a tile with the product photo, description, and price.

In the struts config file we created an Action element for each of the 6
product pages.  For instance:


path="/products/lazydazy"
  parameter="website.product.lazydazy"
  scope="request"
  type="org.apache.struts.actions.ForwardAction"
  validate="false">


And


path="/products/sallysue"
  parameter="website.product.sallysue"
  scope="request"
  type="org.apache.struts.actions.ForwardAction"
  validate="false">


The following is our dilemma:

We are using the same tile containing the html form (which we declared in
the base template) for all these pages.  This doesn't present any problem,
except when validation fails.  When the validation fails, Struts must
determine which page to return and display the error message.  But our
problem is, the Action element requires we specify a single location.


path="/addtocart"
 input="website.product.lazydazy"
 name="addToCartForm"
 scope="request"
 type="com.americandatacorp.struts.action.cart.Add"
 validate="true">
 


But if an item is added to the cart from the "website.product.sallysue"
template, and validation fails, the user is returned to the
"website.product.lazydazy" page with the error displayed.

Does anyone have any suggestions, other than having to create a seperate
"addtocart" action for every page?

Thank you for your assistance in advance.

Josh Holtzman

AMERICAN DATA COMPANY
Developing and Supporting your Online Applications

[EMAIL PROTECTED]
Voice: (310) 470-1257
Fax:(310) 362-8454

Sun Microsystems iForce Partner

 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Memory Problem

2004-07-16 Thread Bryan Hunt
This is more for the lists benefit than yours 
I have found the (CPL licensed) eclipse profiling tool to be absolutely 
excellent.

http://eclipsecolorer.sourceforge.net/index_profiler.html
Also as found using google.
http://directory.google.com/Top/Computers/Programming/Languages/Java/Development_Tools/Performance_and_Testing/
--b
Shailender Jain wrote:
Hai,
I have developed my application using Struts 1.1 and Tomcat server.
I am facing a frequent problem of "OutOfMemory" Error.
What i can do to resolve this?
Is there any way by which i can find out which part of the code is
giving this problem.
Regards,
Shailender Jain

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How to Disable "open" button on "File Download" dialogue box....please urgent

2004-07-16 Thread Bryan Hunt
+1
Andrew Hill wrote:
Try here:
http://www.catb.org/~esr/faqs/smart-questions.html
ganesh gadi wrote:
Hi Friends,
i'm very happy to tell u my problems and get answers.
i need a solution how to disable "open" button on "File Download" 
dialog box.i want control on it.
Pls don't say no solution.Bcox i saw that type of
dialogue box...Now i require that feature.
pls let me know the solution asap.

I used the following code to appear "File Download
box"
httpServletResponse.setContentLength((int) f.length));
  httpServletResponse.setContentType(mimeType);
   
httpServletResponse.setHeader("Content-Disposition","attachment;filename="+f.getName()); 

os =httpServletResponse.getOutputStream();
stream = new FileInputStream(f);
bis = new BufferedInputStream(stream);
is = new BufferedInputStream(bis);
int count;
byte buf[] = new byte[4096];
while ((count = is.read(buf)) > -1)
os.write(buf, 0, count);
i'm using tomcat 5.0.19
Struts 1.1
IE 6.0
Windows 2000server
Thanks
Ganesh

   
__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JSF vs Struts

2004-07-18 Thread Bryan Hunt
struts exists and has existed for a long time. jsf is yet another naf 
sun inspired attempt to mimic microsoft.

--b
Martin Gainty wrote:
Sorry for the simplistic question
Starting a new project and trying to get a handle on 2 different approaches
What does Struts have to offer over JSF?
Thanks,
martin
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JSF vs Struts - Development Process Questions

2004-07-19 Thread Bryan Hunt
+1
I am sceptical about this technology but potentially it could be good. 
I'm going to look at JSF in 6 months
or a years time when it is clearer if this is going to be another 
timewaster/project wrecker or something
usefull and useable.

In the meantime I recomend NitroX as well although I don't like the 
companys "patent pending" bs about
their "app x ray" technology

Things like that don't make me particularly enthusiastic as someone who 
has to constantly worry about
software patents when I'm writing a LGPL app/using a linux server.

--b
Mike Duffy wrote:
I have some questions regarding the development process when using JSF, especially in realtion to
HTML designers.  Will everyone on the team need the same advanced design tools?  Will the
designers who are used to tweaking HTML/JSP be restricted to a completely visual drag and drop
environment? Or even worse, will the HTML designers be required to learn JSF mark up code? 

There was another thread a few weeks ago relating to the general development process.  
Like many
others, we have gotten used to the process where the HTML designers mock up a page and 
then a
software engineer transition the page to a JSP and wires it into our system (using 
Struts, and
JSTL).  What is the vision for the development process in JSF?
Also, what is the ultimate vision for JSF?  Do you invision a IDE that can create interfaces on
 

 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JSF vs Struts - Development Process Questions

2004-07-19 Thread Bryan Hunt
JSF with spring and hibernate tutorial.
http://www.javaworld.com/javaworld/jw-07-2004/jw-0719-jsf.html 
<http://www.javaworld.com/javaworld/jw-07-2004/jw-0719-jsf.html>

Guess I should read it before I comment again.
--b
Bryan Hunt wrote:
+1
I am sceptical about this technology but potentially it could be good. 
I'm going to look at JSF in 6 months
or a years time when it is clearer if this is going to be another 
timewaster/project wrecker or something
usefull and useable.

In the meantime I recomend NitroX as well although I don't like the 
companys "patent pending" bs about
their "app x ray" technology

Things like that don't make me particularly enthusiastic as someone 
who has to constantly worry about
software patents when I'm writing a LGPL app/using a linux server.

--b
Mike Duffy wrote:
I have some questions regarding the development process when using 
JSF, especially in realtion to
HTML designers.  Will everyone on the team need the same advanced 
design tools?  Will the
designers who are used to tweaking HTML/JSP be restricted to a 
completely visual drag and drop
environment? Or even worse, will the HTML designers be required to 
learn JSF mark up code?
There was another thread a few weeks ago relating to the general 
development process.  Like many
others, we have gotten used to the process where the HTML designers 
mock up a page and then a
software engineer transition the page to a JSP and wires it into our 
system (using Struts, and
JSTL).  What is the vision for the development process in JSF?

Also, what is the ultimate vision for JSF?  Do you invision a IDE 
that can create interfaces on
 

 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Hibernate

2004-07-27 Thread Bryan Hunt
Hibernate = persistance
Struts = presentation
This question = Hibernate forums http://www.hibernate.org
Your answer = No, the size of tables will not be a problem
--b
Shailender Jain wrote:
Hi,
I have just completed my application using Strut.
I have gone through some of the e-mails talking about Hibernate.
In my further enhancement of my application i want to use some object
persistence mechanism to make my application run faster.
Has anybody used Struts with Hibernate?
Did anyone faced memory problem related to Hibernate.
I have got tables which have got more then 10 million records.
Regards,
Shailender Jain
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


TOTALY OT: Re: HELP Re: Mail Delivery Failure

2004-07-27 Thread Bryan Hunt
Guys you need my email system. I've set up spamassassin and courier imap 
together + a cron job for
training spamassassin. I just dump crud like this in my spamescaped 
folder and that night it trains my
spam filter ... result no more silly notifications.

--b
Spamassassin/ClamAV/Postfix/Courier-IMAP/Procmail/Cron/Linux ROCKS !
Erik Weber wrote:
PUUUEEEZEE
Seriously, should I address this to another address?
Just posting again in case no one saw it.
Thanks,
Erik

Jan Behrens wrote:
Yes, please!
 

-Original Message-
From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Sunday, 
July 25, 2004 8:37 PM
To: Struts Users Mailing List
Subject: HELP Re: Mail Delivery Failure

I've gotten about fifty of these in the last couple of weeks. Can 
someone remove this person from the list?

Thanks,
Erik
[EMAIL PROTECTED] wrote:
  

Delivery Failure Report.
The following message was incorrectly addressed.
Recipient: "[EMAIL PROTECTED]" is unrecognised.
Please contact "[EMAIL PROTECTED]" for further 
assistance

---
Received: from 127.0.0.1 by firewall (VPOP3) with POP3; Sun, 25 Jul 
2004 13:48:24 +0530
Received: from ([209.237.227.199]) for 
<[EMAIL PROTECTED]> with MailEnable Catch-All Filter; 
Sat, 24 Jul 2004 05:03:10 +0530
  

Received: from mail.apache.org ([209.237.227.199]) by 
rahulgoel.com with MailEnable ESMTP; Sat, 24 Jul 2004 05:03:09 +0530
  

Received: (qmail 69741 invoked by uid 500); 23 Jul 2004 
23:32:53 -
  

Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
List-Unsubscribe: 
List-Subscribe: 
List-Help: 
List-Post: 
List-Id: "Struts Users Mailing List" 
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Delivered-To: mailing list [EMAIL PROTECTED]
Received: (qmail 69728 invoked by uid 99); 23 Jul 2004 23:32:53 -
X-ASF-Spam-Status: No, hits=0.1 required=10.0
tests=DNS_FROM_RFC_ABUSE,FORGED_RCVD_HELO
X-Spam-Check-By: apache.org
Received: from [207.69.200.148] (HELO 
granger.mail.mindspring.net) (207.69.200.148)
  

by apache.org (qpsmtpd/0.27.1) with ESMTP; Fri, 23 Jul 
2004 16:32:50 -0700
  

Received: from sdn-ap-003scfairp0408.dialsprint.net 
([63.184.209.154] helo=mindspring.com)
  

by granger.mail.mindspring.net with esmtp (Exim 3.33 #1)
id 1Bo9Wy-0006XJ-00
for [EMAIL PROTECTED]; Fri, 23 Jul 2004 19:32:49 -0400
Message-ID: <[EMAIL PROTECTED]>
Date: Fri, 23 Jul 2004 19:31:46 -0400
From: Erik Weber <[EMAIL PROTECTED]>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) 
Gecko/20040316
  

X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Re: 1.21
References: <[EMAIL PROTECTED]> 
<[EMAIL PROTECTED]>
  

In-Reply-To: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Checked: Checked


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: OT/ Tomcat, Hibernate and MYSQL problem ( byte to blob )

2004-07-30 Thread Bryan Hunt
My app is able to do it no problem, back and forth.
You can get the source code from http://jestate.revoltingdigits.com/
ie.jestate.struts.action.ImageUploadAction
My code is a  mess at the moment but that code is working.
--b
Mark Lowe wrote:
I've had the same thing happen using DBCP and C3PO, I believe its the 
driver rather than the pooling. As I said we've a app thats live, and 
i haven't touched it in months using DBCP.

[OT] subject change.. Have you had any joy with byte[] to blob mapping 
for file uploads with hibernate 2.1.4? I created a custom usertype, 
but i get a npe. 2.0 delbt with life, but things appear to have taken 
a step backwards. (please dont make me go the the scary hibernate 
forum :) )

On 30 Jul 2004, at 11:34, Joe Hertz wrote:
I noticed this behavior with 3.0.14.
This _really_ sounds like this entry in the Hibernate FAQ to me:
http://www.hibernate.org/117.html#A13
I wouldn't use DBCP though as Gavin King is apparently fed up with it,
and built-in support for it is being yanked in the next major version of
Hibernate.
-Original Message-
From: Marco Mistroni [mailto:[EMAIL PROTECTED]
Sent: Friday, July 30, 2004 5:08 AM
To: 'Struts Users Mailing List'
Subject: RE: OT/ Tomcat, Hibernate and MYSQL problem
Hello,
If I remember correct, mysql connector 3.0.11
Regards
marco
-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: 30 July 2004 09:36
To: Struts Users Mailing List
Subject: Re: OT/ Tomcat, Hibernate and MYSQL problem
Marco
What jdbc driver are you using?
They was a shady version 3 behaving like this.
On 30 Jul 2004, at 10:05, Joe Hertz wrote:
Hibernate's internal connection pooling isn't meant for production
because it does things just like that.
Suggest you use c3p0 for the pooling.
From my hibernate.cfg.xml, I only had to add this:

   5
   20
   1800
   50
HTH
-Joe

-Original Message-
From: Marco Mistroni [mailto:[EMAIL PROTECTED]
Sent: Friday, July 30, 2004 3:58 AM
To: 'Struts Users Mailing List'
Subject: OT/ Tomcat, Hibernate and MYSQL problem
Hello,
First of all, I apologize for the off topic issue..
I know this is not the list, but I tried hibernate forums, and
Searched the web with no solution.. hopefully some of u

had the Same
problem and solved it..
I m experiencing problems with Hibernate in tomcat,

talking to mysql.
My situation is that I didn't define any connection pools

in tomcat,
but left it to Hibernate to handle that...
After leaving the application running for 11 hours, I got

following
exception
hi all,
i have a webapp taht uses Hibernate and MYSQL, running on top of
tomcat.
i am letting Hibernate handle the connections to mysql db, since i
have no connection pools defined in tomcat. after running the
application for nearly 9 hours, when i tried to use my app

to connect
to the database i got following exception:
Caused by: net.sf.hibernate.JDBCException: Could not

execute query at
net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1476)
at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:45)
at com.myapp.hibernate.HibernatePersistenceManager.query(Hibernat
ePersisten
ceManager.java:205)
... 31 more
Caused by: java.sql.SQLException: Communication link failure:
java.net.SocketException, underlying cause: Software caused

connection
abort: recv failed
** BEGIN NESTED EXCEPTION **
java.net.SocketException
MESSAGE: Software caused connection abort: recv failed
STACKTRACE:
java.net.SocketException: Software caused connection abort: recv
failed

now i have searched the web and found two possible

alternatives.. one
was to add following problems to hibernate config file.. true
true
true
but this does not work, as ihave added thos eproperties to

hibernate
properties file and i am still getting same exception
then I tried to add ?autoReconnect=true  to JBDC URL, but

that didn't
work either coz I left application running for 11 hours and after
that I got same exception...
can anyone help me out?
THANX in advance and regards
marco

l: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional comm

POSSIBLE OT: localised hashtable custom tag question

2004-08-01 Thread Bryan Hunt
Ok here's the scenario 
My (opensource) application is going to be available in the users
language.
All my struts localisation stuff is working fine, all the labels and
stuff are stored in property files etc.
I am using hibernate for persistance.
JSTL does not allow you to call functions on objects.
It only allows you to access the properties of beans. ie you cannot
do ${object.getDesctription("fr")}
One of my hibernate POJO's house has got a hash of descriptions inside it.
The descriptions are going to be referenced by java.util.Locale objects
The reason is so that the description of the house itself is going to be 
localised.

--
So what I want to do is either create or use a tag which will allow me 
to do the
following.


or



The tag will then access the struts session and see what Locale the 
person is
using.

If there is a description that matches that locale it will be outputted ,
if not the description matching the default locale will be used.
Perhaps I am looking in completely the wrong direction.
If I am being stupid here please feel free to alert me
I've been trying to decide the best approach for about 2 weeks.
I don't really think this belongs in the DAO or hibernate layers
as it is kinda a presentation issue.
Is anyone else working with something similar ? Or do I have to
build up a tag lib from scratch ?
Thanks
Bryan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: very dynamic forms

2004-08-07 Thread Bryan Hunt
The copy I got back turned out ok. Perhaps your mail admin is using 
something like
the anomy sanitizer and it is stripping it out. I sent the message in 
plain text format
and when I examined the message source it was ok and all the tags were 
in it.

I don't think anyone was very interested in the idea anyway :-)
--b
Michael McGrady wrote:
Bryan your html did not appear on the emails.
At 12:09 PM 8/6/2004, you wrote:
Wouldn't it be so cool if you could take something like a graph of
hibernate objects and
have a form dynamically generated for u.
With dhtml or something so that you could populate the whole graph in
one user form ?
For example a House object that had a set of rooms, each room with
it's own description.
The dhtm generated by the form could expand out so that the user 
could add an
arbitrary number of rooms each with their own description.

The whole thing could get filled out in a single http request.
This would greatly reduce the use case for creating a house.
Has anyone ever developed anything like this ?
--b
On Fri, 06 Aug 2004 11:54:01 -0700, Michael McGrady
<[EMAIL PROTECTED]> wrote:
> How do map based forms farm the values from the request?
>
> At 09:13 AM 8/6/2004, you wrote:
> >For me it was very painless and although there aren't lots of big 
"killer"
> >features - there are IMO lots of little ones that make this a good 
upgrade.
> >
> >Niall
> >
> >- Original Message -
> >From: "Dean A. Hoover" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Sent: Friday, August 06, 2004 4:49 PM
> >Subject: Re: very dynamic forms
> >
> >
> > > Thanks. I am looking at Niall's Lazy stuff, but I like your idea.
> > > I will add it to my list of investigations and experiments. I've
> > > written quite a bit to struts 1.1. Is there a downside to 
upgrading?
> > >
> > > Thanks.
> > > Dean
> > >
> > > Kevin A. Palfreyman wrote:
> > >
> > > >Dean,
> > > >I do a similar thing with Struts 1.1, and I use an ordinary 
struts form
> > > >(a subclass of ValidatorActionForm) that has a DynaBean as one 
of its
> > > >fields.  To match this, my DTO also has the same field as a 
DynaBean,
> > > >and we just have to be a bit more clever when we copy 
properties between
> > > >the two.  The "schema" of the DynaBeans are configured entirely
> > > >separately from the rest of the Struts stuff, and should be 
fairly
> > > >easily done from a DB. In an upcoming version, the shape of the
> > > >DynaBeans will be determined from data from a remote corba 
service.
> > > >
> > > >Unfortunately, this is all product specific (closed source), 
so I can't
> > > >just pass it on (it wouldn't be useful to you anyway in its 
current
> > > >form).  But it should encourage you that it can be done.
> > > >
> > > >>From a quick read of his web page, Niall's Lazy stuff looks very
> > > >promising.  If I were starting again, I might have a look to 
see if that
> > > >would fit.
> > > >
> > > >Good luck,
> > > >
> > > > Kev
> > > >
> > > >
> > > >
> > > >>-Original Message-
> > > >>From: Dean A. Hoover [mailto:[EMAIL PROTECTED]
> > > >>Sent: 06 August 2004 15:47
> > > >>To: Struts Users Mailing List
> > > >>Subject: Re: very dynamic forms
> > > >>
> > > >>What I need to do is construct a form that has a variety of
> > > >>text input forms on it that are determined at run-time. I
> > > >>know how to do this in jsp but I need to provide an
> > > >>ActionForm that conforms to that form.
> > > >>I got several useful replies last night and am investigating 
them.
> > > >>
> > > >>Dean
> > > >>
> > > >>Michael McGrady wrote:
> > > >>
> > > >>
> > > >>
> > > >>>That makes sense, but his other comments seem to negate 
that.  He
> > > >>>says, e.g., that "[w]hat would come out of the query would
> > > >>>
> > > >>>
> > > >>be label,
> > > >>
> > > >>
> > > >>>form position, variable name,etc, etc.".  These are things
> > > >>>
> > > >>>
> > > >>that are on
> > > >>
> > > >

struts file upload strange error

2004-05-03 Thread Bryan Hunt
Hi there list,
I have been trying to get the most simple file upload example working with
and have been receiving a strange error message that I just can't seem 
to shake.

Here is the basics of my action form
snip=
public class ImageUploadForm extends ActionForm {
   // - 
Instance Variables
   /** imageFile property */
   protected FormFile file;

   // - Methods

   public ActionErrors validate(
   ActionMapping mapping,
   HttpServletRequest request) {
  
   if(file == null){
   System.out.println("file is empty");
   }
   return null;
   }

   public FormFile getFile() {
   return file;
   }
   public void setFile(FormFile file) {
   this.file = file;
   }
=snip
Here is the basics of the action
snip=
public ActionForward execute(
 blah) {
   System.out.println("at least i managed to get called");
   throw new UnsupportedOperationException("Generated method 
'execute(...)' not implemented.");
   }
=snip

Here is the basics from my struts config file
snip=
   
   
   

   attribute="imageUploadForm"
   input="/form/imageUpload.jsp"
   name="imageUploadForm"
   path="/imageUpload"
   type="ie.jestate.struts.action.ImageUploadAction"
   scope="request"
   validate="true"
   >
   
   
=snip

Here is the jsp file

snip=
<%@ page language="java"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"; prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html"; prefix="html"%>

   
   JSP for imageUploadForm form
   
   
   
   File :
 
   
   
   
   
=snip
And here is the abreviated version of the error message
snip=
*exception*

javax.servlet.ServletException: BeanUtils.populate
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)

org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)*
cause mère*

java.lang.IllegalArgumentException: argument type mismatch
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
=snip
I have tried changing the type to text and the type to String in 
the form and that works but use this FormFile class and everything 
seems to go fubar. 

It never even gets to call the action , instead it generates this error 
message ,
but the setters and getters are right and the variable is public, this 
only happens
with the FormFile. All the struts stuff is in my classpath as is 
commons-fileupload-1.0.jar.

Anyone got any idea what the hell I'm doing wrong ... I'm starting to 
suspect this
could be a struts bug cause everything looks straightforward enough.

--B

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: struts file upload strange error

2004-05-03 Thread Bryan Hunt
Dude, send me your address and I will fed-ex you a cold beer 
!!
I should have thought of that before. Thanks for your help  I've 
just wasted 24 hours
on this If I was running linux I could have ran a packet capture but 
am on crappy
win 2000 box.

--B

Martin Cooper wrote:

It's not a Struts bug, and it's not even a Struts-related problem. Any time
you need to upload files, you must use a POST request with an 'enctype' of
"multipart/form-data". Your form element should look like this:

--
Martin Cooper
"Bryan Hunt" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
 

Hi there list,
I have been trying to get the most simple file upload example working with
and have been receiving a strange error message that I just can't seem
to shake.
Here is the basics of my action form
snip=
public class ImageUploadForm extends ActionForm {
   // - 
Instance Variables
   /** imageFile property */
   protected FormFile file;

   // - Methods

   public ActionErrors validate(
   ActionMapping mapping,
   HttpServletRequest request) {
   if(file == null){
   System.out.println("file is empty");
   }
   return null;
   }
   public FormFile getFile() {
   return file;
   }
   public void setFile(FormFile file) {
   this.file = file;
   }
=snip
Here is the basics of the action
snip=
public ActionForward execute(
 blah) {
   System.out.println("at least i managed to get called");
   throw new UnsupportedOperationException("Generated method
'execute(...)' not implemented.");
   }
=snip
Here is the basics from my struts config file
snip=
   
   
   

   
   
=snip
Here is the jsp file

snip=
<%@ page language="java"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean";
   

prefix="bean"%>
 

<%@ taglib uri="http://jakarta.apache.org/struts/tags-html";
   

prefix="html"%>
 


   
   JSP for imageUploadForm form
   
   
   
   File :
 
   
   
   
   
=snip
And here is the abreviated version of the error message
snip=
*exception*

javax.servlet.ServletException: BeanUtils.populate
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)
   

org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j
ava:821)*
 

cause mère*

java.lang.IllegalArgumentException: argument type mismatch
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
=snip
I have tried changing the type to text and the type to String in
the form and that works but use this FormFile class and everything
seems to go fubar.
It never even gets to call the action , instead it generates this error
message ,
but the setters and getters are right and the variable is public, this
only happens
with the FormFile. All the struts stuff is in my classpath as is
commons-fileupload-1.0.jar.
Anyone got any idea what the hell I'm doing wrong ... I'm starting to
suspect this
could be a struts bug cause everything looks straightforward enough.
--B
   





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: background process

2004-05-03 Thread Bryan Hunt
If it's unix that you are running on you could run a command using 
"nohup" , the java orthodox way
is to use a message driven bean/jms if you are running inside an 
applicaion server such as JBoss.

--B

atta-ur rehman wrote:

Hello Robert,

As far as I know Struts doen't provide anything like this. And actually it
should not!
You'd use Thread class to implement such a task that needs to return
immediately while running in the background.
Hope this helps.

ATTA

- Original Message - 
From: "Wei, Robert (MAN-Corporate)" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Monday, May 03, 2004 1:32 PM
Subject: background process

 

Hi Folks,

I need implement an action which sends back a forward upon request and
   

then,
 

keep working on a batch process till finish in the background. Anyone
familiar with an easy mechanism in struts 1.1? Thanks.
Robert

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] Convert Java Object into XML. Is there a simple tool in Jakarta projects or elsewere

2005-06-20 Thread Bryan Henson
Don't know if you got much response on this, but I would suggest looking at
Castor.

Quoting David Gagnon <[EMAIL PROTECTED]>:

> Hi all,
> 
>  Sorry for this OT.  I'm looking for a way to output an object into XML 
> for debugging purpose.
> I'm pretty sure I can do it myself with beanUtils and xml-api ..but I 
> hate reinventing the whell and pretty sure there is a simple tool 
> somewhere.
> 
> Thanks for your help!
> 
> Have a nice week-end
> /David
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cancel button and security

2005-07-15 Thread Bryan Hanks
You are absolutely correct Przemyslaw. Realizing that
form validation is cursory at best and easily bypassed
at worst is a good approach.

One of the hard-learned lessons that (it seems) few
developers get is that _ALL_ data received from the
user is suspect, not only in content but in type.  For
example, code that suffers from SQL injection
vulnerabilities is written by people who don't
understand this concept.

I still use the validator as a first line of defense,
because it is quick and (relatively) easy to implement
and the response time is quicker for the user, however
all data gets the final validation check by the
model/business logic layer (with the appropriate
exception thrown if invalid).

Cheers,
Bryan Hanks


-- Original Message --

From:   "Przemyslaw Lupinski" <[EMAIL PROTECTED]>
Subject:Cancel button and security
Date:   Fri, 15 Jul 2005 08:01:15 +0200

Hello,

Many developers use tag  to perform
action without 
validation
(and for other reasons). It's usefull but it can be
danger because of
security. If we don't serve cancel button in every
Action or BaseAction 
then
it's possible to perform some actions without
validation.
How?
It's very simple. Just putting parameter in url
org.apache.struts.taglib.html.CANCEL=1 or adding form
element
.

I've tried this trick in many sites written in Struts.

I advise to remember about this problem if we don't
have a validation 
in
business layer.

--
Przemyslaw Lupinski

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem about first page.

2006-02-20 Thread Bryan LaPlante
Could you make you welcome page different than login.jsp and have it forward
to login.jsp? If login is your front door, maybe all of your welcome pages
could forward to it.

- Original Message -
From: "Joey Watson" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Monday, February 20, 2006 12:14 PM
Subject: Problem about first page.


> Hi everybody.
>
> I want to write a login module.
> login.jsp-display userId , userName, password, company
> infomation (a drop down box)
>  LoginAction.java check login information
>  LoginForm.java  --
> some command class.  one of them will load company information from
db.
>
> When user open web site. the login page will be displayed. user need
> to fill name, id, password and select a company from a drop down box.
> So I need to load company list from before login page displayed. I
> want to do this in Action class (it will call a command class). but my
> problem is login.jsp is defined as in web.xml .
> So before it is been created . onliy ActionForm would be create, the
> Action Class doesn't be created. and I don't want to do the load
> comany actions in ActionForm. So my question is how could I can make
> Action class to be create and do load actions before the login.jsp be
> displayed.
>
> Thanks..
> Joey
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem about first page.

2006-02-20 Thread Bryan LaPlante
here you go.
http://java.sun.com/products/jsp/tags/11/syntaxref11.fm9.html

- Original Message -
From: "Joey Watson" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Monday, February 20, 2006 12:38 PM
Subject: Re: Problem about first page.


> yes. I think it is a good idea. but I don't know to do it. I can make
> a jsp page as welcome page, but how could I make it can forward to
> Login.jsp automatically. user don't need to click a link or a button.
>
> On 2/21/06, Bryan LaPlante <[EMAIL PROTECTED]> wrote:
> > Could you make you welcome page different than login.jsp and have it
forward
> > to login.jsp? If login is your front door, maybe all of your welcome
pages
> > could forward to it.
> >
> > - Original Message -
> > From: "Joey Watson" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" 
> > Sent: Monday, February 20, 2006 12:14 PM
> > Subject: Problem about first page.
> >
> >
> > > Hi everybody.
> > >
> > > I want to write a login module.
> > > login.jsp-display userId , userName, password, company
> > > infomation (a drop down box)
> > >  LoginAction.java check login information
> > >  LoginForm.java  --
> > > some command class.  one of them will load company information
from
> > db.
> > >
> > > When user open web site. the login page will be displayed. user need
> > > to fill name, id, password and select a company from a drop down box.
> > > So I need to load company list from before login page displayed. I
> > > want to do this in Action class (it will call a command class). but my
> > > problem is login.jsp is defined as in web.xml .
> > > So before it is been created . onliy ActionForm would be create, the
> > > Action Class doesn't be created. and I don't want to do the load
> > > comany actions in ActionForm. So my question is how could I can make
> > > Action class to be create and do load actions before the login.jsp be
> > > displayed.
> > >
> > > Thanks..
> > > Joey
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Hosting problem , the Host provider tomcat does not understand .do

2006-02-20 Thread Bryan LaPlante
Have a look at this example web.xml file. You will see what you need in the
*.dohttp://www.javaranch.com/newsletter/Mar2002/l
isting1.htmlBryan LaPlante- Original Message -
From: "Legolas Woodland" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Monday, February 20, 2006 4:20 PM
Subject: Hosting problem , the Host provider tomcat does not understand .do


> Hi
> Thank you for reading my post.
> I get a hosting package from a provider ,
> Now all jsp files works but when i press some buttons or links that lead
> to a .do (Action)
> it return *error 404  *file not found
> is there any other configuration that i should do in my hosting package ?
> it is on linux and tomcat 5.5.9
>
> Thanks
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: passing objects from one request to another

2006-02-25 Thread Bryan LaPlante
my output stream has to be controlled by my action class. It is an ajax
integration for http://www.xoscript.org
where you can invoke methods on a POJO class and in turn that class can
include the output of another action as it's return value.

- Original Message -
From: "Rick Reumann" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Saturday, February 25, 2006 12:11 PM
Subject: Re: passing objects from one request to another


> [EMAIL PROTECTED] wrote:
> > Rick,
> >
> > It sounds like you are having a problem that I solved last week.
>
> Actually, I'm not the one having the problem. I was just replying to the
> initial post, that I'd use the Session for stuff that needs to accessed
> across multiple requests.
>
> > I had a situation where I needed to include the result of other actions
in the
> > middle of my ActionClass so I implement HttpServletRequestWrapper and
> > HttpServletResponseWrapper so that I could provide RequestDispatcher
with a
> > place to store and retrieve variables from the request scope. In my
action
> > class I swapped the real request and response for the wrapped ones and
copied
> > all the request.getParmeters() and so on into a Hashtable in my wrapper
> > classes. When I called dispatch.include(req,res) the new action.do was
able to
> > function as if I forwarded control to the new action class. In order to
> > retrieve the output buffer coming back I created one in my response
wrapper
> > using a String buffer so that I could get at with the toString method.
>
> No offense, but that sounds like a case where trying to be creative just
> made things way more complicated than they need to be. If you need
> something in other Action classes across multiple requests why not just
> stuff some object into the Session instead of going through all these
> hoops? Why in the world would you need to create wrapper classes and
> push the storage of these objects up into the RequestDispatcher? What
> does this gain you versus just storing some object in the Session?
>
> --
> Rick
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Java Hosting Providers, yes, I know it's been brought up before on the list.

2006-03-02 Thread Bryan LaPlante
I feel your pain guys. I found a provider that made me wander why more of
them don't do this. http://www.eapps.com you get a virtual machine running
Linux for each domain and one of the most comprehensive control panels I
have ever used. 20 bucks a month gives you a fair amount of features and
space.

My 2 cents

Bryan LaPlante

- Original Message -
From: "Frank W. Zammetti" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Wednesday, March 01, 2006 11:28 PM
Subject: Re: [OT] Java Hosting Providers, yes, I know it's been brought up
before on the list.


> While I agree they do this (it happened to me once), that is a risk you
> run in ANY shared hosting environment... an admin has to make a quick
> decision that will keep the other people sharing your box running, and
> many times the easiest solution (and arguably best) is to shut down the
> offending service, or app, or even domain, and then try and resolve it
> with the person who owns the supposed offender.  They seem to be pretty
> good at least of informing you in a timely fashion that they had to shut
> X or Y down on you.  At least, the one time it happened to me this was
true.
>
> I have been with Lunarpages for I think close to 3 years now, something
> like that, and it's been a fantastic experience overall.  I personally
> WOULD recommend them... good price for what you get, and they are quite
> responsive (in my experience) to support requests, and for the most part
> let you do what you want (yes, there are some "not allowed" items to be
> aware of as Wendy points out).  But, I seriously doubt they are checking
> everyones' domains, they will only know if a problem arises, so if your
> careful I suspect you can skirt that rule just a bit :)
>
> Frank
>
> Wendy Smoak wrote:
> > On 3/1/06, Rick Reumann <[EMAIL PROTECTED]> wrote:
> >
> > Of my mailing list searching, this hosting provider seems to hold the
most
> >> promise:
> >>
> >> http://www.lunarpages.com/plan2.php
> >
> >
> > I wouldn't... LunarPages has a habit of just disabling access to
anything
> > that they suspect is causing a problem.  Sometimes they have a
legitimate
> > point, sometimes they just say you're "using too many resources" or
> > "affecting other customers on the server".
> >
> > And look at the things that they say are not allowed, including JSF and
> > Spring:
> > http://helpdesk.lunarpages.com/faq.php?do=article&articleid=120
> >
> > --
> > Wendy
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: of a header gives an SSL exception?

2005-02-23 Thread Bryan and Angela
If you look at the exception, it is saying that you are having a PKI 
configuration issue.  It looks like you do not have your Certificate 
Authority (CA) configured.  Your error appears similar to this error: 
http://forum.java.sun.com/thread.jspa?threadID=573918&tstart=60

You need to have some understanding of your PKI setup to fix the issue.  I 
didn't see what version of Tomcat you are using, but here is a guide: 
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/ssl-howto.html

Hope that helps.
Bryan

Simple. But when it loads as part of my 'ui' app I get this:
javax.servlet.ServletException: Exception opening resource 
https://1.2.3.4:8443/ui/includes/header.jsp: 
javax.net.ssl.SSLHandshakeException: 
sun.security.validator.ValidatorException: PKIX path building failed: 
sun.security.provider.certpath.SunCertPathBuilderException: unable to 
find valid certification path to requested target

I can see that SSL is involved, but I was able to get past the login 
pages etc so I don't understand what Struts/Tomcat is trying to tell me 
here; any advice?

If it helps, I can load https://1.2.3.4:8443/ui/includes/header.jsp 
manually just fine.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: XDoclet

2005-02-01 Thread bryan ( [EMAIL PROTECTED] )
my personal opinion

XDoclet is on the way out and 1.5 anotations will replace it. 

I never liked it anyway. 

It does not work in a pleasant fashion with struts config files.

Their is no real advantage in learning it as ejb and hibernate will
both use anotations.

I don't know why someone would generate their spring config with xdoclet.

--b


On Sun, 30 Jan 2005 13:11:01 -, Marco Mistroni
<[EMAIL PROTECTED]> wrote:
> Hello,
> Personal opinion... go for XDoclet, because you can reuse it
> also for
> Other purposes in same webapp (EJB, Hibernate, Spring etc..)
> 
> Regards
> marco
> 
> -Original Message-
> From: Tim Christopher [mailto:[EMAIL PROTECTED] 
> 
> Sent: 30 January 2005 03:28
> To: Struts Users Mailing List
> Subject: XDoclet
> 
> Hi,
> 
> What does everyone think of using XDoclet to build Struts / Tiles /
> Validator configuration files?
> 
> Is it likely to make life seem like it's worth living, or is a few
> hours spent trying to learn it going to drive me mad? :o)
> 
> Cheers for your feedback!
> 
> Tim Christopher
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
http://www.revoltingdigits.com
https://jestate.dev.java.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]