RE: sslext

2005-12-06 Thread Daniel Perry
> If I use the action mapping and forward to a full url specifying the
> type [http, https], then I have to do a redirect, and then the jsp
> page shows up in the url, and that is not good. So I hate that idea.

Why does the jsp have to show up in the url?  Why not redirect to a full
struts url, eg, http://foo.com/bar/action1.do redirects to
https://foo.com/bar/action2.do and action 2 forwards to a jsp.

I had this same issue last week - log on page had to be ssl, but rest of
site not.  So, i just make the link to login.do a full link inc https and
sessionid, and make the login success forward redirect to the non ssl full
link.  Worked a treat.

The biggest problem i came accross was that the site runs on www.foo.com,
but ssl is on foo.com, and tomcat doesnt seem to let you set a domain for
session cookies (PLEASE TELL ME IF I AM WRONG!!!), so i had to bodge it: i
added a servlet filter that checks for a session, and if it's new, sets an
extra cookie for the base domain.


> Then I found the sslext at sourceforge ... but cannot find any
> information on how this works, how to configure, etc. And the mailing
> lists look like a ghost town.

Never used it so i cant comment.

Daniel.


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



RE: {Spam?} RE: [OT]Terrific intro to JSF

2005-08-10 Thread Daniel Perry
I am positive that they used to have 'pdf' versions of all the
developerworks articles.  The developerworks newsletters have some quite
interesting stuff in them (and most of it isnt IBM specific!)

Daniel.

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: 10 August 2005 14:10
> To: Struts Users Mailing List
> Subject: Re: {Spam?} RE: [OT]Terrific intro to JSF
>
>
> "Pilgrim, Peter" <[EMAIL PROTECTED]> wrote on 08/10/2005 08:19:39 AM:
>
> > I was trying to print out the above documents so I could read
> > them on the train last night. I cant believe that IBM Developer
> > does not have a "Printer Friendly" link for its online stuff.
> > I could be wrong!
>
> Exactly!! Their "Print" link simply prints the page.. (:( In fact
> I almost
> wrote as much in their "Discuss" forum.. But it was such a nicely
> done set
> of articles I didn't have the heart to complain..:)
> Geeta
>


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



RE: [OT]Terrific intro to JSF

2005-08-10 Thread Daniel Perry
> Interesting idea.  Let's do a bit of mental exploration of what
> actually happens to see how practical it is.  When does a Struts
> custom tag actually execute?  Only when the page is being rendered, as
> the various HTML elements get produced.  Now, when does (server side)
> validation need to happen?  On the subsequent form submit (the actual
> call to invoke the server side validator is one of the things that
> RequestProcessor does).
>
> Hmm . there's no "tag" there to do the validation for me 
> maybe I need a component model to encapsulate both the rendering and
> the validating behavior ... wonder where I can find one of those?  :-)

Thought of that.  Then i thought... why not just stick the validationion
requirements into the session when you render the tags, then they'd
magically be there when you need to validate it!  You also know what
properties need to be provided by the proxy bean.

There's one more bonus of this - it wouldnt break backwards compatibility,
which seems to be a requirement for struts development :(

My reasoning behind all this stuff, is i HATE all these xml config files.
Or more accurately, I like xml config files, but I hate moving between X
different xml files.  It might suit IDEs, but it aint right for humans!
You've got a jsp page with  - why cant i put validation, type
(for dynamic bean handling), etc there, rather than looking at various
different xml files.

>
> >
> > Then you eliminate actionforms as all the validation info is in
> the form,
> > and can be automcatically done for you, and then use can use
> dynamic proxies
> > to provide properly typed javabeans as output from a form, and use the
> > models DTOs to put data into forms!
>
> You just described the most common design pattern for using JSF :-).

One of these days i will find some time to look at jsf/shale properly.  Been
saying that for quite a while, just never got round to it!

Daniel.


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



RE: [OT]Terrific intro to JSF

2005-08-09 Thread Daniel Perry
> -Original Message-
> From: Craig McClanahan [mailto:[EMAIL PROTECTED]
> PS:  It's pretty straightforward to build turbo versions of the Struts
> HTML tags that have many of the same features described above.  But
> that doesn't begin to touch the behavior at input time, where the
> component itself deals with details like converters, and completely
> eliminates the need for a form bean.

Now it's funny... i was thinking about this the other day.

Why not add to the struts html tags to take validation information? And
while you're at it, why not add typing like type="date" or type="int" or
type="string" to text fields.

Then you eliminate actionforms as all the validation info is in the form,
and can be automcatically done for you, and then use can use dynamic proxies
to provide properly typed javabeans as output from a form, and use the
models DTOs to put data into forms!

Daniel.


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



RE: [OT] DTOs are evil

2005-08-05 Thread Daniel Perry
eh? you can do that without the getter/setter in java as MyProperty is
public.

Daniel.


> -Original Message-
> From: Larry Meadors [mailto:[EMAIL PROTECTED]
> Sent: 05 August 2005 14:18
> To: Struts Users Mailing List
> Subject: Re: [OT] DTOs are evil
>
>
> You don't see it?!? Have you looked?
>
> As a self-professed Java bigot, I will readily admit that C# has a
> *way* better sytax for defining and using properties that I wish Java
> would implement (or even better - improve upon).
>
> public string MyProperty {
>   get { return myProperty; }
>   set { myProperty = value; }
> }
>
> Now, instead of:
>
> someValue = foo.getMyProperty();
> foo.setMyProperty(someValue);
>
> ...I can do this instead:
>
> someValue = foo.MyProperty;
> foo.MyProperty = someValue;
>
> IMO, the second form is MUCH clearer, and provides all of the benefits
> of a get/set pair.
>
> Larry
>
>
> On 8/5/05, Leon Rosenberg <[EMAIL PROTECTED]> wrote:
> >
> > Sorry, I don't see it.
> >
> > Example:
> > private String mail;
> > public String getMail(){
> > return mail;
> > }
> >
> > public void setMail(String aMail){
> > mail = aMail;
> > }
> >
>
> -
> 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: DTOs are evil

2005-08-05 Thread Daniel Perry
> employeeDAO.updateEmployee( employee );
>
>  From what I recall the real OO way would be...
>
> employee.update();
>
> and employee takes care of updating itself.
>

I made a BaseBO using OJB, which has the create, update, softDelete,
hardDelete, findById, findByCriteria methods.  It also has an id and deleted
fields.

Any other BOs extend it, and inherit the behaviours.  The only tie to OJB in
any class other than BaseBO is the Criteria and QueryByCriteria classes
which are used for any queries other than findById, which i cant see a way
round.

The only downside is writing the mappings for each class (though this can be
simplified using XDoclet).

It works wonderfully, and saved lots of coding.

Daniel.


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



RE: HTML labels and Struts

2005-08-02 Thread Daniel Perry
I don't think it's a bug, as anchors should never be sent to the server, (I
believe the should never be sent in a redirect either).  I remember doing
some experiments with this.

If you request a page: blah.do#someLabel, #someLabel is never sent in the
request.

If you forward on the server, then it will still use the anchor from the
original request (obvious as the browser knows nothing about the forward).

If you redirect on the server, then the browser *may* loose it.

I tried adding an anchor on the server in the middle of a redirect:

Browser requests blah.do, server redirected to other.do#anchor.  I cant
remember which way round it was, but I think:
IE makes a subsequent request for other.do#anchor and obviously struts
grumbles as this isn't a valid url.
Firefox makes a subsequent request for other.do and uses the anchor as
expected.

Daniel.

> -Original Message-
> From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
> Sent: 02 August 2005 13:41
> To: Struts Users Mailing List
> Subject: Re: HTML labels and Struts
>
>
> Not sure :)  I personally would consider it a bug :)
>
> I made a Wiki entry for this yesterday by the way, so at least there is
> documentation of it now.  I agree though that it shouldn't be a big
> change and would be nice to "fix" it (or, alter the feature, depending
> on what it is!).
>
> Want to throw a patch up Laurie?  If not, I think I could squeeze in
> time to write the 3-5 lines of code it'd likely be :)
>
> Frank
>
> Laurie Harper wrote:
> > Ouch, is that considered a feature or a bug? :-) It probably
> wouldn't be
> > hard to change Struts to ignore the anchor if such a change were
> > acceptable.
> >
> > L.
> >
> > Frank W. Zammetti wrote:
> >
> >> This is probably ripe for a Wiki entry :)
> >>
> >> As you found out, Struts can't find an Action mapping with an anchor
> >> added
> >> to it... it's trying to find, literally, an ActionMapping named
> >> "someAction.do#someLabel".  You might, I suppose, be able to make that
> >> literally your mapping path, I've never tried that, but I don't think
> >> that's what you'd want to do even if it works.
> >>
> >> The "typical" solution to this is a little bit of scripting on
> your page
> >> like so:
> >>
> >> 
> >> 
> >>   function jumpToAnchor() {
> >> <% if (request.getAttribute("hash") != null) { %>
> >>   location.hash = "<%=request.getAttribute("hash")%>";
> >> <% } %>
> >>   }
> >> 
> >> 
> >> 
> >>
> >> Then, instead of adding the anchor name to the forward you are
> >> requesting,
> >> you add an attribute in your Action named "hash" to the request just
> >> before you return the forward, with a value of the name of the
> anchor you
> >> want to jump to.
> >>
> >
> >
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.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]



RE: JSF is the beginning of the end of Struts !!!

2005-07-27 Thread Daniel Perry
> > 3.  PHP.  I've done some PHP over the last couple years.
>
> PHP and Struts are not antithetical. There have been several ports of
> Struts to PHP, as well as Struts-like frameworks, such as Maverick and
> FuseBox.
>
> I'm not working in PHP myself, but if I were, you can bet I'd be
> porting both Struts and iBATIS.
>
> What we call Struts is not about Java, it's about an architecture that
> pushes logic away from server pages and into a control layer that we
> can configure via XML.
>
> -Ted.

That is all true, but you'll find most php sites dont use anything that
complicated.  And if they did, hosting would be more expensive.  e.g. phpBB
is banned from most cheap shared hosting - it puts too much strain on
php/mysql in a high volume server.

Also, java has been engineered to push things into layers.  Php has not.
Also, java is OO.  Php is not (or is, but badly!).  I wrote an OO system a
few years back in php, and it was a nightmare.  The most annoying thing is
that assignment/method parameters clones objects - it doesn't reference it.
You can get round that by adding & in the right places. Only one nice OO
thing is the serialize funtion.

So i would say that things like iBatis and struts fit nicely into the java
world.  Give php-struts to the average php developer (i know lots of them)
and theyd smile, and politely tell you where you can stick it.

Daniel.


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



RE: JSF is the beginning of the end of Struts !!!

2005-07-27 Thread Daniel Perry
This was the point i was making early on.

PHP is cheaper than java - in almost all ways.

Hosting: You can host php sites for a couple of pounds a month. Can you do
that with java?

Development: it's much easier to learn to make a PHP+Mysql databased web
site. Therefore programmers are cheaper.  Projects are cheaper. Therefore
more web design companies use php rather than java.

Servers: php has minimal overheads. It doesnt use a lot of memory, and it's
pretty efficient at executing pages (in mod_php mode rather than cgi).  It's
probably not as good as already-compiled jsps, but similar.  Java has huge
memory overheads. e.g. on one of our servers, httpd (inc php) is using 10MB,
Tomcat is using 140MB.  Tomcat has 4 apps (all small), php 38.

Most of our php apps are hosted on one server.  Most of our java apps have a
server each, and are on various companies intranets.  But most of our java
apps are much larger than the php ones - and a lot more maintainable!

Dont get me wrong. I much prefer writing systems using Struts, and push for
it.  But, we wont be doing all our sites in java anytime soon, as it's
cheaper to make small datbased sites in php.

Daniel.

> -Original Message-
> From: Tamas Szabo [mailto:[EMAIL PROTECTED]
> Sent: 27 July 2005 07:16
> To: Struts Users Mailing List
> Subject: Re: JSF is the beginning of the end of Struts !!!
>
>
> I wouldn't bet on PHP being more popular than Java webapps.
>
> I think that there will be more smaller Java webapps if there were much
> support for them at web hosting companies.
> I know several cases when Java webapp programmers, had to use PHP to
> make some smaller webapps for someone because most web hosting companies
> offer PHP support but they have no
> Java webcontainers installed.
>
> Tamas
>
>
>
> Yan Hu wrote:
>
> >Xu:
> >One of the reasons why you see a lot of PHP apps is that there
> are always a lot more small apps
> >than large scale ones. I can not imagin you program a large
> scale site using PHP. If you are an OO
> >guy, I could hardly imagin you even would like PHP(mixing all
> server side code with html code).
> >There are a lot of java intranet applications you will never be
> able to access. PHP has its niche
> >in the small app domain. It is fine. But it will never be at the
> same level as Java. I do not
> >understand why you think PHP is more popular than Java. Let me
> ask you one simple question. Why
> >are there so many more java jobs than PHP jobs? Anyone will tell
> you it is because there is a lot
> >more demand for java. So you get the idea. With the advent of
> JSF, Java will be even sexier. I
> >have long wished for something like asp.net code behind in C#.
> Now we have JSF code behind in
> >Java. If asp.net can be a big success, why can't JSF?
> >
> >
> >
> >-
> >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: JSF is the beginning of the end of Struts !!!

2005-07-26 Thread Daniel Perry
Sorry for the OT postings.

My point was that you cant compare usage of PHP with Struts.

The number of Struts sites (or even java sites) will never overtake the
number of PHP sites for the reasons i pointed out (although... zend are
doing their best to kill off php by trying to move it into the enterprise
arena and tying it with java).  But for those same reasons, comparing the
two is useless.

As for JSF... It seems like a nice idea, but i havnt fully got my head round
it.  I cant see it killing off struts in the short term (just look at daily
rate of postings on this list!!!) I do like the idea of replacing struts
html tags with JSF.  I certainly think JSTL/EL are nicer than the logic
tags.

I now have a dilema... I'm just about to start on another project.  What
technologies do i use?

I guess i'll probably stick with struts.  Though i may dabble with JSF a
bit.

Can anyone recommend any good resources? Sure a google search provides tons
of information... but which is any good?

Daniel.

> -Original Message-
> From: Mark Benussi [mailto:[EMAIL PROTECTED]
> Sent: 26 July 2005 10:38
> To: 'Struts Users Mailing List'
> Subject: RE: Re: JSF is the beginning of the end of Struts !!!
>
>
> No offence but this is a daft conversation that I have seen too
> many times.
> Say Struts is dead to a certain Blue vendor who has just releases their
> latest Portal server which is built on Struts and they may smile wryly.
>
> The number of sites out there running Struts is huge and the number of
> products that rely on it as also fairly big. Anyone in the
> telecoms industry
> will know how even the latest version of Broadvision uses Struts.
>
> I have attended some JSF talks, and the technology seems powerful but I am
> not sold. I came to server side programming from DHTML and like the way
> struts still lets you work at that end with large freedom but
> also a lot of
> powerful taglibs.
>
> If Struts 'dies' I will take it on personally and do whatever it
> needs that
> it seems to be lacking.
>
> I have never done any PHP so I can't comment, but agree with the previous
> comments in so far as Struts/Java/Servlets is for large applications. I
> would not build a suite of actions and database pooling for my old mans
> plane photos web site.
>
> As for this server requirements, yes Java (Tomcat whatever else) needs
> server resources, but once its loaded it flies as its threaded. Am I right
> in thinking PHP is not threaded i.e. holding F5 on a PHP page can
> cause some
> processing issues? Anyway no offence but I don't want to know the answer.
> This is a Struts list and I accept JSF is vaguely relevant but I am not
> going to utter another sentence about PHP.
>
> -Original Message-
> From: Daniel Perry [mailto:[EMAIL PROTECTED]
> Sent: 26 July 2005 09:46
> To: Struts Users Mailing List
> Subject: RE: Re: JSF is the beginning of the end of Struts !!!
>
> PHP / (origional) JSP are the same stuff really.  Scripted web page.  Main
> difference is php not OO (well, the api isnt), and php doesnt require any
> declarations/typing - which makes it nicer for less able programmers.
>
> But the big difference is server requirements.  JSP uses a lot more server
> resources.  PHP can be made available on the cheapest mass virtual hosting
> servers.  JSP (let alone full java web apps) cant.
>
> Also, pretty much anyone with any programming skills can pick up php in a
> couple of days. Same cant be said for e.g. Struts+Java+JSP+Servlet etc.
>
> This is why i am forced to use php for most sites (ok, so i
> normally pass it
> on to someone else here), and i tend to use struts for larger sites/apps
> that are going to be hosted internally/on dedicated servers.
>
> Daniel.
>
> > -Original Message-
> > From: John Henry Xu [mailto:[EMAIL PROTECTED]
> > Sent: 26 July 2005 04:17
> > To: Struts Users Mailing List
> > Subject: Re: Re: JSF is the beginning of the end of Struts !!!
> >
> >
> > JSF has been there for a while. We have to see how it does in
> > real applications.
> >
> > EJB has been there for many years, but its complexity of
> > configuration (at least before mature tools were developed) kept
> > many J2EE projects expensive and over budgets (bad ROI examples).
> >
> > Thus we have so many frameworks in Java. Sun is to be blamed for
> > always providing UNPROVEN technologies for java. In many cases,
> > following sun too closely is not wise.
> >
> > PHP was great but I hope java can catch up in real application.
> >
> > John H. Xu
> >
> >
> > http://www.usanalyst.com
> >
> > http://www.GetusJobs.com (The largest free j

RE: Re: JSF is the beginning of the end of Struts !!!

2005-07-26 Thread Daniel Perry
PHP / (origional) JSP are the same stuff really.  Scripted web page.  Main
difference is php not OO (well, the api isnt), and php doesnt require any
declarations/typing - which makes it nicer for less able programmers.

But the big difference is server requirements.  JSP uses a lot more server
resources.  PHP can be made available on the cheapest mass virtual hosting
servers.  JSP (let alone full java web apps) cant.

Also, pretty much anyone with any programming skills can pick up php in a
couple of days. Same cant be said for e.g. Struts+Java+JSP+Servlet etc.

This is why i am forced to use php for most sites (ok, so i normally pass it
on to someone else here), and i tend to use struts for larger sites/apps
that are going to be hosted internally/on dedicated servers.

Daniel.

> -Original Message-
> From: John Henry Xu [mailto:[EMAIL PROTECTED]
> Sent: 26 July 2005 04:17
> To: Struts Users Mailing List
> Subject: Re: Re: JSF is the beginning of the end of Struts !!!
>
>
> JSF has been there for a while. We have to see how it does in
> real applications.
>
> EJB has been there for many years, but its complexity of
> configuration (at least before mature tools were developed) kept
> many J2EE projects expensive and over budgets (bad ROI examples).
>
> Thus we have so many frameworks in Java. Sun is to be blamed for
> always providing UNPROVEN technologies for java. In many cases,
> following sun too closely is not wise.
>
> PHP was great but I hope java can catch up in real application.
>
> John H. Xu
>
>
> http://www.usanalyst.com
>
> http://www.GetusJobs.com (The largest free job portal in North America)
>
>
>
>   - Original Message -
>   From: netsql
>   To: user@struts.apache.org
>   Subject: Re: JSF is the beginning of the end of Struts !!!
>   Date: Mon, 25 Jul 2005 20:13:05 -0500
>
>   >
>   > John Public wrote:
>   > > After just finishing my JSF class, I can confidently
>   > > confirm that JSF will eventually lead to Struts
>   > > becoming OBSOLETE.
>   >
>   > :-) Enhydra and Torque would say that too circa 2001.
>   > Put up a site and lets see it.
>   >
>   > > Let's all get
>   > > behind JSF before MS takes over the web.
>   >
>   > Nothing wrong w/ C# IMO.
>   > I think PHP is "best(fast and cheap, lowest risk, most roi)" for
>   > "genric" server side rendering applications. (But then... I think
>   > the future is client side rendering )
>   > If JSF(or EJB) fails, it won't be becuase somone did not "get
>   behind it".
>   >
>   > Competition should give us best answer, and I am all for using
>   > better tech. Every few years I'd like a new tech please.
>   >
>   >
>   > -- .V
>   >
>   > People are conversing... without posting their email or filling up
>   their
>   > mail box.
>   > roomity.com
>   >
>   > No sign up to read or search this Rich Internet App.
>   >
>   >
>   >
>   -
>   > To unsubscribe, e-mail: [EMAIL PROTECTED]
>   > For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
>
> Jack H. Xu
> Technology columnist and editor
>
> http://www.usanalyst.com
>
> http://www.getusjobs.com (The largest free job portal in North America)
>
> --
> ___
> Sign-up for Ads Free at Mail.com
> http://promo.mail.com/adsfreejump.htm
>
>


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



RE: [OT] saving stats from session when session destroyed

2005-07-25 Thread Daniel Perry
Now I knew there was something like that!  Turns out I was looking at
servlet 2.2 specs and that only had HttpSessionBindingListener!!! Duh!

Thanks

Daniel.


> -Original Message-
> From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
> Sent: 25 July 2005 17:59
> To: Struts Users Mailing List
> Cc: Struts User List
> Subject: Re: [OT] saving stats from session when session destroyed
>
>
> SessionListener is what you want.
>
> Here's an example from one of my apps (condensed for space)... it is used
> to delete a temporary PDF that may have been generated for the user when
> they log off:
>
> import company.app.User;
> import javax.servlet.http.HttpSession;
> import javax.servlet.http.HttpSessionEvent;
> import javax.servlet.http.HttpSessionListener;
> public class MySessionListener implements HttpSessionListener {
>   public synchronized void sessionCreated(HttpSessionEvent se) {
>   }
>   public synchronized void sessionDestroyed(HttpSessionEvent se) {
> HttpSession sess = se.getSession();
> User user = (User)sess.getAttribute("user");
> String userID = user.getUserID();
> AppHelpers.deletePDF(userID);
>   }
> }
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
>
> On Mon, July 25, 2005 12:47 pm, Daniel Perry said:
> > I have an app where i need to record key user stats, which are
> updated by
> > certain struts actions.  The problem is that i want to keep these in the
> > session, and then only save them to the database when the session is
> > either
> > invalidated through logout, or when it times out and is removed by the
> > server.  It doesnt matter if some stats are lost through crashes, server
> > restarts, etc.
> >
> > I cant see an obvious way to find out when sessions are destroyed.
> >
> > Would it be possible to have a class called stats, which is put into the
> > session, and override the finalize method, so that this writes to the
> > database the calls super.finalize?  Would this work?
> >
> > If i make this serializable, what happens if the server decides
> to remove
> > this session after writing to disk - does it just delete the
> file, or does
> > it reserialize it and call finalize?
> >
> > Thanks,
> >
> > Daniel.
> >
> >
> > -
> > 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] saving stats from session when session destroyed

2005-07-25 Thread Daniel Perry
I have an app where i need to record key user stats, which are updated by
certain struts actions.  The problem is that i want to keep these in the
session, and then only save them to the database when the session is either
invalidated through logout, or when it times out and is removed by the
server.  It doesnt matter if some stats are lost through crashes, server
restarts, etc.

I cant see an obvious way to find out when sessions are destroyed.

Would it be possible to have a class called stats, which is put into the
session, and override the finalize method, so that this writes to the
database the calls super.finalize?  Would this work?

If i make this serializable, what happens if the server decides to remove
this session after writing to disk - does it just delete the file, or does
it reserialize it and call finalize?

Thanks,

Daniel.


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



RE: [OT] Hibernate vs. iBatis vs. POJO

2005-07-22 Thread Daniel Perry
> Again, that's a situation where you are involving consultants.
> Consultants
> are expected to know the technology and not learn it on their customers'
> time.  When a company has its own IT staff, there are rarely opportunities
> for somebody else to underbid them.

Really? the majority of the work i do is for companies/organisations that
have their own IT department.

An example: the NHS
They probably have more IT staff than most large software dev companies.  If
they were a bit more organised/centralised they could save themselves a
packet, and stop using external companies (which rip them off then get the
work done in india on the cheap - note we do neither of these!).

Daniel.


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



RE: [OT] Re: Fired???? was...Re: Struts Books Recommendations [OT]

2005-07-08 Thread Daniel Perry
"requires theoretical and practical application of a body of specialized
knowledge along with at least a bachelor’s degree"

**or**

"fashion model of distinguished merit and ability"

Just think where you could get if you're a model with a degree!

i love some of the obscure things in american laws/rules. (not that i'm
saying british rules are any better)

> -Original Message-
> From: Simon Chappell [mailto:[EMAIL PROTECTED]
> Sent: 08 July 2005 14:20
> To: Struts Users Mailing List
> Subject: Re: [OT] Re: Fired was...Re: Struts Books Recommendations
> [OT]
>
>
> Hey, I had an H-1B when I first came to America. Does that mean I can
> be a fashion model? :-)
>
> On 7/8/05, Daniel Perry <[EMAIL PROTECTED]> wrote:
> > "What is an H-1B?
> >
> > The H-1B is a nonimmigrant classification used by an alien who will be
> > employed temporarily in a specialty occupation or as a fashion model of
> > distinguished merit and ability."
> >
> > Now, why doesn't it suprise me that the americans make a
> special case for a
> > fashion model!!!
> >
> > Daniel.
> >
> > > -Original Message-
> > > From: Scott Piker [mailto:[EMAIL PROTECTED]
> > > Sent: 08 July 2005 13:49
> > > To: Struts Users Mailing List
> > > Subject: RE: [OT] Re: Fired was...Re: Struts Books Recommendations
> > > [OT]
> > >
> > >
> > > It's a type of temporary work visa in the US.
> > >
> > > http://uscis.gov/graphics/howdoi/h1b.htm
> > >
> > >
> > > > -Original Message-
> > > > From: Daniel Perry [mailto:[EMAIL PROTECTED]
> > > > Sent: Friday, July 08, 2005 5:33 AM
> > > > To: Struts Users Mailing List
> > > > Subject: RE: [OT] Re: Fired was...Re: Struts Books
> > > > Recommendations [OT]
> > > >
> > > > Applogies for being english or maybe just naive, but what the
> > > > hell is a H1B?
> > > >
> > > > Daniel.
> > > >
> > >
> > > -
> > > 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]
> >
> >
>
>
> --
> www.simonpeter.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]



RE: [OT] Re: Fired???? was...Re: Struts Books Recommendations [OT]

2005-07-08 Thread Daniel Perry
"What is an H-1B?

The H-1B is a nonimmigrant classification used by an alien who will be
employed temporarily in a specialty occupation or as a fashion model of
distinguished merit and ability."

Now, why doesn't it suprise me that the americans make a special case for a
fashion model!!!

Daniel.

> -Original Message-
> From: Scott Piker [mailto:[EMAIL PROTECTED]
> Sent: 08 July 2005 13:49
> To: Struts Users Mailing List
> Subject: RE: [OT] Re: Fired was...Re: Struts Books Recommendations
> [OT]
>
>
> It's a type of temporary work visa in the US.
>
> http://uscis.gov/graphics/howdoi/h1b.htm
>
>
> > -Original Message-
> > From: Daniel Perry [mailto:[EMAIL PROTECTED]
> > Sent: Friday, July 08, 2005 5:33 AM
> > To: Struts Users Mailing List
> > Subject: RE: [OT] Re: Fired was...Re: Struts Books
> > Recommendations [OT]
> >
> > Applogies for being english or maybe just naive, but what the
> > hell is a H1B?
> >
> > Daniel.
> >
>
> -
> 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: Using struts forms as Value Objects: your opinion?

2005-07-08 Thread Daniel Perry
> 1) form beans generally should consist of String data to facilitate
> round-tripping of invalid inputs. I like to constrain them to a clearly
> defined role of marshaling data 'into' and 'out of' the
> presentation layer,
> i.e. across the boundary between presentation and application.

This i would agree with.  Fields in BO/VOs have various types. ActionForms
should only get/set strings.

>
> 2) value objects should use typed interfaces to ensure marshaling to and
> from presentation format (string types) is pushed as far up the
> application
> stack as possible. This also enables other, potentially type-aware,
> presentation / client tiers to be built on top of the same value objects
> (e.g. for a web-services interface).
>
> To address Micheal's question (why not just make value objects
> and business
> objects the same thing?), I'd point out that it can be valuable to
> distinguish between business rules and application logic. I find my
> business objects often have functionality I don't want called
> directly from
> the presentatin layer, particularly when using a mediation layer between
> the two.
>
> Essentially, though, it comes down to the complexity of the
> problem vs. the
> complexity of the solution. The more complex the application, the more it
> makes sense to partition responsibilities. For very simple
> applications it
> makes sense to collapse layers together.


I tend to merge BO,VO,and DAO all into one bean.  I made a self-persistable
base bean (using OJB), and then just add fields with getters/setters.  All
works nicely.  Add any simple logic into the beans.  Stick complex logic in
managers/helpers/services.  I tend to pass these beans straight up to jsps
for pure displaying of stuff, but then use actionforms to edit/submit data.
A big timesaver can be to write a constructor for an action form that
accepts a BO and fills itself from that.

Daniel.


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



RE: [OT] Recommend a UK Tomcat host

2005-07-08 Thread Daniel Perry
UK2 dedicated linux servers. (uk2.net)
We've got a few of these, and they're cheap and reliable.
Only negative is you have to setup/manage them yourself.  But with linux you
honestly have to do very little.

Daniel.

> -Original Message-
> From: Mark Benussi [mailto:[EMAIL PROTECTED]
> Sent: 08 July 2005 09:45
> To: 'Tomcat Users List'
> Cc: 'Struts Users Mailing List'
> Subject: [OT] Recommend a UK Tomcat host
>
>
> Apologies for the repost to the Tomcat list but I am getting desperate.
>
>
> Can anyone recommend a UK based Tomcat hosting solution? I have been let
> down by my current ISP (nameonthe.net) which has gone out of business.
>
>
>
> Your help is greatly appreciated.
>
>
>
> TIA Mark
>
>


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



RE: [OT] Re: Fired???? was...Re: Struts Books Recommendations [OT]

2005-07-08 Thread Daniel Perry
Applogies for being english or maybe just naive, but what the hell is a H1B?

Daniel.

> -Original Message-
> From: Yan Hu [mailto:[EMAIL PROTECTED]
> Sent: 08 July 2005 07:40
> To: Struts Users Mailing List
> Subject: Re: [OT] Re: Fired was...Re: Struts Books Recommendations
> [OT]
>
>
> Last time the price tag I checked on these 2 idiots was 0/hour.
> Is this your personal playground
> to make fun of H1Bs or a struts list? Hey, do not hate the
> players. Hate the game.
>
> --- Martin Gainty <[EMAIL PROTECTED]> wrote:
>
> > Brandon-
> > Keeping in mind that No inductive generalisations can qualify
> from these
> > premises
> > The last time I checked The price for the aforementioned is pegged at
> > 1c/hour
> > which by my calculations qualifies as 'outsourcing the outsourcers'
> > This is the MSRP ..Your mileage may of course vary depending on
> your usage
> > habits..
> > Viel Gluck,
> > M-
> >
> > - Original Message -
> > From: "Brandon Goodin" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" ;
> "Martin Gainty"
> > <[EMAIL PROTECTED]>
> > Sent: Wednesday, July 06, 2005 8:39 PM
> > Subject: Re: [OT] Re: Fired was...Re: Struts Books
> Recommendations [OT]
> >
> >
> > Where do you work!? I am going to notify your boss of you disgruntle
> > behavior on this list!!! No wonder why we have H1Bs. They never
> > complain and just take their 2 cents an hour.
> >
> > And I mean that in the best possible way :p ;-) :D
> >
> > Brandon
> >
> > On 7/6/05, Martin Gainty <[EMAIL PROTECTED]> wrote:
> > > Unfortunately in the US you can be canned for being too old
> or having the
> > > wrong religious views
> > > we have a ton of laws on the books but they are unenforced
> > > My question is how do I (an older engineer with politically incorrect
> > > views)
> > > get work in Germany
> > > Vielen Danke,
> > > Martin-
> > > - Original Message -
> > > From: "Christian Bollmeyer" <[EMAIL PROTECTED]>
> > > To: "Struts Users Mailing List" 
> > > Sent: Wednesday, July 06, 2005 7:31 PM
> > > Subject: Re: [OT] Re: Fired was...Re: Struts Books
> Recommendations
> > > [OT]
> > >
> > >
> > > > On Wednesday 06 July 2005 19:48, Rick Reumann wrote:
> > > >
> > > > Hi,
> > > >
> > > >> Daniel Perry wrote the following on 7/6/2005 12:49 PM:
> > > >> > Hah, it's the business use of web/email they fire you
> for. Go read
> > > >> > your terms of employment, and the reference to "IT acceptible use
> > > >> > policy" that you inadvertantly agreed to.
> > > >>
> > > >> (the below has nothing to do with Mark)..
> > > >>
> > > >> For the record, I'm not against an employer firing an employee for
> > > >> 'whatever' reason they deem fit. If they don't like the
> way you wear
> > > >> your hair, I think they should have the right to fire you if they
> > > >> want. (The public also has a right to know about it based
> on the use
> > > >> of the press etc).
> > > >
> > > > Now though I'm clearly not in the position to get fired
> anytime soon,
> > > > I still think as long as I'm doing my job right and don't blame the
> > > > company I work for, what I do in my leisure time is not my
> > > > employer's business. Including my haircut, age, religious beliefs
> > > > or whatever. What I sell are my skills, work performance and
> > > > last but not least a significant part of my lifetime, but neither
> > > > my soul nor my private life. In Germany, it's not quite that easy
> > > > to get rid of someone who, lets say,  just got older because of
> > > > working for you. And I think this is just. Stealing silver spoons,
> > > > including deliberately breaking company rules in terms of
> > > > e-mail usage and the like is another issue.
> > > >
> > > >> Personally, if I owned a company and someone was using the company
> > > >> email domain name to post on sites such as "swingers" or
> > > >> "transvestitepride," I think I should have right to
> terminate his or
> > > >> her's employment. What I have 

RE: Fired???? was...Re: Struts Books Recommendations

2005-07-06 Thread Daniel Perry
Hah, it's the business use of web/email they fire you for. Go read your
terms of employment, and the reference to "IT acceptible use policy" that
you inadvertantly agreed to.

There have been cases in the uk where they have done this as it's much
cheaper to hunt out employees who have sent dodgy emails/had a sexual advert
popup/etc than to actually pay people redundancy.

Note that i agree it's a bit harsh to get the guy fired.  Still, who really
wants to work for a company that will fire you over a comment you make on a
mailing list?

Daniel.

> -Original Message-
> From: Rick Reumann [mailto:[EMAIL PROTECTED]
> Sent: 06 July 2005 17:42
> To: Struts Users Mailing List
> Subject: Fired was...Re: Struts Books Recommendations
>
>
> Mark Galbreath wrote the following on 7/6/2005 10:19 AM:
> > Thanks to whomever emailed last weeks nonsense thread to the Director
> > of the Board of Elections.  It made me look like a racist and I was
> > fired this morning.  The State is also looking into whether my use of
> > an official email address for that discussion is in violation of state
> > law.  You did your work well, you low-life bastard.
> >
> > Signing off
> > Mark
> >
>
> Whoever did send something is such a loser it's not even funny. At least
> step forward and admit who you are. I constantly here bigotted stuff on
> mailing lists and forums, yet I don't go running like a little baby to
> find out their employeer so I can "tattle" on them like a 3rd grader.
> I'd much rather the internet be open for a free exchange of ideas
> (regardless of whether we agree with them or not) without having to fear
> someone is going to hunt down who I am and state my comments to my
> employeer or wife.
>
> I can't believe I now have to watch what I say on this mailing list.
> Guess I will be making up a gmail account that doesn't use my real name
> just to help protect myself from losers like this person.
>
> It's sad the same thing happened to a guy working at Allstate who
> happened to post that he felt homosexulaity was wrong on a non-company
> related website http://www.wnd.com/news/article.asp?ARTICLE_ID=44961
>
> The irony is I guess Mark should have said how "The US is so evil for
> being in Iraq" or "How he hates pro-life Christians" and maybe he would
> have gotten a promotion. Or better yet, what if he was gay and posted
> all over some homosexual website about how he wanted to do all these
> sexual things with some other males and farm animals, and I as his
> employeer, found out about it and found it was offensive so I fired him.
> I will bet you *anything* that the ACLU would be on my back so fast it
> wouldn't even be funny and I as the employeer would lose my job for
> firing him! I just love the double-standards in the U.S. today.  A guy
> can get state funding from the National Endowment of the Arts by putting
> a crucifix in a jar of urine and calling it 'art', yet at the same time
> people get fired for off-color comments they make on a mailing list?
>
> --
> 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: Struts Books Recommendations

2005-07-06 Thread Daniel Perry
> -Original Message-
> From: Mark Galbreath [mailto:[EMAIL PROTECTED]
>
> Thanks to whomever emailed last weeks nonsense thread to the Director
> of the Board of Elections.  It made me look like a racist and I was
> fired this morning.  The State is also looking into whether my use of
> an official email address for that discussion is in violation of state
> law.  You did your work well, you low-life bastard.
> 
> Signing off
> Mark

Shouldnt that be "Signing on", or is that just a British phrase :)

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



RE: [OT] Re: Unacceptable Behaviour of Mark Galbreath

2005-07-01 Thread Daniel Perry
Yup. To be honest, i can handle the occasional insulting post

Be thankful that he's just distasteful and has a sense of humor, and not a
complete idiot that will never give up insulting developers.

If you're bored, have a search for this guy: Ilias Lazaridis

He came on the OJB mailing list and started laying into developers about not
providing examples that he could use within 2 minutes of downloading them.
He refused to accept that there is no point in providing an OJB app that
does nothing, but runs. Absolute moron.  He has been banned from many lists,
after insulting people.  there are some funny posts out there by him

e.g.
http://coding.derkeiler.com/Archive/Java/comp.lang.java.softwaretools/2005-0
1/0147.html

Daniel.

>
> I love this drama. It's like watching a soap opera. *urmph* Did i just
> admit that i like soap operas? And just think, our favorite troll is
> savoring every moment of this :D.
>
> Brandon


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



RE: [To sum it up] Re: Confused

2005-06-15 Thread Daniel Perry
I took one look at ejbs and ran a mile.

Struts and EJBs seem to be at the opposite end of a scale.
Struts is sensible, nice to work with, efficient, and generally everything
that EJBs arnt!

I personally use it with OJB (made that decision 1.5 yrs ago).  Hibernate
seems to be more popular, and if i was to make the decision now, i'd
probably go with hibernate.  I'm sticking with OJB in the systems i have
because refactoring the whole lot would be such a chore, and OJB works fine
(though i have had to deal with some really annoying intermittent bugs).

Daniel.

> -Original Message-
> From: Pierre Thibault [mailto:[EMAIL PROTECTED]
> Sent: 14 June 2005 19:53
> To: Struts Users Mailing List
> Subject: Re: [To sum it up] Re: Confused
>
>
> Le 14 juin 2005 à 04:59, Stéphane Zuckerman a écrit :
>
> Hello Stéphane,
>
> >
> ...
> > Anyway, this little presentation is far from complete, and I
> > suggest you read some doc about J2EE applications before going
> > further with struts (java.sun.com is a good start).
> >
> > --
> > Stéphane Zuckerman
> 
>
> The difficulty here is that there is lot of pieces that go together.
> There is a lot of choices and it is not clear for the new developers
> which path to fellow. I decided to buy the book 'Struts The Complete
> Reference' and I am only at the beginning. I'll continue to dig on
> the subject. I'm happy to see that there is community here for
> helping me. I fell already a lot more comfortable.
>
> Thank you.
>
> A+
>
> --
> Pierre
>
>
>


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



RE: Confused

2005-06-14 Thread Daniel Perry
No,
J2EE is a NOT EJBS!
J2EE is a collection of technologies, including servlets, jsp, EJBs, etc.

Tomcat hosts various parts of J2EE - servlets, jsps, etc, but it is not a
full J2EE container - it doesnt host EJBs. But you can use servlets, JSP and
taglibs without using EJBs. I do. I've never used an EJB.

Daniel.

> -Original Message-
> From: Pierre Thibault [mailto:[EMAIL PROTECTED]
> Sent: 14 June 2005 04:51
> To: Struts Users Mailing List
> Subject: Re: Confused
>
>
> Yes, I want to use Beans.
>
> Do you mean that I can use servlets, JSP and taglibs without J2EE?
>
> Le 13 juin 2005 à 16:42, Dave Newton a écrit :
>
> > Pierre Thibault wrote:
> >
> >
> >> There are talking about Tomcat but not about JBoss. I'll continue
> >> with JBoss because I want to access J2EE.
> >>
> >
> > I think you might be confused about what "J2EE" is. If you need
> > EJBs, then yeah, JBoss would be one way to go. If you don't,
> > there's a lot of other parts of J2EE, like servlets, JSP, taglibs,
> > etc..
> >
> > Dave
> >
>
>


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



RE: [OT] question about open source data base selection

2005-04-15 Thread Daniel Perry
> If you are distributing a product to others that includes GPL
> software, and you don't want to put your own work under the GPL, the
> end-user has to download the GPL package separately (e.g. MySQL) and
> then plug it in. (And you also have to be careful about how the
> plugging in process works.) If you distribute the product as a
> ready-to-go bundle, then the viral aspects of the GPL kick in, and
> your package must be GPL too. :(
>
> -Ted.

Not strictly true.

You cannot distribute it as a single program.  But you can distribute it
together.

Take a java web-app using mysql.

You can compile it and build a war (excluding the jdbc driver).  This
program is therefore NOT including any GPL code (as long as you havnt used
any elsewhere), and not affected by the GPL license.

If you distribute it on a cd, with mysql and the jdbc jar on the cd, then
you are not breaking the rules, as the programs are separate. See:
http://www.fsf.org/licensing/licenses/gpl-faq.html#MereAggregation

You could probably get away with writing install scripts that install your
package, the mysql package, then install the extra jar.

Note that once the programs are combined again, they would break the rules
if distributed again with the jar file intact.

Daniel.


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



RE: Please wait page

2005-04-07 Thread Daniel Perry
A couple of ways to do this:


Method1 - Page1 submits to Action1 - on submitting hide main div enclosing
page, and show a div with "processing..." until Action1 responds with Page2

Method2 - Page1 submits to Action1. Action1 shows Page2 (Processing...), and
immediatly submits to Action2 which shows Page3 when it completes. Page2
shoudl appear for the duration of processing thanks to response buffering.

Method3 (long transactional tasks)- Page1 submits to Action1.  Action1
starts the transaction, and leaves it to run in the background. Action1
redirects to Action2 which checks if transaction complete, if so forwards to
Action3 otherwise shows Page2 (processing) which refreshes every few seconds
Action2. When it eventually forwards to Action3, Action3 gets the results
from the transaction and shows them.

Daniel.

> -Original Message-
> From: Shiva Narayana [mailto:[EMAIL PROTECTED]
> Sent: 07 April 2005 11:09
> To: Struts Users Mailing List
> Subject: Re: Please wait page
>
>
> Asuthosh,
>
> This one is different from my requirement...i want to display the
> message when the action class loading ...but in this case it it is
> displaying the message when the page is loading...
>
> regards
> Shiva
>
> On Apr 7, 2005 3:17 PM, Ashutosh Satyam <[EMAIL PROTECTED]> wrote:
> > Hi Shiva,
> > I'm enclosing a sample JSP page which you can use
> > for giving the appearance that it's waiting till
> > the DB processing goes through.
> >
> > - - - - - - - - - - - - wait.jsp - - - - - - - - - - - - - - - - -
> > 
> |
> > 
> |
> > 
> |
> > #waitpart { position: absolute; }
>|
> > #mainpart { position: absolute; visibility: hidden; }  |
> > 
> |
> >
>|
> > 
> |
> > function init () {
> |
> >if (document.layers) {
>|
> >document.waitpart.visibility = 'hide';  |
> >document.mainpart.visibility = 'show';  |
> >} else if(document.all) {
>|
> >document.all.waitpart.style.visibility = 'hidden';  |
> >document.all.mainpart.style.visibility = 'visible'; |
> >} else if (document.getElementById) {
>|
> >var elm = document.getElementById('waitpart');  |
> >elm.style.visibility ='hidden'; |
> >elm = document.getElementById('mainpart');  |
> >elm.style.visibility ='visible';
>|
> >}
>|
> > }
> |
> > 
> |
> > 
> |
> >
>|
> > 
> |
> > 
> |
> >  Wait please ...  |
> > 
> |
> > <%
> |
> > //make sure the contents so far has been flushed   |
> > out.flush();
>|
> > %>
> |
> > 
> |
> > <%
> |
> > //just for testing.
>|
> > // Your DB Processing relevant code comes here |
> > for (int i=0; i <10; i++) {
>|
> >out.println("Record:"+i);
>|
> >out.println("");
>|
> > }
> |
> > %>
> |
> >  Here comes the page  |
> > 
> |
> > 
> |
> > 
> |
> > - - - - - - - - - - - - - end page - - - - - - - - - - - - - - - -
> >
> > Hope this gives you enough insight and you may think of better
> > alternative and share with others.
> >
> > Regards,
> > Ashutosh
> >
> > -Original Message-
> > From: Shiva Narayana [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, April 07, 2005 2:43 PM
> > To: user@struts.apache.org
> > Subject: Please wait page
> >
> > hi all,
> >
> > I m developing an application using WSAD 5.1.1,Struts.
> > I m trying to fetch data from the database. I m writing the code in
> > action class...
> > i want to display a page while doing the processing
> >
> > please help me.
> >
> > the same logic is implemented in the site www.travelocity.com
> >
> > --
> > Regards
> > Shiva
> >
> > -
> > 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]
> >
> >
>
>
> --
> Regards
> Shiva
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL 

mapped properties - website wrong?

2005-02-23 Thread Daniel Perry
I've spent the last couple of hours trying to debug a page with mapped
properties.

I found a section of the faq about it:
http://struts.apache.org/faqs/indexedprops.html

It says:
"The signature of the "get" and "set" methods for a mapped property are
different from the same methods for an indexed property. In particular,
instead of an "int" for the index, there is a "String" for the key." and the
example shows these methods...

But this doesnt work

To read the field, it requires a get method like:
public Map getDate() {
return dateMap;
}

For it to write the fields it needs a set method like:
public void setDate(Map date) {
this.dateMap=date;
}

Now the odd thing is that it never calls the set method (fair enough or it
would overwrite the whole map every time), however it wont work unless it
exists!

It would be nice if someone could correct the faq :)

Daniel.


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



RE: indexing with el

2005-02-23 Thread Daniel Perry
ah ha.
jdk 1.4.2 :)

Well, i noticed that a similar method was working... and the trick was to
give them different names:

public List getCostList() {
return cost;
}
public String getCost(int index) {
return (String) cost.get(index);
}

This way,
${multipleProgrammesForm.costList[programme]} works fine
and  also works fine.

It seems that if you supply an indexed and non indexed method with the same
names, it gets all confused, and it tries to use the indexed method without
an index.

Thanks,

Daniel.

> -Original Message-
> From: Niall Pemberton [mailto:[EMAIL PROTECTED]
> Sent: 23 February 2005 15:46
> To: Struts Users Mailing List
> Subject: Re: indexing with el
>
>
> Are you using JDK 1.4? JDK 1.4 will ignore the getCost() method
> that returns
> a java.util.List, if you change it to an array then it will consider that
> method part of the indexed property and everything will probably work. It
> probably would work under JDK 1.3, but Sun tightened up on how it treats
> indexed properties.
>
> http://issues.apache.org/bugzilla/show_bug.cgi?id=28358#c14
>
> Niall
>
> - Original Message -
> From: "Daniel Perry" <[EMAIL PROTECTED]>
> To: "Struts User List" 
> Sent: Wednesday, February 23, 2005 3:05 PM
> Subject: indexing with el
>
>
> > Hi,
> >
> > I'm trying to create a form which uses indexed properties.
> >
> > My bean has two (amongst others) methods:
> > public List getCost() {
> > return cost;
> > }
> >
> > public String getCost(int index) {
> > return (String) cost.get(index);
> > }
> >
> > In the form i use the above:
> >
> >  end="${multipleProgrammesForm.numberOfProgrammes-1}"
> > var="programme">
> > 
> >
> > And it is all fine and dandy!
> >
> > I also need to obtain this value in jstl-el:
> >
> > I've tried:
> > ${multipleProgrammesForm.cost[programme]}
> > gives:
> >
> > javax.servlet.jsp.el.ELException: Unable to find a value for "cost" in
> > object of class
> "com.netcase.pdp.admin.actionform.MultipleProgrammesForm"
> > using operator "."
> > org.apache.commons.el.Logger.logError(Logger.java:481)
> > org.apache.commons.el.Logger.logError(Logger.java:498)
> > org.apache.commons.el.Logger.logError(Logger.java:611)
> > org.apache.commons.el.ArraySuffix.evaluate(ArraySuffix.java:340)
> > org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
> >
> > But, i've also tried obtaining the list on it's own using:
> > 
> > and that gives the same error - suggesting that it's trying to use the
> > indexed getter.
> >
> > Any ideas how i can get this value?  Am i going to have to result to
> > scriptlets?
> >
> > Thanks,
> >
> > Daniel.
>
>
>
> -
> 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: Session Expires Question

2005-02-23 Thread Daniel Perry
I do exactly the same kind of thing with a site.  All actions extend
BaseAction which extends Action, and implement executeAction, not execute.

The (relevant)code for BaseAction:

abstract public class BaseAction extends Action {
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
if (isSessionValid(request)) {
return executeAction(mapping, form, request, response);
} else {
return mapping.findForward("showsessionexpired");
}
}

abstract public ActionForward executeAction(ActionMapping mapping,
ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws Exception;

private boolean isSessionValid(HttpServletRequest request){
... // check for presence of session var
}
}

isSessionValid is a function you must define in this class to check for the
presence of a particular var.  It forwards to the showsessionexpired
global-forward if not.

Daniel.


> -Original Message-
> From: Scott Purcell [mailto:[EMAIL PROTECTED]
> Sent: 23 February 2005 13:56
> To: user@struts.apache.org
> Subject: Session Expires Question
>
>
> Hello,
> I am creating a shopping cart application where each web-user has
> a shoppingcart/userobject in their session. The problem is,
> unlike most software I create, there is no userlogin. I would
> like to be able to show them a jsp page that states when their
> session has expired, and that they will have to acquire their
> widgets again.
>
> The main problem I am having is understanding how to do this
> using struts. The way I have built the SW is as follows. I have a
> welcome-file page that goes to an Action instead of just using a
> index.jsp page. The action creates a shopping cart object and
> places it in the session. The problem is that the index.jsp page
> is called everytime they hit 'home' which is the top level product page.
>
> Does anyone have any ideas, or examples of how this could be
> accomplished. Also, I did create a subclass for Action in which I
> check and ensure that the shoppingcart/userobject exists. I just
> can't figure out how to handle this when it goes away.
>
> Any input or help would be appreciated.
>
> Sincerely,
>
> Scott K Purcell
>
>
>


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



indexing with el

2005-02-23 Thread Daniel Perry
Hi,

I'm trying to create a form which uses indexed properties.

My bean has two (amongst others) methods:
public List getCost() {
return cost;
}

public String getCost(int index) {
return (String) cost.get(index);
}

In the form i use the above:




And it is all fine and dandy!

I also need to obtain this value in jstl-el:

I've tried:
${multipleProgrammesForm.cost[programme]}
gives:

javax.servlet.jsp.el.ELException: Unable to find a value for "cost" in
object of class "com.netcase.pdp.admin.actionform.MultipleProgrammesForm"
using operator "."
org.apache.commons.el.Logger.logError(Logger.java:481)
org.apache.commons.el.Logger.logError(Logger.java:498)
org.apache.commons.el.Logger.logError(Logger.java:611)
org.apache.commons.el.ArraySuffix.evaluate(ArraySuffix.java:340)
org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)

But, i've also tried obtaining the list on it's own using:

and that gives the same error - suggesting that it's trying to use the
indexed getter.

Any ideas how i can get this value?  Am i going to have to result to
scriptlets?

Thanks,

Daniel.


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



RE: [OT] WinCVS problem (free beer!)

2005-01-07 Thread Daniel Perry
Yup, browsing would be nice!  I cant find a product that does it all.
tortoise is nice for general cvs use (ie commiting, updating, etc from other
peoples servers).  I find eclipse more useful for my work though - list of
files that have changes, incoming, outgoing, conflicts, built in diff - only
annoying thing is that it adds everything in the folders to list, so you
have to be carefull if you hit the 'commit all outgoing changes' button.

For browsing cvs servers i use viewcvs.  It has to be installed on the
server (i think) but most opensource servers have it, and i use it on our
server.  It is by far the best way to browse a cvs tree.  (If it's on your
own server you can turn on features like download tarball - which will make
you a tar for any part of the tree for any tag!)

I wish there was an easy to use program that featured eclipse like projects
with the incoming/outgoing/conflicts/etc and the flexibility of browsing
from viewcvs.  It would also be nice if such a tool also supported
subversion aswell as cvs.

Or maybe i should just learn to use command line cvs/svn and i might find
that to be better!

Daniel.

> -Original Message-
> From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
> Sent: 06 January 2005 21:49
> To: Daniel Perry
> Cc: Struts Users Mailing List
> Subject: Re: [OT] WinCVS problem (free beer!)
>
>
> Yep, TortoiseCVS is what I'm using, as it was the only one I got working
> :) Does the job though.
>
> I was under the impression that you could browse a CVS repository with
> most of these tools, and that doesn't seem to be the case.  Maybe the
> one in Eclipse can do it, but most don't seem to have that capability.
> With that in mind, TortoiseCVS seems the past of least resistance for me.
>
> Thanks for your help!
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
>
>
> Daniel Perry wrote:
> > Give tortoisecvs a try.  I personally prefer it to wincvs.
> >
> > http://www.tortoisecvs.org/download.shtml
> >
> > After trying both (and eclipse), i came up with the conclusions:
> >
> > eclipse is the easiest (so use it if using eclipse)
> >
> > tortoise provides nice shell integration that gives an almost 'human'
> > perspective on cvs.
> >
> > wincvs gives a gui interface to the command line tools, with
> lots of menus
> > etc. As i had no real cvs knowledge, wincvs confused me!  I
> found tortoise
> > far far easier to use.
> >
> > Daniel.
> >
> >
> >>-Original Message-
> >>From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
> >>Sent: 05 January 2005 22:35
> >>To: David G. Friedman
> >>Cc: Struts Users Mailing List; Commons User
> >>Subject: Re: [OT] WinCVS problem (free beer!)
> >>
> >>
> >>Indirectly I've thought about it... A lot of guys are using WASD at
> >>work, which is of course Eclipse-based, but I've been resisting.  I've
> >>used a number of IDEs over the years, and I've always found that they
> >>get in my way far more than they help.  That's just me, but it's been my
> >>experience.  At this point I have such a refined work style between
> >>UltraEdit and Tomcat that I can actually work more efficiently overall
> >>than with any IDE I've tried (and I have actually spent some time
> >>playing with WSAD, and it doesn't seem to be any different in terms of
> >>that).  They don't call me the Batch File King (tm) at work for
> nothin' :)
> >>
> >>FYI, I'm trying to let WinCVS run it's course right now as per Glenn's
> >>suggestion.  I also tried hitting escape as Matt suggested, but it
> >>didn't unfreeze it, so it wouldn't appear to be that problem (plus I'm
> >>not seeing any drive activity, which I'd expect to see if it was doing
> >>what Glenn suggested).
> >>
> >>It's weird, I can move the window around no problem, but I can't do
> >>anything with any part of the interface (and large parts of the
> >>interface get "erased" when I move any window over it, typical Windows
> >>frozen app syndrom)
> >>
> >>--
> >>Frank W. Zammetti
> >>Founder and Chief Software Architect
> >>Omnytex Technologies
> >>http://www.omnytex.com
> >>
> >>David G. Friedman wrote:
> >>
> >>>Frank,
> >>>
> >>>Ever think of using Eclipse (v3.X) ?  I use it for
> >>
> >>Java/Struts/Tomcat (Via
> >>
> >

RE: [OT] WinCVS problem (free beer!)

2005-01-06 Thread Daniel Perry
Give tortoisecvs a try.  I personally prefer it to wincvs.

http://www.tortoisecvs.org/download.shtml

After trying both (and eclipse), i came up with the conclusions:

eclipse is the easiest (so use it if using eclipse)

tortoise provides nice shell integration that gives an almost 'human'
perspective on cvs.

wincvs gives a gui interface to the command line tools, with lots of menus
etc. As i had no real cvs knowledge, wincvs confused me!  I found tortoise
far far easier to use.

Daniel.

> -Original Message-
> From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
> Sent: 05 January 2005 22:35
> To: David G. Friedman
> Cc: Struts Users Mailing List; Commons User
> Subject: Re: [OT] WinCVS problem (free beer!)
>
>
> Indirectly I've thought about it... A lot of guys are using WASD at
> work, which is of course Eclipse-based, but I've been resisting.  I've
> used a number of IDEs over the years, and I've always found that they
> get in my way far more than they help.  That's just me, but it's been my
> experience.  At this point I have such a refined work style between
> UltraEdit and Tomcat that I can actually work more efficiently overall
> than with any IDE I've tried (and I have actually spent some time
> playing with WSAD, and it doesn't seem to be any different in terms of
> that).  They don't call me the Batch File King (tm) at work for nothin' :)
>
> FYI, I'm trying to let WinCVS run it's course right now as per Glenn's
> suggestion.  I also tried hitting escape as Matt suggested, but it
> didn't unfreeze it, so it wouldn't appear to be that problem (plus I'm
> not seeing any drive activity, which I'd expect to see if it was doing
> what Glenn suggested).
>
> It's weird, I can move the window around no problem, but I can't do
> anything with any part of the interface (and large parts of the
> interface get "erased" when I move any window over it, typical Windows
> frozen app syndrom)
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
>
> David G. Friedman wrote:
> > Frank,
> >
> > Ever think of using Eclipse (v3.X) ?  I use it for
> Java/Struts/Tomcat (Via
> > the Sysdeo plug-in) development and it includes a built-in CVS client.
> > Add-ons also allow for SVN.
> >
> > Regards,
> > David Friedman / [EMAIL PROTECTED]
> >
> > -Original Message-
> > From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, January 05, 2005 5:11 PM
> > To: Commons User; Struts User
> > Subject: [OT] WinCVS problem (free beer!)
> >
> >
> > Ok, no free beer, I lied ;)  Got your attention though!
> >
> > I'm just now trying to use CVS for the first time, and I'm having a
> > problem I haven't been able to figure out, and I'm sure at least some of
> > you here are using WinCVS, so I hope no one minds an OT question (FYI, I
> > couldn't find a WinCVS support forum)...
> >
> > I've installed WinCVS 1.3 (the latest from the WinCVW.org site,
> > downloaded today) on Windows XP.  I haven't however installed Python or
> > TCL, as they are optional.  The install went fine.
> >
> > But, when I try to run it, it freezes.  I see the splash screen, and the
> > popup mentioning Python.  I click OK, and it's just frozen, can't do
> > anything.  I can close it via right-clicking the taskbar item, but
> > nothing else.  It works on my work PC by the way, although I can't do
> > anything with it there because of firewall restrictions, so I really
> > need it working at home.
> >
> > I've checked to be sure the CvsNT and CvsNT Locking services are
> > running, and they are (not even sure that's necassery, but still).  I've
> > spent 30 minutes or so Googling for an answer but haven't had any luck.
> >
> > Any ideas from anyone around here?  Again, sorry for the OT post, but I
> > couldn't resist tapping the expertise of these lists.  Thanks a lot!
> >
> > --
> > Frank W. Zammetti
> > Founder and Chief Software Architect
> > Omnytex Technologies
> > http://www.omnytex.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]
>
>


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



RE: Actionform 's property

2004-12-20 Thread Daniel Perry
Well the way you dont wish to use would be the normal way to do it :)

The form will be available in the request or session (depending on where you
put the form) scope from the jsp under the form's name.  So
${formName.employeeList} is the list from a JSTL perspective.  From
scriptlet, either:

=((full.package.name.MyForm)request.getAttribute("formName")).getElmployeeLi
st();
or
=((full.package.name.MyForm)session.getAttribute("formName")).getElmployeeLi
st();

Daniel.

> -Original Message-
> From: Zhang, Larry (L.) [mailto:[EMAIL PROTECTED]
> Sent: 20 December 2004 15:58
> To: Struts Users Mailing List
> Subject: Actionform 's property
>
>
> Say I have an action form
>
> MyForm extends ActionForm {
>  List employeeList;
>  //set/getter follows...
> }
>
> Suppose in my action class's execute method,
> I populated employeeList from database, and do
> myForm.setEmployeeList(List someData);
>
> Now in my Jsp, how to get this value and assign this value to a java
> script variable?
>
> Such as:
>
> In my jsp:
>
> <% List iWantToGetThisList = ??? %>
>
> I know one way is that in the action's execute method, I put the
> employeeList in the request using request.setAttribute("employeeList",
> employeeList); but I don't want to do this way...
>



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



RE: "dynamic" dropdown select list?

2004-12-16 Thread Daniel Perry
I've done this using a combination of things.

I think onClick gets fired if you change the value - even using keyboard,
and believe this works accross browsers.

I had onClick fill in a hidden field, and submit the form.  The validate
method notices this, and throws back a single empty actionerror, and not
continue.  This causes it to get redisplayed with the correct stuff
selected!

Daniel.

> -Original Message-
> From: Riedling, Michael [mailto:[EMAIL PROTECTED]
> Sent: 16 December 2004 15:19
> To: [EMAIL PROTECTED]
> Subject: "dynamic" dropdown select list?
>
>
> hello,
>
> 1.)
> I want to create two dynamic dropdown lists to select main- and
> submenus of a navigation in a form.
> I fill both lists with collections, when the User chooses a value
> in the first dropdown menu (e.G. Navigation main menu), the site
> should reload and the related collection of the second dropdown
> menu (e.g. Navigation submenu) have to appear.
>
> I am not sure how to implement that, maybe its very simple and
> have nothing in common with struts. But i need some help with it please :)
>
> Can i do the reload with something like javascript onKeyPress
> etc. or are there usefull struts functions/patterns for it?
>
>
> Thx in advance
>
> Michael
>
>
>
>
>
>
> PS.
> Here is the codefragement of the two simple dropdown lists, i
> have implemented so far:
>
> 
> 
>   :
>   
> 
> 
>   :
>   
>property="nodeName" labelProperty="nodeName"/>
>   
>   
> 
> 
>   :
>   
>property="nodeName" labelProperty="nodeName"/>
>   
>   
> 
>
> 
>   
>   
>   
>   
> 
>   
>   
>   
> 
>
> -
> 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: OJB && struts

2004-12-16 Thread Daniel Perry
I think there is a difference between tieing things to struts, and ojb.

Struts is quite obtrusive - you have to use Actions if you're going to use
struts.  Keeping business logic in actions ties you to struts.  If you
decided to add a swing interface to your app, then you cant easily reuse
this code.  If you'd kept the code in a struts-independant layer, you could
reuse it straight away.

OJB is quite unobtrusive (if used cleverly).  Now lets say you tie your
business logic into OJB. If you decide you want to switch to straight JDBC
you need to redo the business logic code to use JDBC, and remove references
to OJB.  But if you'd used the DAO pattern you'd only have to rewrite all
the DAOs and services tied to OJB - pretty much the same coding as if you
had tied your business logic directly to OJB.  So it doesnt reduce the
coding necessary.  There are hidden benefits though.  Instead of wading
through your entire app, you know where ALL the OJB specific code is - in
the DAOs.  The other big benefit is that you can have the OJB DAOs, and JDBC
DAOs coexisting, and pick which set to use on a given deployment.  If you
use IOC techniques, flipping from one to the other could only invlove
changeing a single classname, probably in an xml config file.

Now as you rightly stated, if you know you're only ever going to use OJB
then this isnt an issue. Which is my case, as i am not going back to JDBC!!!

As an interesting side, if you use OJB, and make all your classes extend a
BaseBO class (which only need have an primaty key "int id;" +getter/setter)
you can make a single DAO which will handle CRUD for all classes which
extend it.  I tend to take this approach. Would make swapping to JDBC a
pig - that would be a big switch statement and a LOT of JDBC code to do
that!

Daniel.

> -Original Message-
> From: Jim Barrows [mailto:[EMAIL PROTECTED]
> Sent: 15 December 2004 20:25
> To: Struts Users Mailing List
> Subject: RE: OJB && struts
>
>
> No big surprise that it works.   The DAO pattern is for
> abstracting out implementation details of how you actually talk
> to your DB.  If you know that you will always use OJB for your
> data access, then you don't need the DAO layer.
> If you know that you will never use anything but struts for your
> front end, then you don't even need a Business Object layer.  You
> can do it all in your action classes.
> HOWEVER, even if you think you know these things the future
> is unpredictable.  Which is why you implement the patterns, to
> accomodate not only radical changes, but minor ones as well.
>
>
> > -Original Message-
> > From: aris [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, December 15, 2004 9:46 AM
> > To: Struts Users Mailing List
> > Subject: Re: OJB && struts
> >
> >
> > Hi liooil,
> > I'm using OJB in my struts application.
> >
> > At the beginning I used Druid to create the package with the beans
> > (BusinessObjects? or DTO as explained in
> > http://www.reumann.net/struts/lesson1/step4.do) and the
> > repository.xml file.
> >
> > Here you can find Druid: http://druid.sourceforge.net/index.html
> >
> > Then I've created a package of BusinessObjectsService that I
> > can call from
> > my Action (as explained in
> http://www.reumann.net/struts/lesson1/step5.do).
>
> I use the class of this package to store and retrieve data from
> the db using
> the PersistenceBroker as explained in the related OJB tutorial.
>
> I don't use the DAO pattern but it works...
>
> Hoping this help,
> aris.
>
>
>
>
> - Original Message -
> From: "liooil " <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, December 15, 2004 10:41 AM
> Subject: OJB && struts
>
>
> 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]
>
>
> -
> 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: OJB && struts

2004-12-15 Thread Daniel Perry
Using OJB and struts is not really any different from using jdbc with
struts.

Set up ojb as per instruction on their site, and use it in the same places
where you'd normally make jdbc calls.

I;m not sure if there are any nice examples (havnt looked since i began
using ojb a long time ago).  I've been using ojb with struts for a long
while.  The go quite nicely together.

One nice trick i've used it to have a BaseDAO that has OJB code for simple
CRUD.  If other DAOs extend it they inherit methods like 'getObjectByPKID'
without having to do any coding!

I've also 'cheated' in some projects and rolled the DAO and BO into one
object.  I hear the cries of pain from the 'patterns' advocates, but
really... why have a separate DAO and BO/TO when they can be rolled to
gether to create a clever self-persistable BO.  If you do go down this
route, then create a service/plug-in that provides more complex multi-object
transactions.

Hope that gives you some ideas...

Daniel.


> -Original Message-
> From: liooil [mailto:[EMAIL PROTECTED]
> Sent: 15 December 2004 09:42
> To: [EMAIL PROTECTED]
> Subject: OJB && struts
>
>
> 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]
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.296 / Virus Database: 265.5.0 - Release Date: 09/12/2004
>
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.296 / Virus Database: 265.5.0 - Release Date: 09/12/2004


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


RE: ??? property naming convention problem

2004-12-14 Thread Daniel Perry
This is confusing.  The bean spec / article is talking about going from a
method name into a property name.  The problem here is the other way round.

Eg, decapitalise method->property will convert: getECoupon -> ECoupon
But it doesnt mention property->method capitalise: eCoupon -> getECoupon /
geteCoupon

I think the assumption has been made that if youre going to go from
getECoupon ->ECoupon that you must go from ECoupon->getECoupon and therefore
eCoupon->geteCoupon

However the spec doesnt say that this should be a reversible process, so why
not eCoupon->getECoupon

Daniel.

> -Original Message-
> From: Andrew Hill [mailto:[EMAIL PROTECTED]
> Sent: 14 December 2004 14:01
> To: Struts Users Mailing List
> Subject: Re: ??? property naming convention problem
>
>
> Sure is mate!. Its all in the javabean specs
>
> This post should enlighten you further:
>
> http://marc.theaimsgroup.com/?l=struts-user&m=98900256403524&w=2
>
>
> And for another getter/setter 'gotcha' you can read this thread through
>
> http://marc.theaimsgroup.com/?l=struts-user&m=102696975022454&w=2
>
> hth
> Andrew
>
> Vinod Easaw Varghese wrote:
> > Hi,
> >
> > I have a textbox in a JSP whose property has been named as eCoupon.
> > I have created the necessary ActionForm with the necessary setter and
> > getter methods such as setECoupon and getECoupon.
> > When I run submit the form within the corresponding JSP I get the
> > error message not able to find the corresponding getter method for
> > property eCoupon
> > The moment I changed the property name to ecoupon and made the
> > necessary adjustments within the ActionForm all began to work well.
> >
> > Is there a property naming convention to be followed in STRUTS
> >
> >
> > With thanks and Regards
> >
> > Vinod Easaw Varghese
> >
> >
> >
>
>
> -
> 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: Generating valid HTML from tag

2004-12-14 Thread Daniel Perry
But that's 5 years during which a non standards-compliant browser has had
90% of the browser market...

I dont know of any browser which gets upset at the form name attribute!

As a side note, why does struts set the form name? is it used anywhere?  I
cant see any reason to use the name tag atall. There's no need to use it
with javascript anymore.

Daniel.

> -Original Message-
> From: William Ferguson [mailto:[EMAIL PROTECTED]
> Sent: 14 December 2004 13:30
> To: Struts Users Mailing List
> Cc: [EMAIL PROTECTED]
> Subject: Re: Generating valid HTML from  tag
>
>
> Well,
>
> the w3C validator certainly considers it to be invalid and is validating
> against the HTML 4.01 spec which came into being in December 1999.
> So I'd be inclined to say that 5 years is more than enough deprecation
> notice.
>
> William
>
>
> - Original Message -
> From: <[EMAIL PROTECTED]>
> > Is it the opinion of others that "deprecated" is semantically equivalent
> > to "invalid"?
>
>
> > "William Ferguson" <[EMAIL PROTECTED]>
> > I noticed that the html generated form the  tag is not valid
> > HTML
> > according to the W3C validation service (http://validator.w3.org).
> > It generates a  tag with a 'name' attribute which has been
> > deprecated.
> >
> > Since I'm striving to conform to relevant standards as best as
> possible, I
> > was wondering whether anyone else had faced the same issue and what
> > approach
> > had been taken.
> >
> > If I don't use the  tag then I can't use other tags like
> >  etc, which means a fair bit of messing about for
> drop-downs.
> >
> > Does anyone else bother with HTML validation?
> > And if so, how do you handle Forms and Form elements?
> >
> > William
>
>
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.296 / Virus Database: 265.5.2 - Release Date: 13-Dec-04
>
>
> -
> 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]Threads and Servlets Question

2004-12-07 Thread Daniel Perry
Threads rule!

Seriously though... only use threads if you know how they work :)

Quartz can do a lot for you (and is a piece of cake to use in struts apps).
It provides cron like functionality, and can also use persistant tasks that
survive container restarts.

Threads are good for simple unimportant asynchronous stuff.  Eg. sending
emails.  If an action triggers the sending of emails, and there's no need to
know if they've been sent, then why make the user wait for slo smtp
servers.  Fire off the emails in a new thread (i wrote a 'BackgroundSender'
for commons email which does this for you).

As a rule this kind of thing is ok if you wont be generating a huge number
of threads, and you write the code carefully.  Eg if you take a look at the
code i copied below, you'll see the run method takes the form:

public void run() {
try {
theMail.send();
} catch (MessagingException ex) {
}
}

This is ok as it runs, and if it fails, it fails - it doesnt loop!  The
following would be taking your life into your own hands:

public void run() {
boolean success=false;
while (!success){
try {
theMail.send();
success=true;
} catch (MessagingException ex) {
}
}
}

This code looks like a good idea - keep trying to send the message until it
is sent.  But lets say the smtp server it uses goes down, and you get a few
hundred mails all trying to go out at the same time. It wont be pretty!
Also, a malformed message that the smtp server rejects would be stuck in an
infinite loop!

So if you use threads, be careful!

Daniel.




---BackgroundSender.java---
package org.apache.commons.mail;

import javax.mail.MessagingException;

/**
 * A class to send messages in the background. Compose the mail as normal,
then
 * use the static method: BackgroundSender.send(Email mail) to send the
email.
 *
 * @author Daniel Perry
 */
public class BackgroundSender extends Thread {

Email theMail;

/**
 * Constructor takes an Email object, and sends it from a background
thread.
 */
private BackgroundSender(Email mail) {
super();
this.theMail = mail;
}

/**
 * Static method to send a org.apache.commons.mail.Email message in the
 * background. Note that if the message fails to get sent there is NO
 * notification!
 *
 * @param mail
 */
public static void send(Email mail) {
new BackgroundSender(mail).start();
}

/**
 * The run method of the thread that actually sends the mail.
 */
public void run() {
try {
theMail.send();
} catch (MessagingException ex) {
// print out exception for reference, this is running in a
// background thread, and noone will do anything about the
error.
ex.printStackTrace();
}
}
}


> -Original Message-
> From: Erik Weber [mailto:[EMAIL PROTECTED]
> Sent: 07 December 2004 06:26
> To: Struts Users Mailing List
> Subject: Re: [OT]Threads and Servlets Question
>
>
>
>
> Erik Weber wrote:
>
> > This is covered by JMX. For example, see javax.management.timer.Timer
> > (which can be initialized/destroyed by a ServletContextListener). The
> > idea is that you can schedule asynchronous operations but leave the
> > Threads to be managed by the server.
> >
> > JBoss supports this but I haven't had any luck determining if Tomcat
> > has any support in this area.
>
> Which is not to say that it won't work in Tomcat. I have used this
> technique in a couple of production applications running on Tomcat, and
> it seems to be reliable. But in those cases the Timer instance is not
> created by Tomcat (it is simply instantiated directly by a
> ServletContextListener) or registered with Tomcat (as would be the case
> with WebLogic's Timer extension) and I suppose would be subject to the
> security constraints that Craig mentioned. So I'm not sure it's much
> different from instantiating your own java.util.Timer (which by the way
> is, according to the Sun documentation, optimized for availability).
>
> Erik
>
> > WebLogic appears to have superior support in this area.
> >
> > Erik
> >
> >
> >
> > Andrew Hill wrote:
> >
> >> 
> >> DON'T spawn threads inside a servlet container unless you
> really, REALLY
> >> have to. It'll tend to save you headaches more times than not. But if
> >> you gotta do it, do it with care :)
> >> 
> >>
> >> Or as they say "dont try this at home kids" :-)
> >>
> >> 
> >> a policy that prohibits them. (For example,
> >> if I was running an ISP hosting service, that's something I would
> &

RE: Placing JSPs under WEB-INF using modules

2004-12-01 Thread Daniel Perry
Yeah, it's no problem.

Just use forwards like:



Daniel.

> -Original Message-
> From: Daniel Massie [mailto:[EMAIL PROTECTED]
> Sent: 01 December 2004 11:58
> To: [EMAIL PROTECTED]
> Subject: Placing JSPs under WEB-INF using modules
>
>
> I have a module called admin, and wish to locate JSPs in
> /WEB-INF/pages/admin. This however is relative to the default
> context rather than /admin.
>
> Is it possible to place JSPs under the WEB-INF directory when
> using modules?
>
> Thanks
> Daniel
>
> -
> 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] Ant question

2004-11-23 Thread Daniel Perry
No idea if ant can do this, but i tend to put a 0 byte 'ignoreme' file in
the directory.  This stops these problems happening with more than just ant!

Daniel.

> -Original Message-
> From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]
> Sent: 23 November 2004 18:31
> To: [EMAIL PROTECTED]
> Subject: [OT] Ant question
>
>
> Hi
> I have a ant script which creates a war file, every
> thing works well but it does not copy empty directory
> in the war file, i need one directory which is empty,
> it is under WEB-INF and at run time xml files are
> created in it,
> My web application expects this empty folder and
> crashes if not found,
> How do i say in ant script to copy empty directory
> also.
> This is my ant script
>  description="create deployable war file">
>   webxml="${webroot}/WEB-INF/web.xml"
> excludes="**/*.properties,**/*.class" update="true" >
>
>
> 
>
> Ashish
>
>
>
> __
> Do you Yahoo!?
> Meet the all-new My Yahoo! - Try it today!
> http://my.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]



error params in html taglib

2004-11-23 Thread Daniel Perry
I've just noticed in the html taglib documentation that various fields:
errorKey, errorStyle, etc have appeared.  Can anyone point me to any
documentation on how these work?

ie.  errorStyle  "CSS styles to be applied to this HTML element if an error
exists for it. "

But how do i specify that the error is for it, and not for a different
element on the same form?

Thanks,
Daniel.


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



RE: Installation Getting Started Question

2004-11-17 Thread Daniel Perry
> I am wanting to see how Struts may help in my J2EE development. I
> have purchased the O'Reilly book "Jakarta Struts" and want to get
> started with some examples.
>
> 1) I am currently running Tomcat 4.1.31 as a standalone.
> Can struts be installed with Tomcat as standalone? I saw
> somewhere in the install where it says to make sure you have
> Apache and Tomcat installed? Can someone help clear this up?

Struts works fine under tomcat standalone.  Note that if you upgrade to
tomcat 5 you get to use EL anywhere in your jsp (not just in tags) so you
can ditch bean:write, c:out tags.

> 2) Is there a hello Struts example somewhere? Just to test the
> install/setup before I get under way?

There are loads of examples out there. Some come with struts: take a look in
the webapps folder of the struts package. Or take a look at
http://sourceforge.net/projects/struts/.  There are some samples and some
extsions to struts.

> 3) The book does not start off simple either, so how can one get
> a handle on this effectively? My background is Servlets/JSP/ Web
> development. Including taglibs, ant, etc.
>

If you're up on java/servlets/jsp then just jump into the examples.  Have a
play with them and you'll quickly get a feel for how it all works.

Daniel.


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



RE: [OT] User Preference System Design

2004-11-17 Thread Daniel Perry
The most common way to store more than one element in a properties file is
to have more than one entry like the following:

colour.count=3
colour.0=red
colour.1=green
colour.2=blue

So your code loads the property for colour.count and loops through the other
properties.  Not very elegant, but it works.

Daniel.

> -Original Message-
> From: Julian [mailto:[EMAIL PROTECTED]
> Sent: 17 November 2004 14:08
> To: Struts Users Mailing List
> Subject: Re: [OT] User Preference System Design
>
>
> Hi,
>
> Thanks for the input.  The Properties object is more
> inline with what I was thinking.  The problem with it
> however, is that there can only be one key/value pair.
>  I see no ability to have one key with multiple pairs
> other than doing comma delimitation.  This is why XML
> was chosen originally.  The problem with it now is
> that it is not stored in an RDBMS, and I am unaware of
> the scalability of a user preferences system based on
> XML.Comments/Suggestions?
>
> Thanks again,
> Julian
>
> --- Erik Weber <[EMAIL PROTECTED]> wrote:
>
> > I like java.util.Properties, or, if Strings aren't
> > good enough, another
> > wrapper for a Map that allows put/get of Objects but
> > that uses a
> > hierarchical default system like Properties does.
> > Properties has built
> > in load/save methods that you can use to store your
> > properties on disk
> > until you move them to a RDBMS. Base user has colors
> > A, B, C. Next
> > higher user needs to have a different color A but
> > inherit colors B and
> > C. Create his properties with the Base user
> > properties as the default,
> > then just put the new property A. Works nicely for
> > that sort of thing.
> >
> > Erik
> >
> >
> > 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
> > >
> > >
> > >
> > >
> > >
> > >
> > >__
> > >Do you Yahoo!?
> > >The all-new My Yahoo! - Get yours free!
> > >http://my.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]
> >
> >
>
> =
> Live simply so others may simply live.
>
> -Ghandi
>
> Pluralitas non est ponenda sine neccesitate.
> "Entities should not be multiplied unneccesarily"
>
> -William of Occam
>
>
>
>
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://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]



RE: AW: talking about paradigms

2004-11-16 Thread Daniel Perry
intermixed...

> This is a simple sintaxis issue...
> parameters in java are not passes as pointers.. they are passed as values
> ( the memory address of the object in the heap )..

emm... that's a pointer :) passing variables by reference or value is
neither here nor there.

"pointer - An address, from the point of view of a programming language"
(from an online computing dictionary)

references - pointers - same thing really. ("The terms "pointer" and
"reference" are generally interchangable " - same dictionary)

>
> so if we are to be precise there are no real pointers in java...
> however.. the main difference with C/C++ is that you cannot do arithmetic
> operations with a pointer... that´s where the "hiding" takes place

Yep, there are pointers... or references... java calls them references,
c/c++ calls them pointers - but they are the same thing. c lets you get at
the pointers and affect their values directly.  Java stops this, but you can
still change a pointer value - just assign it to a different object!
Automatic memory management and no pointer arithmatic is what makes java so
damm nice to anyone who's used c!

Daniel.


>
> Just my .2 cents
> Lucas
>
> - Original Message -
> From: "Struts User" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>; "Dakota Jack"
> <[EMAIL PROTECTED]>
> Sent: Tuesday, November 16, 2004 11:50 AM
> Subject: Re: AW: talking about paradigms
>
>
> > I agree with Jack. There are pointers everywhere in Java. Java learns
> > from C++ mistake by "hiding" error prone functionality such as
> > pointers.
> >
> > Joshua Block's book is not a Java Book for beginner. It is target for
> > experience developer. Probably you should look into Bruce Eckel's
> > on-line book for more information - http://64.78.49.204/
> >
> > I hope this helps.
> >
> > Lee
> >
> > On Tue, 16 Nov 2004 06:42:32 -0800, Dakota Jack <[EMAIL PROTECTED]>
> wrote:
> > > Hello, Leon,
> > >
> > > There are pointers in Java.  Every object is referenced by a pointer.
> > > Indeed, how else could an object be referenced?  I am not sure why you
> > > cited Joshua Bloch's book on this.  There is not, as Eddie said,
> > > pointer arithmetic.
> > >
> > > Jack
> > >
> > > On Tue, 16 Nov 2004 11:46:05 +0100, Rosenberg, Leon
> > > <[EMAIL PROTECTED]> wrote:
> > >
> > > >
> > > > And, taking in risk bringing in boredom in your life, there are NO
> > > > _pointers_ in java; if you don't believe me, try some books
> written by
> > > > java developers (i.e. Joshua Bloch, Effective Java Programming
> Language
> > > > Guide,
> > > > Regards
> > > > Leon
> > >
> > > --
> > > "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~
> > >
> > > -
> > > 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: talking about paradigms

2004-11-16 Thread Daniel Perry
XSLT makes me wince... I love what you can do with it, I just hate writing
it!

I think one of the big differences between xslt and jsp is that in jsp all
the complexities are hidden until you choose to use them.  You can stick
pure html in a jsp file and it works.  You can add some jstl, or maybe some
custom tag libraries... and it works.  You can add scriptlets and it works.
But unlike XSLT there's no necessity to use the more complicated/messy
code - but when you want to, it's there.

Daniel.

> -Original Message-
> From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
> Sent: 16 November 2004 04:22
> To: Struts Users Mailing List
> Subject: Re: talking about paradigms
>
>
> IMHO, you have to be very careful with the XML/XSLT solution.
>
> I worked on a project about two years ago (probably closer to three now
> actually) where we had as a requirement the ability to deliver a fairly
> simple web app via normal HTML, but also WAP-based browsers, and also
> the ability to download data lists as CSVs, and also have the ability to
> download some data to clients in XML but in a format of their choosing.
>   In essence, the app itself never changed, nor did the "data" it spit
> out, but the delivery mechanism was highly varied and had to be flexible
> in the future too.
>
> The solution we decided upon was to have the back end generate only XML,
> then use XSLT to transform it to suite the particular client (really a
> fairly obvious approach!).  To this day it works fantastically well, and
> we continually add new delivery formats to the system for new clients,
> all using the exact same data.
>
> While it does work great, it IS immensely complicated.  XSLT is not a
> simple tool to use, by and large.  When we did it we were coding it by
> hand, there are of course tools to help you along today.  Even still, I
> cringe every time a junior developer calls me because they are trying to
> create a new delivery format and I have to remember all the intricacies
> of this thing.  I mean, I hate remembering details of things I coded
> that I haven't touched in a long while in general, but this app in
> particular is painful to try and recall, and it's because of the overall
> complexity of XSLT.  Power and flexibility always come at costs in this
> line of work, and XML/XSLT-based solutions I think are a prime example
> of this.
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
>
> Dakota Jack wrote:
> > Yet, Bill, that is not the problem of the XML/XSLT model, is it?  That
> > model is really cool in separating the model from the view.  Indeed,
> > that model is great at separating the view data from the view
> > presentation.  I am not sure what the app you worked on did, but I
> > think the idea behind the XML/XSLT model is terrific.  Essentially, as
> > I undestand it, the XML is sent and is in some "language" that the
> > client may or may not understand.  So, the XSLT contains a crash
> > course in the language.  That is way cool from my perspective.
> >
> > Jack
> >
> > P.S.  I really liked Eddie Bush's Jedi Knight take on development.
> > That is quite true in my experience.  Usually these metaphors break
> > down pretty fast.  That one held up pretty good.  Probably due to the
> > master Campbell being behind the mythology of Star Wars.
> >
> >
> > On Mon, 15 Nov 2004 09:43:19 -0500, Bill Siggelkow
> > <[EMAIL PROTECTED]> wrote:
> >
> >>Sorry, I haven't been following this thread, but I tend to agree with
> >>you. I worked on an app that used XML/XSLT to achieve "purity" -- and
> >>what resulted was a lot of this "view helper" data coded into the "pure"
> >>XML document; defeating the premise behind separation of the
> model and view.
> >>
> >>-Bill Siggelkow
> >>
> >>
> >>
> >>Daniel Perry wrote:
> >>
> >>>I think the idea that MVC architecture should have a 'dumb
> view' is totally
> >>>wrong.  The view should be as smart as possible.
> >>>
> >>>MVC should separate the M, V and C.  With a really smart view
> you dont have
> >>>to do any preparation for the view in the controller.  If you
> have a dumb
> >>>view then you have to prepare the data in the model/controller
> so that the
> >>>view can cope with it.  Surely this is wrong as you are doing view
> >>>processing outside of the view. Personally i think ALL view processing
> >>>should be done in the view: the view code (be i

RE: [OT] access Microsoft Access database from remote machine

2004-11-15 Thread Daniel Perry
Or, set up filesharing and access then set up a system dsn on the machine
you want to use it on.  Can get a bit messy though with concurrent access :)

Daniel.

> -Original Message-
> From: Lee Harrington [mailto:[EMAIL PROTECTED]
> Sent: 15 November 2004 18:34
> To: Struts Users Mailing List
> Subject: Re: [OT] access Microsoft Access database from remote machine
>
>
> Microsoft Access is not a "database server" -- it is not designed to
> be run on a local machine and process sql sent to it.
>
> However, you could set up tomcat on the same machine as the access
> databaseset a local connection from that tomcat...and call a java
> procedure on the remote tomcat, which will locally access the Access
> database...and return data to you.
>
> Lee
>
>
> On Mon, 15 Nov 2004 10:25:46 -0800 (PST), Ashish Kulkarni
> <[EMAIL PROTECTED]> wrote:
> > Hi
> > Has any one accessed Microsoft access database from
> > remote machine, currently if i have to use JDBC-ODBC
> > brige i have to create a system DSN and then use this
> > to access data,
> > but if i dont have the database on my local machine,
> > or any drive mapped to my machine how do i access it
> > using JDBC
> >
> > Ashish
> >
> > __
> > 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]
>
>


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



RE: talking about paradigms

2004-11-15 Thread Daniel Perry
I think the idea that MVC architecture should have a 'dumb view' is totally
wrong.  The view should be as smart as possible.

MVC should separate the M, V and C.  With a really smart view you dont have
to do any preparation for the view in the controller.  If you have a dumb
view then you have to prepare the data in the model/controller so that the
view can cope with it.  Surely this is wrong as you are doing view
processing outside of the view. Personally i think ALL view processing
should be done in the view: the view code (be it jsps, java, xml/xsl, etc)
should take model data, and produce a view of that data - and it should be
flexible.

The problem with a smarter (or better worded: more capable) view is that
people start doing things in the view which shouldnt be done there, such as
database access.  I dont think this is down to a problem with the view
technology, just a lack of education on the users part.  Arguing that the
view should dumbed down to stop this problem arising is like saying that
cars should only be able to do 70mph because that's all they can legally do.

For example, a poject i am responsible has a lot of code in the model beans
that was put there pre jstl for formatting things like dates, or text.  So
you have getStartDate() which returns a date, and getFormattedStartDate()
which returns a formatted string.  This code should be in the view as it is
purely for view purposes, but i made the decision to bodge it into the model
as it was nicer than using java code in the jsps.  There are various other
methods - such as retrieving chunks of text with \n into , which can now
mostly be handled with jstl.

Daniel.




> -Original Message-
> From: Rosenberg, Leon [mailto:[EMAIL PROTECTED]
> Sent: 15 November 2004 13:44
> To: Struts Users Mailing List
> Subject: AW: talking about paradigms
>
>
>
>
> > > No, but what about
> > >
> > >  ?
> > > (not sure about the syntax).
> > whats the problem?
> >  MVC usually allows 'read-only access to model' for the view
> > Also the question is, what you expose to the view.
> > If you are afraid that somebody will misuse the library entries -
> don't
> > expose them.
> > I suppose MVC was the reason for JSP EL not to allow arbitrary method
> > invocations. But I'd love to have such anyway ;)
> >
> > >...
> > > And what about database access tags?
> > You mean the jstl tags? They are there for quick and dirty.
> > If you don't change anything in the database though, it still okay to
> MVC.
> > If you don't want it, don't expose your database in the first place ;)
> >
> >
>
> The problem is, that if you give a user the possibility to misuse your
> framework - he will.
> And EL gives jsps more power than a dumb view should have. And if your
> view isn't just layouting out the data, but performing nearly complex
> operations, it's not dumb anymore, and a smart view doesn't fit into the
> MVC.
>
> If the user is allowed to break the paradigm he will.
> If you have an architecture, which is built on a paradigm (and any good
> architecture is) you can't allow the developers to break the paradigm,
> or
> the architecture will stop working one day, without obvious reasons.
> It's probably why there are no pointers in java, even pointers adds cool
> features to the language.
>
> Regards
> Leon
>
>
> -
> 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: Are there Struts Applications in real life out there?

2004-11-15 Thread Daniel Perry
Over the weekend i came accross a couple of high profile (in the uk at
least) sites using struts:
www.smile.co.uk (internet banking app uses struts)
www.vodafone.co.uk (uses portal software from broadvision which uses struts)

Daniel.


> -Original Message-
> From: Axel Gro? [mailto:[EMAIL PROTECTED]
> Sent: 10 November 2004 19:21
> To: Struts Users Mailing List
> Subject: Re: Are there Struts Applications in real life out there?
>
>
> 'One,' one of austria's telco companies uses struts for their one portal.
>  (know one of the one portal's programmers)
>
>  http://www.one.at
>
> i hope one got the idea ;)
>
> yaa (yet another Axel)
>
> -
> 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: hosting recommendations?

2004-11-15 Thread Daniel Perry
Php is a small (in terms of memory footprint) interpreted language.  Php
(running as an apache module) is kept in memory, but doesnt use anywhere as
much memory as your typical tomcat jvm. Each page is processed separately -
so you dont have the 'web-app' hanging around in memory.

You generally tend to get very page-centric coding, with little structure
(as far as i'm aware there's no MVC solution like struts available). Php is
easy to learn - it's much like c or javascript, but with no enforced typing.
Because of this you get a lot of sloppy php code with huge security holes!

Costs for php are low as you can run a few hundred/thousand sites on a basic
server e.g.(512mb ram) tomcat on my dev machine has 512mb allocated for
half a dozen apps!

If you want cheap hosting, get the basic dedicated linux server from
uk2.net - ?30 per month.

Daniel.

> -Original Message-
> From: Woodchuck [mailto:[EMAIL PROTECTED]
> Sent: 12 November 2004 21:14
> 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]



RE: session variable in struts

2004-11-11 Thread Daniel Perry
Its the same in struts as in servlets!

The execute method of Action is passes an HttpServletRequest.

Daniel.


> -Original Message-
> From: Milson Fredy Cardona Echeverri [mailto:[EMAIL PROTECTED]
> Sent: 11 November 2004 17:26
> To: [EMAIL PROTECTED]
> Subject: session variable in struts
>
>
> hi friends
>
> i want to declare a session variable in an action class.
>
> I could to solve it in a servlet class :
> HttpSession session = request.getSession();
> session.setAttribute("variable name","value");
>
> but in struts ¿how do i do it?
>
> thanks in advance
>
> _
> Charla con tus amigos en línea mediante MSN Messenger:
> http://messenger.latam.msn.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]



RE: [OT] Re: A new paradigm of Struts development

2004-11-11 Thread Daniel Perry
To me JDNC seems like a halfway house between webapps and rich client apps.

I personally like the way that webapps work (everything is written for the
server and executed on the server then merely displayed at the client), but
I hate the interface (html - and browser).

The web interface lacks consistency across browsers and (simple) rich gui
components.  It also lacks an event model (ok, so you can use javascript to
catch events and fire off forms/etc - but this isn't very eloquent) - and
lets face it, rich, clever apps need a gui event model.

I have been toying with the idea of an alternative browser - an application
browser which is used to launch remote applications instead of an html
browser.

Basically you have a browser which is designed to display GUI components
(including custom gui components).  User interfaces are specified (xml, or
similar) and it loads them and displays them.  It then processes events, and
events can either be handled locally through a scripting language, or
remotely through an event in the application code.  The application code
itself is running on a server.  Applications are mainly event->action
driven.  Applications have read/write access the user interface.  As a
developer you just code the app and declare the gui.  The user uses a
standard bit of software to access the app.

Daniel.

> -Original Message-
> From: Erik Weber [mailto:[EMAIL PROTECTED]
> Sent: 11 November 2004 15:20
> To: Struts Users Mailing List
> Subject: [OT] Re: A new paradigm of Struts development
>
>
> Vic, why we would want to continue to write apps for Internet Explorer
> and Netscape after discovering a technology like this is beyond me. My
> chips are in with you. I have been pushing my web-app minded clients
> toward Swing all along, but technologies like Java Web Start and now
> JDNC are really going to strengthen my case.
>
> I have a question for you. Sorry if the answer is obvious and I just
> haven't read enough.
>
> I have invested a lot in writing custom UI classes, custom paint
> methods, custom UI defaults properties, etc., to get my Swing components
> looking the way I want (I'm sorry but, changing the background colors,
> and other easily-scriptable stuff, doesn't cure Swing's out-of-the-box
> ugliness). Also, I am amassing a collection of custom components, such
> as self-validating forms and custom JTextPane-based browsers.
>
> In fact, one of my browsers builds layouts based on my own metalanguage
> (soon to be XML). It embeds diagrams with captions and draws arrows from
> the captions to the diagrams based on simple coordinates, etc. Seems
> like I was doing JDNC without even really knowing about JDNC. ;)
>
> I do not intend to abandon my current set of GUI devices, but obviously
> I would like to leverage JDNC if it's worth it, not to mention provide
> compatibility. Will JDNC support my own look and feel (or pseudo look
> and feel)? Can it be easily modified to work with my custom components?
>
> I'm not even sure if I should bring up the question of security. Suppose
> I have a custom file chooser. Will there be a sandbox concept like that
> of Applets?
>
> Thanks,
> Erik
>
>
> Vic wrote:
>
> > Adam Hardy wrote:
> >
> >>
> >> What I want to see in the future for big apps is a DTD or xml schema
> >> that brings JSP code and XHTML mark-up under control. Something that
> >> is easily editable by my editor of choice, using syntax-highlighting
> >> to show me where my XHTML is up the swanny.
> >>
> >
> >
> > Just in case you missed my posts about a great Sun open source project
> > JDNC that will be a part of J26 Standard Edition (Mustang), it does
> > above, one of the reasons that I am "raving" about it, check it out:
> >
> > http://javadesktop.org/jdnc/0_5/docs/tutorial/index.html
> >
> > And I am using it w/ a lot of success. Right now I am just doing the
> > "Swing" extensions, but will tie in UI via XML (and will add code to
> > make it work w/ Hessian SoA, it's trivial binding).
> >
> > My chips are behind JDNC.
> >
> > .V
> >
> >
> > -
> > 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: Validator - Redirects or Forwards?

2004-11-11 Thread Daniel Perry
It uses forward (otherwise the errors get lost between requests!).

Do you get an error?

Daniel.

> -Original Message-
> From: Yagiz Erkan [mailto:[EMAIL PROTECTED]
> Sent: 11 November 2004 09:34
> To: [EMAIL PROTECTED]
> Subject: Validator - Redirects or Forwards?
>
>
> When the validation fails, does the Validator use "redirect" or "forward"?
> Because I can't see my JSP when the validation fails and I keep
> my JSPs under
> WEB-INF. Do you have an idea what may go wrong?
>
> Thanks,
>
>  - Yagiz -
>
> -
> 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: Hiding Url File Parameters

2004-11-10 Thread Daniel Perry
Hmm... difficult one.

What about creating a 'BaseAction' which all actions inherit, which checks a
session attribute.

A session attribute could be set by the valid site entrance action.

All other actions inherit the default behaviour: if the session attribute
doesnt exist then redirect to entrance page otherwise process as normal.

Doesnt stop people seeing your details, but would make any bookmark jump to
the homepage.

Daniel.

> -Original Message-
> From: Peter Neu [mailto:[EMAIL PROTECTED]
> Sent: 10 November 2004 14:59
> To: Struts Users Mailing List
> Subject: Re: Hiding Url File Parameters
>
>
> I'm just trying to hide all the technical details from the user. Nobody
> should attempt to bookmark a page using the Action.do
> even if it's technically not  possible (when using a filter).
>
> Regards,
>
> Peter
>
> Daniel Perry schrieb:
>
> >What exactly is it that you're trying to stop people accessing/doing?
> >
> >Daniel.
> >
> >
> >
> >>-Original Message-
> >>From: Peter Neu [mailto:[EMAIL PROTECTED]
> >>Sent: 10 November 2004 14:24
> >>To: Struts Users Mailing List
> >>Subject: Re: Hiding Url File Parameters
> >>
> >>
> >>OK. Then I will have rely on the filter mechanism
> >>defined in the web.xml.
> >>
> >>Regards,
> >>
> >>Peter
> >>
> >>
> >>
> >>>In short no.
> >>>
> >>>To execute a struts action, the browser MUST make an HTTP
> request.  This
> >>>request MUST specify an object (in HTTP context) to retrieve.
> >>>
> >>>
> >>There is no
> >>
> >>
> >>>way to fully hide this url.  It can appear to be achieved using
> >>>
> >>>
> >>a frameset
> >>
> >>
> >>>with one frame 100%x100% - only the frameset url is shown in
> the browser.
> >>>
> >>>You can also not use .do - set the servlet mapping to anything
> >>>
> >>>
> >>you want - i
> >>
> >>
> >>>believe that you can even use .html as the extension.
> >>>
> >>>Whatever you do will only be effective at hiding it from people
> >>>
> >>>
> >>in general -
> >>
> >>
> >>>anyone who knows about HTTP (eg hackers) can manually make the
> >>>
> >>>
> >>requests and
> >>
> >>
> >>>get round this, so really there is no advantage to hiding the
> url in the
> >>>first place.
> >>>
> >>>Daniel.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>>-Original Message-
> >>>>From: Peter Neu [mailto:[EMAIL PROTECTED]
> >>>>Sent: 09 November 2004 19:02
> >>>>To: Struts Users Mailing List
> >>>>Subject: Re: Hiding Url File Parameters
> >>>>
> >>>>
> >>>>Thanks that definitely solved the problem.
> >>>>
> >>>>Is there also a way to get rid of the Action.do  ?
> >>>>
> >>>>Regards,
> >>>>
> >>>>Swen
> >>>>
> >>>>
> >>>>
> >>>>Daniel Perry schrieb:
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>>Yep,
> >>>>>Change your code to:
> >>>>>nextPage = mapping.findForward("struts");
> >>>>>
> >>>>>and change the forward to:
> >>>>>
> >>>>> >>>>>contextRelative="true"/>
> >>>>>
> >>>>>Note if you dont want a lot of mess in WEB-INF, put them in a
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>folder ie jsps
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>>and use /WEB-INF/jsps/struts.jsp
> >>>>>
> >>>>>Hope that helps,
> >>>>>
> >>>>>Daniel.
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>>-Original Message-
> >>>>&g

RE: Hiding Url File Parameters

2004-11-10 Thread Daniel Perry
What exactly is it that you're trying to stop people accessing/doing?

Daniel.

> -Original Message-
> From: Peter Neu [mailto:[EMAIL PROTECTED]
> Sent: 10 November 2004 14:24
> To: Struts Users Mailing List
> Subject: Re: Hiding Url File Parameters
>
>
> OK. Then I will have rely on the filter mechanism
> defined in the web.xml.
>
> Regards,
>
> Peter
>
> >In short no.
> >
> >To execute a struts action, the browser MUST make an HTTP request.  This
> >request MUST specify an object (in HTTP context) to retrieve.
> There is no
> >way to fully hide this url.  It can appear to be achieved using
> a frameset
> >with one frame 100%x100% - only the frameset url is shown in the browser.
> >
> >You can also not use .do - set the servlet mapping to anything
> you want - i
> >believe that you can even use .html as the extension.
> >
> >Whatever you do will only be effective at hiding it from people
> in general -
> >anyone who knows about HTTP (eg hackers) can manually make the
> requests and
> >get round this, so really there is no advantage to hiding the url in the
> >first place.
> >
> >Daniel.
> >
> >
> >
> >
> >
> >>-Original Message-
> >>From: Peter Neu [mailto:[EMAIL PROTECTED]
> >>Sent: 09 November 2004 19:02
> >>To: Struts Users Mailing List
> >>Subject: Re: Hiding Url File Parameters
> >>
> >>
> >>Thanks that definitely solved the problem.
> >>
> >>Is there also a way to get rid of the Action.do  ?
> >>
> >>Regards,
> >>
> >>Swen
> >>
> >>
> >>
> >>Daniel Perry schrieb:
> >>
> >>
> >>
> >>>Yep,
> >>>Change your code to:
> >>>nextPage = mapping.findForward("struts");
> >>>
> >>>and change the forward to:
> >>>
> >>> >>>contextRelative="true"/>
> >>>
> >>>Note if you dont want a lot of mess in WEB-INF, put them in a
> >>>
> >>>
> >>folder ie jsps
> >>
> >>
> >>>and use /WEB-INF/jsps/struts.jsp
> >>>
> >>>Hope that helps,
> >>>
> >>>Daniel.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>>-Original Message-
> >>>>From: Peter Neu [mailto:[EMAIL PROTECTED]
> >>>>Sent: 09 November 2004 17:55
> >>>>To: Struts Users Mailing List
> >>>>Subject: Re: Hiding Url File Parameters
> >>>>
> >>>>
> >>>>OK.  I tried this :
> >>>>
> >>>>nextPage = new ActionForward(mapping.findForward("struts").getPath(),
> >>>>false);   // set the flag to false
> >>>>
> >>>>and put the JSP's into the WEB-INF folder.
> >>>>
> >>>>When I tried to call the ActionClass the following error occured :
> >>>>
> >>>>java.lang.IllegalArgumentException: Path struts.jsp does not
> >>>>start with a "/" character
> >>>>
> >>>>org.apache.struts.action.RequestProcessor.doForward(RequestProcess
> >>>>or.java:1062)
> >>>>
> >>>>org.apache.struts.action.RequestProcessor.processForwardConfig(Req
> >>>>uestProcessor.java:455)
> >>>>
> >>>>org.apache.struts.action.RequestProcessor.process(RequestProcessor
> >>>>.java:279)
> >>>>
> >>>>org.apache.struts.action.ActionServlet.process(ActionServlet.j
> ava:1482)
> >>>>
> >>>>org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
> >>>>  javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
> >>>>  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >>>>
> >>>>Here is the definition of the Action which is explicitly called
> >>>>and which causes the error:
> >>>>
> >>>> >>>>   input="struts.jsp"
> >>>>   name="postHvForm"
> >>>>   scope="request"
> >>>>   validate="true"
> >>>>   type="pack.servlets.PostHv">
> >>>>
> >>>>   
> >>>>
> >>>>Do you have any idea what I did wrong ?
> >

RE: A new paradigm of Struts development

2004-11-10 Thread Daniel Perry

> Yes you are missing something ;)
>
> I am saying struts doesn't need a "view controller" because you can
> implement the post-redirect-get pattern and struts is complicated enough
> already. Although no-one is arguing for or against me :)
>
> I think it is more a case of JSF needing a better controller -
> i.e. struts.
>

I too like the post-redirect-get pattern as it i feel it provides a neater
solution than tokens!

It completely separates the actual Action from the next Actions preparation.
If you take an action to have the following lifecycle:

1. Prepare data for action (eg read key from request and load a
bean/actionform)
2. Display (eg show form for editing)
3. Process Submit (process submitted data)
4. Next action (begin cycle for next action)

Now the code for struts actions without PRG tends to go 3,4,1,2 (although it
can go 3,4,forward,1,2).

With PRG you get two actions: one doing 1,2 (a) and another doing 3,4 (b)

While i think this pattern makes more logical sense, i think that it is a
bit odd to implement (a) in the same manner as (b).  You can do it using a
single action and use mapping.getParameter() to pick which part of the
action you are on, or you can use two actions - both of which i dislike.

So i think that a view controller could be useful.  Someway of simplifying
and decoupling (a) from (b) would be nice, and would save a lot of
repetative code.

Daniel.



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



RE: [Tiles] Forwarding to an specific anchor link of a Tile

2004-11-10 Thread Daniel Perry
This is not a good idea...

As far as i'm aware anchors are not part of the http specification.  They
are only implemented in html.

Eg. You type /myAnchor.do#myAnchor into the url bar in your browser, the
browser actually requests /myAnchor.do - it doesnt send the anchor - it just
uses it to show the correct part of the page.

Now, if a browser sends a request for /myAnchor.do and recieves a redirect
to /myAnchor.do#myAnchor the browser will then make a further request - but
what should it request?

/myAnchor.do#myAnchor is an invalid url

If its clever it will spot this and either send:
/myAnchor.do (and handle the anchor)

or if it's not:
/myAnchor.do#myAnchor (and cause errors)
/myAnchor.do%23myAnchor (and cause errors)

I've come accross this problem in my own apps.  In testing Firefox and MOST
versions of IE can deal with it... but some versions of IE cause errors.

The only solution i came up with is to use forwards (not redirects) and use
javascript so that when a form is submitted, or a link is cliked it decides
which anchor to select before anything is submitted.

Daniel.



> -Original Message-
> From: David G. Friedman [mailto:[EMAIL PROTECTED]
> Sent: 10 November 2004 04:50
> To: Struts Users Mailing List
> Subject: RE: [Tiles] Forwarding to an specific anchor link of a Tile
>
>
> Daniel,
>
> An anchor is HTML, not Java/Struts so why don't you have your
> redirect go to
> /myAnchor.do#myAnchor ?
>
> Regards,
> David
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: Friday, November 05, 2004 6:43 AM
> To: [EMAIL PROTECTED]
> Subject: [Tiles] Forwarding to an specific anchor link of a Tile
>
>
>
> Hi everybody,
>
> i need to forward from an Action to an specifig anchor link of a Tile.
>
> Something like:
>
> [example definition of Tiles configuration file]
> 
> 
> 
> 
>
> but as expected, Tiles engine can't locate the file.
>
> is it possible to forward from an Action to an specific anchor link of a
> Tile?
>
> Thanks in advance,
> Daniel
>
> -
> 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: Hiding Url File Parameters

2004-11-10 Thread Daniel Perry
In short no.

To execute a struts action, the browser MUST make an HTTP request.  This
request MUST specify an object (in HTTP context) to retrieve.  There is no
way to fully hide this url.  It can appear to be achieved using a frameset
with one frame 100%x100% - only the frameset url is shown in the browser.

You can also not use .do - set the servlet mapping to anything you want - i
believe that you can even use .html as the extension.

Whatever you do will only be effective at hiding it from people in general -
anyone who knows about HTTP (eg hackers) can manually make the requests and
get round this, so really there is no advantage to hiding the url in the
first place.

Daniel.



> -Original Message-
> From: Peter Neu [mailto:[EMAIL PROTECTED]
> Sent: 09 November 2004 19:02
> To: Struts Users Mailing List
> Subject: Re: Hiding Url File Parameters
>
>
> Thanks that definitely solved the problem.
>
> Is there also a way to get rid of the Action.do  ?
>
> Regards,
>
> Swen
>
>
>
> Daniel Perry schrieb:
>
> >Yep,
> >Change your code to:
> >nextPage = mapping.findForward("struts");
> >
> >and change the forward to:
> >
> > >contextRelative="true"/>
> >
> >Note if you dont want a lot of mess in WEB-INF, put them in a
> folder ie jsps
> >and use /WEB-INF/jsps/struts.jsp
> >
> >Hope that helps,
> >
> >Daniel.
> >
> >
> >
> >>-Original Message-
> >>From: Peter Neu [mailto:[EMAIL PROTECTED]
> >>Sent: 09 November 2004 17:55
> >>To: Struts Users Mailing List
> >>Subject: Re: Hiding Url File Parameters
> >>
> >>
> >>OK.  I tried this :
> >>
> >> nextPage = new ActionForward(mapping.findForward("struts").getPath(),
> >>false);   // set the flag to false
> >>
> >>and put the JSP's into the WEB-INF folder.
> >>
> >>When I tried to call the ActionClass the following error occured :
> >>
> >>java.lang.IllegalArgumentException: Path struts.jsp does not
> >>start with a "/" character
> >>
> >>org.apache.struts.action.RequestProcessor.doForward(RequestProcess
> >>or.java:1062)
> >>
> >>org.apache.struts.action.RequestProcessor.processForwardConfig(Req
> >>uestProcessor.java:455)
> >>
> >>org.apache.struts.action.RequestProcessor.process(RequestProcessor
> >>.java:279)
> >>
> >>org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
> >>
> >>org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
> >>javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
> >>javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >>
> >>Here is the definition of the Action which is explicitly called
> >>and which causes the error:
> >>
> >> >>input="struts.jsp"
> >>name="postHvForm"
> >>scope="request"
> >>validate="true"
> >>type="pack.servlets.PostHv">
> >> 
> >>
> >>
> >>Do you have any idea what I did wrong ?
> >>
> >>
> >>Regards,
> >>
> >>Peter
> >>
> >>
> >>
> >>
> >>
> >>
> >>Daniel Perry schrieb:
> >>
> >>
> >>
> >>>So you have an action, which forwards to a jsp page, and you
> >>>
> >>>
> >>dont want the
> >>
> >>
> >>>users to see the blah.jsp?
> >>>
> >>>Just set redirect to false.  This causes it to forward the request
> >>>internally without sending a browser redirect.  The jsp will be
> >>>
> >>>
> >>processed,
> >>
> >>
> >>>and return the result to the browser, but as far as the browser
> >>>
> >>>
> >>is concerned
> >>
> >>
> >>>it will look like its come from the action.
> >>>
> >>>One method of 'hiding' jsps is to put them in the WEB-INF
> >>>
> >>>
> >>directory, and use
> >>
> >>
> >>>forwards (not redirects) as this way the client CANNOT access the jsps
> >>>directly.
> >>>
> >>>Daniel.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>

RE: Are there Struts Applications in real life out there?

2004-11-09 Thread Daniel Perry
hehe...

I'm lucky - i work for a small company, and as far as management is
concerned open-source=free and free=good so through the power of
transativity open-source=good and thats as far as any concern goes...

We've built several big apps using struts - all have been intranet
applications so none available on the internet (some for the NHS).

Not to say we havnt encountered any resistance to open source from our
clients - but this is normally directed at linux or tomcat - struts gets off
lightly as you can hide it with cunning wording ie use phrases like 'a java
library' and not 'based on the struts framework'.

Daniel.

> -Original Message-
> From: Dakota Jack [mailto:[EMAIL PROTECTED]
> Sent: 09 November 2004 18:02
> To: Struts Users Mailing List
> Subject: Re: Are there Struts Applications in real life out there?
>
>
> We are really all just a bunch of kids having fun and there is no
> really real real use of Struts at all.  Whe!  LOL
>
> Sometimes people seem to lose a grip on reality.
>
> Jack
>
>
> On Tue, 9 Nov 2004 10:20:41 -0500, Ted Husted <[EMAIL PROTECTED]> wrote:
> > LOL. :)
> >
> > Yes, over the last two years at least nineteen different
> publishers each decided to publish books about Struts, surely
> selling over a hundred thousand copies combined -- but no one is
> actually using it in production. :)
> >
> > You might as well ask whether the moon is really made of green cheese :)
> >
> > Once upon a time, we had a list of thirty or so public
> applications, but it was too much work to maintain, and we had
> long since past the point where we had something to prove.
> >
> > I've met with teams for some of the the largest corporations in
> world, who I know for a fact are using Struts in production. Am I
> going to names names here. No. Why? Because it's a security issue
> for anyone to reveal what platform they are using. The bigger the
> site, the bigger the issue.
> >
> > I can tell you that I just got back from a users group meeting
> in Boston. The New England JUG is the second largest in the world
> (behind Tokyo). The topic was Struts, and it was standing room
> only. When I asked who had Struts applications in production,
> nearly everyone raised their hands. People tell me all the time
> that Struts is still the platform of choice for major
> corporations. I've also heard from more than one source that it's
> a favorite among Department of Defense contractors. The
> lifecycles for a DoD contracts are very long, and these
> contractors won't be taking Struts out of production any time soon.
> >
> > The article sounds like "yellow" journalism to me -- designed
> for "shock" value only.
> >
> > -Ted.
> >
> >
> >
> > On Tue, 09 Nov 2004 15:45:06 +0100, Stahlhut, Axel wrote:
> > > Hi all,
> > >
> > > there will be an article in a german magazine in the near future
> > > which covers the theme: "Is struts really in use in real
> > > applications".
> > >
> > > To prove that it is indeed in usage in more than one running
> > > project, i wrote a topic in a struts user forum (which runs on my
> > > server and is available for general usage, so feel free to use it
> > > for discussion, best practises and so on).
> > >
> > > If you developed or know an application using struts as mvc
> > > framework (also if just in parts) please feel free to enter a reply
> > > there with a short description of the application and as possible
> > > an URL.
> > >
> > > The URL of the topic is:
> > > http://www.objectstore.de/forum/viewtopic.php?p=5#5
> > >
> > > Regards
> > > Axel Stahlhut
> > >
> > > PS: If somebody knows a URL with al list of applications, please
> > > send them to me.
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> "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~
>
> -
> 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: Hiding Url File Parameters

2004-11-09 Thread Daniel Perry
Yep,
Change your code to:
nextPage = mapping.findForward("struts");

and change the forward to:



Note if you dont want a lot of mess in WEB-INF, put them in a folder ie jsps
and use /WEB-INF/jsps/struts.jsp

Hope that helps,

Daniel.

> -Original Message-
> From: Peter Neu [mailto:[EMAIL PROTECTED]
> Sent: 09 November 2004 17:55
> To: Struts Users Mailing List
> Subject: Re: Hiding Url File Parameters
>
>
> OK.  I tried this :
>
>  nextPage = new ActionForward(mapping.findForward("struts").getPath(),
> false);   // set the flag to false
>
> and put the JSP's into the WEB-INF folder.
>
> When I tried to call the ActionClass the following error occured :
>
> java.lang.IllegalArgumentException: Path struts.jsp does not
> start with a "/" character
>
> org.apache.struts.action.RequestProcessor.doForward(RequestProcess
> or.java:1062)
>
> org.apache.struts.action.RequestProcessor.processForwardConfig(Req
> uestProcessor.java:455)
>
> org.apache.struts.action.RequestProcessor.process(RequestProcessor
> .java:279)
>
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
>
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
> Here is the definition of the Action which is explicitly called
> and which causes the error:
>
>  input="struts.jsp"
> name="postHvForm"
> scope="request"
> validate="true"
> type="pack.servlets.PostHv">
>  
> 
>
> Do you have any idea what I did wrong ?
>
>
> Regards,
>
> Peter
>
>
>
>
>
>
> Daniel Perry schrieb:
>
> >So you have an action, which forwards to a jsp page, and you
> dont want the
> >users to see the blah.jsp?
> >
> >Just set redirect to false.  This causes it to forward the request
> >internally without sending a browser redirect.  The jsp will be
> processed,
> >and return the result to the browser, but as far as the browser
> is concerned
> >it will look like its come from the action.
> >
> >One method of 'hiding' jsps is to put them in the WEB-INF
> directory, and use
> >forwards (not redirects) as this way the client CANNOT access the jsps
> >directly.
> >
> >Daniel.
> >
> >
> >
> >>-Original Message-
> >>From: Peter Neu [mailto:[EMAIL PROTECTED]
> >>Sent: 09 November 2004 16:41
> >>To: Struts Users Mailing List
> >>Subject: Re: Hiding Url File Parameters
> >>
> >>
> >>Hello Joe,
> >>
> >>the value of the redirect flag is true  since I cannot forward when
> >>it is set to false. I thought this was the regular way to forward
> >>from one jsp-page to another.
> >>
> >>Isn't there any other option how I can do the forward and
> >>keep the file-name of the jsp-page out of the URL ?
> >>
> >>Best Regards,
> >>
> >>Peter
> >>
> >>
> >>
> >>Joe Germuska schrieb:
> >>
> >>
> >>
> >>>At 4:03 PM +0100 11/9/04, Peter Neu wrote:
> >>>
> >>>
> >>>
> >>>>Hello,
> >>>>
> >>>>How can I manipulate the URL-Mapping in the
> >>>>web.xml /struts-config.xml in order to hide
> >>>>the filenames when I use the ActionForward in an ActionServlet?
> >>>>Currently the URL displays all the files which I forward to.
> >>>>
> >>>>Before I posted this message I looked through the mail archieve
> >>>>but I only found some suggestions using JScript which I would like
> >>>>to keep out of my application as much as possible.
> >>>>
> >>>>
> >>>Are you returning an ActionForward which has a 'true' value for its
> >>>redirect property?  In this case, the answer is "no."
> >>>
> >>>Otherwise, you could have a Struts action read the file from the
> >>>filesystem and write the bytes to the response.  This would hide the
> >>>true file name.
> >>>
> >>>Joe
> >>>
> >>>
> >>>
> >>-
> >>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: Hiding Url File Parameters

2004-11-09 Thread Daniel Perry
So you have an action, which forwards to a jsp page, and you dont want the
users to see the blah.jsp?

Just set redirect to false.  This causes it to forward the request
internally without sending a browser redirect.  The jsp will be processed,
and return the result to the browser, but as far as the browser is concerned
it will look like its come from the action.

One method of 'hiding' jsps is to put them in the WEB-INF directory, and use
forwards (not redirects) as this way the client CANNOT access the jsps
directly.

Daniel.

> -Original Message-
> From: Peter Neu [mailto:[EMAIL PROTECTED]
> Sent: 09 November 2004 16:41
> To: Struts Users Mailing List
> Subject: Re: Hiding Url File Parameters
>
>
> Hello Joe,
>
> the value of the redirect flag is true  since I cannot forward when
> it is set to false. I thought this was the regular way to forward
> from one jsp-page to another.
>
> Isn't there any other option how I can do the forward and
> keep the file-name of the jsp-page out of the URL ?
>
> Best Regards,
>
> Peter
>
>
>
> Joe Germuska schrieb:
>
> > At 4:03 PM +0100 11/9/04, Peter Neu wrote:
> >
> >> Hello,
> >>
> >> How can I manipulate the URL-Mapping in the
> >> web.xml /struts-config.xml in order to hide
> >> the filenames when I use the ActionForward in an ActionServlet?
> >> Currently the URL displays all the files which I forward to.
> >>
> >> Before I posted this message I looked through the mail archieve
> >> but I only found some suggestions using JScript which I would like
> >> to keep out of my application as much as possible.
> >
> >
> > Are you returning an ActionForward which has a 'true' value for its
> > redirect property?  In this case, the answer is "no."
> >
> > Otherwise, you could have a Struts action read the file from the
> > filesystem and write the bytes to the response.  This would hide the
> > true file name.
> >
> > Joe
> >
>
>
> -
> 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: Remotely restart Tomcat.

2004-11-08 Thread Daniel Perry
I too have found this problem.  I dont entirely understand it myself, but I
was told that when you restart / stop-start a webapp tomcat has to create
new classloaders - and the old classloaders are orphaned and are not cleaned
up during garbage collection, so you basically get a memory leak.  In my
experience the size of the leak depends on the complexity of the program -
ie a struts app using dozens of libraries (itext, fop, ojb, quartz, axis,
jdom, xerces, etc) will cause a bigger memory leak that a tiny servlet using
no libraries.

I dont think the problem is tomcat specific - ie i believe it affects other
servlet containers aswell.

So, using remote shell access to restart tomcat saves a lot of trouble.

Daniel.

> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] Behalf Of Thomas Kellerer
> Sent: 04 November 2004 12:33
> To: [EMAIL PROTECTED]
> Subject: Re: Remotely restart Tomcat.
>
>
> On 04.11.2004 12:49 Christoph Kutzinski wrote:
>
> > AFAIk this is generally disrecommended in production environments since
> > there are some memory leaks in Tomcat/Struts (which are seemingly very
> > hard or impossible to fix) regarding webapp restart.
> >
> > The recommended way is to shut down and restart tomcat.
> >
> > For a develop environment webapp restart is ok.
> >
> > HTH
> > Christoph
> >
> Do you have any reference (documents, links) for this?
>
> Thomas
>
>
> -
> 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: Remotely restart Tomcat.

2004-11-04 Thread Daniel Perry
What OS are you using?

I use ssh to log into our linux servers and restart tomcat that way.

Can also be done using telnet into windows.

Daniel.

> -Original Message-
> From: Philip DONAGHY [mailto:[EMAIL PROTECTED]
> Sent: 04 November 2004 11:32
> To: Struts Users Mailing List
> Subject: Re: Remotely restart Tomcat.
>
>
> You may also be interested in the manager which can start or stop
> specific web applications.
>
> http://jakarta.apache.org/tomcat/tomcat-5.5-doc/manager-howto.html
>
> You have to edit $CATALINA_HOME/conf/tomcat-users.xml and add a user to
> use it.
>
> Donaghy
>
> dumm y a écrit :
> >
> > Hi all
> >
> >  Is there a way to hit the admin or something so that I can
> >  restart Tomcat remotely? I am using Struts and the only way I
> >  know to get things going again after changing the
> >  struts-config.xml file is to restart Tomcat. Can't just restart
> >  my web app.
> >
> >  Help!
> >
> > -
> > 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: Checking a cookie or redirecting - best way? (Getting ERROR, Help!)

2004-09-21 Thread Daniel Perry
It is saying that bean:cookie should be an empty tag. As you havnt closed
the tag, it isnt empty!

So, should be:


Notice the slash on the end!

Daniel.

> -Original Message-
> From: CCNY [mailto:[EMAIL PROTECTED]
> Sent: 21 September 2004 14:04
> To: Struts Users Mailing List
> Subject: Fwd: Checking a cookie or redirecting - best way? (Getting
> ERROR, Help!)
>
>
> So when I run the jsp below (ironically named "success.jsp") I get the
> following error
>
> org.apache.jasper.JasperException: /pages/success.jsp(4,0) According
> to TLD, tag bean:cookie must be empty, but is not
>
> Huh?
>
> I also tried  in the JSP, sme error.
>
> Can anyone help? am i useing bean:cookie wrong?
>
>
> -- Forwarded message --
> From: Dave Johnson <[EMAIL PROTECTED]>
> Date: Tue, 21 Sep 2004 08:41:47 -0400
> Subject: Checking a cookie or redirecting - best way?
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
>
> hi all
>
> Well now I've got this cookie that I need to check for, and if it
> exists, lovely. Nothing else needs to be done.
>
> if NOT, I need to send the user to a specific page (/error.jsp).
>
> I was thinking of using  to check for the bean, but I
> dont want to wrap all my jsp code with that tag, what I really want is
> something simple at the beginning that checks if the bean is there
> then does a redirect if there's an error.
>
> should I be using a struts tag or scriptlet?
>
> what about if I need to include something like that in HTML (using
> javascript) has anyone done that?
>
> Thanks
>
> D
>
> -
> 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: Can anyone recommend a UK based Tomcat Struts MySql hosting solution?

2004-09-16 Thread Daniel Perry
Personally, i've never used shared tomcat/struts/mysql hosting.

We use uk2 (http://uk2.net/) dedicated servers.  Cheapest ones are £29 per
month (3 years up front tho!) for an intel 2.4ghz, 512mb ram, 40gb hdd
server with fedora. Easy enough to set up tomcat on it, and works a treat!

Initialy bought one as they are so cheap just to see what they are like, but
havnt had any trouble with it, so now have a load of them.

Daniel.

> -Original Message-
> From: Mark Benussi [mailto:[EMAIL PROTECTED]
> Sent: 16 September 2004 11:54
> To: [EMAIL PROTECTED]
> Subject: Can anyone recommend a UK based Tomcat Struts MySql hosting
> solution?
>
>
> Subject says it all
>
> Does anyone have any good or bad recommendations.
>
>
>
> -
> 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: FOP for PDF

2004-09-15 Thread Daniel Perry
FOP works a treat. I found it better than iText.
Pretty simple to return from a struts action (see the fop example servlet
code - its basically the same).

Daniel.

> -Original Message-
> From: Jesse Alexander (KXT) [mailto:[EMAIL PROTECTED]
> Sent: 15 September 2004 07:01
> To: Struts Users Mailing List
> Subject: RE: FOP for PDF
>
>
> I would say it is ready.
> If you are worried about the interface changes... and if at your
> shop several
> people must use it... then the best strategy might be to isolate
> your app from
> FOP using a thin layer... (that's what we did anyway to
> accomodate our own
> logging and config rules...)
>
> hth
>
> PS: when posting such a question on an (dare I say obviously)
> wrong mailing
> list, it is best to put [OT] before the subject to declare it
> OffTopic...
> Helps others to decide whether they want to read it or not
>
> -Original Message-
> From: Jirole, Amar [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 14, 2004 10:00 PM
> To: 'Struts Users Mailing List'
> Subject: FOP for PDF
>
> I am planning to use fop for rendering my objects in PDF. Is it production
> ready. Does anyone have any experience either way?
> Thanks in Advance
>
> -Original Message-
> From: Matthias Wessendorf [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 02, 2004 8:06 AM
> To: 'Struts Users Mailing List'
> Subject: RE: PDF & Email
>
>
> for email / javamail see
>
> http://jakarta.apache.org/commons/sandbox/email/
>
> PDF: apache FOP
> --> http://xml.apache.org/fop/
>
> regards,
>
>
> > -Original Message-
> > From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, September 02, 2004 1:59 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: PDF & Email
> >
> >
> > I need to generate an email along with a PDF within a java
> > struts action and send that email with the PDF attachment
> > using java mail.  Can anyone recommend a great PDF package
> > that I can do this and render the PDF as an email attachment
> > in realtime?
> >
> > ___
> > Chris Cranford
> > Programmer/Developer
> > SETECH Inc. & Companies
> > 6302 Fairview Rd, Suite 201
> > Charlotte, NC  28210
> > Phone: (704) 362-9423, Fax: (704) 362-9409, Mobile: (704) 650-1042
> > Email: [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: Advantages of J2EE w. Struts vs .NET ASP.NET

2004-09-14 Thread Daniel Perry
Having been exposed to both .NET and java i have to say i've prefered java.
My main reasons are:

1. java is free so learning it as a student was cheaper (well, legally
anyway!)

2. the amount of free stuff out there for java. There is soo much
available! Show this to most .NET developers and they're amazed.  Though to
be truthful, show most .NET developers how much stuff is available for free
for .NET and they're amazed!

3. Windows. if you go with .net, you have to use windows as a server.
Firstly there's the whole security/stability issue.  I'd agree that in my
experience win2k server has been fairly stable.  As for secure, that's a
joke.  How many worms have there been infecting windows servers? How many
have infected *nix servers?  It also seems madness to me to shell out so
much for an operating system when there are better things for free.  For
example, I installed a linux server with a struts app on it about 6 months
ago (uptime 161 days).  Hasnt been restarted since.  This was in a very
large organisation that was 100% windows, and was dubious about my use of
linux.  Their IT manager i work with says she cant belive how stable it is,
compared to all their windows servers.

If MS launched .NET for linux, then i might reevaluate it.

As for web services, i too love these.  I especially love how easy it is to
make a service using axis and .jws files.  But i do have concerns about web
services.  Dont get me wrong, web services are great if you want to connect
two systems which cant be connected in a simpler fashion. But i am concerned
with the amount of overhead web services generate (refering to SOAP here as
it is the prevelant standard).  In a traditional message passing distributed
system, the overhead (that soap introduces) could be controlled, by
minimising the size of the messages.  Instead of sending a couple of
kilobytes of http headers and xml to ask for a record by id, you could just
send the integer id number. Same applies to the response.  Might not sound
much but when you start processing thousands/millions of requests per
second, the network bandwidth, processing power and memory usage required to
handle these ineficient messages adds up. I would be interested to see a
comparison of say mysql's native tcp communications, and say a SOAP+XML
equivilent.

The inefficiency of SOAP is also a big problem for mobile devices.  Low
memory (ram, and flash) prohibits the use of say axis+exerces.  There are
various solutions being tossed about.

Daniel.

> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] Behalf Of Vic
> Sent: 14 September 2004 14:48
> To: [EMAIL PROTECTED]
> Subject: Re: Advantages of J2EE w. Struts vs .NET ASP.NET
>
>
> Pilgrim, Peter wrote:
> >
> > The trouble with RIA is that there is no universal defacto
> > browser technology. There are lots of interesting solutions
> > for rich functionality. My gut feeling it is gooing to take
> > a twentieth-first century equivalent of Netscape and Microsoft
> > to really push forward a next generation [XML/XSLT/ T(x)] browser
> >
> > Where T(x) stands for some new technology.
> > Hint substitute T(x) for SVG, XUL, Flex, or whatever you
> > think it is going happen.
> >
>
> Hey Peter, I saw your post on TSS or RiA.
> Rich Internent Application, key word is *APPLICATION*. There is no
> browser, that would make 2 sets of windowing API. Like iTunes is an
> aplication.  Or Limewire is an application. It makes it simpler and more
> powerfull w/o browser, just use browser for launch. I think Java
> WebStart is big, no such thing in .NET . (Java of course for cross
> platform, how do I do a network launch w/ .NET on Mac?). Look who owns
> the browser standard. (IE of course, with all the plug in, so  lets
> just  bypass it, nothing worse than coding JSP for IE)
>
> As far as development enviroment, if you compare Sun's JCP Java ... we
> lose, we lose big:
> http://theserverside.com/news/thread.tss?thread_id=28695
> (See the GridBag demo)
>
> But if you include O/S, like JGoodies (iBatis, etc.) ... we win. I do
> think there will be O/S for .NET (like Apache is porting, Ant is
> porting, iBatis is porting so it will be closer. More of a tanget: I
> think Unix is MUCH more stable than viruses on Windoze. Just check out
> Redhat Fedora. So ... for heavy lifting, Linux. For departmental,
> WinAntiVirusCitySlowPoke)
>
> Anyway, I think future is iTunes-like-applications concept (with
> "distributed web services" arcitecture), I will have a sample next
> month, posted on my site only.
>
>
> .V
> boardVU.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]



RE: Adding Tags Dynamically

2004-09-08 Thread Daniel Perry
Do you want to do this for a single extra field? or any number of extra
fields?

If single, then just hide it using css, and use a bit of javascript to
unhide it.

If multiple, you can achieve this using struts by having the form submit,
add extra item in a list (where each item represents a row), then return to
the same form.

Alternatively you can do this using javascript, by adding elements to the
page.  Not a very nice solution though.

Daniel.


> -Original Message-
> From: Hadeel Rashad [mailto:[EMAIL PROTECTED]
> Sent: 09 September 2004 00:29
> To: 'Struts Users Mailing List'
> Subject: RE: Adding Tags Dynamically
>
>
> I want when I press add input, I add the input in a definite place
>
> -Original Message-
> From: Nicolas De Loof [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 08, 2004 6:09 AM
> To: Struts Users Mailing List
> Subject: Re: Adding Tags Dynamically
>
>
> - JSP tags are translated into java code during JSP compilation BEFORE
> any request processing.
> - Javascript is executed by browser AFTER reponse has been built by
> server.
>
> Tags must be 'statically' set in JSP
>
> What do you ant to do ?
>
> Nico.
>
>
> >
> > Can I add struts tags dynamically after loading the page, using
> > javascript probably???
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
> This message contains information that may be privileged or confidential
> and is the property of the Capgemini Group. It is intended only for the
> person to whom it is addressed. If you are not the intended recipient,
> you are not authorized to read, print, retain, copy, disseminate,
> distribute, or use this message or any part thereof. If you receive this
> message in error, please notify the sender immediately and delete all
> copies of this message.
>
>
> -
> 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: Adding Tags Dynamically

2004-09-08 Thread Daniel Perry
No!

Struts tags are executed on the server.

Once user has received the page, it is running on the client browser, not on
the server, so struts tags are no use!

What do you want to do on the client? You probably want to use just
javascript!

Daniel.



> -Original Message-
> From: Hadeel Rashad [mailto:[EMAIL PROTECTED]
> Sent: 09 September 2004 00:10
> To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
> Subject: Adding Tags Dynamically
>
>
>
> Can I add struts tags dynamically after loading the page, using
> javascript probably???
>
>
> -
> 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: Line Breaks and Formatting Text

2004-09-07 Thread Daniel Perry
Personally i dont see a problem with the scriptlet approach.

A lot of people have the misconception that scriptlets are evil.  I think a
better view is that custom tags / jstl are nicer to work with (especially
for non java ppl) . But when there is somthing like this that you just dont
seem to be able to do with jstl alone you have two choices:

1. implement a custom tag library
2. use a scriptlet

In this case i'd go with the scriptlet as its so simple!

Alternatively you could always put the variable 'linefeed' into the
application scope once at startup, then it will always be there.

Daniel.

> -Original Message-
> From: Tom Holmes Jr. [mailto:[EMAIL PROTECTED]
> Sent: 06 September 2004 18:45
> To: Struts Users Mailing List
> Subject: Re: Line Breaks and Formatting Text
>
>
> Great!  Thanks for the help, I appreciate it very much!
>
> Now, the question I have is ... which is the preferred method?
>
> The JSP only solution looks like it does use a scriptlet to set the
> pagecontext.  The first solution (which I use the replaceall), I am not
> sure if I want to do that because other code that might need to get my
> data from the DTO.
>
> Which would you use?
>
> Thanks again.
>
>  Tom
>
> Daniel Perry wrote:
>
> > If you choose to keep the replaceall, then use:
> > 
> >
> > Or, for a jsp only solution:
> >
> > <% pageContext.setAttribute("linefeed", "\n"); %>
> >
> > 
> >
> > Daniel.
> >
> >
> >
> >
> >>-Original Message-
> >>From: Tom Holmes Jr. [mailto:[EMAIL PROTECTED]
> >>Sent: 06 September 2004 17:08
> >>To: Struts Users Mailing List
> >>Subject: Line Breaks and Formatting Text
> >>
> >>
> >>I am a Struts newbie, but not in writing web-applications or JSP pages.
> >>
> >>I am writing a simple app that is taking data from my database and
> >>displaying the data in my JSP page, that works.  I got the date
> >>formatted how I want, and that's fine.  The text data that I want to
> >>display has some linefeeds in it within the database.  Such as:
> >>
> >>Hi!
> >>This is a Test!
> >>This is another line!
> >>
> >>When this displays, it displays as one long line because I know HTML
> >>doesn't recognize line feeds.  So, within my DTO class, when I get my
> >>data, I did a replaceAll("\n","") to replace the linefeeds
> within my
> >>text.  What happens now is that I see the  as part of the text, and
> >>the page source shows >br< (which is why I see the ).
> >>
> >>So, my question is ... how can I keep the line breaks by adding 
> >>correctly?  I want to keep the formatting the same with these line
> >>breaks.  Is there some  or  tag that I am missing or some
> >>regular expression tag I could use.  I am digging into my JSTL
> tag books
> >>for an answer.
> >>
> >>And BTW, I did search the Jarkarta Struts documentation, and I did look
> >>on the web for an answer first.  Leaving a message here was my
> >>last resort.
> >>
> >>Thanks.
> >>
> >> Tom
> >>
> >>-
> >>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: another easy (I hope) beginner question

2004-09-07 Thread Daniel Perry
If i understand your question right, you have a code
collectionElement.fskRating which represents a rating? (ie 1 = "pg-13",
2="G").

I have never done this, but i dont see why you cant just put an array/map of
the full values into the request scope, then use jstl to look it up:
somthing like: ${fullFskRatings[collectionElement.fskRating]} (cant remember
exactly how to do it).

The other method would be to add a "getFullFskRating()" to the
collectionElement bean.

Or write a custom tag that does the conversion, ie: 


Daniel.




> -Original Message-
> From: Tim Cross [mailto:[EMAIL PROTECTED]
> Sent: 06 September 2004 18:34
> To: [EMAIL PROTECTED]
> Subject: another easy (I hope) beginner question
>
>
> Hail gurus, especially Robert Taylor at mulework.com, who,
> in spite of his claims not to be a guru, set me right on
> my last easy beginner question (as did my friend and former
> colleague Ciaran Kenny back in Boulder - the same answer
> came in from both gurus within an hour of each other).
>
> Here's this week's abuse of this valuable resource:
>
> There's a database back there somewhere, and it stores
> autogenerated primary keys and FSK ratings (little bitty
> strings representing ratings for stuff shown in movie
> theatres, the German equiv to "G", "PG-13", "R" etc.,
> for my fellow Yanks at home and abroad). These FSK ratings
> get attached to chunks of content our system keeps track
> of. There's an FskRatingAction that populates a LabelValueBean
> with the DB ids as values, and the little strings as labels.
> Works great for adding and editing stuff that has an FSK rating,
> e.g.,
>
> Format: 
> FSK Rating: 
>  property="value" labelProperty="label"/>
> 
> Play Length: 
>
> What I'm trying to figure out is this: When I'm trying to display
> a bunch of things that have FSK ratings, is there some combination
> of logic and bean tags that will allow me to pull in the FSK rating
> to the display, i.e., replacing
>
> 
> 
> 
>
> which displays the (not particularly human-useful) Id, with
>
> 
> 
> whatever="getLabelForValueThatComesFromCollElt"
>   />
> 
>
> Or do I need to set up a separate method in the FskRatingAction to
> create a per-row bean that I can pull in with bean:include? Seems
> kind of performance-ugly, if so, and much cooler to keep it in
> the .jsp file.
>
> Any tips, like last time and always, hugely appreciated.
>
> Tim
>
> [EMAIL PROTECTED]
> www.cinedavis.com
> Dresden, Germany
>
>
>
>
>
> -
> 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: Line Breaks and Formatting Text

2004-09-06 Thread Daniel Perry
If you choose to keep the replaceall, then use:


Or, for a jsp only solution:

<% pageContext.setAttribute("linefeed", "\n"); %>



Daniel.



> -Original Message-
> From: Tom Holmes Jr. [mailto:[EMAIL PROTECTED]
> Sent: 06 September 2004 17:08
> To: Struts Users Mailing List
> Subject: Line Breaks and Formatting Text
> 
> 
> I am a Struts newbie, but not in writing web-applications or JSP pages.
> 
> I am writing a simple app that is taking data from my database and 
> displaying the data in my JSP page, that works.  I got the date 
> formatted how I want, and that's fine.  The text data that I want to 
> display has some linefeeds in it within the database.  Such as:
> 
> Hi!
> This is a Test!
> This is another line!
> 
> When this displays, it displays as one long line because I know HTML 
> doesn't recognize line feeds.  So, within my DTO class, when I get my 
> data, I did a replaceAll("\n","") to replace the linefeeds within my 
> text.  What happens now is that I see the  as part of the text, and 
> the page source shows >br< (which is why I see the ).
> 
> So, my question is ... how can I keep the line breaks by adding  
> correctly?  I want to keep the formatting the same with these line 
> breaks.  Is there some  or  tag that I am missing or some 
> regular expression tag I could use.  I am digging into my JSTL tag books 
> for an answer.
> 
> And BTW, I did search the Jarkarta Struts documentation, and I did look 
> on the web for an answer first.  Leaving a message here was my 
> last resort.
> 
> Thanks.
> 
>  Tom
> 
> -
> 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: Iterating over collection ...

2004-08-31 Thread Daniel Perry
You need to nest another iterate'er in order to iterate through the inner
list for each object:


    
    
    
    



Daniel.

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: 31 August 2004 17:48
> To: [EMAIL PROTECTED]
> Subject: Iterating over collection ...
>
>
> Hello there
>
> I am having some issue getting the correctly output while
> iterating over my collection
>
> I'm doing the following:
>
> I'm iterating over an processList(ArrayList) which contains 4
> objects of type ProcessBO.
> ProcessBO has 3 attributes;
>
> int ID
> String name
> ArrayList tasklist
>
>
> The tasklist holds objects of type TaskBO
> TaskBO has several attributes of type String
>
> In my jsp I am iterating over the processList like this:
>
> 
>     
>     
>     
>     
> 
>
> which prints the name, ID as I want it to but for the property
> tasklist it prints the class name for each object
> in the tasklist.
>
> I would like to access the attributes of the objects inside the
> tasklist and print them similar to the other output
> with bean:write
>
> I have looked searched for an answer in the documentation where
> it says I could use something like "tasklist.name" for the
> property value but his did not work.
>
> Help would be very much appreciated
>
> Thanks
>
> Karim
>
>
>
>
>
> __
> Switch to Netscape Internet Service.
> As low as $9.95 a month -- Sign up today at
> http://isp.netscape.com/register
>
> Netscape. Just the Net You Need.
>
> New! Netscape Toolbar for Internet Explorer
> Search from anywhere on the Web and block those annoying pop-ups.
> Download now at http://channels.netscape.com/ns/search/install.jsp
>
> -
> 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: Identifying the 'clicked' line when iterating over collection

2004-08-31 Thread Daniel Perry
I would do somthing like the following:




 
${contact.name}
${contact.number}



Modify


The action modifyContact should load the contact with the specified id, "ID"
is available by
String ID = request.getParameter("ID");
The action then stores the contact in the request scope:
request.setAttribute("contact",contact);

then forward to the jsp:

name:${contact.name} etc...

Hope that helps,

Daniel.


> -Original Message-
> From: andy wix [mailto:[EMAIL PROTECTED]
> Sent: 31 August 2004 17:19
> To: [EMAIL PROTECTED]
> Subject: Re: Identifying the 'clicked' line when iterating over
> collection
>
>
> Hi,
>
> I have tried most of the code in the replies and, alas, fear my
> brain is too
> small to get any working.
> I am persevering with Rick Reumann's method (because I liked the
> Struttin'
> with Struts stuff!) but I don't get a session parameter in my next page
> after the link is followed (I have changed the scope to session).  To get
> the ID would be something, but it would save me needing an action
> class at
> all if I could get the contact object representing the 'clicked' row into
> the session or request scope.
> A cut down version of the code is:
>
> 
> 
>   <%
>   ArrayList list = (ArrayList)session.getAttribute("Contacts");
>   Iterator it = list.iterator();
>   int id = 0;
>   while(it.hasNext()) {
>  Contact tempContact = (Contact)it.next();
>}%>
>  
> <%=tempContact.getName()%>
> <%=tempContact.getNumber()%>
>
> 
>  value="${form0.tempContact.id}"/>
> Modify
>
> Note that I am not using any Struts Forms for this Action as I
> receive the
> ArrayList from the session.  I added an html form tag as above
> because you
> had one in the example code.
>
> Cheers,
> Andy
>
> _
> Express yourself with cool new emoticons
> http://www.msn.co.uk/specials/myemo
>
>
> -
> 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: Submit to 3rd party URL after completing Action

2004-08-31 Thread Daniel Perry
Whenever i come accross this, i put a 'confirmation' screen, with all the
details repeated, and a 'pay now' button that submits the (hidden) form to
the external site.

Daniel.


> -Original Message-
> From: Christoph Kutzinski [mailto:[EMAIL PROTECTED]
> Sent: 31 August 2004 16:17
> To: Struts Users Mailing List
> Subject: Re: Submit to 3rd party URL after completing Action
>
>
> I'm currently trying to do something similar. Therefore I would like to
> share my thoughts:
>
> Relying on javascript for business critical functions (and if payment is
> not a business critical function, what is?) is IMO NEVER a good idea,
> because it is not fail-proof at all.
> What only if the user has switched of javascript in his browser?
>
> IMO this kind of functionality should always be handled server-side!
>
> Richard Aukland wrote:
>
> > Many thanks to Bill and Partha for your suggestions.
> >
> > I used the javascript (2nd) technique because I am currently more
> > familiar with it. It is now working. :)
> >
> > Cheers
> >
> > Richard
> >
> >
> >
> >
> >
> >
> > If you use redirect to the payment url, the data in the form is in the
> > session in your site and not the external site where it is needed. So
> > redirect or forward will not help.
> >
> > Try splitting up this work-flow into two steps:
> > 1.  in the first one you write the action class and save the stuff into
> > database and then forward to a page where a hidden form is recreated
> > using
> > the same values as the first one,
> > 2.  in the "body onload" of this page, submit the form to the external
> > url.
> >
> > Hope this helps.
> >
> > Regards,
> > Partha
> >
> >
> >
> > -
> > 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: Learning the basics

2004-08-31 Thread Daniel Perry
It's generally best practice not to tie layers in together.

Assume that you have your DAOs that are aware of ActionForm (or subclasses),
in constructors, or methods.  Now say you want to use the same DAOs in a
standalone app.  In order to do that, you are going to have to include the
struts jar, as the code relies on it!

It also applies the other way round.

Assume that your struts actions know all about the underlying persistence
mechanism.  Now assume that you want to change it from direct jdbc database
access, to an object-relational mapping like apache OJB.  Not only will you
have to change the DAO code, but also all the actions!

In general Data Transfer Objects (DTO) are used to get round these problems.
These are simple javabeans.

Despite this, i often 'cheat' and combine a DTO/DAO/BO/VO all together.
Using OJB I make a base DAO (with common methods: insert, delete,
soft-delete, find), and then extend this to make the other model objects,
that are persisted by OJB.  As they are already javabeans i use them as DTOs
directly.  I have found that this doesnt create a dependance on OJB, etc, as
it is only really the base DAO that relies on it. (as well as some service
classes)

In general, i think you have to weigh up the benefits of sticking to a 'best
practice' design, vs the benefits (time, simplicity, etc) of not.  Sharing
only a set of dedicated transfer objects between layers certainly makes
things easier in a large team.  But i have found the model i describe with
combined DTO/DAO to be equally as effective.

Daniel.




> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: 31 August 2004 15:42
> To: Struts Users Mailing List
> Subject: RE: Learning the basics
>
>
>
>
>
>
> Chris,
>
> In our app we're building a model object Assignment from a dao object
> AssignmentDAO.  We then fill the form AssignmentForm from the
> model object.
> All this is controlled from the AssignmentAction.
>
> I think I've recently read that in general a "lower" layer should not be
> aware of a "higher" layer.  If true the form should fill itself from the
> model object not the model object fill the form.  This is the
> direction I'm
> going.  (We break this "rule" in that the DAO returns a model object).
> Would appreciate opinions of the more experienced as far as how closely
> this follows best practices.
>
>
>
>
>
>
>
>
>  "Daniel Perry"
>
>  <[EMAIL PROTECTED]
>
>  co.uk>
>   To
>"Struts Users Mailing
> List"
>  08/31/2004 08:44  <[EMAIL PROTECTED]>
>
>  AM
>   cc
>
>
>
>  Subject
>  Please respond to RE: Learning the basics
>
>"Struts Users
>
>Mailing List"
>
>  <[EMAIL PROTECTED]
>
>   he.org>
>
>
>
>
>
>
>
>
>
> If you want to follow common java 'patterns' then try to find some info
> about data access objects (DAOs), data transfer objects (DTOs or TOs), and
> view objects (VOs).  That should point you in the right direction.
> Basically, they are javabeans!
>
> Daniel.
>
> > -Original Message-
> > From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Siggelkow
> > Sent: 31 August 2004 13:39
> > To: [EMAIL PROTECTED]
> > Subject: Re: Learning the basics
> >
> >
> > Chris -- Struts knows nothing of the model -- the subject you need to
> > learn is Java database programming. There are many different tutorials
> > on this -- a good one can be found at
> > http://java.sun.com/docs/books/tutorial/jdbc/.
> >
> > Chris Keladis wrote:
> >
> > > Hi Kenneth, Everyone.
> > >
> > > Since we're on the subject, using the example being discussed, towards
> > > the end of the chain we call findRecords.do which takes us to
> > > foundRecords.jsp.
> > >
> > > All well and good.
> > >
> > > I'm having trouble understanding how to get database output from the
> > > model to the view layer?
> > >
> > > How is that data passed around, more to the point?
> > >
> > > Or if someone could point me in the direction of some documentation on
> > > the subject i would be more than happy to study it. I've found plenty
> > > of Struts information, but quite little on database programming with
> > > Struts.
> > >
> > >
> > >
> > >
> > > Thanks,
> > >
> > > 

RE: Learning the basics

2004-08-31 Thread Daniel Perry
If you want to follow common java 'patterns' then try to find some info
about data access objects (DAOs), data transfer objects (DTOs or TOs), and
view objects (VOs).  That should point you in the right direction.
Basically, they are javabeans!

Daniel.

> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Siggelkow
> Sent: 31 August 2004 13:39
> To: [EMAIL PROTECTED]
> Subject: Re: Learning the basics
>
>
> Chris -- Struts knows nothing of the model -- the subject you need to
> learn is Java database programming. There are many different tutorials
> on this -- a good one can be found at
> http://java.sun.com/docs/books/tutorial/jdbc/.
>
> Chris Keladis wrote:
>
> > Hi Kenneth, Everyone.
> >
> > Since we're on the subject, using the example being discussed, towards
> > the end of the chain we call findRecords.do which takes us to
> > foundRecords.jsp.
> >
> > All well and good.
> >
> > I'm having trouble understanding how to get database output from the
> > model to the view layer?
> >
> > How is that data passed around, more to the point?
> >
> > Or if someone could point me in the direction of some documentation on
> > the subject i would be more than happy to study it. I've found plenty
> > of Struts information, but quite little on database programming with
> > Struts.
> >
> >
> >
> >
> > Thanks,
> >
> > Chris.
> >
> > On Thu, 19 Aug 2004 09:46:56 -0700, Jim Barrows
> <[EMAIL PROTECTED]> wrote:
> >
> >>
> >>>-Original Message-
> >>>From: Kenneth Litwak [mailto:[EMAIL PROTECTED]
> >>>Sent: Thursday, August 19, 2004 9:18 AM
> >>>To: Struts Users Mailing List
> >>>Subject: RE: Learning the basics
> >>>
> >>>
> >>>Hi Jim,
> >>>
> >>>I was hoping to
> >>>
> avoid having to
> read a book to write my first Struts app, which is basically
> a small web
> app to let a user search a database table according to one of
> three sets
> of search criteria.  I thought this would be relatively simple.  My
> impression so far, however, is that Struts is way way way way more
> complicated than I thought for this simple app.  Perhaps I
> >>>
> >>>should just
> >>>
> write it without Struts and get a book to red and try Struts
> next time.
> >>>
> >>>It is relatevily simple.
> >>>showSearchCriteria.do  forwards to searchCriteria.jsp  (The
> >>>class could
> >>>be the ForwardAction)
> >>>searchCriteria.jsp has the fields for searching in.
> >>>action goes to findRecords.do, which queries the database and forwards
> >>>the results to foundRecorrds.jsp
> >>>
> >>>Ken asks:  My impression is that a something.do means a web
> >>>page, like a
> >>>JSP is involved.  I don't understand this part about a jsp
> >>>linking to an
> >>>action that goes to findRecords.do.  What does that represent?  From
> >>>what I understand to this moment, it represents a page, when
> >>>it needs to
> >>>work with a backend component to search the database.  This
> >>>may be part
> >>>of the piece I'm missing.
> >>
> >>Part may be that you also need to understand how the web
> works... such subtle things as the stateless nature of the http
> protocol, it's tendency to not pass fields that are empty that
> kind of thing.
> >>Then on top of that... the servlet specification... then on top
> of that the JSP specification, and then tieing all that together
> neatly, is struts. :)
> >>
> >>Let's see if I can simplify this a bit...
> >>
> >>Tomcat/Websphere/Weblogic (the container) receives this URL
> http://foo.com/fooApp/showIndex.do
> >>Container looks at it, and says... okay this goes to the fooApp
> web app... then says *.do.. goes to the struts servlet in fooApp.
> >>The struts servlet goes.. h... showIndex strtus-config
> says that maps to ShowIndexAction class...
> >>I better call it's exectue method.. and it returns the
> sucess/index/whateverYouWantToCallItForward.. struts-config says
> that maps to index.jsp better serve that up.
> >>And now the request processing is done, the requestor has the
> resource they asked for.
> >>
> >>
> >>
> >>>
> >>>So, 2 jsp pages, 2 actions (If you dont use ForwardAction).
> >>>
> >>>If your search criteria are really three different searches, then you
> >>>can put all three forms on one page, and use DispatchAction for the
> >>>findRecords.do action class.
> >>>
> >>>
> I thought EJBs were complex when I first learned them, but they have
> NOTHING on Struts.  Thanks again.
> >>>
> >>>How do you figure?
> >>>
> >>> Because, at least for me (and I grant that I'm much more
> >>>at home in
> >>>the business tier than the web tier), the workflow for an EJB
> >>>(find it,
> >>>create it, call it, remove it) is somewhat straightforward.
> >>>I have yet
> >>>to get the exact mechanics of how Struts works.I've seen
> >>>a couple of
> >>>diagrams but I need something more detailed that shows the exact flow
> >>>through each little step.  Do I need a Form?  A FormBean?  A regular
> >>>bean?  When?  Where?  I can't f

RE: philosophical question/poll about Struts/JSTL, scriptlets

2004-08-27 Thread Daniel Perry
One thing i would suggest, is that if you are working in a team, and you
wish to include these really simple one line scriptlets (like the example i
gave you), then put the scriptlets at the top of the jsp along with the "<%@
page" type declarations, taglib declarations, etc. It makes it easier for
the web design people.

"ignore the crap at the top of the page" and "dont touch any tags you dont
understand" seems to work as instructions for them :)

Daniel.

> -Original Message-
> From: Woodchuck [mailto:[EMAIL PROTECTED]
> Sent: 27 August 2004 18:48
> To: Struts Users Mailing List
> Subject: RE: philosophical question/poll about Struts/JSTL, scriptlets
>
>
>
> --- Daniel Perry <[EMAIL PROTECTED]> wrote:
>
> > hah forget the 'purist' approach!
> >
> > I use jstl / struts taglibs whereever possible.
> >
> > if i had a choice between writing my on taglib or scriptlet for
> > me
> > scriptlet wins - much less hassel, and the code is there for you on
> > the jsp,
> > and it's only normally for very simple things.
> >
> > The main times i use scriptlets are for stupidly simple things that
> > appear
> > to have been overlooked with el/jstl:
> >
> > <% pageContext.setAttribute("linefeed", "\n"); %>
> >
> > Because you cant use \n in el for search and replace strings.
> >
> > Other use is for copying static final variables to the page context
> > (how no
> > one spotted this before el was finalised i will never know? or am i
> > missing
> > somthing?)
>
> hehe, yea the lack of easy way to access static final variables using
> Struts/JSTL is what brought me to this state, lol.
>
> something so easy in scriptlets but needs quite a bit of coding to do
> in non-scriptlet form by comparison.
>
> >
> > Daniel.
> >
>
>
>
>
> ___
> Do you Yahoo!?
> Win 1 of 4,000 free domain names from Yahoo! Enter now.
> http://promotions.yahoo.com/goldrush
>
> -
> 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: philosophical question/poll about Struts/JSTL, scriptlets

2004-08-27 Thread Daniel Perry
> Using scriptlets, to me is like going back to the bad old days of
> out.println(" -Original Message-
> From: Jim Barrows [mailto:[EMAIL PROTECTED]
> Sent: 27 August 2004 18:35
> To: Struts Users Mailing List
> Subject: RE: philosophical question/poll about Struts/JSTL, scriptlets
>
>
>
>
> > -Original Message-
> > From: Woodchuck [mailto:[EMAIL PROTECTED]
> > Sent: Friday, August 27, 2004 10:22 AM
> > To: struts
> > Subject: philosophical question/poll about Struts/JSTL, scriptlets
> >
> >
> > sorry to bring this up on a Friday...
> >
> > does everyone here have pure Struts/JSTL jsp pages that is absolutely
> > void of scriptlets?
>
> Every single one but the main layout page, because I haven't
> figured out a better way to use tiles putList.
> I avoid them like the plague they're almost, imho, as bad as
> javascript.  Then again I have nightmares about
> out.println("")...
>
> >
> > or do you have jsp pages that use a combination of Struts/JSTL and
> > scriptlets, all living together harmoniously using whichever method is
> > easiest/cleanest?
>
> Depends.. I turn everything over to a html person.  The lesss
> scriptlets I use the happier she is.
>
>
> >
> > is mixing Struts/JSTL with traditional scriptlets a bad thing?
>
> I thinks so... ymmmv
>
> >
> > i have to say that i would prefer to *not* mix scriptlets with
> > Struts/JSTL but in some situations it seems scriptlets is the better
> > solution (in terms of code maintainability).  that is, it would be
> > easier to use a little snippet of scriptlet here and there instead of
> > making a round-about (albeit clever) and more verbose way of doing the
> > same thing without scriptlets...
>
> Depends on what you're talking about.. and who you're talking
> about.  If your code is never going to be seen by anybody but
> java programmers,then you may be correct.
>
> >
> > any opinions is welcome!  i want to be able to sleep without
> > nightmares
> > about this!!  :)
>
> Most programmers would probably find that the scriptlets are
> somewhat easier...however I also look at tags as method calls, in
> terms of encapsulation.   I don't need to know what they do, just
> that they do it.  I don't really care how  radio html bit, just that it does so in a manner that makes my
> life easier, like only having to know the property name etc. etc.
> I have several tags that print lists of things change the tag
> and I've changed the way the lists are retrieved.  That can be
> harder to do in a scriptlet.
> Using scriptlets, to me is like going back to the bad old days of
> out.println("
>
>
> -
> 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: philosophical question/poll about Struts/JSTL, scriptlets

2004-08-27 Thread Daniel Perry
hah forget the 'purist' approach!

I use jstl / struts taglibs whereever possible.

if i had a choice between writing my on taglib or scriptlet for me
scriptlet wins - much less hassel, and the code is there for you on the jsp,
and it's only normally for very simple things.

The main times i use scriptlets are for stupidly simple things that appear
to have been overlooked with el/jstl:

<% pageContext.setAttribute("linefeed", "\n"); %>

Because you cant use \n in el for search and replace strings.

Other use is for copying static final variables to the page context (how no
one spotted this before el was finalised i will never know? or am i missing
somthing?)

Daniel.

> -Original Message-
> From: Woodchuck [mailto:[EMAIL PROTECTED]
> Sent: 27 August 2004 18:22
> To: struts
> Subject: philosophical question/poll about Struts/JSTL, scriptlets
>
>
> sorry to bring this up on a Friday...
>
> does everyone here have pure Struts/JSTL jsp pages that is absolutely
> void of scriptlets?
>
> or do you have jsp pages that use a combination of Struts/JSTL and
> scriptlets, all living together harmoniously using whichever method is
> easiest/cleanest?
>
> is mixing Struts/JSTL with traditional scriptlets a bad thing?
>
> i have to say that i would prefer to *not* mix scriptlets with
> Struts/JSTL but in some situations it seems scriptlets is the better
> solution (in terms of code maintainability).  that is, it would be
> easier to use a little snippet of scriptlet here and there instead of
> making a round-about (albeit clever) and more verbose way of doing the
> same thing without scriptlets...
>
> any opinions is welcome!  i want to be able to sleep without nightmares
> about this!!  :)
>
>
>
>
>
> __
> Do you Yahoo!?
> Take Yahoo! Mail with you! Get it on your mobile phone.
> http://mobile.yahoo.com/maildemo
>
> -
> 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: Question about downloading files from a Struts servlet

2004-08-27 Thread Daniel Perry
Not sure what is wrong, but for a possible work-around, have you tried
making the target for the form (or link) a new window?

Daniel.


> -Original Message-
> From: Eric Hodges [mailto:[EMAIL PROTECTED]
> Sent: 27 August 2004 17:17
> To: Struts Users Mailing List (E-mail)
> Subject: Question about downloading files from a Struts servlet
>
>
> I have a Struts form and action that downloads a file to the client.  The
> servlet code looks like this:
>
>   response.reset();
>   AdminSetupForm setupForm = (AdminSetupForm) form;
>   response.setContentType("application/download");  // also tried
> "application/octet-stream", "junk/xml", etc.
>   response.addHeader("Content-disposition", "attachment;
> filename=setup.xml"); // also tried other file names and
> attachment with no
> file name
>   ServletOutputStream out = response.getOutputStream();
>   String exportFile = 
>   response.setContentLength(exportFile.length());
>   out.write(exportFile.getBytes());
>   out.flush();
>   out.close();
>
> This downloads the file properly, but on IE 6.x it corrupts the
> DOM Document
> on the browser.  The form is submitted from JavaScript and all of the
> buttons on the form invoke JavaScript functions.  After
> downloading the file
> on IE 6.x, any attempt by JavaScript to reference the "document" object
> causes an "Unspecified Error".  Inspecting the JavaScript
> environment with a
> script debugger shows that "document" is no longer an object.
>
> I can't find anyone else having this problem, and I've tried many
> different
> ways to solve it.  If anyone has experience with this, please let me know
> what you did.
>
> Thanks,
> Eric Hodges
>
>
> -
> 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: download binary content

2004-08-25 Thread Daniel Perry
They effect browser behaviour.

cache-control - used by browsers and proxies to determine wether to cache
the document or not, and if so, for how long.

content-length - not sure if struts would do this for you, but i know there
are issues with some browsers not liking binary data that it doesnt know the
length of.  Especially applies to pdfs.

Content-disposition - this is *very* usefull.  You can specify inline or
attachment.  Inline tells the browser to display the file in the browser.
(eg. the normal default behaviour for pdfs). Attachment tells the browser
that the file is to be downloaded rather than viewed, so the browser should
show the 'save file' dialog box.  Using filename=... with this allows you to
specify a filename for the attachment. So, if you have an action
download.do?id=6, it can say filename is tradereport-march-2004.pdf! Very
useful for reports, etc where you would otherwise have many files with the
same 'default' filename, ie report.pdf/whatever the browser decides.  Can be
used to reduce admin cockups!!!

Daniel.


> -Original Message-
> From: Erik Weber [mailto:[EMAIL PROTECTED]
> Sent: 25 August 2004 16:14
> To: Struts Users Mailing List
> Subject: Re: download binary content
>
>
> The difference between your implementation and mine is that I am not
> setting the Cache-Control, Content-Disposition and Content-Length
> headers. My download action seems to work fine in IE and Mozilla, but,
> could you enlighten me on what I may be sacrificing?
>
> Thanks,
> Erik
>
>
> Daniel Perry wrote:
>
> >Below is some code i wrote to do this. is some code i wrote:
> >
> >Note the doc object is specific to my app it has methods for
> returning the
> >content type, filename, and a File object pointing to the
> document on disk.
> >
> >I have used almost identicle code for outputting pdf data.  I
> think you can
> >use "attachment" rather than "inline" to make the browser save the file
> >rather than view it.
> >
> >Daniel.
> >
> >
> >// set response headers
> >response.setHeader("Cache-Control", "max-age=600");
> >response.setContentType(doc.getContentType());
> >
> >//Send content to Browser
> >StringBuffer cd = new StringBuffer();
> >cd.append("inline");
> >cd.append("; filename=");
> >cd.append(doc.getFilename());
> >response.setHeader("Content-disposition", cd.toString());
> >response.setContentLength((int) doc.getFile().length());
> >
> >// send data
> >ServletOutputStream sos;
> >sos = response.getOutputStream();
> >
> >InputStream is = new BufferedInputStream(new
> >FileInputStream(doc.getFile()));
> >
> >int bytesRead = 0;
> >byte[] buffer = new byte[8192];
> >while ((bytesRead = is.read(buffer, 0, 8192)) != -1) {
> >sos.write(buffer, 0, bytesRead);
> >}
> >
> >sos.flush();
> >is.close();
> >
> >// return null so it just outputs data (no forward!)
> >return null;
> >
> >
> >
> >>-Original Message-
> >>From: Stefan Groschupf [mailto:[EMAIL PROTECTED]
> >>Sent: 25 August 2004 14:46
> >>To: Struts Users Mailing List
> >>Subject: download binary content
> >>
> >>
> >>Hi,
> >>can someone point me to a resource that describe how to realize a
> >>dowanload action?
> >>Do I can write to the response object with out forwarding?
> >>
> >>Thanks for any hints.
> >>Stefan
> >>
> >>
> >>-
> >>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: download binary content

2004-08-25 Thread Daniel Perry
Below is some code i wrote to do this. is some code i wrote:

Note the doc object is specific to my app it has methods for returning the
content type, filename, and a File object pointing to the document on disk.

I have used almost identicle code for outputting pdf data.  I think you can
use "attachment" rather than "inline" to make the browser save the file
rather than view it.

Daniel.


// set response headers
response.setHeader("Cache-Control", "max-age=600");
response.setContentType(doc.getContentType());

//Send content to Browser
StringBuffer cd = new StringBuffer();
cd.append("inline");
cd.append("; filename=");
cd.append(doc.getFilename());
response.setHeader("Content-disposition", cd.toString());
response.setContentLength((int) doc.getFile().length());

// send data
ServletOutputStream sos;
sos = response.getOutputStream();

InputStream is = new BufferedInputStream(new
FileInputStream(doc.getFile()));

int bytesRead = 0;
byte[] buffer = new byte[8192];
while ((bytesRead = is.read(buffer, 0, 8192)) != -1) {
sos.write(buffer, 0, bytesRead);
}

sos.flush();
is.close();

// return null so it just outputs data (no forward!)
return null;

> -Original Message-
> From: Stefan Groschupf [mailto:[EMAIL PROTECTED]
> Sent: 25 August 2004 14:46
> To: Struts Users Mailing List
> Subject: download binary content
>
>
> Hi,
> can someone point me to a resource that describe how to realize a
> dowanload action?
> Do I can write to the response object with out forwarding?
>
> Thanks for any hints.
> Stefan
>
>
> -
> 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: Help on Action implementing thread for checking user registration thru email?

2004-08-19 Thread Daniel Perry
I previously posted a message on how i did this as a struts plugin, so i've
reposted below.

To do what you require, instead of scheduling a job for each entry after
24hrs, i would include a timestamp in the database, then say every hour,
check for expired entries and delete them.


Nope, you dont need to start another process - i use a struts plugin to load
and initialise Quartz.  It will run in other threads, but this will all be
done for you behind the scenes.

The code for my struts plugin is below (if it's of any help).  Add the
following entry to the struts-config-default.xml in the plug-in section to
load it:



It runs a "Job" every 30 mins.

This job takes the form:

public class RemoveOldProvisionalTrainingJob implements StatefulJob {
public void execute(JobExecutionContext arg0) throws JobExecutionException {
// code to do actual work here
}
}


Note that i'm implementing StatfulJob - this stops it running two of the
same job at the same time.

Daniel.


-SchedulerService.java-
package com.netcase.pdp.service;

import java.util.Date;

import javax.servlet.ServletException;

import org.apache.struts.action.ActionServlet;
import org.apache.struts.action.PlugIn;
import org.apache.struts.config.ModuleConfig;
import org.quartz.JobDetail;
import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.quartz.SchedulerFactory;
import org.quartz.SimpleTrigger;

import
com.netcase.pdp.service.scheduledjobs.RemoveOldProvisionalTrainingJob;

/**
 * @author Daniel Perry
 *
 */
public class SchedulerService implements PlugIn {

Scheduler sched;

public void init(ActionServlet servlet, ModuleConfig moduleConf)
throws ServletException {
System.out.println("Starting scheduler service...");

SchedulerFactory schedFact = new org.quartz.impl.StdSchedulerFactory();
try {
sched = schedFact.getScheduler();
sched.start();

JobDetail jobDetail = new JobDetail(
"removeOldProvisionalTrainingJob",
Scheduler.DEFAULT_GROUP,
RemoveOldProvisionalTrainingJob.class);

// new trigger - repeat every 30 mins starting in 5 
mins time
// (delay for startup)
SimpleTrigger trigger = new 
SimpleTrigger("30MinTrigger",
Scheduler.DEFAULT_GROUP, new Date(new 
Date().getTime()
+ (5L* 60L * 1000L)), 
null,
SimpleTrigger.REPEAT_INDEFINITELY, 30 
* 60L * 1000L);

sched.scheduleJob(jobDetail, trigger);


} catch (SchedulerException ex) {
ex.printStackTrace();
}

}

public void destroy() {
try {
sched.shutdown();
} catch (SchedulerException ex) {
ex.printStackTrace();
}
sched = null;
}

}
---



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



RE: Security - From tradition to struts

2004-08-19 Thread Daniel Perry
You can also put an execute method in the base action that does the
'logged-in' check, and use a global forward to forward to login page.

If you do this, then add an abstract method eg executeAction with the same
signature as execute, and call it.

The main advantage of this is to stop you forgetting to make the required
security calls at the beggining of the subclassed action!

Daniel.



> -Original Message-
> From: Susan Bradeen [mailto:[EMAIL PROTECTED]
> Sent: 19 August 2004 15:17
> To: Struts Users Mailing List
> Subject: Re: Security - From tradition to struts
>
>
> Excellent explanation, Erik. Consider adding this to the Struts Wiki for
> posterity? Must be a place for it in there somewhere ...
>
> Erik Weber <[EMAIL PROTECTED]> wrote on 08/19/2004 08:31:08 AM:
>
> > Sorry, by "hand-rolled" I just mean one that is written
> specifically for
>
> > the application (written by you).
> >
> > The general idea is something like this:
> >
> > Make a BaseAction class.
> >
> > Implement a checkLogin method in the BaseAction class that looks in the
> > current request's HttpSession for a "User" object, which you would have
> > placed into the session in your LoginAction.
> > Implement a checkPermission method in the BaseAction class that
> looks in
>
> > the current HttpSession for a role associated with the user (maybe this
> > is part of the "User" object) that matches the role required for the
> > current request (or you can go as fine-grained as you want, with many
> > different permissions to check for a single request) to be granted.
> >
> > All your Action classes extend the BaseAction class. They can
> invoke the
>
> > checkLogin and/or the checkPermission methods at the beginning of the
> > execute method to decide whether/how to proceed.
> >
> > Write a LoginAction class that sets the "User" action, along with
> > permissions, roles, etc., whatever else is needed in your
> checkLogin and
>
> > checkPermission methods, in the session after login has succeeded (you
> > have taken the entered username and password and matched them
> > successfully against a username and password combination in your
> > database -- typically in a USERS table).
> >
> > Write a Logout Action that invalidates the current session.
> >
> > Alternatively, you could check the login and the permissions the same
> > way, but in a sublass of the Struts RequestProcessor, or in a Servlet
> > Filter, instead of in a BaseAction class.
> >
> > If you want to go with container-managed security and you can use
> > Tomcat, try this (you should probably read it anyway).
> >
> > http://jakarta.apache.org/tomcat/tomcat-5.0-doc/realm-howto.html
> >
> > I also suggest you read the security section of the J2EE tutorial, and
> > the security sections of the JSP and Servlet specifications.
> >
> > If you go with container-managed security, it's real easy to allow/deny
> > entire JSPs, but you still may need to implement finer-grained
> > permissions checks on your own if you need to, for example, show/hide
> > links on a page based on permissions.
> >
> > Erik
> >
> > Leandro Melo wrote:
> >
> > >Erik,
> > >i don't quite understand what you call a hand-rolled
> > >java component (maybe because of my english).
> > >Anyway, it seems to me that you're not using JAAS to
> > >completely control application's security, are u?
> > >I don't know if it possible, but if so, would you post
> > >your setup and basic classes?
> > >I'm very very new at security stuff...
> > >Anyway, i cleared out a lot of things for me.
> > >
> > >Thanks,
> > >Leandro.
> > >
> > >
> > > --- Erik Weber <[EMAIL PROTECTED]> escreveu:
> > >
> > >
> > >>I don't really consider myself an expert here, but I
> > >>dare say that there
> > >>are a lot of webapps deployed out there using
> > >>programmatic (hand-rolled)
> > >>security successfully. I have used the approach with
> > >>success. What
> > >>exactly the advantages are to using
> > >>container-managed security I am not
> > >>able to fully deduce (except for the obvious -- it's
> > >>nice to declare
> > >>stuff in web.xml in a standardized way -- and that
> > >>perhaps it might make
> > >>Servlets a *little* more portable if you wanted to
> > >>use them among
> > >>different apps). But then again, I haven't had to
> > >>take on a project yet
> > >>where the environment was extremely complicated,
> > >>when it came to how
> > >>users and permissions were managed (typically I see
> > >>the same tried and
> > >>trusted setup -- USER, GROUP, ROLES and PERMISSIONS
> > >>tables in some
> > >>central database, and some hand-rolled Java
> > >>component, used to authorize
> > >>the current request, that is invoked in some
> > >>"common" area, such as a
> > >>Servlet Filter -- or, in Struts, a base Action class
> > >>or a custom
> > >>RequestProcessor). It seems like JAAS is still at an
> > >>immature stage
> > >>perhaps, or at least the state of documenation about
> > >>it is.
> > >>
> > >>The other route it seems you could g

RE: [OT] RTF & PDF export options

2004-07-20 Thread Daniel Perry
fop - http://xml.apache.org/fop/index.html

In my opinion better than iText - gives a bit more control.  I had problems
with layout in iText - it adds funny paragraph spacing (especially with big
fonts).  For fop - generate an XML file with data, write some XSL to
translate data into fop xml, and then process. Can create one xml file, one
xsl file, and translate it to what ever you want!

Says it doesnt support rtf yet... "This is currently not integrated with FOP
but it will soon."  Might be worth trying their mailing lists to see what's
happening with it.

With iText, you generate the whole thing programatically.

With iText or fop it's easy to do from an action:


public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException {


ByteArrayOutputStream outPDF = null;

try {
//... generate data here
outPDF = ...

// set response headers
response.setHeader("Cache-Control", "max-age=60");
response.setContentType("application/pdf");


StringBuffer cd = new StringBuffer();
cd.append("inline");
cd.append("; filename=");
cd.append("whatever");
cd.append(".pdf");
response.setHeader("Content-disposition", cd.toString());
response.setContentLength(outPDF.size());

// send pdf data
ServletOutputStream sos;
sos = response.getOutputStream();
outPDF.writeTo(sos);
sos.flush();

// return null so it just outputs data (no forward)
return null;
}


Hope that helps,

Daniel.


> -Original Message-
> From: Barnett, Brian W. [mailto:[EMAIL PROTECTED]
> Sent: 19 July 2004 23:22
> To: '[EMAIL PROTECTED]'
> Subject: [OT] RTF & PDF export options
>
>
> Any suggestions for converting html to RTF and PDF inside an action class
> and then sending the RTF or PDF back to the client?
>
>
>
> Open source tools, code snippets, tips & tricks, etc. ??
>
>
>
> Thanks a bunch.
>
>
>
> Brian Barnett
>
>


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



RE: [OT] Best practice for background service

2004-07-15 Thread Daniel Perry
Nope, you dont need to start another process - i use a struts plugin to load
and initialise Quartz.  It will run in other threads, but this will all be
done for you behind the scenes.

The code for my struts plugin is below (if it's of any help).  Add the
following entry to the struts-config-default.xml in the plug-in section to
load it:



It runs a "Job" every 30 mins.

This job takes the form:

public class RemoveOldProvisionalTrainingJob implements StatefulJob {
public void execute(JobExecutionContext arg0) throws JobExecutionException {
// code to do actual work here
}
}


Note that i'm implementing StatfulJob - this stops it running two of the
same job at the same time.

Daniel.


-SchedulerService.java-
package com.netcase.pdp.service;

import java.util.Date;

import javax.servlet.ServletException;

import org.apache.struts.action.ActionServlet;
import org.apache.struts.action.PlugIn;
import org.apache.struts.config.ModuleConfig;
import org.quartz.JobDetail;
import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.quartz.SchedulerFactory;
import org.quartz.SimpleTrigger;

import
com.netcase.pdp.service.scheduledjobs.RemoveOldProvisionalTrainingJob;

/**
 * @author Daniel Perry
 *
 */
public class SchedulerService implements PlugIn {

Scheduler sched;

public void init(ActionServlet servlet, ModuleConfig moduleConf)
throws ServletException {
System.out.println("Starting scheduler service...");

SchedulerFactory schedFact = new org.quartz.impl.StdSchedulerFactory();
try {
sched = schedFact.getScheduler();
sched.start();

JobDetail jobDetail = new JobDetail(
"removeOldProvisionalTrainingJob",
Scheduler.DEFAULT_GROUP,
RemoveOldProvisionalTrainingJob.class);

// new trigger - repeat every 30 mins starting in 5 
mins time
// (delay for startup)
SimpleTrigger trigger = new 
SimpleTrigger("30MinTrigger",
Scheduler.DEFAULT_GROUP, new Date(new 
Date().getTime()
+ (5L* 60L * 1000L)), 
null,
SimpleTrigger.REPEAT_INDEFINITELY, 30 
* 60L * 1000L);

sched.scheduleJob(jobDetail, trigger);


} catch (SchedulerException ex) {
ex.printStackTrace();
}

}

public void destroy() {
try {
sched.shutdown();
} catch (SchedulerException ex) {
ex.printStackTrace();
}
sched = null;
}

}
---



> -Original Message-
> From: Marco Mistroni [mailto:[EMAIL PROTECTED]
> Sent: 15 July 2004 14:57
> To: 'Struts Users Mailing List'
> Subject: RE: [OT] Best practice for background service
>
>
> Hello,
>   Sorry for 'OT' for asking questions about Quartz..
> Is it so that I have to start a separate 'process' for Quartz to run?
> So, at the end I will have my application server running as well as a
> Quartz process running 'outside' the application server?
>
> Regards
>   marco
>
> -Original Message-
> From: Daniel Perry [mailto:[EMAIL PROTECTED]
> Sent: 15 July 2004 14:48
> To: Struts Users Mailing List
> Subject: RE: [OT] Best practice for background service
>
> Quartz is very easy to use.  No need for thread programming.
>
> But "Job" classes are created as and when they are needed (so no
> initialisation and shared object).
>
> Create a struts plug-in which initialises quartz, and sets up the jobs
> (very
> little code needed).
>
> Daniel.
>
> > -Original Message-
> > From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Siggelkow
> > Sent: 15 July 2004 14:29
> > To: [EMAIL PROTECTED]
> > Subject: Re: [OT] Best practice for background service
> >
> >
> > Jan,
> > Bryan's recommendation of Spring and Quartz sounds good though I have
> > not had a chance to work with these yet. If you want to "roll your
> own"
> > I suggest you look at the java.util.Timer and java.util.TimerTask
> > objects -- they work well for these type of services. See
> > http://java.sun.com/j2se/1.4.2/docs/api/java/util/TimerTask.html.
> &g

RE: [OT] Best practice for background service

2004-07-15 Thread Daniel Perry
Quartz is very easy to use.  No need for thread programming.

But "Job" classes are created as and when they are needed (so no
initialisation and shared object).

Create a struts plug-in which initialises quartz, and sets up the jobs (very
little code needed).

Daniel.

> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Siggelkow
> Sent: 15 July 2004 14:29
> To: [EMAIL PROTECTED]
> Subject: Re: [OT] Best practice for background service
>
>
> Jan,
> Bryan's recommendation of Spring and Quartz sounds good though I have
> not had a chance to work with these yet. If you want to "roll your own"
> I suggest you look at the java.util.Timer and java.util.TimerTask
> objects -- they work well for these type of services. See
> http://java.sun.com/j2se/1.4.2/docs/api/java/util/TimerTask.html.
>
> 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: how to handle special characters like "®"

2004-06-30 Thread Daniel Perry
I've come accross this problem before, and i fixed it by setting the jsp
pages to content type iso-8859-1 rather than UTF-8.

Stick the following tag at the top of the pages:

<%@ page contentType="text/html;charset=iso-8859-1" language="java" %>

Daniel.


> -Original Message-
> From: Jirole, Amar [mailto:[EMAIL PROTECTED]
> Sent: 30 June 2004 14:50
> To: 'Struts Users Mailing List'
> Subject: RE: how to handle special characters like "®"
>
>
> More info please!
>
> -Original Message-
> From: Christina Siena [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 29, 2004 8:07 PM
> To: [EMAIL PROTECTED]
> Subject: how to handle special characters like "®"
>
>
> I am trying to figure how to handle special characters like "®".
>
> When the form is posted, the form attribute contains "®" instead of "®".
>
> -
> 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 Daniel Perry
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]



RE: Theoretical debate

2004-06-18 Thread Daniel Perry
I agree with this.
I tend to find myself passing parameters to business services rather than
DTOs.

I do it for simplicity.  If i use an ActionForm then you either have to add
things like getNumberAsInt as getNumber returns a string, or do the integer
parsing in the action.  You then have to retrieve stuff from the ActionForm
bean, and put it into

So, it seems pretty much pointless putting stuff into DTOs to then take them
out in the service/DAO.

Another potential "bad practice" i tend to use is to merge DAOs with
Business Objects.  I dont see the need for separate objects, especially when
using OJB you can just create a BaseBusinessObject that includes most of the
DAO code, and extend this.  I also tend to double these up as DTOs where i
need to use them.

Daniel.

> -Original Message-
> From: Frank Zammetti [mailto:[EMAIL PROTECTED]
> Sent: 18 June 2004 14:43
> To: [EMAIL PROTECTED]
> Subject: RE: Theoretical debate
>
>
> You know, kind of off-topic, but you remind me of a conversation
> I had with
> someone at work here, maybe you guys would have some input...
>
> I know what various patterns tell us we should do, but in practice... you
> guys of course have your ActionForms that transfer data from the
> view to the
> control layer... do you then have Data Transfer Objects, or Value
> Objects,
> or whatever terms you want to use, to hand off to your model layer?
>
> In other words, do you get data IN via ActionForm to an Action, then
> transfer all that data to another Data Transfer Object, then pass
> that off
> to some subordinate class to do the actual processing?
>
> I ask because most of the Struts apps I've seen don't bother with
> the DTO's,
> they just pass the ActionForm to the subordinate classes, or else
> pass them
> as parameters.  It seems that regardless of what literature is
> telling is we
> should do, in practice (GENERALLY), people don't bother with the DTO's.
>
> Have I just looked at the wrong apps?  What are most people doing in this
> regard?
>
> Frank
>
> >From: "Brian Lee" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: RE: Theoretical debate
> >Date: Thu, 17 Jun 2004 16:54:26 -0400
> >
> >I think struts' concept of separating your actions from your data is
> >admirable and should be followed. The concept of your value/transfer
> >objects (basically the form) also having business logic sounds
> acceptable
> >at first but rapidly becomes a nightmare when you try to use the same
> >value/transfer objects in multiple processes.
> >
> >I think it's a generally accepted practice that separating data
> from logic
> >is a "Good Thing"(tm).
> >
> >BAL
> >
> >>From: "Hookom, Jacob" <[EMAIL PROTECTED]>
> >>To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> >>Subject: RE: Theoretical debate
> >>Date: Thu, 17 Jun 2004 14:57:31 -0500
> >>
> >>I completely agree with what Crysalis is trying to push, also a
> framework
> >>called VRaptor (vraptor.org) also pushes the same idea of
> moving away from
> >>the procedural weight that Struts promotes.
> >>
> >>Look at JSF, do you have actions? No, JSF just updates your
> POJO beans and
> >>calls methods on them.  Why have an ActionForm or have to create all of
> >>these Actions that are simply getter/setter adapters?  Please
> don't be too
> >>quick to retort to my supposed anti-struts mindset, but there are other
> >>frameworks out there that allow direct interaction with my business
> >>objects
> >>and don't require a heck of a lot of framework specific coding.
> >>
> >>---
> >>
> >>Example:
> >>To have a multi-page form with JSF, I just create a bean that sits in
> >>Session scope that has a series of getters and setters.  JSF will also
> >>allow
> >>me to pre-set relationships to other objects at creation time.
> Then, when
> >>I'm ready to submit the multi-page form, I just put in the jsp
> >>#{myFormBean.submit}.  No action mappings, only a managed bean entry.
> >>
> >>With Struts, I have to create an ActionForm objects (can't just use a
> >>business object I already have), and then create separate
> Action objects
> >>to
> >>manipulate that ActionForm.
> >>
> >>---
> >>
> >>-Jacob Hookom
> >>
> >>-Original Message-
> >>From: Frank Zammetti [mailto:[EMAIL PROTECTED]
> >>Sent: Thursday, June 17, 2004 2:29 PM
> >>To: [EMAIL PROTECTED]
> >>Subject: Theoretical debate
> >>
> >>Last night I was Googling for something and I stumbled across
> the Crysalis
> >>framework.  I was actualyl intrigued by the underlying premise
> of it and I
> >>wanted to see what others thought about it.
> >>
> >>In a nutshell and in my own words, Crysalis
> >>(http://chrysalis.sourceforge.net/) has the underlying idea
> that when you
> >>develop in most MVC frameworks, Struts chief among them, you
> are actually
> >>doing something unnatural and in a way at odds with basic OOP design.
> >>
> >>Think about a shopping cart example... If you were going to
> write that in
> >>straight J

RE: problem with jsession id

2004-06-18 Thread Daniel Perry
There is no need for you to use a taglib to render a link! The easiest
solution:

Login

> -Original Message-
> From: Dhruv Trivedi [mailto:[EMAIL PROTECTED]
> Sent: 18 June 2004 12:45
> To: Struts Users Mailing List
> Subject: Re: problem with jsession id
>
>
> Hi Niko and all other guys,
>
> is there any way in struts to avoid this URL rewriting.
>
> Actually jsessionid is also appended with the link with which i
> am submitting the form.
> have a look on code:
> Original code is:
> Login
>
> But when i run application(first time):
>  styleClass="button">Login
>
> How can i get rid of this thing
>
> --Dhruv
>
>
>
>
> Nicolas De Loof <[EMAIL PROTECTED]> wrote:
>
> On first request, a session is created. Tomcat (or any other
> servlet container) wan use two mecanism to handle sessions
> : cookies or URL rewriting (add a ";jsessionid=...").
>
> Preference is for cookies, because it doesn't need to change URLs
> in pages, but on first request, Tomcat has no way to
> know if the browser accepts cookies, so it needs to rewrite URLs
> AND put a setCookie header.
>
> If next request have cookie, URL rewriting is not mandatory anymore.
>
> URL rewriting is done when encoding URL using
> response.encodeUrl(). Struts is compliant with J2EE and calls this method
> in jsp tags for every URL it has to render.
>
> If you don't want such URL to be shown in user browser, you
> should use a redirect on your first action.
>
> Nico.
>
>
>
>
> > hello guys,
> >
> > when i open the login form of my struts application, for the
> very first time a jession id is appended with the
> value of action attribute
> >
> > example
> >
> >
> > above value is shown in the source code of the displayed page.
> >
> > can any one tell me why it happens and how can i solve this problem.
> >
> > Asim Ghosh
> >
> >
> >
> > -
> > ALL-NEW Yahoo! Messenger - so many all-new ways to express yourself
>
>
>
> Our name has changed. Please update your address book to the
> following format: "[EMAIL PROTECTED]".
>
> This message contains information that may be privileged or
> confidential and is the property of the Capgemini Group. It is
> intended only for the person to whom it is addressed. If you are
> not the intended recipient, you are not authorized to read,
> print, retain, copy, disseminate, distribute, or use this message
> or any part thereof. If you receive this message in error, please
> notify the sender immediately and delete all copies of this message.
>
>
> -
> 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!


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



RE: problem with jsession id

2004-06-18 Thread Daniel Perry
That would be jsp adding the session id.  Not really a problem, so do you
really need to get rid of it?

I think it wont appear on further pages, becuase it will use a session
cookie (if i understand correctly, the first time it adds that just in case
session cookie doesn't work).

You should be able to turn off sessions somewhere, or you might be able to
tell it not to use anything other than cookies.  Not sure where thought, so
check JSP docs and or the container config to try for info.

Daniel.

> -Original Message-
> From: Asim Ghosh [mailto:[EMAIL PROTECTED]
> Sent: 18 June 2004 12:06
> To: [EMAIL PROTECTED]
> Subject: problem with jsession id
>
>
> hello guys,
>
>when i open the login form of my struts application, for the
> very first time a jession id is appended with the value of action
> attribute
>
> example
>
> 
> above value is shown in the source code of the displayed page.
>
> can any one tell me why it happens and how can i solve this problem.
>
> Asim Ghosh
>
>
>
> -
>  ALL-NEW Yahoo! Messenger - so many all-new ways to express yourself


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



RE: Theoretical debate

2004-06-18 Thread Daniel Perry
I personally think struts is spot on.  I think it does follow Java & OO
principles, and many J2EE patterns.

My struts apps generally consist of DAOs which handle simple methods, and
some services which handle more complex operations.  These interact with
beans which are persisted using OJB.

The actions (and jsps) provide the view layer.  All my actions do is parse
submitted data, and call methods in services/DAOs.  I would not be atall
happy at providing direct access to services due to lack of
validation/security checks.  Some of my actions are quite big, providing
multi level checks on data.

This whole idea of "transparent" access to beans/services scares me.  It
reminds me of CGI programming, and all the security problems that came with
it.

Web apps are very different to traditional apps.  With traditional apps the
user has no access to variables being passed between the user interface and
service layer.  With webapps they can do anythign they like to data that
gets as far as them.

Eg.  Say a users looks at their list of transactions, and clicks on a link
to view details: "getTransaction.do?transactionId=753"  The user can change
the url to "=750" and try to access someone elses transaction.

The first thing a struts app should do is load transaction 753, and see who
it belongs to. If it doesnt belong to the user (who is probably recorded in
the session) then send them on to an error page.  Without the struts action
doing this check, the method in the service: getTransaction(int
transactionId) will probably be called directly.  Normally a service would
not be expected to do the check, as it will probably be used by UI
components as well as low level system components.

The struts actions (if coded well) add a nice isolation layer between the
view and business services.

Anyway, that's my take on things!

Daniel.

> -Original Message-
> From: mike [mailto:[EMAIL PROTECTED]
> Sent: 17 June 2004 21:45
> To: Struts Users Mailing List; Struts Users Mailing List
> Subject: RE: Theoretical debate
>
>
> +1  I personally do not find what you have to or can do with
> Struts much of
> a problem at all.  I like the freedom the separation gives me.  It is
> rather like the defensive idea of Aaron Nitzovitch in chess.  If you just
> defend a square or piece as much as required, all the defensive
> pieces are
> tied down.  However, if you add an additional defender, then all your
> pieces incorporated into the defense are free to abandon that task and a
> very interesting and deep interchange of offense and defense
> results.  The
> separation of functions in Struts does this for me.  I think I prefer the
> Struts approach to the JSF approach as well, although like
> everyone else, I
> would like and try to achieve a hybrid for my purposes.
>
> Michael
>
> At 01:29 PM 6/17/2004, Hubert Rabago wrote:
>
> >  > From: Frank Zammetti [mailto:[EMAIL PROTECTED]
> >  > Most likely you would have a ShoppingCart class with a
> number of methods
> >in it,
> >  > things like addItem(), removeItem(), totalPrice(), etc.
> >
> >I follow this design on my applications, on the *business logic* tier.
> >On that tier (whether I implement it as EJBs or POJOs), I would have an
> >actual business object that would have these methods.
> >I tend to look at Struts as a necessary add-on to the application to give
> >it a web front end.
> >To me, my web application isn't "a collection of services that
> are executed
> >to form a coherent larger application", rather it's just an interface
> >to the actual application that runs on the server.
> >
> >
> >  --- "Hookom, Jacob" <[EMAIL PROTECTED]> wrote:
> >  > With Struts, I have to create an ActionForm objects (can't just use a
> >  > business object I already have), and then create separate
> Action objects
> >to
> >
> >Because of the way I view my app, I have no problem separating
> my view of the
> >objects in my interface and my app's business objects.  I fully
> understand
> >the need for separate ActionForm objects (users work with untyped string
> >values, my business tier works with typed values, the Action
> object goes in
> >between).  Still, I don't like having to create string-ified
> counterparts of
> >my business objects.  That's how the FormDef project began (
> >http://www.rabago.net/struts/formdef and http://formdef.dev.java.net/ ).
> >
> >I haven't tried JSF yet, but I don't think I want my business
> tier objects
> >"contaminated" with presentation-tier specifics, such as the
> callback methods
> >JSF needs on their managed beans.
> >
> >  >
> >  > Any thoughts?
> >  >
> >  > Frank
> >  >
> >
> >
> >Hubert
> >
> >
> >
> >
> >__
> >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]
>
>
>
> ---

RE: [OT] Soccer portal released goal.com

2004-06-17 Thread Daniel Perry
> Way back in April I was quite impressed by a demonstration
> Visual .Net / Managed C++ / C# talking directly to a J2EE 1.4
> web service. The guy demonstrated the whole thing in under
> five minutes. So I have been wondering what is the state of the
> art of tools under J2EE, but I guess I will find in two weeks
> at J1.


I wish i shared that experience. My complaints about .NET all stem back to
one thing - it's a closed source MS product.  They are about as good at
fixing bugs as complying with standards!

I find open source java solutions far better - you find a bug you ask for a
fix, or fix it yourself.  You find the software doesnt do what you want, you
hack the code to do it!  With .NET this is impossible.

I have recently written web services for our software to interoperate with
an MS .NET system.  It was an absolute nightmare.  Bugs in MS's soap
implementation stopped it from accessing our service.  This was eventually
overcome, but accessing the .NET service was even more painful.  I cannot
use Apache AXIS (directly) to access the service because AXIS generates a
request with slightly different namespace declaration (but an equally valid
one) than MS expects:

http://schemas.xmlsoap.org/soap/encoding/";
xmlns:ns1="http://tempuri.org";>

The example SOAP XML which MS gives you as an example (which works):

http://tempuri.org/";>

The only solution to this i found was to generate my own "SoapEnvelope"
object and use axis to send it, which makes for an ugly solution.

Generally i find the state of J2EE tools to be better than .NET, however
they are harder to find and sometimes get started with.  MS's one benefit
here is everything comes in the one box! There are some things i quite like
about .NET but i just dont like microsofts implementation.  Hopefully MONO
are going to do better :)

Daniel.


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



RE: [OT] thick client functionality in the browser

2004-06-04 Thread Daniel Perry
I can see where you're going with the mixing of business logic and views.

I will admit that in parts i have done this.  A quick javascript check gives
a much quicker response that submit/redisplay form.  Especially when you get
some of the massive pages in our system.  One solution i had was to do both.
The javascript deals with validation, for the user, but the business logic
also validates data using actionforms, and only proceeds if it passes.

Cheers for the span tip. It will reduce some of my needs for double
requests.  However sometimes the iframe saves requesting more than necessary
in the response - eg when searching data, only replace the inside of the
iframe.

Daniel.

> -Original Message-
> From: Frank Zammetti [mailto:[EMAIL PROTECTED]
> Sent: 04 June 2004 17:08
> To: [EMAIL PROTECTED]
> Subject: RE: [OT] thick client functionality in the browser
>
>
>
> >I agree with this.  Our app is IE only, and it's amazing what you can do.
> >IFRAME's make great scrollable tables.  The use of
> >document.getElementById("xxx").style.display="none" (or "") for
> >hiding/unhiding stuff is very extensive.
>
> You know what I discovered about a month ago?  Instead of using
> iFrames, you
> can get the same functionality with a  with
> style="overflow:scroll;".
> In every way I can determine, it looks and works the same, but
> now instead
> of either having the server serve a second page to populate the iFrame or
> having script generate the HTML for it when the parent loads
> (which I did a
> lot of previously), you can how use regular JSP code (taglibs
> hopefully!) to
> generate the HTML inside the .  It speeds things up so much!
>
> >I disagree with the comment about layers tho.  Our jsps are still only
> >displaying stuff.  They arnt doing anything that the business
> layer should
> >atall.
> >
> >Javascript/dhtml is amazing if you persist with what you want.  I came
> >accross a webmail system the other day that i couldnt believe wasnt using
> >anything else for gui!
>
> I agree, you certainly CAN maintain good architecture.  That's where my
> story about my past three apps came in, how the most recent was is
> infinitely better in terms of separation of layers.
>
> The point I was trying to make, probably not very well, is that
> it's EASIER
> to screw up this way.  You can easily become tempted to put pieces of
> business logic in the view because you realize "gee, if I do x, y
> and z via
> scripting I don't have to have the server do it!".  Things like
> validations
> for example... just checking if a field is filled in is of course
> fine to do
> with script, but if you start doing "if field X is greater than
> the maximum
> dollar amount allowed for this account" in script just because
> you happen to
> have that data on the client-side at the time, that's where you run into
> problems.  It's tempting because you CAN do it in script and the
> result is a
> snappier interface that is less error prone (because of reduced network
> activity and server load), but it's not good architecturally.
> It's not that
> dHTML and scripting MAKES you make bad choices, just that it
> makes it easier
> and more attractive in many cases.  That's what I was trying to say,
> hopefuly I did a better job this time :)
>
> >Daniel.
> >
> > > -Original Message-
> > > From: Frank Zammetti [mailto:[EMAIL PROTECTED]
> > > Sent: 04 June 2004 16:41
> > > To: [EMAIL PROTECTED]
> > > Subject: RE: [OT] thick client functionality in the browser
> > >
> > >
> > > I've personally made something of a career out of doing what your
> >talking
> > > about.  The applications I've built at work are known to have very
> > > Windows-like look, feel and functionality, much more so than
> most other
> > > web-based applications.
> > >
> > > To pull it off, two things are true... first, it is IE only.  This is
> > > because of the secone: they are very heavily JavaScript, Dynamic HTML
> >and
> > > CSS-based GUIs.
> > >
> > > It *IS* possibly to do this type of thing in a cross-browser
> > > fashion, but I
> > > think it's fair to say it is considerably harder, and certainly more
> > > time-consuming.  Standardizing on IE for us was easy because it's
> >already
> > > the corporate standard, and is for 99% of our clients (the other 1% we
> > > simply tell they either use IE for at least our apps our they
> > > don't use the
> > > apps... not too nice in my mind, but it's been accepted thus far).
> > >
> > > Whether you try to do it cross-browser or not, most of your
> time will be
> > > spent doing scripting.  You can do some truly amazing things that
> > > will make
> > > you forget your looking at a web-based app, for the most part.
> > > You can also
> > > in many cases get much better performance because the more
> you do on the
> > > client (assuming it's not processor-intensive since your
> talking about
> >an
> > > interpreted scripting language), the better PERCIEVED performance the
> >app
> > > can have in many cases.  A 

RE: [OT] thick client functionality in the browser

2004-06-04 Thread Daniel Perry
I agree with this.  Our app is IE only, and it's amazing what you can do.
IFRAME's make great scrollable tables.  The use of
document.getElementById("xxx").style.display="none" (or "") for
hiding/unhiding stuff is very extensive.

I disagree with the comment about layers tho.  Our jsps are still only
displaying stuff.  They arnt doing anything that the business layer should
atall.

Javascript/dhtml is amazing if you persist with what you want.  I came
accross a webmail system the other day that i couldnt believe wasnt using
anything else for gui!

Daniel.

> -Original Message-
> From: Frank Zammetti [mailto:[EMAIL PROTECTED]
> Sent: 04 June 2004 16:41
> To: [EMAIL PROTECTED]
> Subject: RE: [OT] thick client functionality in the browser
>
>
> I've personally made something of a career out of doing what your talking
> about.  The applications I've built at work are known to have very
> Windows-like look, feel and functionality, much more so than most other
> web-based applications.
>
> To pull it off, two things are true... first, it is IE only.  This is
> because of the secone: they are very heavily JavaScript, Dynamic HTML and
> CSS-based GUIs.
>
> It *IS* possibly to do this type of thing in a cross-browser
> fashion, but I
> think it's fair to say it is considerably harder, and certainly more
> time-consuming.  Standardizing on IE for us was easy because it's already
> the corporate standard, and is for 99% of our clients (the other 1% we
> simply tell they either use IE for at least our apps our they
> don't use the
> apps... not too nice in my mind, but it's been accepted thus far).
>
> Whether you try to do it cross-browser or not, most of your time will be
> spent doing scripting.  You can do some truly amazing things that
> will make
> you forget your looking at a web-based app, for the most part.
> You can also
> in many cases get much better performance because the more you do on the
> client (assuming it's not processor-intensive since your talking about an
> interpreted scripting language), the better PERCIEVED performance the app
> can have in many cases.  A good example is one application where I sort a
> returned list of search results on the browser as a result of a
> click of a
> column header in an iFrame, which makes it work just like a grid
> in Windows.
>   People love that, and so do the server admins since I'm not having the
> server sort search results.
>
> There are absolutely trade-offs you have to be aware of along the
> way, but
> this is the way I'm pulling it off, and the way I think most people are,
> without resorting to plug-ins, Flash, Applets, ActiveX and all
> that sort of
> stuff.  Pure HTML and JavaScript (well, as pure as you can get when it's
> IE-only!), and you get what you want without most of the headaches.
>
> The other big thing to consider is that you VERY quickly break "proper"
> application architecture, i.e., separation of layers.  It's almost
> unavoidable when your doing something like this unless you are
> exceptionally
> careful.  I've done three huge applications along these lines
> over the past
> four years, the first two were pretty poor in terms of
> separation, the third
> is actually very good, but I learned a lot of lessons from the first two,
> and even still there are things done that probably shouldn't be.  If this
> isn't your biggest concern (as it's not here since fulfilling client
> requests always trumps proper application development, bad as
> that may be in
> theory!), then it's fine.  If your an absolute architecture
> purist (i.e., if
> your a Ph.D, which we have way too many of these days!), then you'll
> probably fight such an approach tooth and nail, and continue to
> either (a)
> have trouble with how your applications work or (b) develop less powerful
> interfaces because your more concerned with the structure of an
> application
> than what it looks like and feels like and works like for an end user.
>
> Now that I've opened a theological nightmare here... ;)
>
> Frank
>
> >From: "Wennberg, Mathias" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Subject: [OT] thick client functionality in the browser
> >Date: Fri, 4 Jun 2004 10:25:41 -0500
> >
> >We're currently running a swing java webstart app but issues
> with clients
> >jvm
> >versions and permissions to install/update programs on their
> workstations
> >are
> >making us look into alternatives.
> >What are people out there using to get thick client functionality in the
> >browser? Ultimately it would work without any plug-ins and on
> all browsers,
> >but it's not necessary as long as it works on IE and doesn't use activeX.
> >
> >I'm also looking for comments and feedback on thinlets and canoo.
> >
> >Thanks.
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> _

RE: How can i avoid the use of & in a drop down box ?

2004-06-03 Thread Daniel Perry


Daniel.

> -Original Message-
> From: John Antonakos [mailto:[EMAIL PROTECTED]
> Sent: 03 June 2004 15:10
> To: Struts Users Mailing List
> Subject: Re: How can i avoid the use of & in a drop down box ?
> 
> 
> where should i put that ?
> i never heard of it...
> 
> please give more info, where does it go ?
> to struts-config.xml or somewhere else ?
> In the Struts FormClass or inside the jsp tag ?
> 
> - Original Message - 
> From: "Rouven Gehm" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, June 03, 2004 5:01 PM
> Subject: Re: How can i avoid the use of & in a drop down box ?
> 
> 
> Have you tried to set filter="false" ???
> 
> 
> Rouven
> 
> - Original Message - 
> From: "John Antonakos" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, June 03, 2004 3:40 PM
> Subject: Re: How can i avoid the use of & in a drop down box ?
> 
> 
> > I am re-writing the question cause the stupid Outlook formatted my text
> > and made it without any meaning to it.
> > 
> -
> > We have some drop down boxes in our jsp's which take
> > data straight from the DB. Some of those data contain
> > the character &. (eg John & me).
> > We use a javascript array to store these data for internal
> > use in the page. The struts format those data.
> > When we use these data in a drop down (html select) appears
> > as (John & me) which obviously does not look good.
> > 
> > Is there a way to avoid this from happening ?
> > Can we say to the struts NOT to format the data coming from
> > the java objects ?
> > 
> -
> > i mean NOT to turn & to &, cause when it does it the drop down
> > says: "John & me", which looks ridiculous, doesnt it ?
> > 
> > - Original Message - 
> > From: "Kathy Zhou" <[EMAIL PROTECTED]>
> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> > Sent: Thursday, June 03, 2004 4:26 PM
> > Subject: RE: How can i avoid the use of & in a drop down box ?
> > 
> > 
> > Have you tried to use & for &? just a thought.
> > 
> > Kathy
> > 
> > > -Original Message-
> > > From: Srinivas Rao [SMTP:[EMAIL PROTECTED]
> > > Sent: Thursday, June 03, 2004 8:07 AM
> > > To: Struts Users Mailing List
> > > Subject: Re: How can i avoid the use of & in a drop down box ?
> > > 
> > > Hi John,
> > > It is possible but i am not sure it is working or not 
> > > before inset into the database we will use Single quate( '  ' 
> ) to store
> > > the data, after u can access '&' symble from the database..
> > >  
> > > bye
> > > Srinivas
> > > 
> > > John Antonakos <[EMAIL PROTECTED]> wrote:
> > > We have some drop down boxes in our jsp's which take
> > > data straight from the DB. Some of those data contain
> > > the character &. (eg John & me).
> > > We use a javascript array to store these data for internal
> > > use in the page. The struts format those data.
> > > When we use these data in a drop down (html select) appears
> > > as (John & me) which obviously does not look good.
> > > 
> > > Is there a way to avoid this from happening ?
> > > Can we say to the struts NOT to format the data coming from
> > > the java objects ?
> > > 
> > > John Antonakos
> > > Software Engineer 
> > > Information Systems Department
> > > MedNet International Ltd www.mni.gr
> > > Tel. (+30) 210 6232085
> > > Fax (+30) 210 6232026
> > > Email: [EMAIL PROTECTED]
> > > 
> > > 
> > > 
> > > 
> > > -
> > > Do you Yahoo!?
> > > Friends.  Fun. Try the all-new Yahoo! Messenger
> > 
> > 
> > 
> > -
> > 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]



FW: Delivery Status Notification (Failure)

2004-05-28 Thread Daniel Perry
Everytime i post to the struts list, i get an email back for one person:

Could an admin unscuscribe this user please :)

Daniel.

-Original Message-
From: postmaster+AEA-rave-tech.com +AFs-mailto:postmaster+AEA-rave-tech.com+AF0-
Sent: 28 May 2004 10:16
To: d.perry+AEA-netcase.co.uk
Subject: Delivery Status Notification (Failure)


This is an automatically generated Delivery Status Notification.

Delivery to the following recipients failed.

   shaikh.sohrab+AEA-rave-tech.com





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



RE: is OJB a good choice for Modeling ?

2004-05-28 Thread Daniel Perry
I've been using OJB for 6 months now, and have found it works nicely.

If you do go for ojb, join the user mailing list, as it can be very helpful
when trying to figure out what's going wrong, especially to begin with!

Daniel.



> -Original Message-
> From: Zaid [mailto:[EMAIL PROTECTED]
> Sent: 28 May 2004 09:23
> To: Struts Users Mailing List
> Subject: is OJB a good choice for Modeling ?
>
>
> Hi all,
>
> is OJB(http://db.apache.org/ojb) is a good ORM ? please advise me, I have
> 3 types for choicing:IBatis, Hibernate and ODMG as well.
>
> Regards
>
> -
> 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]



  1   2   >