RE: Which button was pressed?

2005-07-26 Thread Vijaya S
I have many situations like this in my application. This is what I have
done. Have a hidden field at the top of the form as 'btnpressed' and on
onclick event of each of the buttons, set a unique value to the hidden field
("this.form.btnpressed.value='value1'"). In your action, check the value of
the formbean property 'btnpressed' value and do processing accordingly.

Vijaya

-Original Message-
From: Thomas Sundberg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 26, 2005 8:23 PM
To: 'Struts Users Mailing List'
Subject: Which button was pressed?


Hi!

I have a form where a user should be able to request a report. The user
enters two dates and then presses either a button labeled pdf, html och csv.
How can I read in my action which button was pressed?

My form looks something like this:

The button part of my form looks something like this:





I haven't seen any good examples when looking in the docs and searching the
web. I assume I wan't to add something to the html:submit, perhaps use the
property tag(?), or can I be able to read the value of the button pressed?
How do I read the value in my action?

/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: JSF is the beginning of the end of Struts !!!

2005-07-26 Thread Tamas Szabo

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]



Re: probably a cleaner way... testing for just one user

2005-07-26 Thread Tamas Szabo

John Henry Xu wrote:


Here is Rick's original requirement,

 


I have an odd requirement where this internal application should
only be used by one valid user(one session) at a time. (The data
being worked with in the application would require so many locks
that's it just easier to restrict it to one user).
   



Only if one session ends, another connection can establish connections,
always you have only one user connect to data. It doen't matter if
web-browser performing keep-alive or not. If web browser droped the
connection, this session ends and original user drops connection. 


I'm not sure that I got this right:

"If web browser droped the
connection, this session ends and original user drops connection."

The session doesn't end when the browser closes a connection.

If you limit the HTTP connections thath can be made to an application to 
1, it will not

assure you that you will have only 1 session at a time.

If the browser closes a HTTP connection to the web server the session of 
the user will still
be alive on the server. And if a second user opens a connection in this 
time he will be able

to open a second connection and so on...

Furthermore a browser can make more connections to a web server to load 
data(for example

it loads images found in a HTML using separete connections).
You would block all this 'extra' connections if you used your approach.



>David said: it sounds like you understand the concept behind the
 


"acceptCount" but are relying on the browser to perform a keep-alive to
   


hold
 


the connection open...If the keep-alive
doesn't work for a given browser, then the HTTP request is over in a
   


second
 


and the next person can login to the site.
   



Remember the first person does not connected when the second
connected--still one user using data only.
 


The first person is not connected but it has a Session on the server.
The second user can connect so he gets another  Session.

The original requierment said:

I have an odd requirement where this internal application should
only be used by one valid user(one session) at a time.


It says *one session* explicitly.

Tamas



-
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 Yan Hu
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]



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

2005-07-26 Thread Craig McClanahan
On 7/26/05, John Henry Xu <[EMAIL PROTECTED]> wrote:
> > Craig said: Tell me again how you come to the conclusion that Java is
> not a
> > popular platform for web app deployments? (To say nothing of the fact
> > that Microsoft might dispute the "PHP is king" rubric as well :-).
> 
> Craig, I assure you that I always hope Java success and I do think it
> popular for web app. The only thing I think I said Java was not doing
> well as PHP is that PHP becomes more popular in public sites.

That is definitely what you claimed.  I claim that such a standard is
irrelevant.

[snip]
> 
> If it uses Java in Apache, I may find mod_jk, or jsp, .do?... I found
> .shtml mostly.
> 

Consider a Struts based web site that maps "*.html" to the Struts
action servlet (and there are more such sites on the public Internet
than you would possibly believe :-).  Your approach is going to come
to the mistaken conclusion that this is a static HTML based site
instead of a Struts based site.  Actually, my favorite sites are the
ones that map "*.asp" to the Struts servlet.  Gotta love people that
bend minds like that!

But the serious point is that, if you think you can conclude anything
based on the textual content of a URL, you are naively mistaken.  Only
the server you are calling knows for sure what technologies are used
to produce a particular response.

Craig

-
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 John Henry Xu
> Craig said: Tell me again how you come to the conclusion that Java is
not a
> popular platform for web app deployments? (To say nothing of the fact
> that Microsoft might dispute the "PHP is king" rubric as well :-).

Craig, I assure you that I always hope Java success and I do think it
popular for web app. The only thing I think I said Java was not doing
well as PHP is that PHP becomes more popular in public sites. I mentioned
all opensource and other public sites use PHP as evidence, and search
engines showes php sites frequently. And as I said before, I agree with
you that maybe broad criteria should be used. We just have to find a way
how to get those private numbers.

> > example, I found www.javaworld.com, the site runs "Apache/1.3.26,
Unix,
> > mod_gzip/1.3.19.1a , mod_perl/1.27". It likes cgi, isn't it?
> >
>
> No ... that just means they have PERL installed on their installation
> of the app server, with no indication what else is going on. That has
> absolutely nothing to do with what technologies are actually used on
> that site (which happens to have a combination, so how are you going
> to count that? :-).

If it uses Java in Apache, I may find mod_jk, or jsp, .do?... I found
.shtml mostly.

I agree with you here that it is difficult to find exacty what
technologies it use. That is another reason why it is difficult to use
some  criteria determine the overall success as you said. Indeed it is
hard to compare private sites.

> Craig said: But I do know a few other numbers  consider downloads
of the J2EE
> 1.4 implementation from Sun (or the 8.0 or later PE version of the app
> server, but can be downloaded for free) which come with JSF. You need
> seven digits (i.e. millions) to count these numbers ... yet Sun's
> overall penetration in the app server space is relatively small. Is
> Tomcat in the millions yet? (Answer: probably, but not as many :-).

The facts you mentioned certainly supported Java is popular in web
development. And I am glad to see these numbers.

  - Original Message -
  From: "Craig McClanahan"
  To: "Struts Users Mailing List"
  Subject: Re: Re: JSF is the beginning of the end of Struts !!!
  Date: Tue, 26 Jul 2005 21:46:14 -0700

  >
  > On 7/26/05, John Henry Xu wrote:
  > > > Craig said:You can't properly measure a technology's overall
  success on
  > > a single
  > > > criteria like this.
  > >
  > > Craig, you are absolutely right. Maybe there is a better way to
  measure
  > > technologies based on broader criteria. The problem was I (or
  public)
  > > could not access proprietary networks as you said. I used search
  engines
  > > a lot recently. Many topics I searched come up sites in PHP and
  cgi. For
  > > example, I found www.javaworld.com, the site runs "Apache/1.3.26,
  Unix,
  > > mod_gzip/1.3.19.1a , mod_perl/1.27". It likes cgi, isn't it?
  > >
  >
  > No ... that just means they have PERL installed on their
  installation
  > of the app server, with no indication what else is going on. That
  has
  > absolutely nothing to do with what technologies are actually used
  on
  > that site (which happens to have a combination, so how are you
  going
  > to count that? :-).
  >
  > > Again, I agree with you that maybe many hidden sites were Java
  but we
  > > don't know.
  >
  > Then why are you trying to make any assumptions? You claim to be a
  > journalist ... do some research and justify your findings :-)
  >
  > Of course, you're going to find it very difficult to find many
  > meaningful metrics for open source projects. Let's consider one
  > commonly used one ... download counts. On an Apache project, there
  is
  > zero way to know what that count is, because good projects take
  > advantage of the Apache mirror system, and there is no central
  > accumulation of the overall stats (because the mirror sites
  consider
  > that information to be proprietary). I can tell you that, a couple
  of
  > years ago, before Struts started using the mirrors it would get
  about
  > 70k downloads per month ... nowdays, it gets 15k-20k from the
  Apache
  > site and a totally unknown number from the mirrors. So, has the
  total
  > gone up or down? Darned if I know.
  >
  > But I do know a few other numbers  consider downloads of the
  J2EE
  > 1.4 implementation from Sun (or the 8.0 or later PE version of the
  app
  > server, but can be downloaded for free) which come with JSF. You
  need
  > seven digits (i.e. millions) to count these numbers ... yet Sun's
  > overall penetration in the app server space is relatively small. Is
  > Tomcat in the millions yet? (Answer: probably, but not as many :-).
  >
  > Tell me again how you come to the conclusion that Java is not a
  > popular platform for web app deployments? (To say nothing of the
  fact
  > that Microsoft might dispute the "PHP is king" rubric as well :-).
  >
  > >
  > > John Henry Xu
  > >
  >
  > Craig
  >
  >
  -
  > 

RE: probably a cleaner way... testing for just one user

2005-07-26 Thread John Henry Xu
Here is Rick's original requirement,

> I have an odd requirement where this internal application should
> only be used by one valid user(one session) at a time. (The data
> being worked with in the application would require so many locks
> that's it just easier to restrict it to one user).

Only if one session ends, another connection can establish connections,
always you have only one user connect to data. It doen't matter if
web-browser performing keep-alive or not. If web browser droped the
connection, this session ends and original user drops connection. Another
new (only one) session will begin. So still only one user connects. So
this answered your posts below:

 >David said: it sounds like you understand the concept behind the
> "acceptCount" but are relying on the browser to perform a keep-alive to
hold
> the connection open...If the keep-alive
> doesn't work for a given browser, then the HTTP request is over in a
second
> and the next person can login to the site.

Remember the first person does not connected when the second
connected--still one user using data only.



> David said: Then, you would also have the issue of needing a Connector
for that one
> individual webapp and another connector, or other connectors for the
> remaining webapps on that Tomcat server which would need to allow
multiple
> connections at one time (like regular web sites).

Tomcats can have multiple connectors. I don't see a problem here.

Again, I just try to see if configuration is possible for this
interesting problem. I think Rick's coding OK also.

Regards,

John H. Xu

  - Original Message -
  From: "David G. Friedman"
  To: "Struts Users Mailing List"
  Subject: RE: probably a cleaner way... testing for just one user
  Date: Wed, 27 Jul 2005 00:19:12 -0400

  >
  > John,
  >
  > From your notes below, it sounds like you understand the concept
  behind the
  > "acceptCount" but are relying on the browser to perform a
  keep-alive to hold
  > the connection open. I feel that is one dangerous assumption that
  the
  > keep-alive will work for his "main" user's browser. If the
  keep-alive
  > doesn't work for a given browser, then the HTTP request is over in
  a second
  > and the next person can login to the site.
  >
  > I would be interested in reading other opinions (Rick, especially)
  on http
  > keep-alives and how reliable they are in cases like that.
  >
  > Then, you would also have the issue of needing a Connector for that
  one
  > individual webapp and another connector, or other connectors for
  the
  > remaining webapps on that Tomcat server which would need to allow
  multiple
  > connections at one time (like regular web sites).
  >
  > Again, now Rick has theories and opinions on various other methods
  plus his
  > original Filter/sessionListeners approach.
  >
  > Regards,
  > David
  >
  > -Original Message-
  > From: John Henry Xu [mailto:[EMAIL PROTECTED]
  > Sent: Tuesday, July 26, 2005 11:52 PM
  > To: Struts Users Mailing List
  > Subject: RE: probably a cleaner way... testing for just one user
  >
  > Hi David,
  >
  > The problem was interesting. So even Rick made his mind I think it
  is
  > beneficial to see if configuration was possible for the
  requirement.
  > According to Rick:
  >
  > > I have an odd requirement where this internal application should
  > > only be used by one valid user(one session) at a time. (The data
  > > being worked with in the application would require so many locks
  > > that's it just easier to restrict it to one user).
  >
  > The server.xml in Tomcat 4.1.27
  >
  > > port="80" minProcessors="1" maxProcessors="1"
  > enableLookups="true" redirectPort="443"
  > acceptCount="0" debug="0" connectionTimeout="5000"
  > useURIValidationHack="false" disableUploadTimeout="true" />
  >
  > "acceptCount" is for how many connections would be queued, right?
  If one
  > user is using the connection, maxProcessors is 1, others
  automatically
  > can not connect. So this user will use data alone.By setting
  > acceptCount="0", no other connection will be queued also, right?
  Cookies
  > seems not in original requirement. If others cannot connect, there
  is no
  > other sessions. It is similar in Tomcat 5, although it uses
  maxThreads as
  > name.
  >
  > John H. Xu
  >
  >
  >
  -
  > 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



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

2005-07-26 Thread Craig McClanahan
On 7/26/05, John Henry Xu <[EMAIL PROTECTED]> wrote:
> > Craig said:You can't properly measure a technology's overall success on
> a single
> > criteria like this.
> 
> Craig, you are absolutely right. Maybe there is a better way to measure
> technologies based on broader criteria. The problem was I (or public)
> could not access proprietary networks as you said. I used search engines
> a lot recently. Many topics I searched come up sites in PHP and cgi. For
> example, I found www.javaworld.com, the site runs "Apache/1.3.26,  Unix,
> mod_gzip/1.3.19.1a ,   mod_perl/1.27". It likes cgi, isn't it?
> 

No ... that just means they have PERL installed on their installation
of the app server, with no indication what else is going on.  That has
absolutely nothing to do with what technologies are actually used on
that site (which happens to have a combination, so how are you going
to count that? :-).

> Again, I agree with you that maybe many hidden sites were Java but we
> don't know.

Then why are you trying to make any assumptions?  You claim to be a
journalist ... do some research and justify your findings :-)

Of course, you're going to find it very difficult to find many
meaningful metrics for open source projects.  Let's consider one
commonly used one ... download counts.  On an Apache project, there is
zero way to know what that count is, because good projects take
advantage of the Apache mirror system, and there is no central
accumulation of the overall stats (because the mirror sites consider
that information to be proprietary).  I can tell you that, a couple of
years ago, before Struts started using the mirrors it would get about
70k downloads per month ... nowdays, it gets 15k-20k from the Apache
site and a totally unknown number from the mirrors.  So, has the total
gone up or down?  Darned if I know.

But I do know a few other numbers  consider downloads of the J2EE
1.4 implementation from Sun (or the 8.0 or later PE version of the app
server, but can be downloaded for free) which come with JSF.  You need
seven digits (i.e. millions) to count these numbers ... yet Sun's
overall penetration in the app server space is relatively small.  Is
Tomcat in the millions yet?  (Answer:  probably, but not as many :-).

Tell me again how you come to the conclusion that Java is not a
popular platform for web app deployments?  (To say nothing of the fact
that Microsoft might dispute the "PHP is king" rubric as well :-).

> 
> John Henry Xu
> 

Craig

-
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 Rokibul Islam Khan
All the time you are missing one thing my friend, the marketting words
"Servlet/jsp/struts is for large application". Those site you are
talking about is nothing more than a small/large/medium sized portal
type application.

Comparing PHP and Java is a kind of vague idea. We choose technology
which will confirm our ROI. for small scale application where u don't
need 1000 transactions per hour php is well fitted rather than java.
As far as i understand PHP is a kind of cheap technology that  can
confirm  ur ROI for small or even mid scale application but for large
application i don't think it will be wellfitted except creating big
mess.

Personally i like both struts and jsf. jsf have come with the goodies
of struts and improved many other side as well. i am not an expert on
jsf and have no experiance with it but if jsf is better than struts
then jsf should come up to take the place of struts as a better
technology.



-- 
--
Rokibul Islam Khan
Software Developer


On 7/27/05, John Henry Xu <[EMAIL PROTECTED]> wrote:
> > Craig said:You can't properly measure a technology's overall success on
> a single
> > criteria like this.
> 
> Craig, you are absolutely right. Maybe there is a better way to measure
> technologies based on broader criteria. The problem was I (or public)
> could not access proprietary networks as you said. I used search engines
> a lot recently. Many topics I searched come up sites in PHP and cgi. For
> example, I found www.javaworld.com, the site runs "Apache/1.3.26,  Unix,
> mod_gzip/1.3.19.1a ,   mod_perl/1.27". It likes cgi, isn't it?
> 
> Again, I agree with you that maybe many hidden sites were Java but we
> don't know.
> 
> John Henry Xu
> 
>   - Original Message -
>   From: "Craig McClanahan"
>   To: "Struts Users Mailing List"
>   Subject: Re: Re: JSF is the beginning of the end of Struts !!!
>   Date: Tue, 26 Jul 2005 17:41:14 -0700
> 
>   >
>   > On 7/26/05, John Henry Xu wrote:
>   >
>   > > But now almost all public sites are dominated by PHP and
>   others...
>   >
>   > Whatever the actual truth of this assertion, don't forget that the
>   > number of public Internet based webapps is not all that large
>   compared
>   > to the total number of webapps running behind the firewalls of
>   various
>   > companies (For example, Sun, with many *thousands* of internal
>   > application installations on our internal network -- but you'll
>   never
>   > see them if you're not a Sun employee).
>   >
>   > You can't properly measure a technology's overall success on a
>   single
>   > criteria like this.
>   >
>   > Craig
>   >
>   >
>   -
>   > 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: probably a cleaner way... testing for just one user

2005-07-26 Thread David G. Friedman
Tamas,

Rick did ask for a cleaner solution and, at least for Tomcat, using one
class instead of many filters and session listeners (which Rick mentioned he
is using now) looks like a cleaner solution to me.

Too bad he can't narrow it down to one SessionListener,without any Filters,
for his webapp that does something like the following:

When a session is created, have the SessionListener update a session count.
If the count is 2 or more then call SessionEvent.getSession().invalidate()
to cancel the session.  Then the session listener's Session destroy method
can decrement the counter appropriately.   And once the main session is
removed (via logout or timeout) it would set the session count back to zero
so someone new could login to the webapp.  But it sounds like Rick found
some issues with that kind of approach where it doesn't match that simple
kind of logic.

Hell, if I were doing it I'd probably try to hide the one-session-only logic
inside a Struts custom RequestProcessor.processRoles() (?) method call since
I'm a processRoles()aholic programmer. :)

Regards,
David, full of way to many variations on ideas tonight. And I was so quiet
for so many months. :(

-Original Message-
From: Tamas Szabo [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 26, 2005 11:45 PM
To: Struts Users Mailing List
Subject: Re: probably a cleaner way... testing for just one user

Hi,

>The theory is to override the PersistentManager with your own class.
>Theirs subclasses the PersistentManagerBase which subclasses ManagerBase.
>Now inside ManagerBase it seems to create the sessions in the method
>createSession(String). If you override that, you could count the sessions
>and if you already have one active, toss "IllegalStateException" to
>prevent a second session from being created.
>
Rick did almost the same but using webcontainer indepenedent
APIs. So why should he bind his implementation to Tomcat?

I think that Rick's original solution is ok.  He could
remove some lines, because you can set/remove an attribute
to/from a context and have that as a true, false flag.
Instead of setting the attributes to false, don't set them
or remove them and check only for attributes beeing present
in the given scope, no need to check for their bool value.

But that's only a minor detail...

Tamas


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



RE: probably a cleaner way... testing for just one user

2005-07-26 Thread David G. Friedman
John,

>From your notes below, it sounds like you understand the concept behind the
"acceptCount" but are relying on the browser to perform a keep-alive to hold
the connection open.  I feel that is one dangerous assumption that the
keep-alive will work for his "main" user's browser.  If the keep-alive
doesn't work for a given browser, then the HTTP request is over in a second
and the next person can login to the site.

I would be interested in reading other opinions (Rick, especially) on http
keep-alives and how reliable they are in cases like that.

Then, you would also have the issue of needing a Connector for that one
individual webapp and another connector, or other connectors for the
remaining webapps on that Tomcat server which would need to allow multiple
connections at one time (like regular web sites).

Again, now Rick has theories and opinions on various other methods plus his
original Filter/sessionListeners approach.

Regards,
David

-Original Message-
From: John Henry Xu [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 26, 2005 11:52 PM
To: Struts Users Mailing List
Subject: RE: probably a cleaner way... testing for just one user

Hi David,

The problem was interesting. So even Rick made his mind I think it is
beneficial to see if configuration was possible for the requirement.
According to Rick:

>I have an odd requirement where this internal application should
> only be used by one valid user(one session) at a time. (The data
> being worked with in the application would require so many locks
> that's it just easier to restrict it to one user).

The server.xml in Tomcat 4.1.27



"acceptCount" is for how many connections would be queued, right? If one
user is using the connection, maxProcessors is 1, others automatically
can not connect. So this user will use data alone.By setting
acceptCount="0", no other connection will be queued also, right? Cookies
seems not in original requirement. If others cannot connect, there is no
other sessions. It is similar in Tomcat 5, although it uses maxThreads as
name.

John H. Xu


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



Re: [OT] org.apache.commons.beanutils.PropertyUtils.describe(Object )

2005-07-26 Thread Tamas Szabo



You should note that PropertyUtils.describe() simply delegates to the
standard JavaBeans introspection functionality to determine what the
properties of the bean class are ... and, based on the property method
naming rules, every Java class does indeed have a readonly property
named "class" due to the existence of the getClass() method that is
inherited from  java.lang.Object.

You should also note that you can dictate what the available
properties are, and even use getter and setter method names that do
not conform to the standard design patterns, if you supply a
FooBeanInfo class to go along with your Foo class -- see the JavaBeans
spec for more information.  But that's more work than makes sense in
this particular use case.

 

Since I have a BaseValueObject(parent of all value objects) which 
provides toString, equals, hashCode
to all the value objects, I could probably attach a BeanInfo class to 
this class which "hides" the class property

so I will get rid of it in all my value objects.
But since I need the PropertyUtils.describe() only in the 
BaseValueObject methods I simply removed the

class property from the Map.

Anyways, thanks for everyone for the answers.
This was so OT I didn't hope to get any answers ;-)


Tamas


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



RE: probably a cleaner way... testing for just one user

2005-07-26 Thread John Henry Xu
Hi David,

The problem was interesting. So even Rick made his mind I think it is
beneficial to see if configuration was possible for the requirement.
According to Rick:

>I have an odd requirement where this internal application should
> only be used by one valid user(one session) at a time. (The data
> being worked with in the application would require so many locks
> that's it just easier to restrict it to one user).

The server.xml in Tomcat 4.1.27



"acceptCount" is for how many connections would be queued, right? If one
user is using the connection, maxProcessors is 1, others automatically
can not connect. So this user will use data alone.By setting
acceptCount="0", no other connection will be queued also, right? Cookies
seems not in original requirement. If others cannot connect, there is no
other sessions. It is similar in Tomcat 5, although it uses maxThreads as
name.

John H. Xu

  - Original Message -
  From: "David G. Friedman"
  To: "Struts Users Mailing List"
  Subject: RE: probably a cleaner way... testing for just one user
  Date: Tue, 26 Jul 2005 22:39:57 -0400

  >
  > John,
  >
  > Aren't those for simultaneous threads for the webapp, not to limit
  total
  > sessions/session cookies? I thought that just mean that the jobs
  get queue
  > up and run one at a time in that webapp, i.e. with fewer threads.
  It
  > wouldn't stop having multiple sessionIds for people at any given
  time.
  >
  > Regards,
  > David
  >
  > -Original Message-
  > From: John Henry Xu [mailto:[EMAIL PROTECTED]
  > Sent: Tuesday, July 26, 2005 10:35 PM
  > To: Struts Users Mailing List
  > Subject: Re: probably a cleaner way... testing for just one user
  >
  >
  > Rick,
  >
  > In Tomcat, you can set minProcessors="1" maxProcessors="1" in
  > tag (in server.xml file). In Jboss it is the same.
  >
  > What Application server are you using?
  >
  > John H. Xu
  >
  > - Original Message -
  > From: "Rick Reumann"
  > To: "Struts Users Mailing List"
  > Subject: Re: probably a cleaner way... testing for just one user
  > Date: Tue, 26 Jul 2005 22:11:38 -0400
  >
  > >
  > > John Henry Xu wrote the following on 7/26/2005 9:56 PM:
  > > > Can you set maxprocess=1 in web application server
  configuration
  > file?
  > >
  > > I haven't seen that, but I would think there would/should be a
  way
  > > to set up "max sessions" yet googling around hasn't helped. With
  a
  > > combination of a filters and session listeners I've managed to
  get
  > > what I need working, but it's not the cleanest solution.
  > >
  > > -- Rick
  > >
  > >
  >
  -
  > > 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]






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



RE: probably a cleaner way... testing for just one user

2005-07-26 Thread David G. Friedman
Setting debug="99" (doubtful it does anything different over a 9) 
on a JSP containing the line 

<%= request.getSession(true).getId() %>

resulted in output like this:

Jul 26, 2005 11:41:28 PM org.apache.catalina.session.ManagerBase log
INFO: readObject() loading session 3E8AA5B6D30D825FAD686145AAE0EA55

Jul 26, 2005 11:41:28 PM org.apache.catalina.session.ManagerBase log
INFO: readObject() loading session 61AC8BB0FA61AF4804049181F09A59CE

Those lines seem to indicate I'm right about the ManagerBase creating
the session.

Please let us know if it works.

Regards,
David, an idea man when he's not antagonizing "THEM". :)


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



Re: probably a cleaner way... testing for just one user

2005-07-26 Thread Tamas Szabo

Hi,


The theory is to override the PersistentManager with your own class.
Theirs subclasses the PersistentManagerBase which subclasses ManagerBase.
Now inside ManagerBase it seems to create the sessions in the method
createSession(String). If you override that, you could count the sessions
and if you already have one active, toss "IllegalStateException" to prevent
a second session from being created. 


Rick did almost the same but using webcontainer indepenedent APIs.
So why should he bind his implementation to Tomcat?

I think that Rick's original solution is ok.
He could remove some lines, because you can set/remove an attribute 
to/from a context and have that

as a true, false flag.
Instead of setting the attributes to false, don't set them or remove 
them and check only for attributes beeing

present in the given scope, no need to check for their bool value.

But that's only a minor detail...


Tamas


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



RE: probably a cleaner way... testing for just one user

2005-07-26 Thread David G. Friedman
Ready for another theory?  Hold onto your hats for this one... If you're
using Apache Tomcat v5.X, you might try something like this:

The Tomcat context files allow a context to specify a session persistence
manager.  I think the default would be listed like so (from some Tomcat
examples):



  

The theory is to override the PersistentManager with your own class.
Theirs subclasses the PersistentManagerBase which subclasses ManagerBase.
Now inside ManagerBase it seems to create the sessions in the method
createSession(String). If you override that, you could count the sessions
and if you already have one active, toss "IllegalStateException" to prevent
a second session from being created.  Just remember to reduce your session
timeout or make it clear a person must logout (so you can invalidate their
session) so the next person can get into the application.

So, how's THAT for a wild theory for you?

P.S. You can skim the ManagerBase.java code over the web at (sorry but this
will probably wrap and have to be cut/pasted to work)
http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-catalina/catalina/src/share
/org/apache/catalina/session/ManagerBase.java?rev=1.43&view=markup

I would think it wouldn't effect maxthreads or anything like that as long as
you make this webapp it's own context with the above (theoretical) session
limitation.

By the way, I tried setting maxActiveSessions="1" on a webapp the coming in
using both IE and FireFox. However, the Tomcat manager showed 2 sessions so
the simple assumption that maxActiveSessions would function as it's name
suggests is incorrect.  Again, it shouldn't be anything that can't be fixed
with a method override of some sort.

Regards,
David, the creative thinker tonight

-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 26, 2005 11:11 PM
To: Struts Users Mailing List
Subject: Re: probably a cleaner way... testing for just one user


David G. Friedman wrote the following on 7/26/2005 10:39 PM:
> John,
>
> Aren't those for simultaneous threads for the webapp, not to limit total
> sessions/session cookies?   I thought that just mean that the jobs get
queue
> up and run one at a time in that webapp, i.e. with fewer threads.  It
> wouldn't stop having multiple sessionIds for people at any given time.

Right that's what I thought as well. John, I don't want to create any
limit on the number of threads. I just wanted to limit the tool to just
one active session at a time (I know sounds crazy, but it's the way it
'gotta be' for this one).
--
Rick


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



Re: probably a cleaner way... testing for just one user

2005-07-26 Thread Rick Reumann

David G. Friedman wrote the following on 7/26/2005 10:39 PM:

John,

Aren't those for simultaneous threads for the webapp, not to limit total
sessions/session cookies?   I thought that just mean that the jobs get queue
up and run one at a time in that webapp, i.e. with fewer threads.  It
wouldn't stop having multiple sessionIds for people at any given time.


Right that's what I thought as well. John, I don't want to create any 
limit on the number of threads. I just wanted to limit the tool to just 
one active session at a time (I know sounds crazy, but it's the way it 
'gotta be' for this one).



--
Rick

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



Re: probably a cleaner way... testing for just one user

2005-07-26 Thread John Henry Xu
Rick,

it may also called MaxThreads in Apache

and maxThreads in Tomcat 5.

John H. Xu


http://www.usanalyst.com

http://www.GetusJobs.com (The largest free job portal in North America)

  - Original Message -
  From: "John Henry Xu"
  To: "Struts Users Mailing List"
  Subject: Re: probably a cleaner way... testing for just one user
  Date: Tue, 26 Jul 2005 21:34:46 -0500

  >
  > Rick,
  >
  > In Tomcat, you can set minProcessors="1" maxProcessors="1" in
  > tag (in server.xml file). In Jboss it is the same.
  >
  > What Application server are you using?
  >
  > John H. Xu
  >
  > - Original Message -
  > From: "Rick Reumann"
  > To: "Struts Users Mailing List"
  > Subject: Re: probably a cleaner way... testing for just one user
  > Date: Tue, 26 Jul 2005 22:11:38 -0400
  >
  > >
  > > John Henry Xu wrote the following on 7/26/2005 9:56 PM:
  > > > Can you set maxprocess=1 in web application server
  configuration
  > file?
  > >
  > > I haven't seen that, but I would think there would/should be a
  way
  > > to set up "max sessions" yet googling around hasn't helped. With
  a
  > > combination of a filters and session listeners I've managed to
  get
  > > what I need working, but it's not the cleanest solution.
  > >
  > > -- Rick
  > >
  > >
  >
  -
  > > 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






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



RE: probably a cleaner way... testing for just one user

2005-07-26 Thread David G. Friedman
John,

Aren't those for simultaneous threads for the webapp, not to limit total
sessions/session cookies?   I thought that just mean that the jobs get queue
up and run one at a time in that webapp, i.e. with fewer threads.  It
wouldn't stop having multiple sessionIds for people at any given time.

Regards,
David

-Original Message-
From: John Henry Xu [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 26, 2005 10:35 PM
To: Struts Users Mailing List
Subject: Re: probably a cleaner way... testing for just one user


Rick,

In Tomcat, you can set minProcessors="1" maxProcessors="1" in 
tag (in server.xml file). In Jboss it is the same.

What Application server are you using?

John H. Xu

  - Original Message -
  From: "Rick Reumann"
  To: "Struts Users Mailing List"
  Subject: Re: probably a cleaner way... testing for just one user
  Date: Tue, 26 Jul 2005 22:11:38 -0400

  >
  > John Henry Xu wrote the following on 7/26/2005 9:56 PM:
  > > Can you set maxprocess=1 in web application server configuration
  file?
  >
  > I haven't seen that, but I would think there would/should be a way
  > to set up "max sessions" yet googling around hasn't helped. With a
  > combination of a filters and session listeners I've managed to get
  > what I need working, but it's not the cleanest solution.
  >
  > -- Rick
  >
  >
  -
  > 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] Force URLEncoder to use %20 instead of + for spaces

2005-07-26 Thread Neil Aggarwal
Laurie:

Did you try these two URLs I put in my email?

Why does this fail:
http://dev.rentclubs.com/~maryanne/images/clubs/Driver/Ping+G2+Driver.gif

and this one work:
http://dev.rentclubs.com/~maryanne/images/clubs/Driver/Ping%20G2%20Driver.gi
f

Any ideas?

Thanks,
Neil

--
Neil Aggarwal, JAMM Consulting, (214) 986-3533, www.JAMMConsulting.com
FREE! Valuable info on how your business can reduce operating costs by
17% or more in 6 months or less! http://newsletter.JAMMConsulting.com

> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
> Sent: Tuesday, July 26, 2005 5:12 PM
> To: user@struts.apache.org
> Subject: Re: [OT] Force URLEncoder to use %20 instead of + for spaces
> 
> 
> Neil Aggarwal wrote:
> > Hello:
> > 
> > When I encode the name of an image file to place into a 
> URL, I use this
> > code:
> > 
> > URLEncoder.encode(imageName,"UTF-8")
> > 
> > This gives me image names with spaces replaced by + signs 
> which IE does not
> > like. 
> > 
> > If I change the spaces to %20, the URL works perfectly in IE.
> > 
> > For example, if my image name is Ping G2 Driver.gif, 
> URLEncoder gives me
> > this URL:
> >  
>  2+Driver.gif>
> > 
> http://dev.rentclubs.com/~maryanne/images/clubs/Driver/Ping+G2
+Driver.gif
> 
> If I try to load this URL in IE, it gives me a 404 error.
> 
> If I use the exact same url with %20, it works just fine:
>  
>
 if>
>
http://dev.rentclubs.com/~maryanne/images/clubs/Driver/Ping%20G2%20Driver.gi
> f
> 
> I thought + and %20 were both acceptable for spaces in a URL, but
apparently
> IE does not like the plus signs.  
>  
> Is there a way to force URLEncoder to use %20 instead of + signs?

Nope. '+' is canonical and should work fine. What encoding are you sending 
your pages with? That's the only thing I can think of that might make a 
difference.

L.
-- 
Laurie, Open Source advocate, Java geek and novice blogger:
http://www.holoweb.net/laurie


-
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: probably a cleaner way... testing for just one user

2005-07-26 Thread John Henry Xu
Rick,

In Tomcat, you can set minProcessors="1" maxProcessors="1" in 
tag (in server.xml file). In Jboss it is the same.

What Application server are you using?

John H. Xu

  - Original Message -
  From: "Rick Reumann"
  To: "Struts Users Mailing List"
  Subject: Re: probably a cleaner way... testing for just one user
  Date: Tue, 26 Jul 2005 22:11:38 -0400

  >
  > John Henry Xu wrote the following on 7/26/2005 9:56 PM:
  > > Can you set maxprocess=1 in web application server configuration
  file?
  >
  > I haven't seen that, but I would think there would/should be a way
  > to set up "max sessions" yet googling around hasn't helped. With a
  > combination of a filters and session listeners I've managed to get
  > what I need working, but it's not the cleanest solution.
  >
  > -- Rick
  >
  >
  -
  > 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



Re: probably a cleaner way... testing for just one user

2005-07-26 Thread Rick Reumann

John Henry Xu wrote the following on 7/26/2005 9:56 PM:

Can you set maxprocess=1 in web application server configuration file?


I haven't seen that, but I would think there would/should be a way to 
set up "max sessions" yet googling around hasn't helped. With a 
combination of a filters and session listeners I've managed to get what 
I need working, but it's not the cleanest solution.


--
Rick

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



Re: probably a cleaner way... testing for just one user

2005-07-26 Thread John Henry Xu
Can you set maxprocess=1 in web application server configuration file?

John H. Xu


http://www.usanalyst.com 

http://www.GetusJobs.com (The largest free job portal in North America)  



  - Original Message -
  From: "Rick Reumann"
  To: "Struts Users Mailing List"
  Subject: probably a cleaner way... testing for just one user
  Date: Tue, 26 Jul 2005 17:06:32 -0400

  >
  > I have an odd requirement where this internal application should
  > only be used by one valid user(one session) at a time. (The data
  > being worked with in the application would require so many locks
  > that's it just easier to restrict it to one user). Currently I'm
  > achieving this in the following manner and wondering if there is a
  > better way to do it...
  >
  > 1) A SessionListener ...
  >
  > in sesionCreated(..)...
  >
  > HttpSession session = event.getSession();
  > ServletContext context = session.getServletContext();
  > synchronized( context ) {
  > if ( context.getAttribute(Constants.APPLICATION_IN_USE) == null ) {
  > //mark it now in use for application scope for any new sessions
  > to see it's in use
  > context.setAttribute(Constants.APPLICATION_IN_USE, Boolean.TRUE );
  > //but mark in not in use for this session
  > session.setAttribute(Constants.APPLICATION_IN_USE, Boolean.FALSE);
  > } else {
  > //is in use so mark it in use so Session in filter can see it's
  > being used already
  > session.setAttribute(Constants.APPLICATION_IN_USE, Boolean.TRUE);
  > }
  > }
  >
  > sessionDestroyed clears out context APPPLICATION_IN_USE flag.
  >
  >
  > 2) In my servlet filter that filters all requests...
  >
  > if ( path.indexOf("/appinuse.jsp") == -1 ) {
  > if ( session.getAttribute(Constants.APPLICATION_IN_USE) != null
  > &&
  >
  ((Boolean)session.getAttribute(Constants.APPLICATION_IN_USE)).booleanValue()
  )
  > {
  > log.debug("Application already in use!!!");
  > response.sendRedirect(contextPath+"/appinuse.jsp");
  > return;
  > }
  > }
  >
  >
  > Does the above seem to be an ok way to handle this? It's working
  > but not sure if there is a cleaner way?
  >
  >
  > -- Rick
  >
  >
  -
  > 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



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

2005-07-26 Thread John Henry Xu
> Craig said:You can't properly measure a technology's overall success on
a single
> criteria like this.

Craig, you are absolutely right. Maybe there is a better way to measure
technologies based on broader criteria. The problem was I (or public)
could not access proprietary networks as you said. I used search engines
a lot recently. Many topics I searched come up sites in PHP and cgi. For
example, I found www.javaworld.com, the site runs "Apache/1.3.26,  Unix, 
mod_gzip/1.3.19.1a ,   mod_perl/1.27". It likes cgi, isn't it?

Again, I agree with you that maybe many hidden sites were Java but we
don't know.

John Henry Xu

  - Original Message -
  From: "Craig McClanahan"
  To: "Struts Users Mailing List"
  Subject: Re: Re: JSF is the beginning of the end of Struts !!!
  Date: Tue, 26 Jul 2005 17:41:14 -0700

  >
  > On 7/26/05, John Henry Xu wrote:
  >
  > > But now almost all public sites are dominated by PHP and
  others...
  >
  > Whatever the actual truth of this assertion, don't forget that the
  > number of public Internet based webapps is not all that large
  compared
  > to the total number of webapps running behind the firewalls of
  various
  > companies (For example, Sun, with many *thousands* of internal
  > application installations on our internal network -- but you'll
  never
  > see them if you're not a Sun employee).
  >
  > You can't properly measure a technology's overall success on a
  single
  > criteria like this.
  >
  > Craig
  >
  >
  -
  > 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



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

2005-07-26 Thread Craig McClanahan
On 7/26/05, John Henry Xu <[EMAIL PROTECTED]> wrote:

> But now almost all public sites are dominated by PHP and others...

Whatever the actual truth of this assertion, don't forget that the
number of public Internet based webapps is not all that large compared
to the total number of webapps running behind the firewalls of various
companies (For example, Sun, with many *thousands* of internal
application installations on our internal network -- but you'll never
see them if you're not a Sun employee).

You can't properly measure a technology's overall success on a single
criteria like this.

Craig

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



Re: [shale] questions

2005-07-26 Thread Wendy Smoak
From: "Abdullah Jibaly" <[EMAIL PROTECTED]>

> I want to start learning about Shale and have a couple questions to start
> out with:
> 1- What is the difference between Shale and MyFaces?

MyFaces (http://myfaces.apache.org/) is an implementation of the JavaServer
Faces Specification (JSR 127).  Follow the links from the MyFaces site to
learn more.

Shale is a new framework, based on JSF, which you can read about here:
http://struts.apache.org/shale, and on the wiki
http://wiki.apache.org/struts/StrutsShale, which includes a link to the
original proposal.

> 2- Is there any shale-minimal application available?

There are nightly builds available, including the Use Cases Sample App,
which is here:
   http://cvs.apache.org/builds/struts/nightly/struts-shale/use-cases/

(Take the file dated 7/24 -- the build files are being worked on at the
moment and nightlies should be back soon.)

Unzip it and drop the struts-shale-usecases.war file into your servlet
container.  It requires a Servlet 2.4 container such as Tomcat 5.x.

Most of the Shale discussion is taking place on struts-dev.  (If you need to
subscribe: http://struts.apache.org/mail.html#Subscribing )

-- 
Wendy Smoak


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



Re: Actions forwarding to actions

2005-07-26 Thread Liming Xu
You can also add RequestProcessor as controllers.
  - Original Message - 
  From: [EMAIL PROTECTED] 
  To: Struts Users Mailing List 
  Cc: Struts Users Mailing List 
  Sent: Tuesday, July 26, 2005 1:40 PM
  Subject: Re: Actions forwarding to actions


  Not always.

  An Action should be created to perform a specific control instance. For 
Example, if you are going to insert a record, the Action class has all the 
required code to insert the record. However, as you get into more complex 
systems, you will often find that you are duplicating a lot of the same 
functions. At this point you have to abstract many of these functions into 
utility or helper classes to reduce the amount of duplication that you have. 
This reduces your action class down to simply flow control logic. But if this 
becomes highly repetitive, then you may breakout into calling multiple actions 
that know how to handle a specific set of events.


  "Lance Semmens" <[EMAIL PROTECTED]>


"Lance Semmens" <[EMAIL PROTECTED]> 
07/26/2005 12:24 PM Please respond to
  "Struts Users Mailing List"  

   

  To 
  "Struts Users Mailing List"  


  cc 
 


  Subject 
  Actions forwarding to actions 
  
   

  I'm a newbie to struts and I'm maintaining what I consider to be
  spaghetti code.
  There actions which forward to other actions and I'm getting lost a bit
  lost at times.
  As a rule, should an action be all encompassing and therefore not need
  to forward to another action?

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





Re: probably a cleaner way... testing for just one user

2005-07-26 Thread Liming Xu

Could we use a static variable to solve the problem?


- Original Message - 
From: "Rick Reumann" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Tuesday, July 26, 2005 6:06 PM
Subject: probably a cleaner way... testing for just one user


I have an odd requirement where this internal application should only be 
used by one valid user(one session) at a time. (The data being worked with 
in the application would require so many locks that's it just easier to 
restrict it to one user). Currently I'm achieving this in the following 
manner and wondering if there is a better way to do it...


1) A SessionListener ...

in sesionCreated(..)...

HttpSession session = event.getSession();
ServletContext context = session.getServletContext();
synchronized( context ) {
 if ( context.getAttribute(Constants.APPLICATION_IN_USE) == null ) {
   //mark it now in use for application scope for any new sessions to see 
it's in use

   context.setAttribute(Constants.APPLICATION_IN_USE, Boolean.TRUE );
   //but mark in not in use for this session
session.setAttribute(Constants.APPLICATION_IN_USE, Boolean.FALSE);
 } else {
   //is in use so mark it in use so Session in filter can see it's being 
used already

   session.setAttribute(Constants.APPLICATION_IN_USE, Boolean.TRUE);
 }
}

sessionDestroyed clears out context APPPLICATION_IN_USE flag.


2) In my servlet filter that filters all requests...

if ( path.indexOf("/appinuse.jsp") == -1 ) {
   if ( session.getAttribute(Constants.APPLICATION_IN_USE) != null && 
((Boolean)session.getAttribute(Constants.APPLICATION_IN_USE)).booleanValue() 
 ) {

log.debug("Application already in use!!!");
response.sendRedirect(contextPath+"/appinuse.jsp");
return;
}
}


Does the above seem to be an ok way to handle this? It's working but not 
sure if there is a cleaner way?



--
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: JSF is the beginning of the end of Struts !!!

2005-07-26 Thread netsql

John Henry Xu wrote:


You are right. I worked on Java and hope Java success. That is the reason
my links are java-based. I just want see more sites written in Java. That
is why I think in Java world, we need more doers than talkers.
If more java programmers code complex sites, java could compete to PHP.
But now almost all public sites are dominated by PHP and others... Hope
other Java programmers provides Java links as well.



+1



--

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



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

2005-07-26 Thread Dave Newton

John Henry Xu wrote:


Leon Rosenberg: Actually I promised myself not to response to your posts, since 
it doesn't make sense...
   


I remind myself that I don't answer to insulting and irrelevant comments. So...
 


Uh, you just did.


 > > It is interesting to see PHP that has simple programming models
 > > defeat Java in real applications.
 


He's right; that didn't make any sense.

PHP has complicated programming models, too; it has frameworks just like 
Java does.


Doesn't mean you have to use them, just like you don't have to use 
"complicated models" for programming Java, either--you can write 
everything in the JSP, use straight JDBC/SQL, etc. and it'll look a lot 
like PHP.


You'll end up with a plate full of spaghetti code with either language 
if you don't bother using one of those complicated programming models.


Dave



[shale] questions

2005-07-26 Thread Abdullah Jibaly
Hi all,

I want to start learning about Shale and have a couple questions to start out 
with:

1- What is the difference between Shale and MyFaces?

2- Is there any shale-minimal application available?

Thanks!
Abdullah

-
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 John Henry Xu
Mark,

You are right. I worked on Java and hope Java success. That is the reason
my links are java-based. I just want see more sites written in Java. That
is why I think in Java world, we need more doers than talkers.
If more java programmers code complex sites, java could compete to PHP.
But now almost all public sites are dominated by PHP and others... Hope
other Java programmers provides Java links as well.

John H. Xu

http://www.usanalyst.com 

http://www.Getusobs.com (The largest free job portal in North America)  

  - Original Message -
  From: "Mark Benussi"
  To: "'Struts Users Mailing List'"
  Subject: RE: Re: JSF is the beginning of the end of Struts !!!
  Date: Tue, 26 Jul 2005 22:35:53 +0100

  >
  > It is interesting to see that the two sites on your footer are
  written using
  > JSP.
  >
  > -Original Message-
  > From: John Henry Xu [mailto:[EMAIL PROTECTED]
  > Sent: 26 July 2005 20:42
  > To: Struts Users Mailing List
  > Subject: RE: Re: JSF is the beginning of the end of Struts !!!
  >
  > It is interesting to see PHP that has simple programming models
  defeat
  > Java in real applications.
  >
  > This leads to a question: Do Java best programming models and
  frameworks
  > conter-productive for real applications and sites?
  >
  > The new frameworks, other than struts, I like Spring. I would not
  use
  > JSF unless JSF had some real applications (based on Sun's
  reputation on
  > their new technologies).
  >
  > John H. Xu
  >
  >
  > http://www.usanalyst.com
  >
  > http://www.GetusJobs.com (The largest free job portal in North
  America)
  >
  > - Original Message -
  > From: "Daniel Perry"
  > To: "Struts Users Mailing List"
  > Subject: RE: Re: JSF is the beginning of the end of Struts !!!
  > Date: Tue, 26 Jul 2005 09:45:53 +0100
  >
  > >
  > > 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 

Re: [OT] Force URLEncoder to use %20 instead of + for spaces

2005-07-26 Thread Laurie Harper

Neil Aggarwal wrote:

Hello:

When I encode the name of an image file to place into a URL, I use this
code:

URLEncoder.encode(imageName,"UTF-8")

This gives me image names with spaces replaced by + signs which IE does not
like. 


If I change the spaces to %20, the URL works perfectly in IE.

For example, if my image name is Ping G2 Driver.gif, URLEncoder gives me
this URL:
 
http://dev.rentclubs.com/~maryanne/images/clubs/Driver/Ping+G2+Driver.gif

If I try to load this URL in IE, it gives me a 404 error.

If I use the exact same url with %20, it works just fine:
 

http://dev.rentclubs.com/~maryanne/images/clubs/Driver/Ping%20G2%20Driver.gi
f

I thought + and %20 were both acceptable for spaces in a URL, but apparently
IE does not like the plus signs.  
 
Is there a way to force URLEncoder to use %20 instead of + signs?


Nope. '+' is canonical and should work fine. What encoding are you sending 
your pages with? That's the only thing I can think of that might make a 
difference.


L.
--
Laurie, Open Source advocate, Java geek and novice blogger:
http://www.holoweb.net/laurie


-
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 John Henry Xu
> Leon Rosenberg: Actually I promised myself not to response to your
posts, since it doesn't
> make sense...

I remind myself that I don't answer to insulting and irrelevant comments.
So...

John H. Xu

http://www.usanalyst.com 


http://www.GetusJobs.com (The largest free job portal in North America)  

  - Original Message -
  From: "Leon Rosenberg"
  To: "'Struts Users Mailing List'"
  Subject: Re: JSF is the beginning of the end of Struts !!!
  Date: Tue, 26 Jul 2005 21:50:10 +0200

  >
  > > -Ursprüngliche Nachricht-
  > > Von: John Henry Xu [mailto:[EMAIL PROTECTED] Gesendet: Dienstag,
  > > 26. Juli 2005 21:42
  > > An: Struts Users Mailing List
  > > Betreff: RE: Re: JSF is the beginning of the end of Struts !!!
  >
  > Actually I promised myself not to response to your posts, since it
  doesn't
  > make sense...
  >
  > But...
  >
  >
  > >
  > > It is interesting to see PHP that has simple programming models
  > > defeat Java in real applications.
  >
  >
  > How exactly you define a defeat?
  >
  >
  >
  >
  >
  -
  > 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



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

2005-07-26 Thread Mark Benussi
It is interesting to see that the two sites on your footer are written using
JSP.

-Original Message-
From: John Henry Xu [mailto:[EMAIL PROTECTED] 
Sent: 26 July 2005 20:42
To: Struts Users Mailing List
Subject: RE: Re: JSF is the beginning of the end of Struts !!!

It is interesting to see PHP that has simple programming models defeat
Java in real applications.

This leads to a question: Do Java best programming models and frameworks
conter-productive for real applications and sites?

The new frameworks, other than struts, I like Spring. I would not use
JSF unless JSF had some real applications (based on Sun's reputation on
their new technologies).

John H. Xu


http://www.usanalyst.com 

http://www.GetusJobs.com (The largest free job portal in North America)  

  - Original Message -
  From: "Daniel Perry"
  To: "Struts Users Mailing List"
  Subject: RE: Re: JSF is the beginning of the end of Struts !!!
  Date: Tue, 26 Jul 2005 09:45:53 +0100

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






Jack H. Xu
Technology columnist and editor

http://www.usanalyst.com

http://www.getusjobs.com (The l

Re: [OT] org.apache.commons.beanutils.PropertyUtils.describe(Object )

2005-07-26 Thread Craig McClanahan
On 7/26/05, Ed Griebel <[EMAIL PROTECTED]> wrote:
> I had this issue where class was getting populated. Since it was for
> logging display, I didn't want the long class name displayed and ended
> up removing 'class' from the map if it was in there. It's much easier
> than defining (and agreeing on!) these "special" fields in an object.
> 

That seems like the right pragmatic answer.

> The only change I could get behind is if there was a
> "PropertyUtils.describePrimitives()" which would only return primitive
> types and String, but this would have little usefulness because it's
> so specific.

You should note that PropertyUtils.describe() simply delegates to the
standard JavaBeans introspection functionality to determine what the
properties of the bean class are ... and, based on the property method
naming rules, every Java class does indeed have a readonly property
named "class" due to the existence of the getClass() method that is
inherited from  java.lang.Object.

You should also note that you can dictate what the available
properties are, and even use getter and setter method names that do
not conform to the standard design patterns, if you supply a
FooBeanInfo class to go along with your Foo class -- see the JavaBeans
spec for more information.  But that's more work than makes sense in
this particular use case.

> 
> -ed
> 

Craig

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



Re: probably a cleaner way... testing for just one user

2005-07-26 Thread Rick Reumann
A cleaner way I'm finding is to compare the sessionID with one that I 
put in application scope. Much better than the flag garbage below.


Rick Reumann wrote the following on 7/26/2005 5:06 PM:
I have an odd requirement where this internal application should only be 
used by one valid user(one session) at a time. (The data being worked 
with in the application would require so many locks that's it just 
easier to restrict it to one user). Currently I'm achieving this in the 
following manner and wondering if there is a better way to do it...


1) A SessionListener ...

in sesionCreated(..)...

HttpSession session = event.getSession();
ServletContext context = session.getServletContext();
synchronized( context ) {
 if ( context.getAttribute(Constants.APPLICATION_IN_USE) == null ) {
   //mark it now in use for application scope for any new sessions to 
see it's in use

   context.setAttribute(Constants.APPLICATION_IN_USE, Boolean.TRUE );
   //but mark in not in use for this session
session.setAttribute(Constants.APPLICATION_IN_USE, Boolean.FALSE);
 } else {
   //is in use so mark it in use so Session in filter can see it's being 
used already

   session.setAttribute(Constants.APPLICATION_IN_USE, Boolean.TRUE);
 }
}

sessionDestroyed clears out context APPPLICATION_IN_USE flag.


2) In my servlet filter that filters all requests...

if ( path.indexOf("/appinuse.jsp") == -1 ) {
   if ( session.getAttribute(Constants.APPLICATION_IN_USE) != null && 
((Boolean)session.getAttribute(Constants.APPLICATION_IN_USE)).booleanValue() 
) {

log.debug("Application already in use!!!");
response.sendRedirect(contextPath+"/appinuse.jsp");
return;
}
}


Does the above seem to be an ok way to handle this? It's working but not 
sure if there is a cleaner way?






--
Rick

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



probably a cleaner way... testing for just one user

2005-07-26 Thread Rick Reumann
I have an odd requirement where this internal application should only be 
used by one valid user(one session) at a time. (The data being worked 
with in the application would require so many locks that's it just 
easier to restrict it to one user). Currently I'm achieving this in the 
following manner and wondering if there is a better way to do it...


1) A SessionListener ...

in sesionCreated(..)...

HttpSession session = event.getSession();
ServletContext context = session.getServletContext();
synchronized( context ) {
 if ( context.getAttribute(Constants.APPLICATION_IN_USE) == null ) {
   //mark it now in use for application scope for any new sessions to 
see it's in use

   context.setAttribute(Constants.APPLICATION_IN_USE, Boolean.TRUE );
   //but mark in not in use for this session
session.setAttribute(Constants.APPLICATION_IN_USE, Boolean.FALSE);
 } else {
   //is in use so mark it in use so Session in filter can see it's 
being used already

   session.setAttribute(Constants.APPLICATION_IN_USE, Boolean.TRUE);
 }
}

sessionDestroyed clears out context APPPLICATION_IN_USE flag.


2) In my servlet filter that filters all requests...

if ( path.indexOf("/appinuse.jsp") == -1 ) {
   if ( session.getAttribute(Constants.APPLICATION_IN_USE) != null && 
((Boolean)session.getAttribute(Constants.APPLICATION_IN_USE)).booleanValue() 
) {

log.debug("Application already in use!!!");
response.sendRedirect(contextPath+"/appinuse.jsp");
return;
}
}


Does the above seem to be an ok way to handle this? It's working but not 
sure if there is a cleaner way?



--
Rick

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



Re: Which button was pressed?

2005-07-26 Thread Laurie Harper

Wendy Smoak wrote:

From: "Laurie Harper" <[EMAIL PROTECTED]>


By 'hidden button' do you mean a regular input w/ type=submit and CSS to
hide it?



Yes. :)  In my case, defaulting to the first button on the form didn't make
sense, so that invisible button does nothing.  The form is submitted and
re-displayed as-is.  The user [eventually] learns that he has to click the
button next to the thing he is trying to add or delete.


I was afraid you'd say that ;-) I'd rather not have an oddly placed button 
show up if the user has CSS turned off (or is using an agent that doesn't 
support it). On the other hand, I hate when hitting enter fails to submit a 
form ;-)


L.
--
Laurie, Open Source advocate, Java geek and novice blogger:
http://www.holoweb.net/laurie


-
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-26 Thread Leon Rosenberg
> -Ursprüngliche Nachricht-
> Von: John Henry Xu [mailto:[EMAIL PROTECTED] 
> Gesendet: Dienstag, 26. Juli 2005 21:42
> An: Struts Users Mailing List
> Betreff: RE: Re: JSF is the beginning of the end of Struts !!!

Actually I promised myself not to response to your posts, since it doesn't
make sense...

But...
 

> 
> It is interesting to see PHP that has simple programming 
> models defeat Java in real applications.


How exactly you define a defeat?




-
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-26 Thread Leon Rosenberg
> -Ursprüngliche Nachricht-
> Von: John Henry Xu [mailto:[EMAIL PROTECTED] 
> Gesendet: Dienstag, 26. Juli 2005 21:42
> An: Struts Users Mailing List
> Betreff: RE: Re: JSF is the beginning of the end of Struts !!!

Actually I promised myself not to response to your posts, since it doesn't
make sense...

But...
 

> 
> It is interesting to see PHP that has simple programming 
> models defeat Java in real applications.


How exactly you define a defeat?




-
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 John Henry Xu
It is interesting to see PHP that has simple programming models defeat
Java in real applications.

This leads to a question: Do Java best programming models and frameworks
conter-productive for real applications and sites?

The new frameworks, other than struts, I like Spring. I would not use
JSF unless JSF had some real applications (based on Sun's reputation on
their new technologies).

John H. Xu


http://www.usanalyst.com 

http://www.GetusJobs.com (The largest free job portal in North America)  

  - Original Message -
  From: "Daniel Perry"
  To: "Struts Users Mailing List"
  Subject: RE: Re: JSF is the beginning of the end of Struts !!!
  Date: Tue, 26 Jul 2005 09:45:53 +0100

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






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



Re: [OT] org.apache.commons.beanutils.PropertyUtils.describe(Object )

2005-07-26 Thread Ed Griebel
I had this issue where class was getting populated. Since it was for
logging display, I didn't want the long class name displayed and ended
up removing 'class' from the map if it was in there. It's much easier
than defining (and agreeing on!) these "special" fields in an object.

The only change I could get behind is if there was a
"PropertyUtils.describePrimitives()" which would only return primitive
types and String, but this would have little usefulness because it's
so specific.

-ed

On 7/26/05, Tamas Szabo <[EMAIL PROTECTED]> wrote:
> Laurie Harper wrote:
> 
> > Tamas Szabo wrote:
> >
> >> it seems to you ok that the
> >> org.apache.commons.beanutils.PropertyUtils.describe(Object )
> >> method puts the class property(coming from java.lang.Object) in the map?
> >>
> >> I'm not sure about this, but it would be more logical for me if the
> >> class was not in the Map(if it was not handled as a normal property).
> >> I mean when I write a bean I declare all of the properties I want to
> >> consider properties.
> >> But because all the beans extend Object, I also get Object's properties.
> >> It just doesn't seems right to me :-)
> >
> >
> > Seems perfectly reasonable to me; that's inheritance at work ;-)
> > describe() will pull everything that looks like a bean property as
> > defined by the JavaBeans spec, which includes 'class'. Why do you
> > think this property should be handled specially?
> 
> Because it is special! :-)
> We get this property only because we must inherit from Object.
> 
> Let's say you have to design the java classes again.
> You have Object which will be the parent of everything and you also know
> that you will have JavaBeans, which must inherit from Object and
> the methods starting with get are special to JavaBeans. Would you name
> one or more of the Object methods getXxx()?
> I think I wouldn't.
> 
> However, I think that this whole thing isn't worth a lot of time to
> discuss it, it probably has no practical consequences.
> It was just a theoretical question...
> 
> > Is having it appear in the map causing a problem somewhere?
> >
> Yes. In my generic toString() method [firstName=Jack, class=class
> sztamas.project.model.vo.User, lastName=Black, ...]. :-)
> But I removed class from the Map before constructing the String.
> Seriously I cannot think of any big problems that it could cause.
> 
> Tamas
> 
> 
> 
> -
> 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 with List of beans question

2005-07-26 Thread Rick Reumann

Shekhar Jain wrote the following on 7/26/2005 1:19 PM:

I have an ActionForm with a List of beans with a variable size. In my
reset() method I'm trying to resize the List to the size I need. 


You really shouldn't have to do this. It's much easier to just wrap your 
list in a LazyList. More info here...


http://wiki.apache.org/struts/StrutsCatalogLazyList


--
Rick

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



Re: Which button was pressed?

2005-07-26 Thread Frank W. Zammetti
Is that a type="button" or type="submit"?  Just to clarify, because return
only affects submits I believe.

Also, I'm pretty sure if you do:

onClick="return false;"

...attached to that invisible button, you wouldn't even get the redisplay
submission.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Tue, July 26, 2005 1:31 pm, Wendy Smoak said:
> From: "Laurie Harper" <[EMAIL PROTECTED]>
>
>> By 'hidden button' do you mean a regular input w/ type=submit and CSS to
>> hide it?
>
> Yes. :)  In my case, defaulting to the first button on the form didn't
> make
> sense, so that invisible button does nothing.  The form is submitted and
> re-displayed as-is.  The user [eventually] learns that he has to click the
> button next to the thing he is trying to add or delete.
>
> --
> Wendy Smoak
>
>
> -
> 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: Which button was pressed?

2005-07-26 Thread Wendy Smoak
From: "Laurie Harper" <[EMAIL PROTECTED]>

> By 'hidden button' do you mean a regular input w/ type=submit and CSS to
> hide it?

Yes. :)  In my case, defaulting to the first button on the form didn't make
sense, so that invisible button does nothing.  The form is submitted and
re-displayed as-is.  The user [eventually] learns that he has to click the
button next to the thing he is trying to add or delete.

-- 
Wendy Smoak


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



Re: Which button was pressed?

2005-07-26 Thread Laurie Harper

Wendy Smoak wrote:

You may also want to add a "hidden" button at the very top of the form, with
a value that causes your app to simply redisplay the form.

At least on IE, pressing enter in a text field will submit the form without
the user pressing _any_ of the buttons.  But IE will send the value for the
'first' button on the form.

This is especially fun if you don't realize what's happening, and the
'first' button on your form deletes something. ;)


By 'hidden button' do you mean a regular input w/ type=submit and CSS to 
hide it? Or is there another way to handle this? [I just went through 
changing the order of submit buttons in my forms to make sure the one I 
wanted came first in each case, hence my interest in alternative approaches 
;-)]


L.
--
Laurie, Open Source advocate, Java geek and novice blogger:
http://www.holoweb.net/laurie


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



Re: [OT] org.apache.commons.beanutils.PropertyUtils.describe(Object )

2005-07-26 Thread Tamas Szabo

Laurie Harper wrote:


Tamas Szabo wrote:

it seems to you ok that the 
org.apache.commons.beanutils.PropertyUtils.describe(Object )

method puts the class property(coming from java.lang.Object) in the map?

I'm not sure about this, but it would be more logical for me if the 
class was not in the Map(if it was not handled as a normal property).
I mean when I write a bean I declare all of the properties I want to 
consider properties.

But because all the beans extend Object, I also get Object's properties.
It just doesn't seems right to me :-)



Seems perfectly reasonable to me; that's inheritance at work ;-) 
describe() will pull everything that looks like a bean property as 
defined by the JavaBeans spec, which includes 'class'. Why do you 
think this property should be handled specially?


Because it is special! :-)
We get this property only because we must inherit from Object.

Let's say you have to design the java classes again.
You have Object which will be the parent of everything and you also know 
that you will have JavaBeans, which must inherit from Object and
the methods starting with get are special to JavaBeans. Would you name 
one or more of the Object methods getXxx()?

I think I wouldn't.

However, I think that this whole thing isn't worth a lot of time to 
discuss it, it probably has no practical consequences.

It was just a theoretical question...


Is having it appear in the map causing a problem somewhere?

Yes. In my generic toString() method [firstName=Jack, class=class 
sztamas.project.model.vo.User, lastName=Black, ...]. :-)

But I removed class from the Map before constructing the String.
Seriously I cannot think of any big problems that it could cause.

Tamas



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



ActionForm with List of beans question

2005-07-26 Thread Shekhar Jain
I have an ActionForm with a List of beans with a variable size. In my
reset() method I'm trying to resize the List to the size I need. 
Although the reset() method has the request object getting passed in
as a parameter it appears to be empty. Is there any reason it is
there? If I have a hidden field in the form where I store the number
of items in the list how can I use it to get the right List size??

Shekhar

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



[Tiles] Sharing Context Between Two Tiles

2005-07-26 Thread Ian Brandt
Hello All,

I'm trying to write a portlet like component using tiles.  A simplified
version of my first attempt follows:

The portlet definition:







portlet.jsp:

[...]






The definition for a particular portlet:



 




oneportlet.jsp:

[...]






Finally a body page that inserts oneportlets:

[...]









Upon trying this I found that aParam is not available to oneportlet.jsp
(attribute not found error on tiles:useAttribute).  I did find that
aParam was available to portlet.jsp.  From this I realized that my
tiles:insert in portlet.jsp was creating a new tile context for
oneportlet.jsp, and the fact that my .portlets.oneportlet definition was
extending .uicomponents.portlet did not mean that their context would be
shared.

The only solution I've been able to think of so far is to add a generic
"attributes" attribute to my base portlet definition, and just pass that
on the insert of the content defined by the extending definition:

The new portlet definition:









The new portlet.jsp:

[...]








My body page has to build up a collection of all the parameters that
oneportlet needs (either from the action or using scriptlets), and
oneportlet has to iterate through that collection pulling out the
parameters it needs.  It's hard read and maintain.

So thanks for listening to this point, and now for my question: can
anyone think of a better approach?  My next attempts were going to be
seeing if a tiles controller for .uicomponents.portlet could copy it's
context to the inserted content, or trying a JSTL import instead of a
tiles insert and seeing if the portlet's tiles context would be
available to the imported page.  Is there an entirely different way to
look at this that I'm not thinking of?

Thanks!

Ian

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



Re: Tag creation question

2005-07-26 Thread Laurie Harper

Hernandez, Mariano wrote:

Good morning all. I'm wanting to write up a few tags and want to enable EL.
Anyone know what class(es) I could use to interpret el attributes? I was
trying to track it down from the 1.2.7 src, but I seem to be missing the
strutsel package. 


If you're using a JSP 2.0 container you don't need to do anything special 
in your tags, the container will handle the EL expressions for you. 
Otherwise, you can find the -el versions of the struts tags in 
contrib/struts-el (at least thats where they were in CVS; I assume they're 
still in the same place in the svn repository).


L.
--
Laurie, Open Source advocate, Java geek and novice blogger:
http://www.holoweb.net/laurie


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



Re: How to convert web-application having Frame struture into Struts

2005-07-26 Thread Frank W. Zammetti
That's more or less the answer I'd give for new projects.

There is still inherent power in the frames model in having essentially a
number of independant browser windows though.

As an example, one app I did has 5 different visible frames (and 2 hidden
ones).  Of the 5 visible ones, only one ever changes, the rest have their
contents loaded initially and are changed via scripting when the content
in the main frame loads.  This has made that application extremely fast
because there simply isn't as much coming back with each request.  Yes, it
absolutely requires scripting, but then so does AJAX :)

One of the hidden frames is the Javascript API, about 100k of code.  This
code would, at least in part, have to be downloaded with each page
otherwise.  The other hidden frame is actually where everything is
targetted to, which helps makes the interface look, feel and work much
more like a fat client because a lot of things happen out of site of the
user, only what I want them to see gets seen.

This is all stuff that is either extremely difficult or maybe even
impossible to do without frames... AJAX only gets you so far, as does CSS.
 Of course there are the problems to consider, some of which you
mentioned, so you really have to look at the requirements and see what
fits.  I would lean away from frames these days, but some people rule them
out without a thought, and that to me is not a smart way to work.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Tue, July 26, 2005 12:44 pm, Laurie Harper said:
> Frank W. Zammetti wrote:
>
>> Me personally?  I'd use frames! :)  No, not automatically, if the
>> requirements were such that it made sense.  I don't have an aversion to
>> them like many people seem to.
>>
>> But, in the case where I couldn't justify it (remember, using frames
>> does
>> introduce some unique difficulties) I would go with Tiles.  I think
>> that's
>> the generally-accepted "Struts approach" when you have common sections
>> to
>> each page of a site layout.
>
> Personally I'd rely on CSS; I can deliver a 90% equivalent UI without the
> accessibility sacrifices involved with frames. The only benefit frames
> give
> that is tough to reproduce without them is the ability to easily reload
> parts of a page independently and, well, these days there's always AJAX
> for
> that :-)
>
> L.
> --
> Laurie, Open Source advocate, Java geek and novice blogger:
> http://www.holoweb.net/laurie
>
>
> -
> 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-EL

2005-07-26 Thread Karr, David
Another good suggestion would be to NOT use a different taglib prefix
for the struts-el tag libraries.  In the initial examples, you might
have seen examples like "html" and "html-el".  I don't recommend that
(anymore).  If you use the same prefix, then that will be less to change
when you port your code to JSP 2.0.

> -Original Message-
> From: Marco Mistroni [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, July 26, 2005 7:36 AM
> To: 'Struts Users Mailing List'
> Subject: STruts-EL
> 
> 
> Hello all,
>   Anyone can suggest me a good link from where I can 
> learn Struts-EL?
> 
> Thanx and regards
>   Marco
> 
> 
> 
> 
> -
> 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 have logical 'OR' between two validator rules ?

2005-07-26 Thread Glen Mazza
I'm not exactly certain of your needs, but I think you can always 
activate validation but just change the validation code based on the 
value/state of other fields (such as the "original" one you mention).


Perhaps the Java code example on page 38 of
http://www.objectsource.com/Struts_Survival_Guide.pdf can be of help for 
you--I am unsure.


Glen


Marc Demlenne wrote:
Hi, 


I need to use a text box that must correspond to a regular expression,
so it can be validated by the "mask" validator.

However, if and only if this value remains unchanged by customer, it
has not to be validated and can stay as is, even if it doesn't
correspond to the mask. This could be easily done by checking the
value against another field containing the original one with
"validwhen" validator for instance.

However, I need to have my field validated even if only one of those
validators are OK, not both ones.

How can I make this using validator plugin ? 

Thanks very much for any answer. 



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



Re: How to convert web-application having Frame struture into Struts

2005-07-26 Thread Laurie Harper

Frank W. Zammetti wrote:


Me personally?  I'd use frames! :)  No, not automatically, if the
requirements were such that it made sense.  I don't have an aversion to
them like many people seem to.

But, in the case where I couldn't justify it (remember, using frames does
introduce some unique difficulties) I would go with Tiles.  I think that's
the generally-accepted "Struts approach" when you have common sections to
each page of a site layout.


Personally I'd rely on CSS; I can deliver a 90% equivalent UI without the 
accessibility sacrifices involved with frames. The only benefit frames give 
that is tough to reproduce without them is the ability to easily reload 
parts of a page independently and, well, these days there's always AJAX for 
that :-)


L.
--
Laurie, Open Source advocate, Java geek and novice blogger:
http://www.holoweb.net/laurie


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



Re: Actions forwarding to actions

2005-07-26 Thread BHansard

Not always.

An Action should be created to perform a specific control instance.  For Example, if you are going to insert a record, the Action class has all the required code to insert the record.  However, as you get into more complex systems, you will often find that you are duplicating a lot of the same functions.  At this point you have to abstract many of these functions into utility or helper classes to reduce the amount of duplication that you have.  This reduces your action class down to simply flow control logic.  But if this becomes highly repetitive, then you may breakout into calling multiple actions that know how to handle a specific set of events.


">"Lance Semmens" <[EMAIL PROTECTED]>








"Lance Semmens" <[EMAIL PROTECTED]> 
07/26/2005 12:24 PM

Please respond to
"Struts Users Mailing List" 








To
"Struts Users Mailing List" 


cc



Subject
Actions forwarding to actions








I'm a newbie to struts and I'm maintaining what I consider to be
spaghetti code.
There actions which forward to other actions and I'm getting lost a bit
lost at times.
As a rule, should an action be all encompassing and therefore not need
to forward to another action?

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





Re: [OT] org.apache.commons.beanutils.PropertyUtils.describe(Object )

2005-07-26 Thread Laurie Harper

Tamas Szabo wrote:
it seems to you ok that the 
org.apache.commons.beanutils.PropertyUtils.describe(Object )

method puts the class property(coming from java.lang.Object) in the map?

I'm not sure about this, but it would be more logical for me if the 
class was not in the Map(if it was not handled as a normal property).
I mean when I write a bean I declare all of the properties I want to 
consider properties.

But because all the beans extend Object, I also get Object's properties.
It just doesn't seems right to me :-)


Seems perfectly reasonable to me; that's inheritance at work ;-) describe() 
will pull everything that looks like a bean property as defined by the 
JavaBeans spec, which includes 'class'. Why do you think this property 
should be handled specially? Is having it appear in the map causing a 
problem somewhere?


L.
--
Laurie, Open Source advocate, Java geek and novice blogger:
http://www.holoweb.net/laurie


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



Re: Actions forwarding to actions

2005-07-26 Thread Jeff Beal
See http://wiki.apache.org/struts/ActionChaining?highlight=%28actionchaining%29

On 7/26/05, Lance Semmens <[EMAIL PROTECTED]> wrote:
> I'm a newbie to struts and I'm maintaining what I consider to be
> spaghetti code.
> There actions which forward to other actions and I'm getting lost a bit
> lost at times.
> As a rule, should an action be all encompassing and therefore not need
> to forward to another action?
> 
> -
> 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 convert web-application having Frame struture into Struts

2005-07-26 Thread Glen Mazza
If Tamas would need to learn Tiles from the beginning, he may also wish 
to consider using Sitemesh[1] instead.  The AppFuse web development 
project moved to it from Tiles some months ago, and from those who know 
both, it appears that more are preferring Sitemesh.  (Although I'm sure 
Tiles presently has a huge lead in usage.)


Glen

[1] http://www.opensymphony.com/sitemesh/


Frank W. Zammetti escribió:

Me personally?  I'd use frames! :)  No, not automatically, if the
requirements were such that it made sense.  I don't have an aversion to
them like many people seem to.

But, in the case where I couldn't justify it (remember, using frames does
introduce some unique difficulties) I would go with Tiles.  I think that's
the generally-accepted "Struts approach" when you have common sections to
each page of a site layout.



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



Re: Which button was pressed?

2005-07-26 Thread Michael Jouravlev
On 7/26/05, Thomas Sundberg <[EMAIL PROTECTED]> wrote:
> Hi!
> 
> I have a form where a user should be able to request a report. The user
> enters two dates and then presses either a button labeled pdf, html och csv.
> How can I read in my action which button was pressed?

DispatchAction and all its flavors were created specifically for that.

On 7/26/05, Wendy Smoak <[EMAIL PROTECTED]> wrote:
> At least on IE, pressing enter in a text field will submit the form without
> the user pressing _any_ of the buttons.  But IE will send the value for the
> 'first' button on the form.

I think that all browsers submit the form. At least MSIE and Firefox
do. Seems that Firefox always submits the first button, while MSIE
sometimes do not submit any buttons (which is allowed by HTML
specification, which requires that no more than one submit element is
sent to the server).

Michael.

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



Actions forwarding to actions

2005-07-26 Thread Lance Semmens
I'm a newbie to struts and I'm maintaining what I consider to be
spaghetti code.
There actions which forward to other actions and I'm getting lost a bit
lost at times.
As a rule, should an action be all encompassing and therefore not need
to forward to another action?

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



RE: DynaActionForm + ActionForm problem.

2005-07-26 Thread Miquel Angel Seguí Munar
Tamas, thank you very much, the problem was the DOCTYPE definition. Now I
have to deal with an error from the Action class, but I thing I can handly
it.

Miquel Angel Seguí Munar

-Mensaje original-
De: Tamas Szabo [mailto:[EMAIL PROTECTED]
Enviado el: martes, 26 de julio de 2005 18:06
Para: Struts Users Mailing List
Asunto: Re: DynaActionForm + ActionForm problem.


Hi,


>I've been writting applications with Struts 1.1 + Tomcat 5.5.9 + Eclipse
for
>a year. Until now, I've been using ActionForm. Now I want to move to
>DynaActionForm. ?Is there any problem in using DynaActionForm and
ActionForm
>in the same application (in the same struts-config.xml file)?
>
>   What I did was to replace a ActionForm definition in my 
> struts-config.xml
>file by a DynaActionForm definition, but I got this error:
>"
>GRAVE: Parse Error at line 12 column -1: Element "form-bean" does not allow
>"form-property" here.
>org.xml.sax.SAXParseException: Element "form-bean" does not allow
>"form-property" here.
>   at org.apache.crimson.parser.Parser2.error(Parser2.java:3160)
>...
>
>
You probably have this DOCTYPE definition in your struts-config.xml

http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>

Try to change it to

 http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>

or

 http://struts.apache.org/dtds/struts-config_1_2.dtd";>

Support for DynaActionForms was added only in Struts 1.1.

Tamas


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

2005-07-26 Thread Jeff Beal
The second example would actually have to be:

"
/>

-- Jeff

On 7/26/05, Jeff Beal <[EMAIL PROTECTED]> wrote:
> It's a lot more clear to compare the difference between:
> 
> 
> 
> and
> 
> "/>
> 
> Especially considering the following scenarios that "just work" in EL:
> 
>   -- What if "someObj" may be in more than one scope?
>   -- What if there *is* no 'someObj'?
>   -- What if someProp is null?
> 
> -- Jeff
> 
> On 7/26/05, Dave Newton <[EMAIL PROTECTED]> wrote:
> > M4RC0 wrote:
> >
> > >I mean, why to use
> > >
> > >instead
> > >
> > >
> > >
> > Because typing ${} is easier/cleaner than typing <%= %> and it's JSP 2.0
> > syntax.
> >
> > Dave
> >
> >
> >
> > -
> > 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-EL

2005-07-26 Thread Wendy Smoak
From: "M4RC0" <[EMAIL PROTECTED]>
> But, a newbie question: whitch are the beneficts of using Struts-EL
> instead standar struts taglibs or JSTL???

These aren't mutually exclusive, typically you'll use the original Struts
taglib alone, or Struts-EL and JSTL 1.0 together [in a Servlet 2.3/JSP 1.2
container].

(Then when you move to Servlet 2.4/JSP 2.0, you go back to the original
Struts tags, plus JSTL 1.1.)

> After reading documentation, i really don't understand why, when and
> where to use Struts-EL.

What typically happens is that you discover JSTL, and then get frustrated by
the fact that you _can't_ use expressions in the Struts taglibs [with JSP
1.2].  Enter Struts-EL, which gives you that ability.

In your example, that runtime expression will not be able to "see" variables
set with JSTL, such as the status of a loop inside  or anything
set with .  Try this:
   <%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>
   
   <%= myval %>
(It won't even compile...)

The flip side of that is:  JSTL cannot "see" scripting variables.  This is
intentional. :)

If you're going to use JSTL 1.0, then you should use Struts-EL along with
it.

-- 
Wendy Smoak


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



Re: STruts-EL

2005-07-26 Thread Jeff Beal
It's a lot more clear to compare the difference between:



and

"/>

Especially considering the following scenarios that "just work" in EL:

  -- What if "someObj" may be in more than one scope?
  -- What if there *is* no 'someObj'?
  -- What if someProp is null?

-- Jeff

On 7/26/05, Dave Newton <[EMAIL PROTECTED]> wrote:
> M4RC0 wrote:
> 
> >I mean, why to use
> >
> >instead
> >
> >
> >
> Because typing ${} is easier/cleaner than typing <%= %> and it's JSP 2.0
> syntax.
> 
> Dave
> 
> 
> 
> -
> 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: DynaActionForm + ActionForm problem.

2005-07-26 Thread Tamas Szabo

Hi,



I've been writting applications with Struts 1.1 + Tomcat 5.5.9 + Eclipse for
a year. Until now, I've been using ActionForm. Now I want to move to
DynaActionForm. ?Is there any problem in using DynaActionForm and ActionForm
in the same application (in the same struts-config.xml file)?

What I did was to replace a ActionForm definition in my 
struts-config.xml
file by a DynaActionForm definition, but I got this error:
"
GRAVE: Parse Error at line 12 column -1: Element "form-bean" does not allow
"form-property" here.
org.xml.sax.SAXParseException: Element "form-bean" does not allow
"form-property" here.
at org.apache.crimson.parser.Parser2.error(Parser2.java:3160)
...
 


You probably have this DOCTYPE definition in your struts-config.xml

http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>

Try to change it to

http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>

or

http://struts.apache.org/dtds/struts-config_1_2.dtd";>

Support for DynaActionForms was added only in Struts 1.1.

Tamas


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



Re: STruts-EL

2005-07-26 Thread Dave Newton

M4RC0 wrote:

I mean, why to use 


instead

 

Because typing ${} is easier/cleaner than typing <%= %> and it's JSP 2.0 
syntax.


Dave



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



DynaActionForm + ActionForm problem.

2005-07-26 Thread Miquel Angel
Hi all.

I've been writting applications with Struts 1.1 + Tomcat 5.5.9 + Eclipse for
a year. Until now, I've been using ActionForm. Now I want to move to
DynaActionForm. ?Is there any problem in using DynaActionForm and ActionForm
in the same application (in the same struts-config.xml file)?

What I did was to replace a ActionForm definition in my 
struts-config.xml
file by a DynaActionForm definition, but I got this error:
"
GRAVE: Parse Error at line 12 column -1: Element "form-bean" does not allow
"form-property" here.
org.xml.sax.SAXParseException: Element "form-bean" does not allow
"form-property" here.
at org.apache.crimson.parser.Parser2.error(Parser2.java:3160)
...
"

That's my ActionForm definition in struts-config.xlm:

  


   



...

  

I would apreciate your help.

Thanks in advance.


Miquel Angel Segui


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



Re: Which button was pressed?

2005-07-26 Thread Martin Gainty

3 button each doing a submit seems a bit confusing..
why not trap onClick for all 3 buttons and then redirect to a JS method

The onClick method will perform any necessary validation and ultimately pass 
to form.action and form.submit e.g.

document.formName.action="WhateverTheActionIs";
document.formName.submit();

Just a thought..
Martin-
- Original Message - 
From: "Wendy Smoak" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Tuesday, July 26, 2005 11:27 AM
Subject: Re: Which button was pressed?



From: "Braun, James F" <[EMAIL PROTECTED]>


The value of the button pressed
will be stored in the bean's submit variable (which you must create).
The bean:message tag is there so that the button's title will be set
according to the locale setting. app.submit, app.renew, and app.replace
refer to the application resource file(s).


You may also want to add a "hidden" button at the very top of the form, 
with

a value that causes your app to simply redisplay the form.

At least on IE, pressing enter in a text field will submit the form 
without
the user pressing _any_ of the buttons.  But IE will send the value for 
the

'first' button on the form.

This is especially fun if you don't realize what's happening, and the
'first' button on your form deletes something. ;)

--
Wendy Smoak



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

2005-07-26 Thread M4RC0
But, a newbie question: whitch are the beneficts of using Struts-EL
instead standar struts taglibs or JSTL???
After reading documentation, i really don't understand why, when and
where to use Struts-EL.
I mean, why to use 

instead

???

Thanks!

-- 
M4RC0

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



Re: Which button was pressed?

2005-07-26 Thread Tamas Szabo

Paul Moody wrote:


I think you will need to use the property attribute,
example:



You can put a String docType property in your form and
examine it in the action to see what the user pressed.

As an aside, in my experience this becomes a bit more
complicated in a multilingual application where the
value of the button changes depending upon the user's
language.

 


You can use different properties for the different doc types.


...



Then you have to check only which property is set ...

Tamas



Paul Moody

--- Thomas Sundberg
<[EMAIL PROTECTED]> wrote:

 


Hi!

I have a form where a user should be able to request
a report. The user
enters two dates and then presses either a button
labeled pdf, html och csv.
How can I read in my action which button was
pressed?

My form looks something like this:

The button part of my form looks something like
this:





I haven't seen any good examples when looking in the
docs and searching the
web. I assume I wan't to add something to the
html:submit, perhaps use the
property tag(?), or can I be able to read the value
of the button pressed?
How do I read the value in my action?

/Thomas



   


-
 


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


   








___ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.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: Which button was pressed?

2005-07-26 Thread Scott Piker
A warning about using property="submit" for the html:submit tag... If
you need to use javascript to programmatically submit forms (i.e.
myForm.submit()), then using property="submit" will cause you problems
since you now have a form property called "submit", which overrides the
form's submit method.  As I recall, the error message is obscure when
this happens - pain in the a$$ to track down the cause of the bug.

I would recommend using properties of "submitBtn", "renewBtn" and
"replaceBtn" instead - and then in your action class you just need to
check for the existence of the parameter (i.e. not null) to determine
which button was pressed.  The value is not important in this case.

HTH,
- Scott

> -Original Message-
> From: Braun, James F [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, July 26, 2005 11:18 AM
> To: Struts Users Mailing List
> Subject: RE: Which button was pressed?
> 
> Finally a question I can answer!
> 
> Below is my code to do what you want. The value of the button 
> pressed will be stored in the bean's submit variable (which 
> you must create).
> The bean:message tag is there so that the button's title will 
> be set according to the locale setting. app.submit, 
> app.renew, and app.replace refer to the application resource file(s).
> 
> J.
> 
>   
> 
>   
>   
> 
>   
>   
> 
>   
> 
> -Original Message-
> From: Thomas Sundberg [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 26, 2005 10:53 AM
> To: 'Struts Users Mailing List'
> Subject: Which button was pressed?
> 
> Hi!
> 
> I have a form where a user should be able to request a 
> report. The user enters two dates and then presses either a 
> button labeled pdf, html och csv.
> How can I read in my action which button was pressed?
> 
> My form looks something like this:
> 
> The button part of my form looks something like this:
> 
> alt="Create a pdf file"/> alt="View report as html online"/> 
> alt="Create a tab separated text file for 
> import in Excel"/>
> 
> I haven't seen any good examples when looking in the docs and 
> searching the web. I assume I wan't to add something to the 
> html:submit, perhaps use the property tag(?), or can I be 
> able to read the value of the button pressed?
> How do I read the value in my action?
> 
> /Thomas
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> --
> This transmission is intended only for use by the 
> addressee(s) named herein and may contain information that is 
> proprietary, confidential and/or legally privileged. If you 
> are not the intended recipient, you are hereby notified that 
> any disclosure, copying, distribution, or use of the 
> information contained herein (including any reliance thereon) 
> is STRICTLY PROHIBITED. If you received this transmission in 
> error, please immediately contact the sender and destroy the 
> material in its entirety, whether in electronic or hard copy 
> format. Thank you.
> 
> 
> 
> -
> 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: Which button was pressed?

2005-07-26 Thread Wendy Smoak
From: "Braun, James F" <[EMAIL PROTECTED]>

> The value of the button pressed
> will be stored in the bean's submit variable (which you must create).
> The bean:message tag is there so that the button's title will be set
> according to the locale setting. app.submit, app.renew, and app.replace
> refer to the application resource file(s).

You may also want to add a "hidden" button at the very top of the form, with
a value that causes your app to simply redisplay the form.

At least on IE, pressing enter in a text field will submit the form without
the user pressing _any_ of the buttons.  But IE will send the value for the
'first' button on the form.

This is especially fun if you don't realize what's happening, and the
'first' button on your form deletes something. ;)

-- 
Wendy Smoak



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



Re: STruts-EL

2005-07-26 Thread Wendy Smoak
> Anyone can suggest me a good link from where I can learn
> Struts-EL?

http://struts.apache.org/userGuide/building_view.html#struts-el
http://struts.apache.org/faqs/struts-el.html

You can find Struts-EL in the 'contrib' directory of the 1.2.7 binary
distribution.

-- 
Wendy Smoak


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



RE: Which button was pressed?

2005-07-26 Thread Braun, James F
Finally a question I can answer!

Below is my code to do what you want. The value of the button pressed
will be stored in the bean's submit variable (which you must create).
The bean:message tag is there so that the button's title will be set
according to the locale setting. app.submit, app.renew, and app.replace
refer to the application resource file(s).

J.

  

  
  

  
  

  

-Original Message-
From: Thomas Sundberg [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 26, 2005 10:53 AM
To: 'Struts Users Mailing List'
Subject: Which button was pressed?

Hi!

I have a form where a user should be able to request a report. The user
enters two dates and then presses either a button labeled pdf, html och
csv.
How can I read in my action which button was pressed?

My form looks something like this:

The button part of my form looks something like this:

  

I haven't seen any good examples when looking in the docs and searching
the web. I assume I wan't to add something to the html:submit, perhaps
use the property tag(?), or can I be able to read the value of the
button pressed?
How do I read the value in my action?

/Thomas


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


-- 
This transmission is intended only for use by the addressee(s) named herein and 
may contain information that is proprietary, confidential and/or legally 
privileged. If you are not the intended recipient, you are hereby notified that 
any disclosure, copying, distribution, or use of the information contained 
herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received 
this transmission in error, please immediately contact the sender and destroy 
the material in its entirety, whether in electronic or hard copy format. Thank 
you.



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



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

2005-07-26 Thread Frank W. Zammetti
Clustering in general has two purposes... load distribution and failover
capabilities.  Both of these factor into scalability, load distribution
moreso obviously.

In our environment, we have a 3-node Oracle cluster in production.  We
have seen efficiency gains across the board in terms of query speeds
because three users can, theoretically at least, execute a query
simultaneously more efficiently when they in essence have a server to
themselves.  Of course this is idealized and rarely happens in reality,
but I'm talking theory here :)

The other side of that of course is what happens when a write a occurs...
the data has to be synchronized, which takes resources and degrades some
of the load distribution benefits.  So, it is largely a question of how
the database is used... if there are more reads than writes, a cluster
should nearly always be more efficient (assuming the load distribution
mechanism is actually doing it's job properly) than a single box.  The
larger the delta between reads and writes in favor of reads, the larger
will be the benefit.

All of this figures in to how well the app, in terms of the database, will
scale.  Let's say we're talking a relatively steady 70-30 distribution of
reads to writes, which isn't unusual in most apps I've seen.  Again,
idealizing the situation, you can handle more traffic in a 3-node cluster
than a single server, assuming reasonably similar hardware of course
(i.e., compare an 8-way box to three single CPU boxes and the single
server likely will fair better) just because the load can be distributed. 
That bodes well for scalability.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Tue, July 26, 2005 10:13 am, Derek Broughton said:
> Leon Rosenberg wrote:
>
>>> Von: Michael Jouravlev [mailto:[EMAIL PROTECTED]
>>>
>>> On 7/25/05, Leon Rosenberg <[EMAIL PROTECTED]> wrote:
>>> > I think the problem is rather that none of the dbs scales.
>>> > To scale you need something in front of db in the business layer
>>> > (middleware), so it's no difference whether you use ibatis or sql.
>>> > Could be nasty with hibernate though, at least you need to turn off
>>> > the lazy loading...
>
> Surely that's entirely dependent on the type of transactions you're doing.
> I would expect lazy loading to help with scalability in some cases.
>>>
>>> I thought that database clusters exist before J2EE clusters
>>> ;) And I believe that former are more robust than latter too.
>>
>> Database clusters exists, true. But who tells you that they scale???
>>
>> Actually I has often seen projects, where the architect told, if we will
>> have scalability problems, we will cluster the db.
>> Then, the day X came, they clustered the db and then... surprise,
>> surprise
>> it became even slower...
>>
>> I think the sentence "clustering will help you scaling" is an urban myth
>> :-)
>
> It's hard to see where clustering is ever going to be more efficient than
> a
> single multi-cpu machine of the same capacity.  The cluster only helps
> when
> you get into realms beyond the reach of a single machine, and generally
> where that machine is cpu-bound.  Clusters have their place, but I'm still
> not sure it's in DBs.
> --
> derek
>
>
> -
> 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: Which button was pressed?

2005-07-26 Thread Paul Moody
I think you will need to use the property attribute,
example:



You can put a String docType property in your form and
examine it in the action to see what the user pressed.

As an aside, in my experience this becomes a bit more
complicated in a multilingual application where the
value of the button changes depending upon the user's
language.

Paul Moody

--- Thomas Sundberg
<[EMAIL PROTECTED]> wrote:

> Hi!
> 
> I have a form where a user should be able to request
> a report. The user
> enters two dates and then presses either a button
> labeled pdf, html och csv.
> How can I read in my action which button was
> pressed?
> 
> My form looks something like this:
> 
> The button part of my form looks something like
> this:
> 
> alt="Create a pdf file"/>
> alt="View report as html online"/>
> alt="Create a tab separated text file
> for import in Excel"/>
> 
> I haven't seen any good examples when looking in the
> docs and searching the
> web. I assume I wan't to add something to the
> html:submit, perhaps use the
> property tag(?), or can I be able to read the value
> of the button pressed?
> How do I read the value in my action?
> 
> /Thomas
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 






___ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail 
http://uk.messenger.yahoo.com

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



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

2005-07-26 Thread Derek Broughton
Leon Rosenberg wrote:

>> Von: Michael Jouravlev [mailto:[EMAIL PROTECTED]
>> 
>> On 7/25/05, Leon Rosenberg <[EMAIL PROTECTED]> wrote:
>> > I think the problem is rather that none of the dbs scales.
>> > To scale you need something in front of db in the business layer
>> > (middleware), so it's no difference whether you use ibatis or sql.
>> > Could be nasty with hibernate though, at least you need to turn off
>> > the lazy loading...

Surely that's entirely dependent on the type of transactions you're doing. 
I would expect lazy loading to help with scalability in some cases.
>> 
>> I thought that database clusters exist before J2EE clusters
>> ;) And I believe that former are more robust than latter too.
> 
> Database clusters exists, true. But who tells you that they scale???
> 
> Actually I has often seen projects, where the architect told, if we will
> have scalability problems, we will cluster the db.
> Then, the day X came, they clustered the db and then... surprise, surprise
> it became even slower...
> 
> I think the sentence "clustering will help you scaling" is an urban myth
> :-)

It's hard to see where clustering is ever going to be more efficient than a
single multi-cpu machine of the same capacity.  The cluster only helps when
you get into realms beyond the reach of a single machine, and generally
where that machine is cpu-bound.  Clusters have their place, but I'm still
not sure it's in DBs.
-- 
derek


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



Tag creation question

2005-07-26 Thread Hernandez, Mariano
Good morning all. I'm wanting to write up a few tags and want to enable EL.
Anyone know what class(es) I could use to interpret el attributes? I was
trying to track it down from the 1.2.7 src, but I seem to be missing the
strutsel package. 

 

Thanks,

 

Mariano Hernandez



Which button was pressed?

2005-07-26 Thread Thomas Sundberg
Hi!

I have a form where a user should be able to request a report. The user
enters two dates and then presses either a button labeled pdf, html och csv.
How can I read in my action which button was pressed?

My form looks something like this:

The button part of my form looks something like this:





I haven't seen any good examples when looking in the docs and searching the
web. I assume I wan't to add something to the html:submit, perhaps use the
property tag(?), or can I be able to read the value of the button pressed?
How do I read the value in my action?

/Thomas


-
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-26 Thread Greg Reddin
Interesting this discussion would come up now.  I've been in and out of 
Struts for about 5 years.  I'm now coming back in and taking interest in 
JSF/Shale, etc.  A few of points to think about:


1.  Struts will someday die.  If it doesn't, then we've seen the end of 
technology advancement.  If those of us who love Struts and what it 
provides want to continue to have influence going forward, we have to be 
 ready to embrace the next thing that's better than Struts and add 
value there.  Staying with something because of familiarity is typically 
the road to becoming a dinosaur in technology.


2.  I only started studying JSF seriously about 2 weeks ago. From what 
I've seen it takes the best things Struts offers and brings them into a 
somewhat cleaner package.  Those things are:


*  Nice HTML tag library.
*  Auto-populating of form beans.
*  Simple controller interface.

It also expands on these things by making the view easier to develop, 
less restriction on how form beans and controllers are developed, and 
some other really interesting services that I've only begun to play 
with.  To sum it up, using JSF out of the box I can do most of what I 
can with Struts, only quicker and with less code.  I see JSF as the next 
step of Struts.  But it's still not complete.  I'm only beginning to see 
what Shale adds to JSF and am following Shale with great interest.


3.  PHP.  I've done some PHP over the last couple years.  I'm by no 
means an expert, but I do know my way around somewhat.  The whole time 
I've caught myself thinking if I was in Java I'd have a better way to do 
just about everything.  But most of the "better way" is because of the 
J2EE APIs, Struts, and Tiles.  The language is a bit more cumbersome 
than Java and it's much more difficult to modularize.  I find PHP is 
easier (to me) if I don't try to make things elegant, but just "spew 
code" to some extent.  I finally found a CMS to use as a Struts-like 
framework, but I still find Java/Struts and now JSF to be better, 
cleaner, and more modular.  I am now trying to figure out a way to do my 
future "on-the-side" consulting in Java instead of PHP.


I think another of PHPs success factors has to do with its acceptance 
from the open source community.  Somehow Java has had a somewhat tainted 
reputation due to the lack of a truly open complete implementation -- 
and probably some are just bitter that Sun hasn't opened the whole thing 
up.  I don't personally have anything to contribute to that debate, but 
I suspect it's a factor in why PHP has been so widely embraced on the 
web compared to Java.


So all in all, it doesn't much matter to me if JSF supercedes Struts. 
If it's better, then it should.  If we get behind Shale it think we can 
have our cake and eat it too.


BTW, for JSF info, try MyFaces.  Their Getting Started section points to 
some pretty good tutorials.  In short testing I've found the myfaces 
implementation to be pretty stable.  I'm actually surprised Craig is not 
listed as a contributor to that project.


That's my 50 cents.
Greg

Daniel Perry wrote:

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 wi

STruts-EL

2005-07-26 Thread Marco Mistroni
Hello all,
Anyone can suggest me a good link from where I can learn
Struts-EL?

Thanx and regards
Marco




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



Re: How to convert web-application having Frame struture into Struts

2005-07-26 Thread Frank W. Zammetti
Me personally?  I'd use frames! :)  No, not automatically, if the
requirements were such that it made sense.  I don't have an aversion to
them like many people seem to.

But, in the case where I couldn't justify it (remember, using frames does
introduce some unique difficulties) I would go with Tiles.  I think that's
the generally-accepted "Struts approach" when you have common sections to
each page of a site layout.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Tue, July 26, 2005 9:58 am, Tamas Szabo said:
> Hi,
>
> Frank W. Zammetti wrote:
>
>>Granted there is a bit of a general negative
>>feeling towards frames, most people will tell you not to use them
>> starting
>>a new app, but you have an existing app with them, so that's fine.
>>
>>
>
> What would you use in a new application?
> Tables? Divs?
>
> Thanks,
> Tamas
>
>
>
> -
> 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 convert web-application having Frame struture into Struts

2005-07-26 Thread Tamas Szabo

Hi,

Frank W. Zammetti wrote:


Granted there is a bit of a general negative
feeling towards frames, most people will tell you not to use them starting
a new app, but you have an existing app with them, so that's fine.
 



What would you use in a new application?
Tables? Divs?

Thanks,
Tamas



-
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 John Henry Xu
  From: netsql
  To: user@struts.apache.org
  Subject: Re: JSF is the beginning of the end of Struts !!!
  Date: Tue, 26 Jul 2005 06:27:35 -0500

  > There is DAO, etc for PHP, take a look at architecture of TikiWiki.
  > And my faviorte lesson: Home page of Spring is in Plone.
  >
  > Here is a good summary of what's out there:
  >
  
http://www.opensourcecms.com/index.php?option=content&task=view&id=388&Itemid=143
  >
  > So if you do non RiA application you need to objactivley
  > consider php and plone, see if they have a solution w/ less risk.
  >

Thank netsql for these sites. Look at the lists that netsql provides, and
the fact all open source hosts on PHP, I feel we have to code more
meaningful sites in java. Spring should host their sites developed by
Spring, just like Microsoft hosts msn on IIS.

I could not figure out what google/yahoo used in their site (CGI?).

At least, I have coded and will code my sites with java.

John H. Xu


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



Re: How to convert web-application having Frame struture into Struts

2005-07-26 Thread Frank W. Zammetti
Hi,

Using frames in a Struts apps is not a problem, I've written a number of
apps that are frame-based.  Granted there is a bit of a general negative
feeling towards frames, most people will tell you not to use them starting
a new app, but you have an existing app with them, so that's fine.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Tue, July 26, 2005 8:26 am, Swapnil Patil said:
> Hi all,
>
>My web-application has jsp frame struture. Model2 is used for
> it. I want to convert this application into Struts . I don't get any
> way in struts equivalent to frame struture. Can any body help me ?
>
> -
> 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] org.apache.commons.beanutils.PropertyUtils.describe(Object )

2005-07-26 Thread Tamas Szabo

Hi,

Are you saying that Bean should not extend Object?  



No, I'm saying that that getClass() shouldn't be handled as a getter for 
beans.
Actually I'm saying this but I'm not really sure of it that's why I 
asked :-)


I had some code which get the properties of a bean, but I explicitly 
checked that

the properties are not comming from java.lang.Object.
Now I switched to Commons Beanutils, and I learned that they consider 
the Object.getClass()
a getter ==> you will have a class property in all of your beans cause 
every Java class extends java.lang.Object.


Now I am not sure that class should be considered a property of every 
bean or not.

That's why I asked you guys ... ;-)

Tamas


-
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-26 Thread BHansard

I am the same way.  I have a large collection of common libraries that I have developed over the past 5 years or so.  Each iteration, they get a little more powerful.  I can create a highly scalable and complex application very quickly using Struts because of this.  Yes java may be overkill for a personal home page, but for mission critical applications or sites that require 1000's of transactions per hour, it is a must.  I hope JSF takes off and becomes as easy to use as VS 2005, but until a wide range of either customer components or vendor developed components are available, its reach will be limited by comparision.  I think it will happen, but not over night.  Until then, there are very few languages that can deliver the power and speed of development as my struts / Java library.


">"Mark Benussi" <[EMAIL PROTECTED]>








"Mark Benussi" <[EMAIL PROTECTED]> 
07/26/2005 07:45 AM

Please respond to
"Struts Users Mailing List" 








To
user@struts.apache.org


cc



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








Luckily my apps are written with a large amount of the code written for each 
customer, with reusable taglibs plugging into each site. All my DAO etc is 
done as the sites use the same DB schema and therefore code.

I am 90% of the way there from day 0 with each customer so this is not an 
issue.

I dont think i am falling for any marketing theory, I have bene doing Java 
apps for about 7 years. I didnt even see your point anyway. Is it marketing 
hype to state that Struts/Java/Servlets is for large
applications and I would not build a suite of actions and database pooling 
for my old mans plane photos web site

Original Message Follows
From: netsql <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" 
To: user@struts.apache.org
Subject: Re: JSF is the beginning of the end of Struts !!!
Date: Tue, 26 Jul 2005 06:27:35 -0500

Mark Benussi wrote:

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

You may be just repeating the marketing theory, not what was validated in 
practice. Friendster switched to PHP after Java, so I guess they did not 
find Java scaleable.
On a large project you may want to reduce risk by starting w/ 80% of project 
done and customize the last 20%. Imagine, 1st week and you are 80% done.
There is DAO, etc for PHP, take a look at architecture of TikiWiki.
And my faviorte lesson: Home page of Spring is in Plone.

Here is a good summary of what's out there:
http://www.opensourcecms.com/index.php?option=content&task=view&id=388&Itemid=143

So if you do non RiA application you need to objactivley consider php 
and plone, see if they have a solution w/ less risk.

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





Re: [OT] org.apache.commons.beanutils.PropertyUtils.describe(Object )

2005-07-26 Thread Martin Gainty

Good Morning Tamas

Are you saying that Bean should not extend Object?
 1)If so is there another way that Bean could support reflection without 
extending Object?
 2)If so if that hurdle could be overcome How would the Bean support the 
equals method?


Martin-
- Original Message - 
From: "Tamas Szabo" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Tuesday, July 26, 2005 3:35 AM
Subject: [OT] org.apache.commons.beanutils.PropertyUtils.describe(Object )



Hi,

it seems to you ok that the 
org.apache.commons.beanutils.PropertyUtils.describe(Object )

method puts the class property(coming from java.lang.Object) in the map?

I'm not sure about this, but it would be more logical for me if the class 
was not in the Map(if it was not handled as a normal property).
I mean when I write a bean I declare all of the properties I want to 
consider properties.

But because all the beans extend Object, I also get Object's properties.
It just doesn't seems right to me :-)

Tamas


-
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 + JavaScript = dynamic forms

2005-07-26 Thread BHansard

There are several ways that this can be accomplished. 

1.  Pure Struts.  You can create an Initialization Action which holds you form as the input form.  When you change select 1, in the onchange submit the page to the init.do.  the page will retain all input values as the form will maintain your entries.  The problem is that the page will noticably flicker.

2.  Pure _javascript_.  Down load all options and used _javascript_ to change out the values.  Downside, you have a larger page to download (_javascript_) and you have to download all possible options, many of which you will not need.

3.  AJAX. The new kid on the block.  The Onchange will run a java mthod which will connect to the server and return the updated options.  Check out DWR or equivalent.

I am sure there is a JSF or PHP solution as well but I am not familar enough with those technologies to comment.

All three of these options will use _javascript_ to some extent and if someone has _javascript_ disabled, this will not work.


Janek Ziniewicz <[EMAIL PROTECTED]>








Janek Ziniewicz <[EMAIL PROTECTED]> 
07/26/2005 05:38 AM

Please respond to
"Struts Users Mailing List" 








To
user@struts.apache.org


cc



Subject
Struts + _javascript_ = dynamic forms








I d like to write a form with, say, 3 dropboxes. Choosing an option in
1. box changes list of available options in other 2 boxes.

[Eg. box #1 can store list of countries and box #2 list of cities in
chosen country, or all cities if no country is chosen.]

It can be done with _javascript_. However, I am looking for your opinion
about Struts-way of doing that task.

-- 
Pozdrawiam,
Janek Ziniewicz
gg: 902858
irc.freenode.net: #gore, #dub

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





How to convert web-application having Frame struture into Struts

2005-07-26 Thread Swapnil Patil
Hi all,

   My web-application has jsp frame struture. Model2 is used for
it. I want to convert this application into Struts . I don't get any
way in struts equivalent to frame struture. Can any body help me ?

-
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-26 Thread netsql

Mark Benussi wrote:
Is it

marketing hype to state that Struts/Java/Servlets is for large
applications and I would not build a suite of actions and database 
pooling for my old mans plane photos web site





Why would you say that?

.V


-
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-26 Thread Mark Benussi
Luckily my apps are written with a large amount of the code written for each 
customer, with reusable taglibs plugging into each site. All my DAO etc is 
done as the sites use the same DB schema and therefore code.


I am 90% of the way there from day 0 with each customer so this is not an 
issue.


I dont think i am falling for any marketing theory, I have bene doing Java 
apps for about 7 years. I didnt even see your point anyway. Is it marketing 
hype to state that Struts/Java/Servlets is for large
applications and I would not build a suite of actions and database pooling 
for my old mans plane photos web site


Original Message Follows
From: netsql <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" 
To: user@struts.apache.org
Subject: Re: JSF is the beginning of the end of Struts !!!
Date: Tue, 26 Jul 2005 06:27:35 -0500

Mark Benussi wrote:



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.




You may be just repeating the marketing theory, not what was validated in 
practice. Friendster switched to PHP after Java, so I guess they did not 
find Java scaleable.
On a large project you may want to reduce risk by starting w/ 80% of project 
done and customize the last 20%. Imagine, 1st week and you are 80% done.

There is DAO, etc for PHP, take a look at architecture of TikiWiki.
And my faviorte lesson: Home page of Spring is in Plone.

Here is a good summary of what's out there:
http://www.opensourcecms.com/index.php?option=content&task=view&id=388&Itemid=143

So if you do non RiA application you need to objactivley consider php 
and plone, see if they have a solution w/ less risk.


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



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

2005-07-26 Thread netsql

Mark Benussi wrote:



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.




You may be just repeating the marketing theory, not what was validated 
in practice. Friendster switched to PHP after Java, so I guess they did 
not find Java scaleable.
On a large project you may want to reduce risk by starting w/ 80% of 
project done and customize the last 20%. Imagine, 1st week and you are 
80% done.

There is DAO, etc for PHP, take a look at architecture of TikiWiki.
And my faviorte lesson: Home page of Spring is in Plone.

Here is a good summary of what's out there:
http://www.opensourcecms.com/index.php?option=content&task=view&id=388&Itemid=143

So if you do non RiA application you need to objactivley consider 
php and plone, see if they have a solution w/ less risk.


.V


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

RE: Struts + JavaScript = dynamic forms

2005-07-26 Thread Mark Benussi
Have a look at the Javascript HTTPXMLRequest. Its called AJAX. There is some 
resources on the stuts wiki page http://wiki.apache.org/struts/AjaxStruts




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



Struts + JavaScript = dynamic forms

2005-07-26 Thread Janek Ziniewicz
I d like to write a form with, say, 3 dropboxes. Choosing an option in
1. box changes list of available options in other 2 boxes.

[Eg. box #1 can store list of countries and box #2 list of cities in
chosen country, or all cities if no country is chosen.]

It can be done with JavaScript. However, I am looking for your opinion
about Struts-way of doing that task.

-- 
Pozdrawiam,
Janek Ziniewicz
gg: 902858
irc.freenode.net: #gore, #dub

-
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 Mark Benussi
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 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
>
>


-

Re: [OT] Re: SelectAction - an improved DispatchAction

2005-07-26 Thread Michael Jouravlev
This is getting tiresome, so I will try to be quick. I created another
attachment (15777) to
http://issues.apache.org/bugzilla/show_bug.cgi?id=30292 . It is less
compact that McGrady's version because it uses prefix not suffix, and
event-to-method map. It actually was inspired by LookupDispatchAction,
only I did not want to use button caption to locate methods. The code
is not copied or stolen whatever the accusations are. Image button
handling was added after discussion in the mailing list, and turned
out to be something that Ted Husted already told about.

Event-to-method map can be considered by some as a hassle, by others
as a bit of protection from direct calling of action's methods. Some
would like to move mapping outside of the code. Yet other would like
to use external util class, callable from a regular action class. If
someone still wants to discuss all these great options, I can join. In
its current form SelectAction works as a basis for my dialog stuff,
which I hope to submit to Struts later. I just had decided to start
from one class, which can be used by many.

I just want to comment Martin Cooper's words: "IMHO, dispatch actions,
whatever flavour, are a bad idea in the first place. They are
essentially second-level controllers. What for? You already have a
perfectly good controller in the Struts ActionServlet, so why have
your own additional levels of controller below that?"
http://marc.theaimsgroup.com/?l=struts-dev&m=109538996604541&w=2

Exactly, they are a second-level controllers, what is wrong with that?
This event model is not much different from other frameworks, it
allows to reduce number of classes, to have compact and clean config
file, and most important, to easily create web components. One action
for all component methods also allows to have only one address, I
consider this very important for user experience. But Frank already
hates me for having the same arguments day after day.

Michael.

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



  1   2   >