global-forwards
forward name=error path=/error.jsp /
/global-forwards
in your action you can forward to error in the event that something's
gone pear-shaped.
On 19 Feb 2004, at 01:58, Russ Baker wrote:
I am having a real issue with the way Tiles handles an error page. I
am
setting up
Hello,
After the action is performed, I need to send the html view back to the http
client and to an email output.
I am not sure on how to do it.
Can anyone advise a suitable approach sample code?
Cheers
/jm
+ several million..
But this wasn't the crack that was being smoked.
The literal question that was being asked was can i use a link to
submit a form without using javascript?
The response to which was no.
Geeta's suggestion was the only solution to the problem as you'd store
the lot in he
What about indexed=true on the radio button?
On 19 Feb 2004, at 04:36, Johnson, Gary wrote:
Hello *,
I've been trying to generate a variable list of text fields with
each
row containing a radio button and 2 text fields. The getters seem to
work
OK, but can't seem to make the setters work.
XML Spy has a visual XSLT designer...I have never used the visual designing features ..
But any how, XML Spy suit is really good ..I have used it to design my xslts for
XSL:FO transformations...I have found the the hierarchial(node like)view very
conveninent.
-Original Message-
From:
If you need this kind of behaviour (Container Managed Security) I already
implemented a very simple, free and open framework that allows to manage
security over your application.
I haven't made any documentation besides javadoc but, if you need any
help, just send me an email.
Pedro
Hi all,
I am trying to validate a collection of objects, like:
field property=meansAddress
indexedListProperty=value.notifications
depends=mask,required
var
var-namemask/var-name
var-value^[0-9]*$/var-value
Hi,
In my jsp's i do on the bottom of the jsp:
script
today();
/script
In my head section i then define the method...
function today(){
var today = new Date();
var month = today.getMonth()+1;
var year = today.getYear();
var day = today.getDate();
I am trying to use logic:iterator tag as follows.Try to give dynamic values for
offset and length attributes.
logic:iterate id =emp name=EmpList offset=index length=length
EmpList,index and length values are set properly in session .
But this throws following exception :
How can I make two combo box, work sincronized, when I choice on value the other will
be populate based on the value or the first, there is a way to make this without
refresh all page, just the second combo box. Using Struts,Tiles... , someone have
one example of this thing.
Abraços
Daniel
If you don't want to submit the form then this has to be done client side
with Javascript, you will have to know all of the possible values of the
2nd box for each of the possible values of the 1st. Otherwise it can be
done fairly easily using an action.
Paul
without a refresh its a javascript question
find the oreilly book on javascript and look at the Option()
constructor.
Struts and tiles may help you to get the data to the page, but the
re-population of select menus is javascript.
On 19 Feb 2004, at 13:05, Daniel wrote:
How can I make two
You can use ComboSelectTag from http://providers.sourceforge.net/
-Original Message-
From: Paul-J Woodward [mailto:[EMAIL PROTECTED]
Sent: Jueves, 19 de Febrero de 2004 09:09 a.m.
To: Struts Users Mailing List
Subject: Re: 2 combo Box (drop down list)
If you don't want to submit
I'm not completely clear on how you've got your data set up, but something like
this should work with JSTL:
jsp:useBean id=paramValuesExtract class=java.util.HashMap/
c:forEach var=retrieveExtractDetails items=${extracts}
c:set target=${paramValuesExtract}
property=extractId
I used iframe, some time ago at one project but I was not using struts,tiles
with iframe it's work very well, but don't have many advantages of Struts,
tiles..., I'd like to use the popup like exemple of
http://www.mattkruse.com/javascript/popupwindow/ (the last example), How can
I populate
HI,
When we want to pass an object or collection of objects to jsp we use value
object or collection of them.
For example imagine there is an action that wants to retrieve a list of
users from database and send it to jsp.
Here is the code of action:
UserListAction
{
execute()
{
That tag lib guillermo suggested, or writing your own javascript like i
suggested is the way to do it then ..
On 19 Feb 2004, at 13:34, Daniel wrote:
I used iframe, some time ago at one project but I was not using
struts,tiles
with iframe it's work very well, but don't have many advantages
Hi,
Is there any way that we can get the list of dynaForms in a java class? What
we are looking is some thing like:
Collection DynaForrm = org.apache.struts. class ( struts-config.xml )
Getting the list of dynamic form from struts.config.xml is done by digester
when the action sevlet is
I'll need a Action, for query data base..., and use a javascript for
execute this action ??? Help me , for the inicial way for this.
thanks
Daniel S.
- Original Message -
From: Mark Lowe [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, February 19, 2004
the DateTime taglib would perfectly fit your needs:
http://jakarta.apache.org/taglibs/doc/datetime-doc/intro.html
Ben
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 19 februari 2004 11:27
To: [EMAIL PROTECTED]
Subject: html:javascript simple question
Hi,
I have the following code:
logic:iterate id=users name=userInfo
bean:write name=users property=userName/
/logic:iterate
How can i get the first record ?
Something like bean:define name=userInfo[0] property=userName/
but thats not working, any idea ?
Thanks !
Get it from the servletContext and change it...dynamically.
--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx
MSN: [EMAIL PROTECTED]
-Original Message-
From: keshav [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 19,
Or with JSTL:
%@ taglib prefix=fmt uri=http://java.sun.com/jstl/fmt; %
jsp:useBean id=today class=java.util.Date/
script type=text/javascript language=javascript
!--
function today() {
var date = fmt:formatDate value=${today} pattern=dd/MM//;
Using ComboSelectTag you have to do as follows:
1) In the action, get the collection of objects (from database, or
whatever) and set it in the request:
For example, has the following collection of objects with these
properties:
idProp1
descripProp1
idProp2
descripProp2
(See
Does anybody know of a way to define more than one default message
resources in struts 1.1.
Hi,
Thanks for the pointer - although Im not sure this is a case for those tags
(at least I cant work out how to solve my problem using them!)
My issue is that I dont know how many multibox sets I will need on my form
(i.e. it has to have a dynamic number of multiboxes, each with a dynamic
I'm sure this is a quite common issue, but I couldnt' find anything from
the archives; the question is: what is the best practice to include a js
file in a module independent way ? It seems html:rewrite will prepend
the module name, which is incorrect! I want to put those JavaScript
files in a
Hi all,
iam little bit off the topic...
Iam getting the following exception
Exception org.xml.sax.SAXNotRecognizedException:
Feature: http://apache.org/xml/features/allow-java-encodings
while opening
D:\ATG\Dynamo5.6.1\Portal\authentication\authentication\META-INF\application.xml
?xml version=1.0 ?
!DOCTYPE application PUBLIC -//Sun Microsystems, Inc.//DTD J2EE Application
1.2//EN http://java.sun.com/j2ee/dtds/application_1_2.dtd;
application
display-name
simpleJ2EE
/display-name
the xml file is not well-formed.. /application is missing at the end.
Just like it is done in the struts-example.
--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx
MSN: [EMAIL PROTECTED]
-Original Message-
From: Daniel [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 19, 2004 8:52 AM
To:
I am about to start an application with 5 user levels: admin, reseller,
merchant, company, and employee. I need the administrators for each level
to be able to become the lower level, do something for that lower level
(or go a level lower) and then pop back out. I would like to use roles for
All,
We will be working on a big project that uses Struts/HTML/Java Script as
the front end.
We use Rational Rose to support analysis and design activities.
From your experience (using Struts) what artifacts/deliverables can be
used to document
the Presentation Tier? How do we depict the
Can anybody help me with this problem?
I have two arraylists of beans in my session, I am trying to iterate through
them and when an element in one bean equals an element in the second bean
print it out
logic:iterate id=ElementOne name=currentElementOneValues
logic:iterate id=ElementTwo
Hi Russ,
I had the same problem and ended up including the error page in the body
of the tiles layout. This way the user could continue in the app, but be
informed that an error occurred. So, all of my body tiles have an error page
directive. If the error occurs elsewhere (header, menu, footer)
You will find the following useful:
The Struts Framework by Sue Spielman
Developing Enterprise Java Applications With J2EE and UML by Khawar Ahmed
and Cary Umrysh
-Original Message-
From: Sreenivasa Chadalavada [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 19, 2004 8:17 AM
To:
Although not shown below, the value of the radio button is set in the action
form OK. It's the indexed properties that are causing the grief.
-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 19, 2004 3:32 AM
To: Struts Users Mailing List
Subject: Re:
I have the following code:
logic:iterate id=users name=userInfo
bean:write name=users property=userName/ /logic:iterate
How can i get the first record ?
JSTL makes this easy:
c:out value=${userInfo[0].userName} /
Or, to write out only the first one while iterating the loop:
Is it in violation of the HTML 4 (or XHTML 1) spec that an a .../a
tag have *both* an href and a name attribute? I ask, because in Struts
1.1, apparently, if I specify a linkName attribute to an otherwise
normal html:link tag (with either page, action, or href specified) -
it ignores
At 3:12 PM +0100 2/19/04, Renato Romano wrote:
I'm sure this is a quite common issue, but I couldnt' find anything from
the archives; the question is: what is the best practice to include a js
file in a module independent way ? It seems html:rewrite will prepend
the module name, which is
Try This -
logic:iterate id =emp name=EmpList offset=%= indexVar %
length=%= lengthVar %
Regards,
Janarthan S
Chaminda Fernando [EMAIL PROTECTED] wrote:
I am trying to use
EmpList,index and length values are set properly in session .
But this throws following exception :
Title: Logic:equal
Hello friends
How to compare boolean values by logic:equal?
logic:equal name=currentRow property=editable value=true
// do something
/logic:equal
Doesnt seem to be working? Is there anything wrong in above code?
Pls help.
Shashank S. Dixit
Cognizant
If I put the path of imput in the action forward it's work ok,
return mapping.findForward(sucesso),
but if I use the same path on the input value and use
return (new ActionForward(mapping.getInput())), the page is not show.
Abraços
Daniel S.
Hello,
Is there a way to upload a directory (recursive if flagged), using
fileupload. Are there another ways of doing it ?
Thanks
Shishir
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
How to compare boolean values by logic:equal?
logic:equal name=currentRow property=editable value=true
// do something
/logic:equal
Use JSTL instead:
c:if test=${currentRow.editable}
// do something
/c:if
--
Tim Slattery
[EMAIL PROTECTED]
You mean you want the response to include what?
At 12:22 AM 2/19/2004, you wrote:
Hello,
After the action is performed, I need to send the html view back to the http
client and to an email output.
I am not sure on how to do it.
Can anyone advise a suitable approach sample code?
Cheers
hi
xteamly sorry...its just a snapshot...actually /application was closed at the
end...sorry once again..
thanks
prashanth
Turner Benjamin [EMAIL PROTECTED] wrote:
simpleJ2EE
the xml file is not well-formed.. is missing at the end.
From: Jean-Michel Robinet [mailto:[EMAIL PROTECTED]
After the action is performed, I need to send the html view
back to the http client and to an email output.
I am not sure on how to do it.
In the Action, send the email, then forward to the html view (JSP?).
Google should turn up many
In case this helps some people, yesterday I stumbled on a missing bit of
necessary information in the otherwise very good book, Programming with
Jakarta Struts, by Chuck Cavaness (Nov 2002 printing): Chapter 14, 'Using
Tiles', fails to explain the TilesRequestProcessor. I can find no mention
The validwhen documentation suggests that only two items may be joined
with and or or. Does this mean that I could not write a condition like:
var-nametest/var-name
var-value((field1 == 'A') or (field1 == 'B') or (field1 ==
'C'))/var-value
Is it this limited? Anyone having successful
HTML 4.01 Specification
12.1.3 Specifying anchors and links
Authors may set the name and href attributes simultaneously in the same A instance.
Quoting Brice Ruth [EMAIL PROTECTED]:
Is it in violation of the HTML 4 (or XHTML 1) spec that an a .../a
tag have *both* an href and a name
I am designing an input screen that will have multiple select tags for inputting a
number of rows into a db table. I plan to do a Cartesian product of the input
properties in my Action and then feed each row to my db persistence framework (Ibatis)
for insertion into the db. My question is
Can anybody provide me sample code of Struts JSP contains Javascript..? or any link to
refer how to use JavaScript function inside Struts JSP..??
Thanks in advance,
-Ramadoss
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
OK, then it seems that the Struts behaviour is incorrect?
Kris Schneider wrote:
HTML 4.01 Specification
12.1.3 Specifying anchors and links
Authors may set the name and href attributes simultaneously in the same A instance.
Quoting Brice Ruth [EMAIL PROTECTED]:
Is it in violation of the
Seems like it...
Quoting Brice Ruth [EMAIL PROTECTED]:
OK, then it seems that the Struts behaviour is incorrect?
Kris Schneider wrote:
HTML 4.01 Specification
12.1.3 Specifying anchors and links
Authors may set the name and href attributes simultaneously in the same A
instance.
I did what I wanted, but had to code it like this:
var-nametest/var-name
var-value((field1 == 'A') or ((field1 == 'B') or (field1 == 'C')))/var-value
rather difficult to read!
Regards, Fabio.
-Messaggio originale-
Da: Grassi Fabio
Inviato: giovedì 19 febbraio 2004 17:43
A: '[EMAIL
Is anyone out there using a Struts build later than the 1.1 release that
could test for me if this is fixed in a later release?
Thanks!
Kris Schneider wrote:
Seems like it...
Quoting Brice Ruth [EMAIL PROTECTED]:
OK, then it seems that the Struts behaviour is incorrect?
Kris Schneider
It's not much different than Javascript in any JSP. Cedric Dumoulin's Tiles
Advanced Features (http://www.lifl.fr/~dumoulin/tiles/
tilesAdvancedFeatures.pdf) has several examples that use Javascript.
On Thursday 19 February 2004 12:14, Ramadoss Chinnakuzhandai wrote:
Can anybody provide me
No you can't use html:optionsCollection tag to display labels.
I also can't think why this would be necessary - if you
define your options
in your resource bundle, you know how many there are going to
be and so you
can just use straight html:option tags. For example:
In your resource
Threre is a way for test if my resource properties file is in memory , because my
application can't read any key of that file, and I made other application (for test),
I used the way and works ok.
I'm use easyStruts an eclipse and I have this message: Faltal error on loading
I have created an Action class which does session
validation by checking to see if a loggedIn flag is
set in the session - if it is absent, or set to false,
then I want to forward to the login page. However if
it is set to true then I don't want to do anything -
the execute() method should just
From: James Adams [mailto:[EMAIL PROTECTED]
I have created an Action class which does session
validation by checking to see if a loggedIn flag is
set in the session - if it is absent, or set to false,
then I want to forward to the login page.
Have you considered using a Filter instead?
I use a a Servlet Filter to achieve this. This filter intercepts request
before Struts gets it's hands on the request.
Paul
-Original Message-
From: James Adams [mailto:[EMAIL PROTECTED]
Sent: 19 February 2004 18:17
To: [EMAIL PROTECTED]
Subject: How to create a No Action
Can I just return null ?
No. Returning null signals Struts that the Action has done
everything necessary for the response, and there is nothing for
Struts to forward to. That doesn't sound like what you want, or at
least not completely.
If you want to send the person back to the calling
While you can use a filter to do this, why not extend the
RequestProcessor class?
By overriding the processPreprocess function you can check for your
flag. If found simply return true to continue processing. Otherwise
forward the user onto the login page.
*
*James Adams wrote:
I have
See
http://www.systemmobile.com/articles/strutsMessageResources.html
Does anybody know of a way to define more than one default
message resources in struts 1.1.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
Situation:
I have a datagrid (displaytag), and I make a link on the colum ID of my database;
When I click on this link , I'll execute a action with a ID parameter (correct ??),
and query the data base and show the edit page with the result values of the query.
How can I pass aparameter for a
At 12:46 PM -0600 2/19/04, Brad Balmer wrote:
While you can use a filter to do this, why not extend the
RequestProcessor class?
By overriding the processPreprocess function you can check for your
flag. If found simply return true to continue processing.
Otherwise forward the user onto the
How's this? you can put it in a tile wooo (I hear gasps of amazement) ..
script language=javascript type=text/javascript
!--
function ajavascriptfunctioninatile() {
alert(Mellow World!!);
}
//--
/script
a href=javascript:ajavascriptfunctioninatile()Hit me/a
On 19 Feb 2004, at 18:14,
How would you forward the user to the login page? The processPreprocess() method
returns true or false.
-Original Message-
From: Brad Balmer [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 19, 2004 1:47 PM
To: Struts Users Mailing List
Subject: Re: How to create a No Action
Here is an example, if you like:
import java.util.Date;
import java.util.Properties;
import javax.mail.Address;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.SendFailedException;
import javax.mail.Session;
import javax.mail.Transport;
import
protected boolean processPreprocess(
HttpServletRequest request,
HttpServletResponse response) {
boolean continueProcessing = true;
HttpSession session = request.getSession(false);
if (session == null) {
continueProcessing = false;
try {
All,
I heard that most Struts based applications make a round trip for
conditional dynamic content generation and Validation.
In your experience, can you please let me know what are the advantages and
disadvantages of
each of the approaches.
I very much appreciate your help in this regard.
Darrin,
Thanks for the information. I will look into it.
Regards,
Sree/-
Smith, Darrin Darrin.Smith
@OraMetrix.com
02/19/2004 09:23 AM
Please respond to Struts Users Mailing List
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
cc:
Subject:RE:
Geeta Ramani wrote:
Michael:
Michael Steiger wrote:
Max Cooper wrote:
Max,
thanks for your help.
If I just want to display values I do not need a html:form and html:text
tags. What should I use instead?
You can either use the html:form anyways (and just not show any submit button)
or you
Group,
I'm having a problem if I use the message-resources inside my tiles
jsp. I'm doing something similar to the standard tiles sample for designing
a layout for menus with the selected menu shown differently.
I'm doing something like this :
% String sel = ( String )
Hi all,
I am new to the group and new to Struts, working on my first application. I
am using Struts 1.0, and tomcat 4.1.27.
I get the following error:
org.apache.jasper.JasperException: org/apache/struts/action/ActionForm
With root cause
javax.servlet.ServletException:
Not sure what you mean by conditional dynamic content generation ??
Action takes care of the conditional part of the content and it is
supplemented with custom tag (equal, present) etc. on the jsp level.
I think you mean client side validation and server side validation. The
decision depends
Thanks for all of the suggestions on how to solve this
problem. You have all given good ideas and introduced
me to concepts that I am unfamiliar with as a beginner
with Struts.
To further clarify what I want to do, in case it will
lead to more pointed suggestions - I am including this
session
From: James Adams [mailto:[EMAIL PROTECTED]
To further clarify what I want to do, in case it will
lead to more pointed suggestions - I am including this
session validator on each JSP of my application to
check to make sure that a user is logged in, and if
not I forward to the login page.
The application has to return the same information to 2 different supports.
Here is an example
- A user asks for a report
- The action class goes to the DB to get the view.
- An actionForward object is returned with the right jsp page.
- Finally, the page is
That was a great trick Jayesh. It solved my problem too.
Thx.
Avinash
-Original Message-
From: Gopalakrishnan, Jayesh [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 18, 2004 11:39 AM
To: Struts Users Mailing List
Subject: RE: Tiles and message-resources
You could pass in the key,
Jean-Michel,
Check out www.jsptags.com.
Specifically, you should look at the Jakarta Mailer
Taglib and the ColdJava Copy taglib there.
If you use the Mailer taglib, I think you could put
almost the entire contents of the JSP page inside the
message tag and send it.
Otherwise, you might want to
I currently use JBuilder 8 Enterprise and I'm eval'ing JBuilder X. Anyone
else using X for Struts dev? I'm curious as to your thoughts.
Personally, I'm underwhelmed. I so wanted to see the validator framework
being leveraged...or even addressed. It's existence is barely acknowledged.
Is it my
Mark,
Sharing is good - I made the source for my LazyDynaBean avaialble here:
http://www.niallp.pwp.blueyonder.co.uk
There is a set of nested tags (havn't used them myself) in struts. Take a
look at:
Nested Examples: http://www.keyboardmonkey.com
Nested Tags Guide:
Hi Joe,
I Use JBuilder X (Developer Edition) for my Struts development. The Struts
configuration tools is pretty neat but other than the fact that I prefer
JBuilder to Eclipse I can't speak of anything else that would convince to
use JBuilder just to simplify Struts development.
You can download
Hi Joe,
Personally, I'm averse to IDEs which require a minimum 512MB (768MB recommended)
RAM (hope you're not running XP on a stock laptop...;-)
Curtis
--
c dot tee at verizon dot net
Joe Hertz wrote:
I currently use JBuilder 8 Enterprise and I'm eval'ing JBuilder X. Anyone
else using X for
Hey all.
Got another wacky question.
I am writing a custom tag library, and I want it to flush the buffer of html
out to the page as part of the processing. From what I can tell, either
pageContext.getResponse.flushBuffer(); or pageContext.getOut.flush(); should
do this, but I can't get either
Hi,
My problem is that on my page i have fixed number of columns(e.g say
5) but no of rows are dynamic soo how can i construct a bean with the
help of DynaActionForm...
do anyone has any code ..say example it would be very benificial for
me.
Thanks ,
Vishal
Jim,
What you really want to achieve is best done outside
Struts. Basically you are trying to achieve two things:
1)First, a user not logged in should be forwarded to a
login page.
2)Second, prevent unauthorized users from not accessing
the page.
This is best done by using J2EE security. Use
89 matches
Mail list logo