I have a very common user requirement, that is, to allow switching the
locale on every page.
I can easily write an action which take the selected locale and the
invoking page as input and forward the response back to the invoking page.
However, if that invoking page is the result of some
I need to implement struts on my application.
My application functions like
page1.jsp -- servlet -- javabeans(database access)
-- page2.jsp
page2.jsp -- servlet -- javabeans -- page3.jsp
I have implemented struts using action mappings but it
only works when I use a URL link and has .do
It's the first report of such problem. Is it a random problem, or can you
reproduce it as you want ?
Stack trace indicate a runtime failure. Maybe you can try to recompile Tiles
with jars and Java set in your environment.
Do you use java1.3 or 1.4 ? Tiles and Struts are compiled with 1.3.
Subject: Re: is there drawdown select box in struts?
From: zb cong [EMAIL PROTECTED]
===
thanks for your answer
see my code
html:select property=singleSelect size=10
html:option value=Single 0Single 0/html:option
html:option value=Single 1Single 1/html:option
John,
I am using this taglib quite extensively and it works very well with Struts.
Below is a fairly basic example jsp.
Essentially, the pager url attribute specifies the destination when any of
the navigation links is clicked. Request parameters required by the action
class can be specified
I would like to make an update of some values of a form and for that, I have to take
back some values in a database and set the values of the form fields relevant to each.
I'm trying to use the set Method of the form bean but I got no value back in my form.
Could someone help ?
Daniel W.
Hi,
I'm using Struts 1.0's multipart form functionality and it doesn't appear to
be correctly pulling binary content from the request to disk.
Using the sample 'struts-upload.war' app on NT, I've tried to upload then
write a 600kb Word doc. The file successfully uploaded but the copied
version
Hiya
Just got back from my two week break, and found that my article, Best Practice with
Expresso Framework, second edition has been published on the TheServerSide.com.
Because Expresso 4.0 uses the Jakarta Struts MVC model, it may be relevant to you
Struts
guys as well.
Hi Larry,
Excellent - well done. This looks like the sort of thing beginners shoud print
out study. From a quick look at it, I'd say it should be put on the struts
web-site or at least be a recommended link.
Keith.
--- Maturo, Larry [EMAIL PROTECTED] wrote:
I've been collecting, in a document,
You are not alone Thorbjørn!
See.
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg20608.html
Keith.
--- Thorbjørn_Ravn_Andersen [EMAIL PROTECTED] wrote:
torsdag februar 28 2002 kl. 03:53 PM skrev David A. D. Konrad:
I am trying to create my first real struts application,
Hi,
truth spoken here
It should not be on the recommended page tough...
It should be required reading before asking any further questions
(eg in the mailing list).
Alexander
-Original Message-
From: keithBacon [mailto:[EMAIL PROTECTED]]
Sent: Montag, 4. März 2002 14:12
To: Struts
Subject: Re: Best way to deal with Form object String parameters into another bean?
From: Will Jaynes [EMAIL PROTECTED]
===
Are there any plans to enhance BeanUtils so that a more general
conversion can take place (like from string to date). I notice the
BeanUtil javadocs have a Converter
Peter,
This should be fixed as of version 1.0.1, and will definately not be
an issue as in 1.1
-Original Message-
From: Towns, Peter (ANTS) [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 6:48 AM
To: '[EMAIL PROTECTED]'
Subject: File upload - binary file checksum issue
Hi,
Try this.
ActionServlet servlet = getServlet();
ServletContext ctxt = servlet.getServletContext();
-mel h
Eddie Bush [EMAIL PROTECTED] wrote: Hey guys/gals =)
I'm trying to get a ServletContext object in one of my actions... but I don't seem to
be having any luck.
Here is what I've
I keep getting a ClassCastException during runtime in one of my Action
classes. This is a runtime error, but it compiles cleanly. In my
application framework, I have defined a class named ListActionForm
that extends the ActionForm. I extend the ListActionForm with a
class named
In case anybody ran into the error Cannot find message resources under key
org.apache.struts.action.MESSAGE. when trying the
Struts File upload example in the nightly build.
Here's the solution thanks to the bugfixers:
Add a dummy init parameter to the web.xml file like so:
servlet
remove the 'size=10'
- Original Message -
From: Struts Newsgroup @[EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 04, 2002 3:25 AM
Subject: Re: is there drawdown select box in struts?
Subject: Re: is there drawdown select box in struts?
From: zb cong [EMAIL PROTECTED]
Hi John,
Glad to hear it. It represents many
painful hours of labor over struts. :-)
-- Larry
-Original Message-
From: John Menke [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 02, 2002 1:27 PM
To: Struts Users Mailing List
Subject: RE: White Paper on Struts
Larry,
Thanks for
I'm getting a deserialization error in Tomcat during a reinit pointing
to LabelValueBean. Checking out the current CVS source, I note that it
doesn't implement Serializable. Is there a reason why it doesn't
implement this?
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For
Subject: Empty and Equal
From: Tim Chen [EMAIL PROTECTED]
===
Hi all,
1) Didnt the struts taglib use to have a way to test if a collection is
empty?
I cant seem to find it anymore.
I have a bean that contains an ArrayList.
I want to Output a message if that ArrayList is empty.
Right, I'm back (finally!)
I narrowed the problem down to a struts-config problem. I deleted
everything from struts-config that wasn't related to the one page that I was
having problems with. I then found that the page would work, and not give
me the getter missing error.
So went back to my
Ted,
I am very much interested in this. Could you give a short sample code for
this approach? We used to use Javascript here to stop multiple submission
but now we are using struts and Javascript is out. Thank you very much,
Yanhui
-Original Message-
From: Ted Husted
Here's a link that describes the pattern. You have to buy the book for full
effect:
http://www.phptr.com/corej2eepatterns/codeChap5.html
/Ross
-Original Message-
From: Yu, Yanhui [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 11:21 AM
To: 'Ted Husted'; Struts Users
I'm new, so take this answer with a grain of salt...
The link syntax is different than the submit button syntax.
For a HTML link it would look something like:
html:link page=/testFinishReason.do
bean:message key=finishReasonTest.testLink/
/html:link
But for a submit button the coding
Me too.
Thanks again Larry.
John Menke
john@eagleinfosy
Hi,
are there any plans to build on html:radio? I am building a form dynamically from a
result set out of the database and html:radio would be fine if it would read the value
attribute from a bean.
It would be nice to have a labelName labelProperty attributes.
At the moment I have to
I am a new user and I thought your white paper was excellent and provided some
much needed glue.
There seems to be more and more references for struts, but not many *cook
books*.
All I can say is more ! :)
Thanks again.
Maturo, Larry [EMAIL PROTECTED] on 03/04/2002 09:32:25 AM
Subject: Re: Empty and Equal
From: Tim Chen [EMAIL PROTECTED]
===
Sorry, clarify a bit on part 1.
i have found a way to do this using bean:size and then checking using
logic:equal versus logic:notEqual but I was wondering more on if there was a
one liner (or taglib) solution that I could use.
Hi Folks:
We're converting much of our GUI (written in JFC/Swing) to thin client
using HTML-JavaScript and the struts framework.
I have converted a few of the simpler maintenance screens using the
framework and (thanks to you all) have learned quite a bit with struts.
There is a screen that I
You can work with one form to display/insert the data. Because you
populate your form in the action class.
I would validate your form data in the action and then pass the form to
a special DAO Object which handles the SQL Statements, including transaction
handling. This means you need the
Sorry forgot to say, hold your form in the session,
so you are able to give the user more steps to include this.
-Ursprungliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Gesendet: Montag, 4. Marz 2002 18:11
An: Struts Users Mailing List
Betreff: Advice requested,
1 ActionForm (session scope), 5 ActionMappings, one Action, 5 JSPs. Each
tab has link which submits form with that tab's form values, the tab submit
link is differentiated by mapping parameter attribute (or hidden form
field). ActionForm validate checks data is OK. Each submit of the current
tab
While I haven't had chance to read it in detail, the direction of the document is
wonderful. My question to you is whether you had considered (or were able to) publish
it as a PDF? I know that it would be useful to a greater range of people as a PDF.
I have all the necessary facilities to do
Hi Adam,
This may not be exactly what you want, but look at
the white paper, under Model Layer Framework, at
http://stealthis.athensgroup.com/presentations/.
There is a section on using the indexed attribute
under logic:iterate, and it has a table of radio
buttons example that uses the indexed
Hi Simon,
Good idea. I believe we can do that here. Let
me look into it.
-- Larry
-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 11:26 AM
To: Struts Users Mailing List
Subject: RE: White Paper on Struts
While I haven't had chance
Almost every of my action classes has the try/catch block.
And I catch different types of exceptions that may be thrown
+ Throwable at the end
} catch ( ... ) {
log(...);
// add error;
} catch (Throwable t) {
log(...);
// add error
I found that in struts example
Catching Throwable will catch both Exceptions and Errors. Catching Exception
will only catch Exceptions.
You will want to catch Exceptions *AND* Errors to be bullet-proof.
We were catching Exception for a while and we thought we were covered, until
one day we got (due to some weird deployment) a
You can search to your heart's content here:
http://www.mail-archive.com/struts-user@jakarta.apache.org/
___
- mark h. nichols
- dhsv022 at dhs dot state dot il dot us
Ooo. They've got the Internet on computers now. - Homer Simpson
[EMAIL PROTECTED]
I have two pages, selectEditQuestion.jsp and EditQuestion.jsp. First you
select the question you want to edit, then you edit it, simple enough.
Here's the strange thing:
The form tag in the first page (selectEditQuestion.jsp) is set up in the
standard way, and that's fine:
html:form
Subject: DB Connection pool
From: Vic Cekvenich [EMAIL PROTECTED]
===
re:
http://www.mail-archive.com/struts-user%40jakarta.apache.org/msg23194.html
Any suggestions on a supported and open source connection pool ?
(non expresso)
Vic
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For
Subject: Subject: DB Connection pool
6891:From: Vic Cekvenich [EMAIL PROTECTED]
===
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
You have shown two of your defined actions selectEditQuestion and
editQuestion. However your form tags refer to saveQuestion. I'm
wondering what form bean saveQuestion is bound to. Perhaps your page comes
up blank because saveQuestion is not bound to the correct form bean?
/Ross
Internal Servlet Error:
javaxservletServletException: Cannot find ActionMappings or ActionFormBeans
collection
This error message appears in my application Anybody knows what's the problem?
At the request of Simon P. Chappell
I have put up a pdf copy of the Struts
White paper for those that don't have
MS Word.
Thanks Simon. I should have done that
already, but I hadn't thought about it.
-- Larry Maturo
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional
ActionMappings and the ActionFormBeans collection are specified in
the struts-config.xml file, located in the WEB-INF sub-directory. You could
check to see if the XML file exists.
-Original Message-
From: Fábio Queiroz Barbosa [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 2:22
I realize that the digester is now part of commons, but I figure there is
probably a lot of expertise here since it grew up in Struts. I was
wondering if someone could help me figure out the easiest way to do this:
I have an xml document, that holds form data, I would like to use the
I put in my struts-config.xml file the code below:
data-source
autoCommit=true
description=My Data Source
driverClass=sun.jdbc.odbc.JdbcOdbcDriver
maxCount=4
minCount=2
password=myPass
url=jdbc:odbc://myhostIntranet_db
the beaninfo is all in the parent class - Component...
--Stacy
- Original Message -
From: dIon Gillard
To: Struts Users Mailing List
Sent: Saturday, March 02, 2002 8:06 PM
Subject: Re: Digester and inheritance
Stacy Weng wrote:
I have a parent class called Component,
One other question though now that I am looking at this a little closer:
Each of my individual JSP's should not have a Submit/Cancel/Reset for each
page.I was thinking about having one and only one Submit/Cancel button.
So I would probobly use a Frame and have a target window (which would
Man! Is this a hard one? :(
-Original Message-
From: Hani Hamandi [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 11:49 AM
To: Struts Users Mailing List (E-mail)
Subject: bean:message default key?
Folks,
Is there any way to tell bean:message, if you can't find this key, then
OK, that was helpful - now I see it from different perspective.
But what if somebody argues that Throwable catches
also JVM exceptions, like ThreadDeath or OutOfMemory
and similar? Should I care about that or not?
If not then why?
Dariusz Wojtas
At 13:14 02-03-04 -0500, you wrote:
Hani,
No, its easy :-) , just see the sourcecode for
org.apache.struts.MessageTAG, remove the JSPException that is thrown and
return the key.
joachim gjesdal
Hani Hamandi wrote:
Man! Is this a hard one? :(
-Original Message-
From: Hani Hamandi [mailto:[EMAIL PROTECTED]]
Sent:
I have some struts app that works perfectly, but
I may have some problems if the user opens another
window in the same session (Ctrl + N).
The browser introduces itself with the same cookie
in both windows.
Is there any way to avoid this?
I was thinking about using filters and 2 cookies.
1st
Ok, and then what? Re-jar struts myself with this new source-code?
Thanks!
-Original Message-
From: Joachim Gjesdal [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 4:27 PM
To: Struts Users Mailing List
Subject: Re: bean:message default key?
Hani,
No, its easy :-) , just see the
Hi,
I'm running tomcat as my development server and with struts it's really slow to start
up. It's a slow machine.
Is it that the struts xml DTD references are causing Tomcat to try to connect over the
net to get them?
If this is the case, can I stop it somehow?
Thanks
Adam
Find the best
Yeah, and then submit the patch and ask a comitter if this would be
better than throwing an exception. I´m all for it!
if (message == null) {
/*
JspException e = new JspException
(messages.getMessage(message.message, key));
If your struts-config.xml does not parse as well-formed XML, then you will
get this error. You need to make sure that the data-source element is a
child of data-sources. Also make sure that you place it in the right
location. See element declaration for struts-config.
data-sources
data-source
Hi All,
I am trying to achieved the following code below using only tags:
%
HashMap myMap = someClass.getMyMap();
myMap.put(1, one);
%
someClass would return a HashMap.
I can't seem to find an example of how this can be done.
can someone point me to an example (or show me a example)?
-
Has anyone created JSPs containing a table? Is there anything in Struts
that supports tables?
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
My understanding is that the Tiles in the contrib folder of the Nightly
Build does work with the latest changes to ActionServlet.
When the beta is posted, it will just be a snapshot of the current
Nightly Build. There's only the one CVS and only the one development
list. There's nothing behind
I am planning to use the Nesting Extension in my application and would like
to field comments on how to best implement a database persistance mechanism
in this framework.
The MonkeyStruts example uses one ActionForm bean on the outermost level
that links to other beans recursively in a parent
Hi Michael,
See the logic:iterate tag. It is useful in
creating tables, but it is not a table tag
by any means. You would then use bean:write
to put data in the table within the iterate
tag.
-- Larry Maturo
[EMAIL PROTECTED]
-Original Message-
From: Michael Nadeau [mailto:[EMAIL
Subject: Re: Ping on 1.1 or Tiles/Nightly working
From: Vic Cekvenich [EMAIL PROTECTED]
===
Add this in Struts-config:
controller
processorClass=org.apache.struts.tiles.TilesRequestProcessor
/controller
Vic
Sean Willson wrote:
I wanted to ping any developers that may be listening to
John Menke wrote:
I am planning to use the Nesting Extension...
sweet :)
The MonkeyStruts example uses one ActionForm bean on the outermost level
that links to other beans recursively in a parent child heirarchy. It
looks
like each child bean in the hierarchy is instantiated from
you could drive it exactly as you've described having the beans manage
their dirty state and have a one-to-one level mapping from the
persistence mechanism to nested bean (ie: have each nested bean know how
it's to be stored). There are various ways to take this back to the MVC
paradigm keeping
I've got a problem and I'm not sure whether it's my poor design or a struts
limitation. I'd appreciate it if someone can shed some light. Let me know if
you require more details.
I have an action mapping for an update my profile page with an associated
ActionForm and validate=true. In order to
We had the same issue to deal with. What we did was in our ActionServet
(which subclassed Struts ActionServlet), was to override the
processPreprocess method, which is called for every request. We checked
the session there, instead of in every Action perform method. If the
session is expired
Aaron,
what do you think of implementing the Observable interface with the
DataBeans? This could help with detecting updates. (Inserts and Deletes
are easier because you can determine the action via querying the submit
button).
-john
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For
On Mon, 2002-03-04 at 19:20, Matt Read wrote:
I can see a solution where in validation() methods I check that the session
is still valid but this seems clumsy to me Is it good MVC design for the
request to be handled by the Model before the Controller gets to see it? Am
I
Yes I already did that. I use html:forms
action=/forms on my forms. The problem is, it
does not work.
The values are not passed. But I can see that the
servlet is doing its job of connecting to the database
because I prompted the servlet to
System.out.println(some text here); and I can see
that
Thanks, that sounds like a good solution. My only reservation is that in
processPreprocess() you'd have to effectively hard-code a list of the
request paths that require a user to login. I suppose you have to do it
somewhere though.
Matt.
-Original Message-
From: Chuck Cavaness
Your problem is slightly different than ours. In our application, the user
had to be logged in to go anywhere. This mechanism was a way to catch the
problem when a user has already logged in and let's the session timeout.
They then invoke an action that has a form that uses the session object
Well, yeah. That'd do the trick too. Probably in a fashion that would be
manageable, clean, and garner the respect of OO gurus, developers and
peers alike. Very apt solution.
You can notify the observer from inside your setters rather than query
the submit button. Mainly because you will have
I like beans managing dirty state becuause I could possibly have one
method
that can handle several different structures if it's designed right.
Maybe this:
Have all DataBeans implement an interface lets day DirtyInterface that
defines
2 methods:
public String getDirtyAttribute()
I don't think what you guys are discussing, is too far off from the
Simper framework I've developed:
http://www.netmeme.org/simper/
It doesn't have anything to do with the current Nesting library, but, it
does many of the things you've discussed in this thread, including
automatic change
Bryan,
i just wish I could have both Simper and Nesting working at once, it would
be the best of both worlds. I'm pretty sure the Nesting Extension needs
concrete classes to work (maybe Aaron will correct me). I have looked into
simper and it looks great, I just don't know how to make the
Aaron,
I think this is the way to go. Notify the observer from within the setter
making sure the data has changed. I think I can make an Observer class that
will store a collection of objects that have changed. Then I can query this
collection in the Action and perform the updates. Maybe I
Mutually exclusive domains of operation.
I don't see any reason as to why the nested tags wouldn't work with simper.
The tags are just that. tags. They will interpret any bean they get
their hands on when the JSP gets evaluated. So simper and NeXt could
possibly be perfect buddies. The tags
78 matches
Mail list logo