Hello Sean,
This saves me from a lot of work.Tnanx. I just tried it and it works fine,
except for the case of of images. I guess for that case I have to use
ContentType(image/jpeg).
Konstantina
- Original Message -
From: Sean Willson [EMAIL PROTECTED]
To: Struts Users Mailing List
Subject: Re: How to Pre-fill a formbean
From: Pim [EMAIL PROTECTED]
===
This is exactly the answer I had in mind, except for the part to use class
instead of type, I didn't know that. Casting your original loginForm to a
mainForm won't work, you have to explicitly create a new mainForm and
Subject: Re: When i have three buttons that all can submit the same form...
From: Pim [EMAIL PROTECTED]
===
Changing the form's action is the solution we chose with the help of
javascript.
We created a function:
function go(whatAction) {
document.forms('skillForm').action=whatAction;
Hi, you're right, it's not working when using the tags
that way, however try to do something like this:
html:img page=%=langPathANDImage%
where langPathANDImage=/images/ + lang +
/hello.jpg
this should work.
/Johannes
--- [EMAIL PROTECTED] skrev: Hello all,
I tried to use a Tag in my
Subject: Subject: Re: More problems: No action instance for path /login could be
create d...
7895:From: Pim [EMAIL PROTECTED]
===
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Subject: Re: How to use XML and XSL with Struts?
From: Pim [EMAIL PROTECTED]
===
Have you read this article?
http://www.javaworld.com/javaworld/jw-02-2002/jw-0201-strutsxslt-p2.html
Pim
jcorey [EMAIL PROTECTED] wrote in message
news:a6o2mh$lt7$[EMAIL PROTECTED]...
In my action I parse an xml
When I press cancel, I want to perform a link to the mainMenu of my app.
Doing a forward doesn't work because there are 2 frames, and the left frame
is still there after I go to mainMenu. So logically, this is what I want to
do:
td
html:cancel property=cancel
Hi,
I am working on this Enterprise application where we have to split the whole
UI into multiple .war and .jar files. The .jar files shall contain all the
Action and Form beans and the .war file shall contain all the JSPs and the
respective struts-config.xml, web.xml files.
I can see how to
Phil,
Your loginAction should create and populate a mainForm
bean and then saves it in the request scope. In the
main.jsp, get a reference to this form by:
jsp:useBean name=mainForm scope=request
class=com.MainForm
and the input fields on that jsp get the defaults from
this form bean. You have
Just handle the images as same as handling message.
for instance, you can put the following line into your
ApplicatonResources.properties file:
prompt.image1=img src=image/ok.gif
It will display the image you need.so you can make your internationalisation
images
- Original Message -
送信者
I had the same problem. The way that i fixed it is to move dom4j into the
lib dir of the app server. And define jdom in the startup of weblogic.
After doing that the problem went away.
Daniel Jaffa
- Original Message -
From: Mitch Gitman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent:
I had defined all the attributes and relevant properties in
struts-config.xml . I finally found solution . It is quite weird as it was
not related with application per se but the driver. I m using JSQLConnect
driver and it expired yesterday.I changed the driver and it everything
started working
Hi,
I have 3 form beans. Each of them have a session scope defined in the
struts-config.xml.
Here's the config for one of them:
action path=/piechart
type=be.stluc.info.struts.PieChartAction
name=piechartform
scope=session
When I try to access them
That's it what is was looking for.
Thanks a lot.
Marcus
Johannes
Subject: I18N Problem with Chinese Character
From: Liu Yan [EMAIL PROTECTED]
===
hi List,
I am using struts-1.0.2 with WebLogic 6.1-sp2. For an I18N project, I
followed the steps:
1) I created ApplicationResources.properties and
ApplicationResources_zh.properties files to store strings.
2) The
Subject: Struts JRun 3.0 and 3.1
From: Gernot Pfingstl [EMAIL PROTECTED]
===
I've a problem with the struts html:html locale=true tag and JRun
application server.
We currently use JRun 3.0 which cannot compile the html:html
locale=true. Instead of this we use, as the struts-team has recommended
you should turn your resource file to UTF-8 encoding using native2ascii
command.
that command locates in your-jdk-home\bin directory.
detail command line is listed below:
native2ascii ApplicationResources_zh.properties
ApplicationResources_zh.propertiesX
the first parameter is source file,second
myCollection is a Vector of Integer. I dont need property or labelProperty.
How can I use the select with a Collection.
html:select property=id
html:options collection=myCollection/
/html:select
please any help
thanks
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional
I have bean form with some String fields and a Vector Field. This
vector contains a collection of Customer objects. Each Customer object
have some String and int fields.
My .jsp renders html:text for the bean form's String fields and
uses iterate to render html:text representing Customer's
That's correct. Struts doesn't magically write your application for you.
:) The bean you get will be empty. It's your job to retrieve data from
the database and populate the bean with the proper info. How you retrieve
the data from the database has been the discussion of many many threads
You can do it this way, but I would use a Struts tag instead of a jsp tag.
Instead of using jsp:useBean and jsp:getProperty, all you need to do is
bean:write name=mainForm property=mfProperty/
and that will write out the mfProperty to the JSP.
Jay
On Thu, 14 Mar 2002, Joe Lee wrote:
I've fixed this problem when I only use the default getter and default
setter for the vector field, managerRole. When I override any or both of
the getter and setter, I have problem. I wonder if Struts does not allow me
to override or overload any of these getters and setters?
Appreciate any
How to format a Timestamp value for print dd/MM/ using html:text ?
--
E-Consulting® Corp.
Estratégia - Tecnologia - Comunicação
www.e-consultingcorp.com.br
Subject: ActionMappings or ActionFormBeans collection cannot be found 100 101 102 103
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
146 147 148 149 150 151 152 153 154 155
You should download the latest nightly Struts build and use
org.apache.struts.taglib.bean.format.sql.timestamp=dd/MM/
in your ApplicationResource.properties file.
Abracos,
Otavio
- Original Message -
From: Fábio Queiroz Barbosa [EMAIL PROTECTED]
To: Struts User [EMAIL
Subject: Cannot find ActionMappings or ActionFormBeans collection
From: Frank Marx [EMAIL PROTECTED]
===
Hi,
regarding to my recent postings and I found the root cause for the exception
which is:
- Root Cause -
javax.xml.parsers.FactoryConfigurationError:
What the hell is all this? And what container supports J2SE 1.4?
Mark
-Original Message-
From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 15, 2002 9:25 AM
To: [EMAIL PROTECTED]
Subject: ActionMappings or ActionFormBeans collection cannot be found
???
Subject:
I assumed it was the Friday joke! :-)
Simon
-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist www.landsend.com
Lands' End, Inc. (608)
I have a situation where I want to have an ActionForm (let's say AutomobileForm) w/
only 1 variable (Automobile). If the Automobile class's get/set parameters were all
run of the mill types (String, int, boolean, etc), I would normally just have a method
called 'getAutomobileObject()' inside
Subject: Tranforming Collection to a Map
From: Lance [EMAIL PROTECTED]
===
Is there a method somewhere hidden in the commons package for doing this. I
see the CollectionUtils.getCardinalityMap(Collection col) method, but it's
not what I'm really looking for. I wanna do something like this:
Subject: Help about iterate tag using
From: PitBull [EMAIL PROTECTED]
===
Hi,
i'ld like to do something like: for(j=1; j=31; j++) in the HTML
select/option
tags using the struts tag. In the options tag I have to put value from 1 to
31.
E.s.: select name=selDate size=1 onchange=fillDate()
the servlet spec only provides Strings for received parameters, so you
need to be able to convert from this. I use adapters to get this type
oof conversion via struts. I wrap the real bean inside, and the
population of the underlying bean is handled by the wrapper ( it's
actually just parsing
I believe the bean is not available at the scripting level. Read the Bean Tag
developers guide:
http://jakarta.apache.org/struts/api/org/apache/struts/taglib/bean/package-summary.html#package_description
My advice is to use a scriptlet to get the bean.
%
FooBar fooBar =
Thanks for the reply Arron, ... well appreciated.
but I noticed in your example that the MonkeyBean contains an ArrayList of
monkeys (ArrayList monkeyList) and you have both a setter and a getter
method for it. I was trying to duplicate this on my form bean. My
ArrayList is contained in the
Check out the JSP™ Standard Tag Library (JSTL)
http://jakarta.apache.org/taglibs/doc/standard-doc/standard-beta1/Overview.html
snip from above page
The convention is to use the name var for any tag attribute that exports information
about the tag. For example, an iterator tag exposes the
For this to work you must have a property of type Timestamp in your Form
bean, for example dt_changed and access it normally either through
tdbean:write property=dt_changed //td
if you are displaying or
tdhtml:text property=dt_changed value=bean:write
property=dt_changed / //td
if you want to
Subject: PLEASE don't crosspost to Struts and Struts-Dev
From: Jeff [EMAIL PROTECTED]
===
Over the past few days, a few messages have been crossposted to both
Struts and Struts-Dev. The focus of Struts-Dev is quite specific and
narrow, and virtually NO message genuinely falls with the scope of
If I understand what you're saying, (using the previous Automobile example)
you would have something like
// THE ORIGINAL VALUE CLASS
public class Automobile
{
private CarType carType = null;
public CarType getCarType(){ return carType; }
public void setCarType(CarType ct)
Hi,
I noticed that this particular feature is on the Struts Project Wish-List,
but I really need it now!! Well not really. I could revert back to my ugly
scriptlets.
But anyway, the problem is - I have an array of Strings (each representing a
color - e.g. #33FFCC) and I'd like to present them
well as nobody seems to have a clue about my problem. I'll ask my question
differently :)
When is a session bean destroyed ?
If I specify, a form bean to have a session scope (as I did in the
struts-config.xml), when will it be destroyed ?
I suppose the form bean is created the first time I
AFAIK, a session bean is destroyed when the session expires (30 min by
default).
Otavio
- Original Message -
From: Slimane Zouggari [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, March 15, 2002 12:02 PM
Subject: Re: problem with bean having session scope
Thanx, I supposed it was something like that :)
The thing is, I still don't understand why my beans aren't shared among all
of my action classes :(
Friendly Regards,
Slimane
At 12:05 15/03/2002 -0500, you wrote:
AFAIK, a session bean is destroyed when the session expires (30 min by
default).
Hi!
I had a similar problem, but I am still using struts 1.0.2 release build so
I have no access to the nested tags - still, I think, I found a solution:
table
logic:iterate id=entry name=searchresult scope=request type=foo
indexId=index
tr
tdinput name=cbx%=index.intValue()%
I suppose the form bean is created the first time I use a jsp:useBean
tag
in my jsp file, isn't it ?
(for example: jsp:useBean id=searchbydateform scope=session
class=be.stluc.info.struts.SearchByDateForm/)
Actually, the creation of the ActionForm bean is handled by the Struts
Can form bean properties be of type ArrayList?
And if yes, are there any special considerations when doing so, with
regards to the getter and setter methods?
I am using an ArrayList in a form bean as follows:
--- snip ---
...
private ArrayList recipients;
...
I'm starting to get burned by using logic:iterate more than once in my
same JSP page.It's screwing up the results and I am getting some
bizzare server-side JSP exceptions.I think only nested tags will solve
this...I have downloaded/installed the new nightly build for struts and
Check out http://www.keyboardmonkey.com/struts/index.html.
Thanks.
Ying
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 15, 2002 12:27 PM
To: Struts Users Mailing List
Subject: Is there a quick resource for learning nested tags?
I'm starting
Search the mail archives for indexed.
Dave
Juan Pablo Villaverde [EMAIL PROTECTED] on 03/15/2002
08:47:25 AM
Please respond to Struts Users Mailing List
[EMAIL PROTECTED]; Please respond to
Juan Pablo Villaverde [EMAIL PROTECTED]
To: Struts Users Mailing List
[EMAIL
Hi -
I need to keep a request around during a page display. What I am doing
goes like this:
- User clicks on a button
- Request gets passed to various struts Action classes where
various things happen
- Request then gets passed to a jsp page. This jsp page is a
frameset
Data coming from a browser that is used to populate a form bean is basically
of type String or String[]. I think if you change the ArrayList to a string
array you will have better luck. I haven't tried this yet but it has a
better chance of working than the ArrayList declaration.
-
user the options (note the S) tag
Dave
Struts Newsgroup (@Basebeans.com) struts%basebeans.com on 03/15/2002 10:40:01
AM
Please respond to Struts Users Mailing List
[EMAIL PROTECTED]
To: [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject: Help about iterate tag using
On Fri, 15 Mar 2002 13:35:03 -0600, Robert Williams wrote:
Data coming from a browser that is used to populate a form bean is
basically
of type String or String[]. I think if you change the ArrayList to
a string
array you will have better luck. I haven't tried this yet but it
has a
better
Since this is client-side UI behavior, you will need a Javascript handler function to
swap out the images...once you have it (the function), use the onmouseover attribute
of the html:link tag to specify the function that should be called. This is a
pretty common piece of Javascript
Hi All,
And Thanks. So in my loginAction, I can create a reference to mainForm and
pre-populate it with defaults from the database.
Would someone be able to provide a snippet of code that I can use in
loginAction to create a reference to mainForm?
Thanks,
Phil
-Original Message-
Ok, First step solved (or almost)...
now I have a bunch of radio buttons and checkboxes indexed on my page...
My question is, can I use the Validator xml to validate required fields on my page?
all my radio grouping should be selected before submiting the form... Does
Validator.xml already
// Create a form with the name given in struts-config.xml
MainForm mainForm = new MainForm();
mainForm.setProperty1(..);
...
request.setAtribute(mainForm, mainForm);
// **//
Struts Action Servlet creates mainForm just before displaying the main.jsp,
if
How about just including the link message with the image and just do the
rollover on the image?
Sincerely,
Shane Witbeck
Web Application Developer, Bank of America
904.987.1688
-Original Message-
From: Paul Idusogie [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 15, 2002 2:23 PM
To:
Does anyone have a UML diagram or a sample description
of the main Struts classes that need to be used,
extened, etc. for a very simple web application?
What's the fastest way to understand the framework?
I have the sample app running, but it's not very east
to follow if you're looking for a
I use indexed property in all tags where applicable.. but the
collection objects are not updated..
dlc Search the mail archives for indexed.
dlc Dave
dlc Juan Pablo Villaverde [EMAIL PROTECTED] on 03/15/2002
dlc 08:47:25 AM
dlc Please respond to Struts Users Mailing List
dlc [EMAIL
Hi,
Thanks for your answer, I'll try to remove the jsp:useBean tag.
But I still do have a question :) You say that:
Struts takes care of instantiating,
read/writes, and scope management for these beans
well, then when does he do that ? The first time I call the Action Class ?
If so, what if I
Check out these resources they helped me:
http://husted.com/struts/resources/uml-jps.pdf
Business Delegate Pattern Sequence Diagrams:
http://www.cayambe.org/docs/design/AddToCart.html
http://www.cayambe.org/docs/design/BrowserCatalog.html
http://www.cayambe.org/docs/design/ManageCart.html
Can you post more info. Did you set your beans to session scope? There have
been lots of people in the archive with similar problems, so it's still worth
checking there too.
Cheers,
David
Juan Pablo Villaverde [EMAIL PROTECTED] on 03/15/2002
04:05:25 PM
Please respond to Struts Users
Depends on whether it is a stateless or stateful session bean. There is no
way of knowing (outside of a server crash) when a stateless bean will be
destroyed.
Mark
-Original Message-
From: Otavio C. Decio [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 15, 2002 12:05 PM
To: Struts Users
Valid questions, all. :) I have to admit I'm not 100% sure when the
ActionForm bean is first instantiated/initialized, but this is what I think:
The ActionForm bean is created and initialized when the URI specified by the
action-mapping for this particular Action/ActionForm pair is requested.
Hi,
Thanx again for your answer :)
The problem is that I don't want to nest my ActionForm, I want them all
treated as a unique session bean. Without them being into (dependant of)
another ActionForm.
so you can retrieve them from other Actions/JSPs by
using request.getAttribute( ActionForm
Hi,
In mainAction, where form is passed in by the method header, the code
form.setProperty1(Dog);
compiles.
In loginAction, the code:
MainForm mainForm = new MainForm();
mainForm.setProperty1(Dog);
as suggested by Viplava, fails to compile with:
[javac] Found 2 syntax
Subject: Re: I18N Problem with Chinese Character
From: Liu Yan [EMAIL PROTECTED]
===
hi,
Thanks. Yes, it helps. And now the Chinese character is displayed OK.
I used the native2ascii command with -encoding UTF-8 parameter and with no
exception. I believe that the your exception is caused by
I mistyped the compiler output. It should read:
[javac] Found 2 syntax errors in ...:
[javac]
[javac] 36. mainForm.setProperty1(Dog);
[javac]
[javac]
[javac] *** Syntax: misplaced construct(s)
[javac]
[javac]
[javac]
Yep, that's what I meant, mis-type on my part there. hmmm...so you want 3
ActionForm beans to be instantiated when a single Action is delegated to,
but don't want to use nested forms?
Okay, you can do this two (maybe more) ways:
1. You could chain your actionforwards such that the Action
Dear Friends,
I have a jsp in where we have columns as follows
Add no. of rows you wish to add - go
AB CD E
save
1. Using java scripts we allow user to add rows
dynamically on the page.
2. How may I achieve this functionality of dynamically
adding rows using struts? how
okay, thanx a lot for your help :)
I'll try the second method tomorrow (now it's 2am and I'm feeling sleepy :)
Friendly Regards,
Slimane
At 17:02 15/03/2002 -0800, Someone poor demented soul by the name of
Joseph Barefoot presented us with the following text which may contain
useless
Greetings,
I don't know if a similar solution has been provided, but, I tweaked the
Link Tag to support the writing of
'javascript:[function_name]([param1,param2,param3...])' to the href
attribute of the final output. Here is a summarization of it's
functionality:
I added the following
Without seeing the source code to mainForm, we can't help much. It looks
like you don't have a method in mainForm with a signature like this:
public void setProperty1(String value) {
...
}
On Fri, 15 Mar 2002, HERSHKOWITZ,PHIL (A-Sonoma,ex1) wrote:
I mistyped the compiler output. It
Hi all,
I would like to know, how can i forward a page with parameter... my
problem detail like that:
A action class...
---
public ActionForward perform(.) {
...
... do what i have to do.. like update/delete/insert operation...
...
if ( every ok ) {
return
Hi Liu Yan,
have you meet the input chinese problem? if yes, how to solve it ? could
you share your experiense? Thanks.
Gordon
Struts Newsgroup (@Basebeans.com) wrote:
Subject: Re: I18N Problem with Chinese Character
From: Liu Yan [EMAIL PROTECTED]
===
hi,
Thanks. Yes, it helps. And now the
75 matches
Mail list logo