I've been responding to your questions here and at JavaRanch on this
subject.
It seems like you are missing the point of DynaActionForms.
Please read 4.3 and 4.4 of the user guide.
http://jakarta.apache.org/struts/userGuide/building_controller.html
Lots of additional comments below.
Master the Struts Tiles Framework Tutorial (Dec. 2003)
http://www.arc-mind.com/downloads.htm
The Tiles framework makes creating reusable pages and visual components
easier. Developers can build Web applications by assembling reusable tiles.
You can use tiles as templates or as visual components.
hi,
Yes, i was referring to copyProperties().
The problem really gets complex if you have nested objects.
and i doubt if there is any readymade solution to the problem you are
facing. but with very little effrots you can do this
You can make one and for all. Doesn't seem to be a tough job
THANK YOU SOOO MUCH for providing such detail code in response.
One of the lines in the iterating function:
nvString.append(this.getString(key) + );
What's the this and the getString suppose to be? Should it be the
map.get function?
Rgds,
Patrick.
-Original Message-
oops, it's m.get(key).toString();
sometimes it happens in hurry ;-)
-Original Message-
From: Patrick Cheng [mailto:[EMAIL PROTECTED]
Sent: Monday, January 05, 2004 2:50 PM
To: Struts Users Mailing List
Subject: RE: Querystring builder
THANK YOU SOOO MUCH for providing such detail code
i have this error, i don't know where goes wrong.. please help..
javax.servlet.ServletException: Exception creating bean of class
net.foong.newitemForm: {1}
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
Thanks Nico.
However, I'm facing a problem with using my custom linktag.
I am trying to specify the href attribute from which I shall get the
path by using:
dtag:dlink href=/sample.html showAlways=truetest tag/dtag:dlink
However, my jsp is giving me the error: Error(12): Attribute: href is not
You have to copy/paste extended taglib description in your custom tld.
You should write a simplest custom tag that includes it's body into response (the way
logic: tags do) on some
application-specific conditions, and use it this way :
myTag:isUserInRole path=/sample.html
html:link
To borrow from the title of a movie:
Dude, where's my constructor?
this is my newitemForm.java
newitemForm.java
=
package net.foong;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionForm;
import
Hi
I have a page which calls an action. Depending on certain condition I
will forward it to suitable pages. After this steps if user clicks the
Browser's back button, it gives typical browser error Warning: Page has
Expired (I am using IE). This happens especially after the validation
failure.
Dear All,
I have extended the RequestProcessor.processRoles() function. When it returns false
(i.e. user rejected) I get a blank screen. How/where do I set a custom page or action
to perform?
Thanks, Paul
Global Equity Derivatives
Did you try to turn off expire? e.g.
%
response.setDateHeader (Expires, 0);
response.setHeader(Pragma, no-cache);
response.setHeader(Cache-Control, no-store);
response.setDateHeader(max-age, 0);
response.setDateHeader(Expires, 0);
%
Regards,
Martin
- Original Message -
From: Manjunath
You have to write the response before returning from processRole. For example, you can
set response status to some error
so that default associated error-page is displayed :
response.sendError(HttpServletResponse.SC_FORBIDDEN,
getInternal().getMessage(notAuthorized, mapping.getPath()));
JPlates Inc has announced the general availability of JPlates 3.0.1.
JPlates 3.0.1 adds template processing to Java, providing fully
compiled, object-oriented template processing with template objects and
template methods. JPlates dramatically improves productivity for Java
and JSP and
Using Struts tags, you do this for creating a select filled with options
tags:
html:select property=idDocument
html:options collection=documents property=id
labelProperty=descrip/
/html:select
In this case, you should create a collection with beans for each
document type (Passport,
In this case, the only constructor for the class is the default one. Equivalent to:
public newitemForm() { super(); }
I think the link should be:
html:link action=/newitem
but I only took a quick look through the code...
Quoting Joe Hertz [EMAIL PROTECTED]:
To borrow from the title of a
How can i have a dynamic value in the action ?
The following is not working .
bean:define id=url value=/setUp.do?action=all type=String/
html:form action=%=url%
Thanks !
Hello,
this may be a bit off topic but there it goes: how do I deploy the
artimus example application? What kind of database structure do I have
to create?
Kelly.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
If I am not mistaken some IDEs create a default public constructor for you..
*My 2 pennies*
Martin
- Original Message -
From: Kris Schneider [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, January 05, 2004 8:05 AM
Subject: RE: javax.servlet.ServletException:
It should work (I use it !)
Did you include the taglib directive for struts-bean ?
Nico.
How can i have a dynamic value in the action ?
The following is not working .
bean:define id=url value=/setUp.do?action=all type=String/
html:form action=%=url%
Thanks !
That's perfect.
Thanks, Paul
Nicolas De Loof
hi,
perhaps it is this:
(look at:
http://jakarta.apache.org/struts/userGuide/struts-bean.html#define )
type:
Specifies the fully qualified class name of the value to be exposed as
the id attribute.
[ java.lang.String (if you specify a value attribute) or
java.lang.Object otherwise. ] [RT Expr]
1)get the artimus example app at
http://sourceforge.net/project/showfiles.php?group_id=49385
2)change to the artimus folder which contains appfuse.sql
C:\cd artimus
C:\Artimusdir
Volume in drive C has no label.
Volume Serial Number is 1CB0-1E6D
Directory of C:\Artimus
01/05/2004 08:31a
I can write
bean:write name=url/
but not %=url%
then i get an
org.apache.jasper.JasperException: Unable to compile class for JSP
any idea ?
Thanks !
- Original Message -
From: Nicolas De Loof [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, January
No thats not it,
It's not working with or without type... org.apache.jasper.JasperException
Thx
- Original Message -
From: Matthias Wessendorf [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Monday, January 05, 2004 2:42 PM
Subject: RE: simple question
hi,
I think it may depend on the servlet container. Currently i am unable
to do it (tomcat 5) however I know I have done it before in one of the
4.x versions.
Camron G. Levanger
The Dreamlab
www.dreamlabmedia.com
(866) 890-3705
On Jan 5, 2004, at 7:12 AM, dirk wrote:
I can write
bean:write
Here are some random guesses.. Looks like it should work to me.
I use
html-el:form action=${url}
usually url is defined in a tiles def but what you're doing should work
fine..
what about
c:set var=url value=/foo.do /
to test if its some problem with the bean:define tag you could try.
%
I did all this you said and followed also the steps in readme.txt. But
when I click on create resources button, I get this:
05/01/2004 13:10:15 org.apache.struts.action.RequestProcessor process
INFO: Processing a 'POST' for path '/menu/Manager'
processActionForward(/do/CreateResources, false)
Hi,
I have a drop down list in my jsp page the code is shown below
td width=100bName/b/td
td
select name=sName style=width:225px
logic:iterate id=results name=sNameSetup property=nameList
scope=session
option value=bean:write name=results property =sName
//option
Dear Struts users:
For a couple of weeks now, I've been trying to use the ProcessAction class
in Struts Scaffold, following the book Struts in Action and the example
Artimus application in which it was demonstrated. It's pretty convenient in
that it simplifies the design of my business logic
Assuming you are using Struts to process the form submission,
once the user selects a value from the drop down list and submits
the form to be processed, the action which you have configured to
handle this form submission, will have access to the selected value
via the form configured to store the
You'll find the docs here
http://jakarta.apache.org/struts/userGuide/struts-html.html#select
You need something like the following, please don't copy and paste and
then immediately post the list.
html:select property=sName
html:options name=myList property=sName /
/html:select
Judging by the
Hi,
Thanks for your reply robert.
I am using struts and in the action i am using
request.getParameter(sname);
for all other text boxes i get the value using request.getParamter();
but I dont get any value for the drop down list.
Can you help me more
Regards
Kamal
-Original Message-
umm.. ehhh
perhaps
option value=
could be why you get no value (in fact i suspect thats it).. The
parameter will be whatever is in the value attribute, if you leave the
value attribute out then it will default to the display string
presented between the option tags..
On 5 Jan 2004, at
-Original Message-
From: Robert Taylor [mailto:[EMAIL PROTECTED]
Sent: Monday, January 05, 2004 11:43 AM
To: [EMAIL PROTECTED]
Subject: RE: selecting a value from drop down list
Okay. I just saw something in your original post.
select name=sName style=width:225px
logic:iterate
Hi,
Thanks for your reply Mark.
I tried the option you suggested. but that thing gives me a null value
Regards
Kamal
-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: 05 January 2004 16:23
To: Struts Users Mailing List
Subject: Re: selecting a value from drop down
Hi,
It works now.
It was just that the value was in double quotes and as its a string it
already has double quotes
So i changed the option value from
option value=bean:write name=results property =pnDescription
/bean:write name=results property =pnDescription /
to
option value=bean:write
Try request.getParameter(sName);
robert
-Original Message-
From: Kamal Gupta [mailto:[EMAIL PROTECTED]
Sent: Monday, January 05, 2004 11:06 AM
To: Struts Users Mailing List
Subject: RE: selecting a value from drop down list
Hi,
Thanks for your reply robert.
I am using struts
Hello, I will do my best to explain what's going on and hopefully someone
can help me out. If more information is needed, please let me know.
Here is the situation. We're upgrading our servers to user java 1.4.1. We
were previously running 1.3 A few of our web pages loop through collections
I haven't had any of these sorts of problems even when moving struts
app from 1.3 to 1.4 (i generally just follow what apple provide on osx
and then just match it on linux for live servers and such like.
What i can tell you though it that I've used c:set .. in the same way
as you're using
Struters,
I need help from somebody.
I have a formbean that has a vector property, and my jsp has a iterator that
renderizes this:
input type=hidden name=userList[0].id value=1 id=id0
input type=hidden name=userList[0].name value=paul id=name0
input type=hidden name=userList[1].id
Look at ListUtils.lazyList()
http://jakarta.apache.org/commons/collections/api/org/apache/commons/collect
ions/ListUtils.html#lazyList(java.util.List,%20org.apache.commons.collection
s.Factory)
robert
-Original Message-
From: Paulo Rezende [mailto:[EMAIL PROTECTED]
Sent: Monday,
Paulo,
The problem is that Vectors or Arrays are not created and sized for you
automatically. When your form is submitted, the populate() method attempts
to set the Vector element of new element which is beyond the size of your
vector. To fix this problem, you can either size the Vector with empty
A common mistake that people make when trying to design something completely
foolproof is to underestimate the ingenuity of complete fools.
-Douglass Adams
| __ |\\
Well, oddly enough, when I changed:
private List employeeWorkDay= new ArrayList();
to:
private ArrayList employeeWorkDay= new ArrayList();
in my FormBean, it worked. It appears that List was the problem. Very odd.
Thank you!
From: Mark Lowe [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List
I'm very new to struts so please be kindly.
I have two Arraylist call itemList and errorCodeList. The itemList contains list of
Item object. The item object has a property calls errorCode which returns an error
code in int (1-50). I want to display the error description associates to that
please, i got a weird problem with struts. I haven't done anything different from what
i do hundres of times a day: edit something in an Action or FormAction file, change
small things in a jsp...ant build, shutdown, startup...well, no matter what i do, it
has never given me any problem. But
It looks to me like in your admin.jsp file you have something like
logic:empty
logic:redirect
/logic:redirect
/logic:empty
Something is wrong with your redirect tag.. make sure you are giving it the
correct parameters that are required etc... when all else fails use a
debugger and find
Hi,
I am using a custom link tag that extenjds the struts LinkTag.
I am using the custom tag in my jsp in the following way:
dtag:dlink href=dcsi/logoff.do showAlways=trueLogout/dtag:dlink
I have the following entry in my struts-config.xml file:
action path=dcsi/logoff.do
if the link you are looking for is ...
http://10.48.142.7:8988/dcsi/logoff.do
try dropping off the dcsi prefix in the path=dcsi/logoff.do
- Original Message -
From: Duggal, Sanjay [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, January 05, 2004 8:49 AM
Hi all
is it posible to split table with struts or jstl ?
thank's for your opinion
On Tuesday 06 January 2004 12:21, Hari_s wrote:
is it posible to split table with struts or jstl ?
What do you mean by split table - two tables separated at some abitory point
in the data ?
--
Regards,
Derek Clarkson
.O. Analyst/Programmer
..O Waterwerks Pty Ltd
OOO Melbourne, Australia
Struts automatically append the 'CONTEXT' for you in preparing the link
url.
So use it with care. I had this problem before. For example, when the
tile (I'm not sure if you're using tile, but it's my case) belongs to
the root context (), and you want to link to a page in another
context, say
Ok, I suppose this is a direct question to Craig as the maintainer
ofstruts-faces:I'm studying JSF and I need to integrate a Struts
application with it,so I am studying struts-faces too. My problem is
that this applicationuses a custom RequestProcessor that implements the
ProcessingFilterpattern
If you make your Item class returns an Error object, you can avoid the
errorCodeList, something like this:
public class Item {
private int id=0;
private MyError error;
/**
* @return Returns the error.
*/
public MyError getError() {
thank for your response derek...
I mean it's split table into separate page,
i have 100 data and i want display 10 data every pages...
- Original Message -
From: Derek Clarkson [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, January 06, 2004 8:27 AM
Quoting Diego Louzán Martínez [EMAIL PROTECTED]:
Ok, I suppose this is a direct question to Craig as the maintainer
ofstruts-faces:I'm studying JSF and I need to integrate a Struts
application with it,so I am studying struts-faces too. My problem is
that this applicationuses a custom
On Tuesday 06 January 2004 16:50, Hari_s wrote:
I mean it's split table into separate page,
i have 100 data and i want display 10 data every pages...
Ok, kool. I had a similar thing that I wanted to do. I wanted to be able to
determine odd or event numbered rows in a table so I could
Thanks for the reply. I tried this but no luck.
Actually my web form contains some form fields plus a file upload
element. Some thing similar to online resume submission. So I have to
POST method inorder to achieve the result.
-Original Message-
From: Martin Gainty [mailto:[EMAIL
59 matches
Mail list logo