There are at least two ways to handle the forwards:
explicitly using some
sort of suffix/prefix (e.g. all paths that end in .coc will
be handled
by the cocoon plugin) or simply pass all the request first to
cocoon and
if cocoon doesn't handle it, process it normally. The stxx plugin
actually the vimulator on jEdit is buggy.
No, sorry for the confusion. I'm not using the vim emulator on jEdit,
I'm using the standard vim on Linux (and then also jEdit on
Linux when I
have to get stuff done quickly and don't have the time to learn vim:)
Easy yank for Vim v0.99b1:
use
Actually, you can use html comments to remove tags you just have to
embed them in the tag...thusly:
!--bean:write name=foobar property=nothing--
That will be ignored by the container, browser and everything else.
Or you can use JSP comments:
%--
foo
bean:write name=foobar
Please excuse the simple question (I am new to Struts):
When is it appropriate to use form beans for an action?
The reason why I ask is because you can obtain information
from a request
via the information sent by the HTTP/Post/Get. If I have a
bunch of widgets
in a form I can just
I have a web page (the parent) that opens a child
window using javascript. The parent window sets a
field on the child window. The child window needs to
use that data, as it is opening, to perform a DB query
and display information on itself.
The problem is that, even though the
I think you've misunderstood...
The child is not an action, it is a page. A page that
is opened using Javascript. In this case, the parent
window is never submitted.
From what I can tell about Struts (I'm pretty new to
it) is that the only way to get data onto a form is
via the
I have two series of radio buttons in my page.
Let's say:
radioButton1 has 3 possibilites
radioButton2 has 4 possibilites.
I want to validate my form because
radioButton1=3 and radioButton2=4
is not allowed.
What's the best practice?
Using requiredif, so I validate radioButton2
only if
This problem was discussed yesterday.
Please look at the thread Reporting an Exception message in a JSP.
-Message d'origine-
De: Heligon Sandra [mailto:[EMAIL PROTECTED]
Date: mercredi 26 février 2003 11:38
À: '[EMAIL PROTECTED]'
Objet: Display error in JSP page with ActionError
I am developing a Struts application and I am using
Tiles for the
presentation.
I have a common look and feel for all pages with a
header, a menu, a
body, and a footer.
My question is the following:
The options (commands) of the menu depend on the user
I want to display the error message of an SQLException
in my JSP.
At first, I tried to set an ActionError with this message and
to display it via html:errors/.
It does not work because ActionError accepts as an input
string the key of a property.
So what's the nicest way to show to the user the
Hello All,
Could anyone explain me, what is the best (or just good) way to make
communication between:
Struts Actions - Business Logic Layer - DB Source
I want to have separate layers for Business logic and DB Access.
But the main question - how should I get the reference to
I want to display in my HTML page a collection of Strings,
and I want to display a comma between each word and a final dot.
I use nested:iterate:
nested:iterate property=bar
nested:write property=label,
/nested:iterate
It works fine except for the final dot.
My question is:
in a
nested:iterate
property=someCollection
indexId=index
logic:notEqual
property=index
value=0,/logic:notEqual
/nested:iterate
.
This should allow you to display commas between each word and
then a dot.
I cannot test index against 0.
I need to test it against the size
I want to extract an object from the current form bean and save it in the
page scope.
I am in a nested environment:
nested:form action=/foobar
...
/nested:form
I inserted this tag just after the nested:form.
nested:define id=pageObject property=inFooBar toScope=page
type=a.b.c.myObject/
The
Forget it. It works fine now :-)
I want to extract an object from the current form bean and
save it in the
page scope.
I am in a nested environment:
nested:form action=/foobar
...
/nested:form
I inserted this tag just after the nested:form.
nested:define id=pageObject
Tiles is a major pita to set up but its amazing how much time
it saves down
the road.
I think its awesome just from the fact that u dont need to worry about
putting all the decorations on a page (nav bar/header/footer
etc) and only
need to worry about the meat and potatoes part.
Aside
Neil Erdwien wrote:
You mean Feb 21-23 -- next week?
Yes, next week.
Will these conferences be (freely?) available
in mp3 or ogg format, so we can hear it later?
This e-mail is intended only for the above addressee. It may contain
privileged information. If you are not the addressee you
Hi all,
I'm using xslt intsead of the jsps in struts. Does any one
know if there
are tag-libs that I can use in xslt?
What's your XSLT processor?
Xalan and Saxon provides enhanced features with the saxon:
and xalan: namespaces (at least functions, I do not
remember for tags).
There is
Thanks, I'll look into them.
Most of the time XSL tags provide all
you need to manage your input XML.
This e-mail is intended only for the above addressee. It may contain
privileged information. If you are not the addressee you must not copy,
distribute, disclose or use any of the information
I have a bean with two properties:
label and uppercase.
In my JSP, i would
like to write the label in uppercase
only if uppercase is equal to yes.
The condition can be managed by a logic:equal,
I presume.
But how can I uppercase the label before bean:writ-ing
it?
---cut here---
This e-mail
This is probably an FAQ, but I cannot understand that:
logic:empty
This tag evaluates its nested body content only if the specified value is
-either absent (i.e. null),
-an empty string (i.e. a java.lang.String with a length of zero)
or
-an empty java.util.Collection (tested by the .isEmpty()
-Message d'origine-
De: Oguz Kologlu [mailto:[EMAIL PROTECTED]]
Date: mercredi 12 février 2003 11:15
À: Struts Users Mailing List
Objet: RE: Need Advise: use Struts/XSLT
Hi,
There is an article on theserverside.com that discusses this issue at:
To oversimplify - it says you
What about Cocoon integration with Struts? Is it possible that cocoon
handle the presentation layer while Sturts focus on the controller?
Yes. i think this is the best approach.
But I never had the opportunity to do that.
Probably my company (which is Cocoon commiter) will
launch a Struts
I'm currently doing some initial research on the possibility
of generating
Microsoft word documents (yuk) from a web application for a
project that I
am working on. The web app portion of course would use
struts. However, as I
suspected, I'm finding that creating word documents from Java
JetSpeed:
- Apache project
- Based on Turbine
- Uses Torque for persistence layer
Liferay:
- Based on Struts
- Uses Castor for persistence layer
- Comes with more than 20 pre-built portlets from
Online Shopping, Message Boards, Email to Wiki.
- Personalization available like Yahoo!
-
Do anyone know a good upload/download java component??
Webdav?
This e-mail is intended only for the above addressee. It may contain
privileged information. If you are not the addressee you must not copy,
distribute, disclose or use any of the information in it. If you have
received it in error
Hi,
I have 2 questions...
Is it possible to buy Struts support and maintenance from any
enterprise? (do you know any which deal with that?)
Do you know how to get benchmark on performance issues with
Struts (relative to samples)?
Thanks and regards.
lsa.
You may want to have a
shall i include thirdparty jars in my distribution?
Thirdparty like commons, Jboss clients, xmlparsers and so on...
In your distribution?
You mean in your web application archive?
Yes, it is probably useful to add any jar that is used in
your project.
By default, the basic Struts needs
I've used Hibernate on my last two (small) projects. It
works great for me,
and is super easy if you read the documentation. On one
project, I have
POJOs that are marked up with XDoclet and it creates
ValidationForms and
Hibernate mappings using Ant tasks. So I have one class to
Last week's meeting of the local WebSphere Users' Group (WUG)
included a demonstration of the WebSphere Studio Site
Developer (WSSD) including Struts tooling. It is quite impressive.
Through the use of wizards and other intuitive aids WSSD
eases the process of developing a
Just tried easy struts, don't why it didn't show me the parameter of a
mapping.
It seems that current versions of EasyStruts only handle
struts-config.xml that were generated by EasyStruts.
So it is not good at reading hand-made struts-config.xml
It is a pain, except if you have always used it
You should rename the file
no/aftenposten/adk/idam/czar/struts/Dummyform.java
to DummyForm.java, may be.
-Message d'origine-
De: Arnesen, Geir [mailto:[EMAIL PROTECTED]]
Date: mercredi 5 février 2003 19:34
À: [EMAIL PROTECTED]
Objet: Problems debugging Struts-app inside Intellij
AFAIK the only javascript struts outputs is for the validator
- and thats an
optional 'cosmetic' feature that can be switched off without effecting
(affecting/afecting/efecting arrrgh! Ive lost my ability to spell!)
application correctness. Struts 'controls' are pretty much
just your basic
-Message d'origine-
De: Andrew Hill [mailto:[EMAIL PROTECTED]]
Date: lundi 27 janvier 2003 16:19
À: Struts Users Mailing List
Objet: RE: Logging
Struts comes with a marvellous package known as
commons-logging - which is
what struts uses to output log messages.
Commons
The reset() method in the DynaActionForm class is called at
the same time
than the ActionForm's one is, with a little difference. The
former cannot be
empty, as it initializes the passed parameters to their
original value(which
could be the one passed by the configuration file or the
I said that SOMETIMES it is very annoying.
You have the request and the mapping in the request, so you
can decide on each
reset() written by you that you want it happen or not.
I had only one form for which I didn't need the reset
sometimes. So I did the
following:
public void
snip
The problem is that you cannot control the reset-populate-validate
cycle.
/snip
You can if you override the RequestProcessor :-)
Ive actually had to do something similar in regards to form
population and
form instantiation , in which I defined my own ActionMapping
class to
1. Struts find the formbean on scope or creates a new one
2. formbean.reset() is called to set all properties to default values
3. formbean is populated from request parameters
4. formbean.validate() is called (if configured)
Which class makes step 2? ActionServlet? RequestProcessor?
And step
Just got a call from a recruiter. He told me that hiring is
picking up for
java in general and especially for anyone with Struts
experience. A lot of
his big company customers are beginning to staff Struts projects.
Definitely a testament to the hard work of all the commiters
- great
Cocoon distribution comes with samples.
One of the samples is a XML-XSL-FO-PDF
pipeline.
Very easy to setup, very efficient
(Cocoon is efficient, FOP is ...).
http://xml.apache.org/cocoon
This e-mail is intended only for the above addressee. It may contain
privileged information. If you are not
I have mailed with Cedric Dumoulin (the Tiles guy).
He told me that the tiles:insert cannot be
inside a nested:iterate for flushing reasons:
tiles:insert does a flush, which is forbidden inside
the body of a custom tag.
It seems that this limitation has been changed in JSP 1.2,
and now it is
It seems that this limitation has been changed in JSP 1.2,
and now it is possible to flush from inside a custom
tag only if this tag extends IteratedTags.
I presume that the implementation of nested:iterate
I use (Struts-1.1b2) does not extend IteratedTags.
Is there a newer version of
It seems that this limitation has been changed in JSP 1.2,
and now it is possible to flush from inside a custom
tag only if this tag extends IteratedTags.
I presume that the implementation of nested:iterate
I use (Struts-1.1b2) does not extend IteratedTags.
You would like
Can anyone tell me if Ant is able to start/stop Tomcat?
Cactus includes some Ant targets that do this, but I've never
needed them.
I just leave Tomcat running all the time and used the dynamic install,
reload, and remove commands that come with Tomcat 4.1.
Starting and stopping
Hey all,
does anybody develop with easy struts and eclipse ?
Yep.
This e-mail is intended only for the above addressee. It may contain
privileged information. If you are not the addressee you must not copy,
distribute, disclose or use any of the information in it. If you have
received it in
Hi,
It's not possible with Easy Struts but you can use Tomcat
Sysdeo plugin for building a war.
I use Lomboz for that.
It is quite good a tcreating war, but it sucks for launching/stopping
Tomcat.
I presume using Ant is really a neat idea.
Can anyone tell me if Ant is able to start/stop
Then what's the way Idea works?
It is supposed to be fast.
Which widget family does it use?
This e-mail is intended only for the above addressee. It may contain
privileged information. If you are not the addressee you must not copy,
distribute, disclose or use any of the information in it. If you
Here is the content of inside.jsp
nested:equal property=field.subfield value=AAA
toto
/nested:equal
Here is the content of around.jsp:
nested:form action=/manageA
tiles:insert attribute=inside/
/nested:form
/nested:form
This combination fails.
If I copy the content of inside.jsp
and paste it
Could anyone confirm that
a tiles:insert cannot be inside a nested:iterate.
I always have the error message:
Illegal to flush within a custom tag
So I presume both tags don't like each other :-)
Is there a way to get the same behaviour with
jsp:include?
(that's to say an include which gets
Thanks Oliver for the reply..I did look into this and as u
said, this is the
way...But I have another question..
Is there any way to directly convert from HTML or JSP to
pdf?I mean why do i
have to write xsl again just to create the page layout when I
do already have
the page
I want to display the content of a collection.
Each value should have a checkbox with it.
Some thing like:
| | Value One
| | Value Two
| | Value Three
Delete selected items
(where a | | represents a checkbox. You had already
reckognized them, isn't it? :-)
That would be the past IMO. Apache HTTP and Cocon and similar
are PITA.
... you can publish static text from Struts like this:
- Store XML content in a db field. (from user input or RSS feed).
- XSLT it and cache HTML cache in a db field.
Or many variations such as Styxx browser side.
Dear friends,
I want to use cocoon with struts and Jrun
And I want to use jsp instead of xsp.
How can I configure cocoon to use jrun as JSPEngine,...?
It's probably more a question for [EMAIL PROTECTED]
Cocoon provides a JSPGenerator. Use your JSP as you would
use your XSP, just say the
I just started developing webapplications with struts. It's great for
the application-part of the website, but for the publishing of static
text I don't see much advantage using struts. For that I see a great
advantage in using cocoon.
Now I didn't use cocoon yet. But for me the ideal
I Confused when I read you email AND an article about XMLForms from
http://wiki.cocoondev.org/Wiki.jsp?page=XMLFormsStruts !!
Can we replace all the struts functionality with cocoon? Is
cocoon a MVC
frame work too? I thought cocoon works on presentation layer only.
Cocoon is not a
Hi all,
I have following requirement in our struts application.
.After user does a query on database,a set of records is
returned to him on
screen in a table format.He can then ask the same data to be
given in PDF
format so that he can print it.
My question is what is the best way to
That would be the past IMO. Apache HTTP and Cocon and similar
are PITA.
... you can publish static text from Struts like this:
- Store XML content in a db field. (from user input or RSS feed).
- XSLT it and cache HTML cache in a db field.
Or many variations such as Styxx browser side.
XML in files, and not in DB is fine for small site, or if you do not
have a lot of consent turn over.
But it is much easier to operate a large site, whit a lot of
approval,
editing, etc. and complex custom layouts (tiles) if you store XML
content in a db, IMO. Ex: flag content as
Hi All,
I am new to struts, and I have the following questions:
We have a web application already in production, we use
EJB in backend,
servlet in front end, we did it this way, back end session bean will
generate XML data, and pass to front end servlet, the servlet
will call
So that what Cocoon is for...
So if your EJB is able to know if its result XML is the same
as a previous
one
Btw, how would your EJB know that, most are designed stateless. Just
wondering if Cocoon does that automatically.
Cocoon is web based. So its default cache management
is based
I have a form on 3 pages.
So my form bean is in session scope.
The JSP are as follows:
Page1:
some text inputs+some checkboxes.
Next
Page2:
more advanced stuff
PreviousNext
Page3:
even more advanced stuff
PreviousFinish
My problem is the classic problem of checkboxes.
I do
Did you add, at the top of your JSP, the declaration of the namespaces x
and c ?
-Message d'origine-
De: Mouratidis, Georg [mailto:[EMAIL PROTECTED]]
Date: mardi 7 janvier 2003 12:02
À: [EMAIL PROTECTED]
Objet: JSTL-XML does not work
Hi all,
i have the following code in my
;-))
-Original Message-
From: ROSSEL Olivier [mailto:[EMAIL PROTECTED]]
Sent: Dienstag, 7. Januar 2003 12:04
To: 'Struts Users Mailing List'
Subject: RE: JSTL-XML does not work
Did you add, at the top of your JSP, the declaration of the
namespaces x
and c ?
-Message
or the jar files deployed with
this application
i dont know what that means. it would be nice and faster if
you can give the solution
georg
-Original Message-
From: ROSSEL Olivier [mailto:[EMAIL PROTECTED]]
Sent: Dienstag, 7. Januar 2003 12:10
To: 'Struts Users Mailing List
Same problem here as well. But in my case the checkbox values
are coming
from the database. So I can't set all checkbox properties to
false in the
reset() method.
Any solution in mind?
It is quite tricky.
In the reset, you must check what's the page where you clicked
the submit button.
Hi,
Actually you would have the same problem on pages 2, 3, etc.
if there were
any checkboxes.
we had the same problem and solved it by writing separate
reset functions
for each page.
In the general action forms reset method an additional property (e.g.
pageId) of the action
At the end of a multiple-pages form, I wish to have a page that
displays, as HTML, the content of the form previously filled.
What's the best process for that?
Should I put the formBean into request scope, and use bean:write to
display each field?
---cut here---
This e-mail is intended only
Is there a way to tell to a LookupDispatchAction:
if submit=button.add do add()
if submit=button.delete do delete()
else do process();
?
the last part (a default method to launch
if you can find no method name in the Map)
---cut here---
This e-mail is intended only for the above addressee.
In an action class, how can I get an ActionForward instance
that represents
the action currently executing?
No. But if that class was accessed for another class, you could
have saved the ActionForward in the request/session to get it back in
the target action.
This e-mail is intended only
As much as I like Eclipse, it doesn't do JSPs at this time,
which is what the original poster asked for. (AFAIK; if there
is a plug-in available somebody please correct me.)
There are plug-ins to debug java code corresponding to JSPs, with
the line number of the original JSP.
This e-mail is
I'm trying to generate a list of options:
html:select property=year
jstl:forEach var=y begin=1986 end=2003
html:option value=${y}jstl:out value=${y}//html:option
/jstl:forEach
/html:select
But this produces the following output:
option value=${y}1987/option
If you want to open a new window when submitting a form you
will have to set
the target of the html:form or form using _blank will
launch a new
window.
Newbie question:
can you make this new window a modal window?
can this window appear when you click the Select (submit) button,
but not
I wish to have my message resources in several files:
message-resources parameter=java.resources.application /
message-resources parameter=language /
message-resources parameter=database /
When I launch Tomcat, I have realized that the LAST message-resources
is read, but not the
I want to use LookupDispatchAction.
Reading one of Ted's tips, it seems that the value returned by my
submit buttons MUST be stored in a .properties file, and looked up
inside my JSP:
html:submit property=submit
bean:message key=button.add/
/html:submit
There's no way to have a hard-coded
I think you are missing the point of what
LookupDispatchAction is about.
It solves a specific problem with i18n'd button labels.
It sounds like you might be more interested in DispatchAction.
Ted says that JavaScript is needed with Dispatch Action.
My problem with DispatchAction is that
There are a couple tutorial examples - and the EDG (Expresso
Developers
Guide) doc etc. You'll find the doc at:
http://www.jcorporate.com/product/expresso.html Documentation. A bit
slow to load - we are currently working on bringing up a new server
which will resolve this.
After
May be I can help about Cocoon.
I use it A LOT.
And am only newbie with Struts.
What I LOVE with Struts is the lego concept of the actions.
It is so easy, so intuitive and powerful to manage internal logic.
In Cocoon, the same internal logic requires a lot of Java programming,
and maximum
O/R is not always needed. Sometimes you just want to work with a
relational master/detail (ie, next row(); next row();).
My concern is not to have to think in term of (for example)
Primary Key/Foreign Key or Conposite Key...
This is too much low level for me. And some programmers I talk
to
I really find this remark not constructive. I do not seek
somebody who hates
this tool but on the contrary, somebody which uses it with Struts(voir
Tiles) and with which I can have exchanges.
Marcomedia and Struts are not incompatible.
Sure!
My remark was just a troll for the old time
1. If we use ActionForm, the ActionServlet first executes the
validate()
method before calling execute() on the corresponding Action.
If I switch
from ActionForms to Struts Validator (that is, use
ValidatorForm instead
of ActionForm), do things work the same way? Is it that in this case
are there any big documentation for expresso?
may be a book or several tutorials?
-Message d'origine-
De: Steven Leija [mailto:[EMAIL PROTECTED]]
Date: lundi 16 décembre 2002 21:36
À: 'Struts Users Mailing List '
Objet: Compliment Frameworks
Hey Guys,
What are some good
I have a tiles page with two tiles:
left part is a menu (slashdot, linxufr, amazon, myStaticHtmlSite...)
right part should be the content of the site that I can browse inside
this tile.
The idea is to reproduce the system of frames with tiles.
I wonder how I could do that?
May be the right tile
I could not follow your question.
A good practices that I use is to have centralized navigation in XML,
using Struts menu from sf.net.
So the question is:
in StrutsMenu, how do you highlight the currently selected menu item?
Another question about StrutsMenu:
is it possible to get a string
Hi,
I defined 2 actions in session scope referring the same
form. The first
action sets some properties in the form and then forwards
the request to the
second action. The second action sets some more properties
and then forwards
to a JSP page which contains the html form. The
I have encountered this problem before. Try this:
Within your first Action set the get the values that are not
being passed from the request object. Then before forwarding
to the next Action set these values explicitly in the request
objects attributes.
My current method is to use a
I have a tile, with the login form at the upper right part of the tile.
My login form is made of 2 JSP: username.jsp and password.jsp.
My tile is managed by Main.jsp.
My mappings are:
action path=/Username
type=net.lolive.action.SuccessAction
name=LoginForm2
Can someone explains me when(and why if possible) the reset
method of
Action forms
is called.
On every reuse of the ActionForm. Because it is necessary for
^
What are you calling a reuse?
Suppose I have something like:
a Form is session
i fill one field with a
I have a tile, with the login form at the upper right part of
the tile.
My login form is made of 2 JSP: username.jsp and password.jsp.
My tile is managed by Main.jsp.
My mappings are:
action path=/Username
type=net.lolive.action.SuccessAction
name=LoginForm2
Suppose I have something like:
a Form is session
i fill one field with a JSP+action
that action redirects to an action
that action forwards to a JSP (a tile)
that tile calls several actions
on of those forwards to another action
that action wants to fill another field
I guess
I wish to pass an ActionForward to an action via the session.
Is it possible?
Action1 has several forward available.
It saves on ein the session.
Action2 retrieves this forward from the session, and use it
to forward there.
---cut here---
This e-mail is intended only for the above
I wish to pass an ActionForward to an action via the session.
Is it possible?
Action1 has several forward available.
It saves on ein the session.
Action2 retrieves this forward from the session, and use it
to forward there.
I guess you could..
Just define forward one to
Hello,
I am new to using Struts' Validator framework and am trying to write a
sample application based on the example distributed with Validator
download from D. Winterfeldt's site.
In the file jsRegistration.jsp, there are the following lines:
html:form action=registration
Woo hoo! A Struts In Action book review on Slashdot!
http://books.slashdot.org/books/02/11/25/1731249.shtml?tid=156
Shortly: The bible of web MVC :-)
Someone on IRC said that one of its chapters (that was already available)
is talking about an old flavour of the Validator. Is it true?
This
It seems that saving ActionErrors in request can sometimes be a pain
(especially
when you redirect a lot).
I wonder if it is possible to make a similar system but store ActionErrors
in session.
In Actions, instead of saving in request, you save in session.
And the tags html:session-errors will
I read on the list that it is impossible to pass a property from
struts-config.xml
to an Action.
Example:
action
set-property name=foo valuebar/
/action
except if you overload the ActionMapping used for that statement.
Is it still the case in Struts-1.1 ?
---cut here---
: Passing an argument from struts-config.xml to an action.
2002. november 28. 12:13 dátummal ROSSEL Olivier ezt írtad:
I read on the list that it is impossible to pass a property from
struts-config.xml
to an Action.
Example:
action
set-property name=foo valuebar/
/action
I have a DynaActionForm:
A (String)
B (String)
C (String)
D (String)
E (String)
I want to fill it with 2 forms:
1.jsp:
Form (action=1.do)
A: ___
B: ___
D: ___
Submit
1.do has an actionMapping with a
DynaActionForm in session
Hello, I hope some of you guys has seen something like this
and knows how to
prevent it, I'm running struts 1.02 with tomcat 4.0.1 on
Win2K Server. I'm
using Eclipse for IDE and everytime I save one of my Action
or ActionForm
classes on Eclipse, I see in the tomcat console the message:
I have an ActionForm of type MyOwnActionForm.
I want to remove it completely from its scope (which is session in my
application).
In Struts 1.0.2, I could have used a RemoveFormBeanAction to do that.
This action is not available anymore.
What's the process in Struts 1.1b2 ?
---cut here---
The form bean is stored under a key from the Globals class.
You can remove
the bean by getting the session and calling removeAttribute
with the Globals
key.
I am not sure I understand.
Do you mean:
session.removeAttribute(Globals.FORM_BEANS_KEY)
?
It seems that it is equivalent to:
1 - 100 of 114 matches
Mail list logo