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
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
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
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
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
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
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,
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,
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
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
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.
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
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
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
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:
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
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
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.
--
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
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
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
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]
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:
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
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
I think you will need to use the property attribute,
example:
html:submit property=docType value=pdf
alt=Create a pdf file/
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
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
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,
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
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
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
Paul Moody wrote:
I think you will need to use the property attribute,
example:
html:submit property=docType value=pdf
alt=Create a pdf file/
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
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
bean-el:message key=${stringvar}/
instead
bean:message key='%= stringvar
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;
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
M4RC0 wrote:
I mean, why to use
bean-el:message key=${stringvar}/
instead
bean:message key='%= stringvar %'/
Because typing ${} is easier/cleaner than typing %= % and it's JSP 2.0
syntax.
Dave
-
To unsubscribe,
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)?
It's a lot more clear to compare the difference between:
bean-el:message key=${someObj.someProp.someString}/
and
bean:message key=%=
request.getAttribute(someObj).getSomeProp().getSomeString()%/
Especially considering the following scenarios that just work in EL:
-- What if someObj may be
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
The second example would actually have to be:
bean:message key=%=
((SomeClass)request.getAttribute(someObj)).getSomeProp().getSomeString()%
/
-- Jeff
On 7/26/05, Jeff Beal [EMAIL PROTECTED] wrote:
It's a lot more clear to compare the difference between:
bean-el:message
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
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?
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
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
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
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
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
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
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
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
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
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
Hello All,
I'm trying to write a portlet like component using tiles. A simplified
version of my first attempt follows:
The portlet definition:
definition name=.uicomponents.portlet
path=/tiles/uicomponents/portlet.jsp
put name=content/
/definition
portlet.jsp:
[...]
div
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
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
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
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
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
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
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
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
-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
-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
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
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
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!)
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
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
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
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
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
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
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
Could we use a static variable to solve the problem?
- Original Message -
From: Rick Reumann [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Tuesday, July 26, 2005 6:06 PM
Subject: probably a cleaner way... testing for just one user
I have an odd
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
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
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
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
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
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
Rick,
In Tomcat, you can set minProcessors=1 maxProcessors=1 in Connector
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
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
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.
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
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
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):
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
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
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
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
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
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
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
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
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
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
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
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).
98 matches
Mail list logo