Hi, I am using Struts 1.02 and got the following Problem:
I need to create a JSP where u can select to create a pdf or excel file.
The problem is, I didn't programm the Action to create the file, a
colleague did.
So I need some way to call his Servlet. I tried to map directly to it,
that did not
Hi Sandra.
For each column header you need a link that gives the required
parameters to your Action.
You can add 1 static and one dynamic parameter.
If you need more dynamic parameters, you need to add a map.
Without map:
html:link page=/sortmyRecords.do?staticparameterName=columName
I don't understand why you cannot directly use the PDF-generator servlet, by
adding a dedicated mapping in your web.xml.
It needs to go through the request processor, to check if the user is
logged in
or not.
perform() method in any action MAY return an ActionForward, but CAN return
null if
I never set content-length when generating response (PDF or not). Perhaps
you have a mistake in length calculation and browser waits for EOF ? Try
without.
Nope. I know it works as it works without Struts.
[EMAIL PROTECTED] schrieb:
It writes the binary value(pdf) into the
Because then I wouldnt have a request processor.
The rest of the application is written in struts and uses the request
processor to
check wether the user is logged in or not.
If not, he gets forwarded to the login page instead of creating a pdf.
marcus
[EMAIL PROTECTED] schrieb:
I never
Oh - so you want to sort at the client side.
Well then your in the wrong mailinglist! ;-)
I mean you asked how to do it in struts.
that's always on the server side.
Of course you can do that with java script,
but imho java script sucks! ;-)
marcus
[EMAIL PROTECTED] schrieb:
Hi Marcus,
How to make a radio Button checked using Struts 1.02 ?
That would be the html equivalent:
input type=radio name=name value=value checked
thx in advance for your help.
marcus
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
I got a form for editing a data records.
When I hit cancel I want to display an other page then when I hit
submit.
How to do this ?
thx,
marcus
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
, it works,
but also forwards to this same page,
instead of to the regular start page.
marcus
[EMAIL PROTECTED] schrieb:
2002. december 3. 09:37 dátummal Marcus Biel ezt írtad:
I got a form for editing a data records.
When I hit cancel I want to display an other page then when I hit
submit
immediately returns an ActionForward that forwards
the request on to the action/jsp/etc... that you want to go to if they hit
cancel.
-Original Message-
From: Marcus Biel [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 03, 2002 16:37
To: [EMAIL PROTECTED]
Subject: different
I thought (isCancelled(request))
would be a user defined method.
Are you sure I can simple use this method,
and he will know the user hit the cancel button ?
marcus
[EMAIL PROTECTED] schrieb:
2002. december 3. 10:01 dátummal Marcus Biel ezt írtad:
No, my problem is different!
No. Your
Hi, I got a table that displays a list of data records.
When editing a data record, I don't want to display the data record to
edit on another page, but on the same page.
Therefore I think I have to use the logic:equal tag to compare the id
value of the current record with the id that got entered
Thanks.
Going to try this asap.
marcus
[EMAIL PROTECTED] schrieb:
2002. november 26. 11:20 dátummal Gemes Tibor ezt írtad:
bean:define id=value1 name=oneForm property=oneProperty /
Of course this should be:
bean:define id=oneValue name=oneForm property=oneProperty /
logic:equal
Somewhere along the way I've read that you can display dynamic localized
messages,
by using adding brakets {} to your message and to add a parameter to
this message in your action.
Unfortunately I forgot where I found this.
Can anyone explain to me how to create dynamic localized messages - for
Works perfect,
even though it makes my jsp even harder to handle! :-)
marcus
[EMAIL PROTECTED] schrieb:
2002. november 26. 11:20 dátummal Gemes Tibor ezt írtad:
bean:define id=value1 name=oneForm property=oneProperty /
Of course this should be:
bean:define id=oneValue name=oneForm
Hi there,
I working with Struts 1.02 quite a while now,
and did a very complicated application using Struts,
but the more I know, the more I realize that I don't exactly know the
basics:
What exactly is the difference between the different scopes which
scopes are there,
besides request,
Use logic present or logic equal tags.
e.g.:
logic: equal name=yourBean property=yourImageProperty
value=image1/
html:img src=image1.jpg/
/logic:equal
logic: notEqual name=yourBean property=yourImageProperty
value=image1/
html:img src=image2.jpg/
/logic:equal
marcus
[EMAIL
I had the same problem about a week ago( also using Struts 1.02)
Now I am using a seperate Action to change the local.
public ActionForward perform(ActionMapping mapping,
ActionForm form, HttpServletRequest request, HttpServletResponse
response){
SetLocalForm
Buy Chucks Book: O'Reilly Struts
I've almost read it, and it's quite good imho.
marcus
[EMAIL PROTECTED] schrieb:
Hi all,
I want to buy a good struts manual/book. I see there's a couple on
Amazon.com. Any comments as to which ones are good?
thx
This message contains information
I've just read Chuck's Chapter about Exception Handling (O'reilly Struts
Book).
Now I am trying to accomplish what he suggested.
Unfortunately I am forced to used Struts 1.02.
return mapping.getInput(); didn't work - it gives back a String,
but my Action class needs to return an ActionForward.
Works fine!
Thanks!
marcus
[EMAIL PROTECTED] schrieb:
2002. november 14. 10:02 dátummal Marcus Biel ezt írtad:
return mapping.getInput(); didn't work - it gives back a String,
but my Action class needs to return an ActionForward. (Struts 1.02).
So I tried it that way:
return
I want to give the user the ability to manually change the language of
the aplication by selecting a local value from a selectbox.
Has someone got an appropiate example to achieve this ?
thx in advance,
marcus
--
To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org
For
-
From: Marcus Biel [mailto:Marcus.Biel;bmw.de]
Sent: Mittwoch, 13. November 2002 10:32
To: [EMAIL PROTECTED]
Subject: user manually changing local
I want to give the user the ability to manually change the language of
the aplication by selecting a local value from a selectbox.
Has
Did that, but when compiling,
I get thrown this error:
SetLocalAction.java:18: cannot resolve symbol
symbol : variable LOCAL_KEY
location: class org.apache.struts.action.Action
request.getSession().setAttribute(Action.LOCAL_KEY, local);
^
Am using
Nope! You missed an 'E'. This applies to the subject of this thread too.
Action.LOCALE_KEY
Hth,
Tib
thx!
Would have never found it! :-)
marcus
--
To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
Thanks everyone!
Finally it works!
marcus
--
To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
ARG! What the hell is wrong here ???
import java.util.Locale;
import java.lang.*;
import java.sql.*;
import javax.servlet.http.*;
import org.apache.struts.action.*;
public class SetLocalAction extends Action {
public ActionForward perform(ActionMapping mapping,
ActionForm form,
that's just the way I did it, and it works nicely! :-)
[EMAIL PROTECTED] schrieb:
Marcus,
What datatype does getLocal() return?
I would likely write:
SetLocalForm myForm = (SetLocalForm)form
first and then:
String localString = myForm.getLocal();
or:
String
I got an AddRecord.jsp, AddRecordAction and AddRecordForm
and last but not least an ShowAddedRecord.jsp that displays the record
that was added.
When I added a new record to database, I want to forward to the same
jsp, AddRecord.jsp, so that the user can add further records.
The problem now is
It could also be that the form in your jsp has the standard: value=
marcus
[EMAIL PROTECTED] schrieb:
When a submit my form with errors,
the jsp is returned back with errors displayed as i expect.
But all fields are empty.
is it because I define my form like this
html:form
The developers claim there wasn't an exact release date,
they would release it when it's done.
But that's not true!
Whatever they others may have told you,
I am the only one who knows the secret release date:
On the 12th December 2341, 5:32:23am.
Hope this helps,
marcus
[EMAIL PROTECTED]
Damn! And I thought my informations would be up to date!
So they will release v1.1 almost 200 years earlier then I thought ?
Wow, it's really fascinating how fast these guys are! 8-)
Hmm. They do seem to have a fondness for the 12th of the month dont they?
Yes indeed!
marcus
[EMAIL
Got a question about ActionClass and ActionForm.
If am creating an instance of my ActionForm in my ActionClass,
what happens if there already exists an instance of the ActionForm I am
creating ?
Will a new instance get created, or will the existing instance get used
?
If the same instance will
Well,
I have to admit, the more I learn about Struts,
I realize the more things I don't know exactly.
isn't your ActionClass passed an instance of the ActionForm in the
execute method?
Of course I pass an instance of the ActionForm into my execute method,
but I am simple using ActionForm form
How to fill an Actionform after using an ActionClass ?
Normally a user fills out a form on a jsp, then the Actionform gets
called and filled by the data the user entered.
Then the ActionClass gets started and uses the data from the ActionForm.
But I've got an Action that creates data, and it
hmmm.
Tried it this way:
AlaskaGroupsForm alaskaGroupsForm = (AlaskaGroupsForm)form;
alaskaGroupsForm.setGid(gid);
alaskaGroupsForm.setBeschreibung(beschreibung);
alaskaGroupsForm.setStiwo(stiwo);
alaskaGroupsForm.setMo(mo);
alaskaGroupsForm.setStiwoerg(stiwoerg);
I want to add data records using a jsp.
When the user entered the data, and hits submit, an actions adds the
data record to the database.
When this is done, it forwards to the same page again, so that the user
can add more data records.
The problem is that the form gets filled by the ActionForm
Hi,
I'v got a link that uses dynamic and static parameters at the same time.
html:link page=/Action.do?sort=id paramName=myForm
paramId=mySelection paramProperty=mySelectionID/html:link
Now I need more then one dynamic parameter. How can I add it ?
Do I just need to repeat paramName=myForm
Of course I already had a look at this page,
but I need several dynamic parameters, and about that nothing is told.
About the map:
I don't know how to exactly use it, plus I doubt I could use it, as the
parameters I need are in different forms.
marcus
[EMAIL PROTECTED] schrieb:
Marcus,
What's better:
To have a bean let's say BookBean.java
that has got a String title, author, pages
and an Actionform that uses this BookBean,
or is it better to have an ActionForm
that has a String title, author, pages.
Imho it's much faster and easier to have your properties in your
ActionForm,
Use the link page like the others told you.
Just in case your logoff Action needs a dynamic parameter (like userid)
you can do this like this:
html:link page=/logoff.do paramName=beanName paramId=userId
paramProperty=userId
For an image look at:
btw:
That's just what I am looking for!
How can I check if a user typed in a string instead of a number?
marcus
--
To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Well, of course you can put your image into the link instead of text,
just like you would do it with simple html.
I have to admit so far I never used an image link,
so I still sugest you to look in your struts docu,
but it should be something like:
html:link page=/logoff.do
I guess you got just the same problem as I had.
1. I guess you misunderstood the way of ActionClass and ActionForm.
First of all, the ActionForm gets filled with the data the user types in
the input fields on your jsp. Then the action gets called.
So I bet putting your List into a Form won't
Nope, it's in session scope.
Imho I know what happens:
the parameter is in session scope, but when reloading my jsp,
there comes the form again, and the parameter gets reset.
I already deleted this parameter from the reset method,
but this neither helped.
marcus
[EMAIL PROTECTED] schrieb:
yes of course I know!
But how can I be sure that this String is a Integer ?
I mean I can simply convert this String to an Integer,
but I doubt this would help, cause a String can get converted to an
Integer.
(Like A is 65 I think)
So how can I be sure that the user typed 65 and not A ?
Marcus
Sorrry, this was a bit to short for me.
Which field are you talking about ?
I guess you mean the ActionForm.
If you mean the ActionForm, how could I fill it using my Action ???
First of al the ActionForm gets called, THEN the Action gets called,
so I could hardly fill my ActionForm from my
if: logic:equal
else: logic:notEqual
marcus
--
To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
But remember we got Strings, not Characters.
Sorry I know this is dumb, but today I worked this much,
I really can't get a clear mind.
8-)
marcus
[EMAIL PROTECTED] schrieb:
Check out the static methods of the java.lang.Character class. isDigit()
should solve your dilemma.
Mark
--
To
Hi Cedric,
I just had a look at Chuck's chapter about tiles.
I didn't read the whole chapter yet, only the half,
but from what I've read so far, it doesn't seem to be so different from
templates,
just gots some enhanced features.
Btw: I also read that it was you who created it! :-)
So you should
Sorry this might be a dumb question,
but I can't really figure out how to use struts templates efficently.
I already had a look at Struts-Docu:
http://localhost:8080/struts-documentation/api/org/apache/struts/taglib/template/package-summary.html#package_description
If i figured it out correctly,
Hi Cal,
as far as I know tiles are only supported since 1.1,
but I am strictly forced to use 1.02 at work.
Any other suggestions ?
E.g. how to simple import other jsp's ?
Marcus
[EMAIL PROTECTED] schrieb:
Take a look at Tiles - you can avoid the second page by defining the page
definition
Hi there,
I've got an Action, that creates a Vector,
that is stored in an ActionForm.
The Action scope is set to session.
Now I am forwarding to a jsp, and when a user hits submit another
action gets called that uses the same Vector of the same ActionForm.
Anyways, it only returns an empty
Thx for all your suggestions.
I am just reading chapter 14 of Chucks great Struts novel! ;-)
(Chapter 14: Using Tiles)
cya,
marcus
[EMAIL PROTECTED] schrieb:
Definitely use Tiles as Cedric suggested. The template taglib is deprecated
in 1.1 in favor of Tiles so when you eventually migrate
Hi,
I got an select box, where you can select a value. When you hit submit,
you get displayed a list of data records that fit to that value.
But the selected value should get stored for the whole session,
so if you hit on edit or delete that you directly get displayed the
table,
wihout selecting
name=plantSelectionForm type=PlantSelectionForm
scope=session /
?
thx,
marcus
[EMAIL PROTECTED] schrieb:
I think placing the Form Bean in the session scope will help.
/* A
- Original Message -
From: Marcus Biel [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 28
?
thx,
marcus
--
To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
:-)
Thx! Simple, but highly efective!
:-D
marcus
[EMAIL PROTECTED] schrieb:
http://www.google.com/search?hl=enie=UTF-8oe=UTF-8q=what+for+are+nested+t
agsbtnG=Google+Search
James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org
--
To unsubscribe, e-mail:
Can I directly access an Action in the browser ?
I want to create an ArrayList, before I display my jsp,
because this jsp page needs to ue this ArrayList.
Therefore I wrote an action mapping:
action path=/createPlantList
type=CreatePlantListAction
name=createPlantListForm
When I have got to close the action tag,
and when not ??
I thouht at the end of every action path there needs to be the closing
bracket.
Marcus
--
To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
Well that is my full class name, I don't use a package.
Log ? Which log ?
Have a good look at the rest of your struts-config as it may well be a typo
in some other part of the xml and not related to this particular action
after all.
Well, there could be a typo -
but I dunno when to close action
root cause:
org.xml.sax.SAXException: Stopping after fatal error: Element type
action must be followed by either attribute specifications, or
/.
--
To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
If you just mean that I don't validate the action -
I will take care about that at a later time.
But what do you mean with:
it also has a '' without ''.
?
Isn't that the closing tag for the action path tag ?
action path...
...
..
input=/index.jsp
?
Using a utility to validate the file is
So how about this:
action path=/getAlaskaGroups
type=GetAlaskaGroupsAction
name=getAlaskaGroupsForm
scope=session
input=/index.jsp
validate=false
forward name=getAlaskaGroupsDone path=/index.jsp/
/action
Would that be correct ???
thx in advance,
How to set a flag in your jsp ?
I need one, to alternately display 2 different row colors in a table,
and one to differ between sort=ascending or sort=descending.
Any ideas ??
thx in advance,
marcus
--
To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org
For additional
I got an Action that is creating an ArrayList, when this is done,
I want to show this ArrayList in a jsp file.
In the struts-config.xml,
is input required in the action mappings ?
action-mappings
action path=/doAction
type=ActionClass
name=ActionForm
scope=request
If you got Data records from a database -
have they got to be saved in an ActionForm, or in a value bean ???
I guess they have to be saved in a value bean,
because ActionForm just take request parameters.
If so, what about the action mapping ?
name=ValueBean instead of name=ActionForm ?
thanks
When to use global forwards and when to use regular action forwards ?
global-forwards
forward name=actionDone path=/index.jsp/
/global-forwards
or:
action path=/addAlaskaGroup
type=ActionClass
name=ActionForm
scope=request
input=/index.jsp/
Hi! 2 Questions:
First Question:
%
ArrayList werkeList= SimpleQuery.getAemWerkUnique();
pageContext.setAttribute(werkeList, werkeList);
%
html:form action=selectWerk.do method=GET
html:select property=werkAuswahl size=1
html:options collection=werkeList property=mo/
Still same problem. I want to make a dynamic select box.
Now I've got:
html:select property=werkAuswahl size=1
html:options collection=%=werkeList % property=mo/
/html:select
Compiler throws:
An error occurred at line: 26 in the jsp file: /index.jsp
Generated servlet error:
Hi,
I am still trying to get this dynamic select box created.
Well, now I had a CLOSE look at the Struts documentation about
html:options tag.
The collection attribute is interpreted as the name of a JSP bean, in
some scope, that itself represents a collection of individual beans, one
per
Do you want a static dropdown or a dynamical drop down ?
Anyways, have a look at
http://localhost:8080/struts-exercise-taglib/html-select.jsp
( When Tomcat is running)
You can find the sources at ../tomcat
folder/webapps/struts-exercise-taglib/html-select.jsp
One hint:
Don't forget to
Yes, 30 minutes before I did -I really forgot this valuable source of
information
What I did was really stupid!
At the beginning, I tried to do all features of my page from scratch,
but as it didn't work, I decided to work step by step.
So I left everything aside, and just tried to get this
Hi, I am trying to do a dynamic select box.
Therefore, I create an ArrayList, containing Beans with my properties.
Then I want to create a select box with one of those properties.
What works is to simply print the mo value of my ArrayList:
logic:iterate id=AemGroupBean collection=%=werkeList%
Yes, this was just a typo. :-
Would be much easier then! ;-)
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Sorry, can't follow you exactly.
What's that???
type={the class that aem represents with complete package ex.
'com.mypack.AEM'}
and:
1. AemGroupBean is not the Form, AemGroupBean is just one of thousand
beans containing one data record each.
2. AemGroupBean hasn't got a getWerkeList() but is
I also found this solution:
html:select property=werkAuswahl
html:options collection=werkeList property=mo/
/html:select
But it throws the error:
Cannot find bean under name org.apache.struts.taglib.html.BEAN
(Same Error Wendy got)
marcus
--
To unsubscribe, e-mail: mailto:[EMAIL
PROTECTED]
Brunnenstr. 111 Tel. 030/245-52210
13355 Berlin-WeddingFax 030/245-52763
Marcus Biel
Marcus.Biel@bmw.An:
[EMAIL PROTECTED]
de Kopie
Hi there,
I am studying computer science at the University in Landshut, Germany.
As part of my studies now I have to work
in a company for 5 Months. So I am working @ BMW in Munich, and they
told me to get into struts,
to realize a project with Struts.
I just started working with Struts. I've
Thanks,
just downloaded the entire book -
eventhough some chapters seem to be missing:
8, 14,(chapter 14 was chapter 15), 17 and 19.
If you got them,
please send to [EMAIL PROTECTED]
thanks,
marcus
[EMAIL PROTECTED] schrieb:
If you havent already, download and read the review copies of
80 matches
Mail list logo