RE: logic iterate

2003-12-01 Thread Naveen S. Kumar
No, in the same page i have to display 

 value1 value2  value3 

for the next 3 values i should display in next row.using logic iterate and only with 
struts not with jstl.
thanks
naveen.

-Original Message-
From: David Friedman [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 12:24 PM
To: Struts Users Mailing List
Subject: RE: logic iterate


Are you talking about pagination?  Show 3 on a page and then skip to the
next page?  Sounds like you want the displaytag taglib.  This examples does
10 items per page: http://www.displaytag.org/example-paging.jsp

Regards,
David

-Original Message-
From: Naveen S. Kumar [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 1:43 AM
To: Struts Users Mailing List
Subject: logic iterate


hi,
how do i break the row according the number of data displayed, i.e i have 3
values in a row after 3 rows i have to go next row for display how can i do
using only struts without scriptlets. any example or link would be great
help for me
thanks
naveen.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: logic iterate

2003-12-01 Thread David Friedman
Are you trying to do this to save space:

value1 value2 value3
value4 value5 value6
value7 value8 value9

Or this to show 3 properties of any one bean at a time:

bean1.value1 bean1.value2 bean1.value3
bean2.value1 bean2.value2 bean2.value3
bean3.value1 bean3.value2 bean3.value3

Regards,
David

-Original Message-
From: Naveen S. Kumar [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 2:02 AM
To: Struts Users Mailing List
Subject: RE: logic iterate


No, in the same page i have to display

 value1 value2  value3 

for the next 3 values i should display in next row.using logic iterate and
only with struts not with jstl.
thanks
naveen.

-Original Message-
From: David Friedman [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 12:24 PM
To: Struts Users Mailing List
Subject: RE: logic iterate


Are you talking about pagination?  Show 3 on a page and then skip to the
next page?  Sounds like you want the displaytag taglib.  This examples does
10 items per page: http://www.displaytag.org/example-paging.jsp

Regards,
David

-Original Message-
From: Naveen S. Kumar [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 1:43 AM
To: Struts Users Mailing List
Subject: logic iterate


hi,
how do i break the row according the number of data displayed, i.e i have 3
values in a row after 3 rows i have to go next row for display how can i do
using only struts without scriptlets. any example or link would be great
help for me
thanks
naveen.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: logic iterate

2003-12-01 Thread Naveen S. Kumar
i mean when i am displaying the value from collection using logic iterate i display 
values in  with 4  for the 5th value i have to go for next  with 4  
value to be displayed.as i showed in last mail
thanks
naveen.

-Original Message-
From: David Friedman [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 12:38 PM
To: Struts Users Mailing List
Subject: RE: logic iterate


Are you trying to do this to save space:

value1 value2 value3
value4 value5 value6
value7 value8 value9

Or this to show 3 properties of any one bean at a time:

bean1.value1 bean1.value2 bean1.value3
bean2.value1 bean2.value2 bean2.value3
bean3.value1 bean3.value2 bean3.value3

Regards,
David

-Original Message-
From: Naveen S. Kumar [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 2:02 AM
To: Struts Users Mailing List
Subject: RE: logic iterate


No, in the same page i have to display

 value1 value2  value3 

for the next 3 values i should display in next row.using logic iterate and
only with struts not with jstl.
thanks
naveen.

-Original Message-
From: David Friedman [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 12:24 PM
To: Struts Users Mailing List
Subject: RE: logic iterate


Are you talking about pagination?  Show 3 on a page and then skip to the
next page?  Sounds like you want the displaytag taglib.  This examples does
10 items per page: http://www.displaytag.org/example-paging.jsp

Regards,
David

-Original Message-
From: Naveen S. Kumar [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 1:43 AM
To: Struts Users Mailing List
Subject: logic iterate


hi,
how do i break the row according the number of data displayed, i.e i have 3
values in a row after 3 rows i have to go next row for display how can i do
using only struts without scriptlets. any example or link would be great
help for me
thanks
naveen.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Links/Articles/Tutorials on DynaValidatorForm ?

2003-12-01 Thread Baljinder Singh
Hi All,

Can anybody provide me with links/tutorials/articles related to
DynaValidatorForm ??

Thanks & Regards,
BS


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Struts Exception Handling

2003-12-01 Thread Baljinder Singh
Is anybody having any comments on exception handling strategies ?? I am
looking for solutions reagarding handling exceptions related to database.

Thanks,
BS

-Original Message-
From: Baljinder Singh
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 26, 2003 11:44 AM
To: Struts Users Mailing List
Subject: RE: Struts Exception Handling


Phil & Mike,

The approach that I am using right now is to make an ExceptionHandler and
configure it in struts-config.xml using something like following:





This way it would catch ALL database related exceptions and throw them. But
the problem goes deep into into handling a specific database exception, for
ex. duplicate key exception during insert operation or child dependency
during delete operation. Now different databases would throw different kind
of errors for these cases. My problem is how to catch these specific SQL
errors and show a user friendly message according to each of them. For ex,
when duplicate key exception is thrown, I want to show a message like
"Duplicate key cannot be inserted" or show a message like "Child record
exists for this key" for a child dependency case. How can I catch particular
error codes or message thrown by the database and show them and STILL KEEP
EVERYTHING GENERIC so that tommorrow if I change my database, I only need to
change the DAOs.

Thanks & Rgds,
BS

-Original Message-
From: Mainguy, Mike [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 26, 2003 2:11 AM
To: 'Struts Users Mailing List'
Subject: RE: Struts Exception Handling


Welll,
  The way I've done this before is to wrap all Exceptions in a Custom type
and throw it all the way back to struts.  This seems to work well for
trivial business style apps, I'm not sure how it would hold up in something
with more complexity in the business layer.  For example, My CRUD code would
catch SQL exceptions, check out what the real problem is, and, if it is a
genuine problem, throw a new FrameWorkException with the proper error
message (or message key) contained in it.

  I would also be curious on how other folks do such things however...


worse is better

-Original Message-
From: Baljinder Singh [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 25, 2003 9:55 AM
To: Struts Users Mailing List
Subject: Struts Exception Handling


Hi All,

I am looking for a robust exception handling approach in struts. Can
somebody help me in that. My framework consists of struts interacting with
session beans which then interact with DB through DAO. Now if during a CRUD
operation, for example there is a duplicate key exception thrown, how should
I handle it so that I can show the user exact message that duplicate key is
being inserted. Same for all kind of database messages and validations.

Thanks & Regards,
BS


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
This message and its contents (to include attachments) are the property of
Kmart Corporation (Kmart) and may contain confidential and proprietary
information. You are hereby notified that any disclosure, copying, or
distribution of this message, or the taking of any action based on
information contained herein is strictly prohibited. Unauthorized use of
information contained herein may subject you to civil and criminal
prosecution and penalties. If you are not the intended recipient, you should
delete this message immediately.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts Exception Handling

2003-12-01 Thread HG
Hi Baljinder

I use one common rule of thumb in regard to exception handling in Struts
applications: "Never throw an exception in action classes, always catch
exceptions in action classes"

At lower layers (Business Delegate, EJB Facade, Data Access Object, etc) I
COULD use exceptions to communicate errors to upper layers (Actions).
I used the above scenario in several projects, but I also did projects where
I never rethrow a catched exception, instead I return some sort of
"errorcode".

Anyone else can share their experience...I saw an article discussing this on
theserverside.com for a while ago...quite good...maybe you should check it
out.

Best regards

Henrik

- Original Message - 
From: "Baljinder Singh" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, December 01, 2003 9:30 AM
Subject: RE: Struts Exception Handling


> Is anybody having any comments on exception handling strategies ?? I am
> looking for solutions reagarding handling exceptions related to database.
>
> Thanks,
> BS
>
> -Original Message-
> From: Baljinder Singh
> [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 26, 2003 11:44 AM
> To: Struts Users Mailing List
> Subject: RE: Struts Exception Handling
>
>
> Phil & Mike,
>
> The approach that I am using right now is to make an ExceptionHandler and
> configure it in struts-config.xml using something like following:
>
> 
>  key="error.exception.SQL"
> handler="com.exception.MyExceptionHandler"
> path="error.jsp" />
> 
>
> This way it would catch ALL database related exceptions and throw them.
But
> the problem goes deep into into handling a specific database exception,
for
> ex. duplicate key exception during insert operation or child dependency
> during delete operation. Now different databases would throw different
kind
> of errors for these cases. My problem is how to catch these specific SQL
> errors and show a user friendly message according to each of them. For ex,
> when duplicate key exception is thrown, I want to show a message like
> "Duplicate key cannot be inserted" or show a message like "Child record
> exists for this key" for a child dependency case. How can I catch
particular
> error codes or message thrown by the database and show them and STILL KEEP
> EVERYTHING GENERIC so that tommorrow if I change my database, I only need
to
> change the DAOs.
>
> Thanks & Rgds,
> BS
>
> -Original Message-
> From: Mainguy, Mike [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 26, 2003 2:11 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Struts Exception Handling
>
>
> Welll,
>   The way I've done this before is to wrap all Exceptions in a Custom type
> and throw it all the way back to struts.  This seems to work well for
> trivial business style apps, I'm not sure how it would hold up in
something
> with more complexity in the business layer.  For example, My CRUD code
would
> catch SQL exceptions, check out what the real problem is, and, if it is a
> genuine problem, throw a new FrameWorkException with the proper error
> message (or message key) contained in it.
>
>   I would also be curious on how other folks do such things however...
>
>
> worse is better
>
> -Original Message-
> From: Baljinder Singh [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 25, 2003 9:55 AM
> To: Struts Users Mailing List
> Subject: Struts Exception Handling
>
>
> Hi All,
>
> I am looking for a robust exception handling approach in struts. Can
> somebody help me in that. My framework consists of struts interacting with
> session beans which then interact with DB through DAO. Now if during a
CRUD
> operation, for example there is a duplicate key exception thrown, how
should
> I handle it so that I can show the user exact message that duplicate key
is
> being inserted. Same for all kind of database messages and validations.
>
> Thanks & Regards,
> BS
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> -
> This message and its contents (to include attachments) are the property of
> Kmart Corporation (Kmart) and may contain confidential and proprietary
> information. You are hereby notified that any disclosure, copying, or
> distribution of this message, or the taking of any action based on
> information contained herein is strictly prohibited. Unauthorized use of
> information contained herein may subject you to civil and criminal
> prosecution and penalties. If you are not the intended recipient, you
should
> delete this message immediately.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail:

Re: Links/Articles/Tutorials on DynaValidatorForm ?

2003-12-01 Thread Andrew Kuzmin
http://javaboutique.internet.com/tutorials/Struts11Val/

http://prdownloads.sourceforge.net/struts/The-Validator-Framework.pdf?downlo
ad


--
Andrew Kuzmin
www.java201.com


- Original Message -
From: "Baljinder Singh" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, December 01, 2003 11:32 AM
Subject: Links/Articles/Tutorials on DynaValidatorForm ?


> Hi All,
>
> Can anybody provide me with links/tutorials/articles related to
> DynaValidatorForm ??
>
> Thanks & Regards,
> BS
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Error 404 - communicating with jsession id between two servers

2003-12-01 Thread Tapan Nanawati
Hi All,
I have a typical problem.
I have iPlanet and Weblogic installed. iPlanet is forwarding request to weblogic.
 
1) From iPlanet server I make a call :-
172.31.235.253 - - [26/Nov/2003:11:26:56 +0900] "GET 
/shvn/dfw/INTEAPP/directDerivatives/BankAdminAuditLog.do HTTP/1.1" 200 14149
This call is forwarded to weblogic and I get the page loaded.
 
2) I have a Run button on the page:-
When I click on Run this is the URL generated in iPlanet server logs (same thing seen 
in the URL):-
172.31.235.253 - - [26/Nov/2003:11:28:19 +0900] "POST 
/shvn/dfw/INTEAPP/directDerivatives/BankAdminAuditLog.do;jsessionid=1EP150JOqJYdAj8YI80z9tx1CgaD3fJtN8oD15pW92rJbPKWIngI!490032195!-1407194149!8080!7002
 HTTP/1.1" 404 1317
 
jsessionid was attached in the URL and this results in 404.
 
The entry in weblogic access log shows this :-
2003-11-26 02:28:20 0.0060 POST 
/directDerivatives/BankAdminAuditLog.do%3bjsessionid%3d1EP150JOqJYdAj8YI80z9tx1CgaD3fJtN8oD15pW92rJbPKWIngI!490032195!-1407194149!8080!7002
 404 1317 172.31.235.215
 
3) NOW I press browser back and refresh the page :
And after this when I press RUN - I get data from weblogic correctly.
 

The URL becomes : -
172.31.235.253 - - [26/Nov/2003:11:29:44 +0900] "GET 
/shvn/dfw/INTEAPP/directDerivatives/BankAdminAuditLog.do HTTP/1.1" 200 14149
 
 
Where is the problem coming: I understand : weblogic must be sending jsessionid when 
the first call is being made: but why is iplanet not able to display it.
 
Please help.
Thanks Very much in Advance.
Tapan


-
Do you Yahoo!?
Free Pop-Up Blocker - Get it now

my version of the Tokens

2003-12-01 Thread Raphaël di Cicco
Hi,

before knowing about tokens, I have implemented a way to deal with the "refresh of a 
POST form" problem. Now that I know that tokens exist, I can't really use them for 
several reasons, but mainly because it adds a field in the  which modifies my 
current form validation with javascript.
Here is what I have done in my ActionBase class, that every Action I use derives from :


protected void setDBFlag(Object o, HttpServletRequest request) {

synchronized(session.getId()){

request.getSession(false).setAttribute(

Parametres.DB_FLAG + o,

Parametres.CHECKBOX_TRUE);

}

}



protected void clearDBFlag(Object o, HttpServletRequest request) {

synchronized(session.getId()){

request.getSession(false).removeAttribute(

Parametres.DB_FLAG + o);

}

}



protected boolean checkDBFlag(Object o, HttpServletRequest request) {

synchronized(session.getId()){

return (

request.getSession(false).getAttribute(

Parametres.DB_FLAG + o)

!= null);

}

}


These methods should be called from the class below this way :

public class MyAction extends ActionBase{

...
protected ActionForward executeUpdate(ActionMapping mapping, ActionForm form, 
HttpServletRequest request, HttpServletResponse response)

throws Exception {

if ("GET".equalsIgnoreCase(request.getMethod())) {

setDBFlag(this, request);

this.processBeforeUpdate(mapping, form, request, response);

return mapping.findForward(EDIT);

} 

else {

HttpSession session = request.getSession(false);

ListResultCsv resultats =

(ListResultCsv) (session.getAttribute(attTable));

if(checkDBFlag(this, request)){

//update DB

processUpdate(...,form);

updateBeanConteneur();

clearDBFlag(this,request);

}}

}

.



}//end of class

As you can see I'm putting a flag on the session. This flag name is actually function 
of the name of the Action instance itself (this). 

The idea is to put the flag to true while preparing the form, then when the form is 
submitted, I check if the flag is true then I do the updates and set the flag to 
false. So when a user presses refresh, the form is not submitted 2 times.
The problem with this solution is that I must use the same Action to prepare and 
submit the Form, but it's the case most of the times.
I was wondering if the solution I chose looks OK in a multi-user application. I know 
that each user has its own Action instance, so it should not be a problem, but at the 
same time, looking at Struts' implementation of the tokens which is more complicated, 
I think there might be some issues with my approach.

Thanks in advance for the feedback!


Raphaël di Cicco


Using map backed forms beans

2003-12-01 Thread Antony Paul
Hi,
When I use an ActionForm which have a HashMap to store values as
specified in chapter 4 of the users guide, the name of the text field is not
properly displayed. My code is given below.

ActionForm

private Map map = new HashMap();
 public void setMap(String key,Object value){
  map.put(key,value);
 }
 public Object getMap(String key){
  return map.get(key);
 }

in JSP i use this coding.



When it is displayed on browser the name is displayed as map(name). I want
it to be just name. (It is simple example. I need dynamic generation) How to
do it.

Antony Paul.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Drop-down-list

2003-12-01 Thread Gede Indrawan
Hi all,

In case I have 2 drop-down-lists and the second drop-down-list content
changed automatically if we select certain item at the first one,
how can I do it in the struts world? Any references to this case? Any code
example?

I am totally blind to this case..

best regards
-GI.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Drop-down-list

2003-12-01 Thread Firat TIRYAKI
You can directly do it using javascript, refer to the below URL for a
detailed example

http://www.jguru.com/faq/view.jsp?EID=923880

F.

- Original Message - 
From: "Gede Indrawan" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, December 01, 2003 12:39 PM
Subject: Drop-down-list


> Hi all,
>
> In case I have 2 drop-down-lists and the second drop-down-list content
> changed automatically if we select certain item at the first one,
> how can I do it in the struts world? Any references to this case? Any code
> example?
>
> I am totally blind to this case..
>
> best regards
> -GI.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Setting browser download dialogue box captions and suggesting file names

2003-12-01 Thread Mike Parfitt
My application has form containing a table with hyperlinks in one column.

When a user clicks on one, a request is made to the server passing in the ID of the 
chosen file (Microsoft Word) to be downloaded.

The file is then downloaded to the user's browser (Internet Explorer - V5) but I 
cannot find how to influence the caption/contents of the various dialogue boxes, even 
though I tried a method suggested in a posting to this list dated 2001.

The essential logic in the DownLoadAction.java file is the following :-

OutputStream os = null;

HttpSession session = request.getSession();
ComponentManager cm = 
(ComponentManager)session.getAttribute(CitadelKeys.COMPONENT_MANAGER);
IDownloadBD IDownloadBD = cm.getDownloadBD(session);

BigInteger rgmtMfst = new BigInteger(request.getParameter("fileID"));  
 

response.setContentType("application/msword"); 
response.setHeader("Content-Disposition", "attachment; 
filename=Portfolio_Document.doc");
response.addHeader("Content-Description", "Portfolio Report Download");

String AcceptEncoding = request.getHeader("Accept-Encoding");

if ((AcceptEncoding != null) && (AcceptEncoding.indexOf("gzip") != -1))
{
os = new GZIPOutputStream(response.getOutputStream());
if (response.containsHeader("Content-Encoding")) { 
response.setHeader("Content-Encoding", "gzip"); }
else { response.addHeader("Content-Encoding", "gzip"); }
}
else { os = response.getOutputStream(); }

//download the file via the BD...
IDownloadBD.downloadFile(os, rgmtMfst);

ActionMessages webClientMessages = new ActionMessages();
webClientMessages.add("portfolio", new 
ActionMessage("portfolio.report.download.completed"));
saveMessages(request, webClientMessages);

os.flush();
os.close();

But the target filename suggested by the Content-Disposition header gets replaced by 
download.doc somewhere and the Content-Description header does nothing (as far as I 
can tell).

I have tried response.setContentType("application/x-download"); and the only 
difference is that the suggested filename changes to "download" instead of being 
"download.doc"

On the Content-Disposition header, in addition to the one shown above, I have tried 
others :-

"attachment; filename=\"C:\\Portfolio_Document.doc\";"
"attachment; filename=\"Portfolio_Document.doc\";"
"attachment; filename=\"Portfolio_Document.doc\""

and none of them have any effect either.

Searching the web reveals Internet Explorer and Opera as known culprits for bad 
compliance with the relevant Internet protocols, so has anyone found a way to :-
suggest a target filename
create meaningful dialogue captions
When the Client browser is Internet Explorer V5 ?

Is there some "helpful" facility in IE5 that I need to turn off (or on) ?
Is my code inherently wrong ?

All solutions gratefully received ...

Regards.

Mike 
 
 
Mike Parfitt 
Developer 
JMH Demica Ltd 
Crowne House,
56-58 Southwark Street 
London 
SE1 1UN 

 
 
 
Direct:  +44 (0) 20 7450 2539 
Switchboard: +44 (0) 20 7450 2500 
Fax: +44 (0) 20 7407 5825 
Web: http://www.jmhdemica.com 
 
 
 
This document should only be read by those persons to whom it is 
addressed and is not intended to be relied upon by any person 
without subsequent written confirmation of its contents. JMH 
Demica accepts no liability for the consequences for any person 
acting, or refraining from acting, on such information prior to 
the receipt by those persons of subsequent written confirmation 
(by letter or fax). If you have received this email message in 
error, please notify the sender immediately by telephone. Please 
also delete the message from your computer. Any form of 
reproduction, dissemination, copying, disclosure, modification, 
distribution and/or publication of this email message is 
prohibited. The contents of this email message do not 
necessarily reflect the opinions of JMH Demica. Citadel is the 
registered trademark of JMH Demica. Copyright JMH Demica all 
rights reserved. 

 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[ANNOUNCE] Struts Menu 2.0 Released!

2003-12-01 Thread Matt Raible
This release is a significant refactoring of the 1.x codebase.  The
source 
and site is now built using Maven.  Menus can now be defined using
Velocity 
templates and support has been added for looking up dynamic values.
This 
means that if you have ${variableName} in your menu-config.xml (in a
link), 
the tag library will look in all scopes for a variable with the name 
"variableName".  The example app has been updated to improve
documentation.

IMO, the Velocity templates is huge because it means "if it's possible
with 
HTML" - it's possible with Struts Menu.

Changes (http://struts-menu.sourceforge.net/changes-report.html):

- Renamed package structure to net.sf.navigator.
- Added support for using Struts' actions and forwards for links in 
  menu-config.xml.  
- Added support for using dynamic variables in menu-config.xml. 
- Updated build process to use Maven for building/deploying.
- Refactored to use Velocity and allow dynamic variable substitution.

Read the nitty-gritty details about the Velocity enhancements at 
http://raibledesigns.com/wiki/Wiki.jsp?page=StrutsMenu.

Demo: http://raibledesigns.com/struts-menu
Download: http://tinyurl.com/x6p9

Enjoy!

Matt



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: recursive tiles

2003-12-01 Thread Adam Hardy
Hi Felipe,
not quite sure exactly what you want to do - where do you expect 
subbody1 & subbody2 to come from? If you are defining them in your 
tiles-defs.xml then you need to pass them as variables explicitly to 
'body' in your maintemplate:


  

HTH
Adam
On 12/01/2003 06:41 AM Felipe Nascimento wrote:
Hi,

I have the following definition in my tiles-defs.xml:

   
   
   
   
   


   

In mainTemplate.jsp I have:



What I want is to put more variable content in my foo.jsp, the same way I
put in mainTemplate.jsp
something like
foo.jsp:




--
struts 1.1 + tomcat 5.0.14 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: my version of the Tokens

2003-12-01 Thread Adam Hardy
Hi Raphaël
what happens if the user has two browser windows open for two different 
datasets which use the same action? He will be prevented from submitting 
the second one.

Adam

On 12/01/2003 11:30 AM Raphaël di Cicco wrote:
Hi,

before knowing about tokens, I have implemented a way to deal with the "refresh of a POST 
form" problem. Now that I know that tokens exist, I can't really use them for several reasons, 
but mainly because it adds a field in the  which modifies my current form validation with 
javascript.
Here is what I have done in my ActionBase class, that every Action I use derives from :
protected void setDBFlag(Object o, HttpServletRequest request) {

synchronized(session.getId()){

request.getSession(false).setAttribute(

Parametres.DB_FLAG + o,

Parametres.CHECKBOX_TRUE);

}

}



protected void clearDBFlag(Object o, HttpServletRequest request) {

synchronized(session.getId()){

request.getSession(false).removeAttribute(

Parametres.DB_FLAG + o);

}

}



protected boolean checkDBFlag(Object o, HttpServletRequest request) {

synchronized(session.getId()){

return (

request.getSession(false).getAttribute(

Parametres.DB_FLAG + o)

!= null);

}

}

These methods should be called from the class below this way :

public class MyAction extends ActionBase{

...
protected ActionForward executeUpdate(ActionMapping mapping, ActionForm form, 
HttpServletRequest request, HttpServletResponse response)
throws Exception {

if ("GET".equalsIgnoreCase(request.getMethod())) {

setDBFlag(this, request);

this.processBeforeUpdate(mapping, form, request, response);

return mapping.findForward(EDIT);

} 

else {

HttpSession session = request.getSession(false);

ListResultCsv resultats =

(ListResultCsv) (session.getAttribute(attTable));

if(checkDBFlag(this, request)){

//update DB

processUpdate(...,form);

updateBeanConteneur();

clearDBFlag(this,request);

}}

}

.



}//end of class

As you can see I'm putting a flag on the session. This flag name is actually function of the name of the Action instance itself (this). 

The idea is to put the flag to true while preparing the form, then when the form is 
submitted, I check if the flag is true then I do the updates and set the flag to 
false. So when a user presses refresh, the form is not submitted 2 times.
The problem with this solution is that I must use the same Action to prepare and 
submit the Form, but it's the case most of the times.
I was wondering if the solution I chose looks OK in a multi-user application. I know 
that each user has its own Action instance, so it should not be a problem, but at the 
same time, looking at Struts' implementation of the tokens which is more complicated, 
I think there might be some issues with my approach.
Thanks in advance for the feedback!


Raphaël di Cicco


--
struts 1.1 + tomcat 5.0.14 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


redirecting insead of forward.

2003-12-01 Thread Antony Paul
Hi,
Is it possible to tell the controller that redirect to next page instead
of forwarding.

Antony Paul.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: redirecting insead of forward.

2003-12-01 Thread Kalra, Ashwani
its redirect(true or false) attribute in actionforward tag


>-Original Message-
>From: Antony Paul [mailto:[EMAIL PROTECTED]
>Sent: Monday, December 01, 2003 5:41 PM
>To: struts
>Subject: redirecting insead of forward.
>
>
>Hi,
>Is it possible to tell the controller that redirect to 
>next page instead
>of forwarding.
>
>Antony Paul.
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>


This message contains information that may be privileged or confidential and
is the property of the Cap Gemini Ernst & Young Group. It is intended only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all copies
of this message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



forward vs redirect ?

2003-12-01 Thread Antony Paul
Hi,
I would like to receive comments on when to use forward and redirect in
action mapping. Do people use forward only. All the articles and examples I
saw uses forward.

Antony Paul.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: my version of the Tokens

2003-12-01 Thread Raphaël di Cicco
Thanks Adam for your comment.
Yes you're right... but in my application every new window I open is indexed
with a windowId.
In fact, every session attribute name is built using this windowId, so that
session objects don't mix between pages. The flag itself uses the windowId
this way, but I didn't put it in the code (something like
request.getSession(false).setAttribute(Parametres.DB_FLAG + o +
getWindowId(request), Parametres.CHECKBOX_TRUE);

Nonetheless, the problem you found will happen if the user decides to open a
new window by himself because the new window will have the same windowId as
the previous one :(


- Original Message - 
From: "Adam Hardy" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, December 01, 2003 12:44 PM
Subject: Re: my version of the Tokens


> Hi Raphaël
> what happens if the user has two browser windows open for two different
> datasets which use the same action? He will be prevented from submitting
> the second one.
>
> Adam
>
> On 12/01/2003 11:30 AM Raphaël di Cicco wrote:
> > Hi,
> >
> > before knowing about tokens, I have implemented a way to deal with the
"refresh of a POST form" problem. Now that I know that tokens exist, I can't
really use them for several reasons, but mainly because it adds a field in
the  which modifies my current form validation with javascript.
> > Here is what I have done in my ActionBase class, that every Action I use
derives from :
> >
> >
> > protected void setDBFlag(Object o, HttpServletRequest request) {
> >
> > synchronized(session.getId()){
> >
> > request.getSession(false).setAttribute(
> >
> > Parametres.DB_FLAG + o,
> >
> > Parametres.CHECKBOX_TRUE);
> >
> > }
> >
> > }
> >
> >
> >
> > protected void clearDBFlag(Object o, HttpServletRequest request) {
> >
> > synchronized(session.getId()){
> >
> > request.getSession(false).removeAttribute(
> >
> > Parametres.DB_FLAG + o);
> >
> > }
> >
> > }
> >
> >
> >
> > protected boolean checkDBFlag(Object o, HttpServletRequest request) {
> >
> > synchronized(session.getId()){
> >
> > return (
> >
> > request.getSession(false).getAttribute(
> >
> > Parametres.DB_FLAG + o)
> >
> > != null);
> >
> > }
> >
> > }
> >
> >
> > These methods should be called from the class below this way :
> >
> > public class MyAction extends ActionBase{
> > 
> > ...
> > protected ActionForward executeUpdate(ActionMapping mapping, ActionForm
form, HttpServletRequest request, HttpServletResponse response)
> >
> > throws Exception {
> >
> > if ("GET".equalsIgnoreCase(request.getMethod())) {
> >
> > setDBFlag(this, request);
> >
> > this.processBeforeUpdate(mapping, form, request, response);
> >
> > return mapping.findForward(EDIT);
> >
> > }
> >
> > else {
> >
> > HttpSession session = request.getSession(false);
> >
> > ListResultCsv resultats =
> >
> > (ListResultCsv) (session.getAttribute(attTable));
> >
> > if(checkDBFlag(this, request)){
> >
> > //update DB
> >
> > processUpdate(...,form);
> >
> > updateBeanConteneur();
> >
> > clearDBFlag(this,request);
> >
> > }}
> >
> > }
> >
> > .
> >
> >
> >
> > }//end of class
> >
> > As you can see I'm putting a flag on the session. This flag name is
actually function of the name of the Action instance itself (this).
> >
> > The idea is to put the flag to true while preparing the form, then when
the form is submitted, I check if the flag is true then I do the updates and
set the flag to false. So when a user presses refresh, the form is not
submitted 2 times.
> > The problem with this solution is that I must use the same Action to
prepare and submit the Form, but it's the case most of the times.
> > I was wondering if the solution I chose looks OK in a multi-user
application. I know that each user has its own Action instance, so it should
not be a problem, but at the same time, looking at Struts' implementation of
the tokens which is more complicated, I think there might be some issues
with my approach.
> >
> > Thanks in advance for the feedback!
> >
> > 
> > Raphaël di Cicco
> >
>
>
> -- 
> struts 1.1 + tomcat 5.0.14 + java 1.4.2
> Linux 2.4.20 RH9
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Check for required when using validator

2003-12-01 Thread Arne Brutschy
Hello,

is there any possibility to check from an jsp page (or custom tag) for
the requiredness of a property? I'm using the validator. When I
specify the property as "required" in the validator.xml, I want to
display a small red star behind the input field on the page. Is his
possible to to this from am jsp page or my custom tag?

Regards,
Arne


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Using map backed forms beans

2003-12-01 Thread Raphaël di Cicco
I think you can't...
if you want to display name, then you need to have a getName() and setName()

- Original Message - 
From: "Antony Paul" <[EMAIL PROTECTED]>
To: "struts" <[EMAIL PROTECTED]>
Sent: Monday, December 01, 2003 11:36 AM
Subject: Using map backed forms beans


> Hi,
> When I use an ActionForm which have a HashMap to store values as
> specified in chapter 4 of the users guide, the name of the text field is
not
> properly displayed. My code is given below.
>
> ActionForm
>
> private Map map = new HashMap();
>  public void setMap(String key,Object value){
>   map.put(key,value);
>  }
>  public Object getMap(String key){
>   return map.get(key);
>  }
>
> in JSP i use this coding.
>
> 
>
> When it is displayed on browser the name is displayed as map(name). I want
> it to be just name. (It is simple example. I need dynamic generation) How
to
> do it.
>
> Antony Paul.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Textarea validation, using validator and mask

2003-12-01 Thread Arne Brutschy
Hello,

I'm trying to use the validator with a regexp mask on an textarea field. 
 There are two problems:

1) even if the regexp allows empty strings and the field is not
   required, the validator reports that the field is invalid. same
   mask works for a simple text input.
2) I'm trying to use the regexp on every line of the textarea, ie:
   Alternate EMail Addresses
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]
   Every line should evaluated by the email target of the validator. But
   this doesn't work. Even empty string don't work.
Anyone noticed this/has a solution? I'm going to try to understand this 
javascipt code in the mask target now, perhaps I can fix it.

Regards,
Arne
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: forward vs redirect ?

2003-12-01 Thread Claire Wall
Hi Antony,

As a rule i always use just forward unless there is a specific need to
redirect to the page you're forwarding to.

For example, say i had an action which saved some details from a form to a
database. if the page is not redirected then if the user were to refresh the
page, the action would be called again and the data saved again. This
obviously i would not want the user to do so in this case i redirect the
page, so that if the user were to refresh the page, the save action would
not be called again.

The times when I would advise against using redirecting is when you're
storing objects on the request object in your action. If you redirect then
this information is lost. There are ways around this (like putting the
objects on the session rather than on the request object) but i try to cut
down on the amount of information being stored in the session.

There are probably some better defined uses of the redirect attribute and
when/where to use it, but the above is the general rules i go by, having run
into problems with both redirecting and not redirecting in the past.

hope this helps

Claire


- Original Message -
From: "Antony Paul" <[EMAIL PROTECTED]>
To: "struts" <[EMAIL PROTECTED]>
Sent: Monday, December 01, 2003 1:28 PM
Subject: forward vs redirect ?


> Hi,
> I would like to receive comments on when to use forward and redirect
in
> action mapping. Do people use forward only. All the articles and examples
I
> saw uses forward.
>
> Antony Paul.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



dynamic reloading of struts-config and classes for Struts 1.1 and JPlates 3.0 - 99%

2003-12-01 Thread Dan Jacobs
Hi all,

I have implemented a scheme for dynamically reloading classes and struts 
configuration files for JPlates 3.0.1 and Struts 1.1, and welcome anyone 
interested to try it out.  Everything you need is in the JPlates trial 
download at http://www.jplates.com, and the config setup is described in 
the examples on the site and in the Java-doc.  The scheme is designed to 
work even if you don't use JPlates.

As indicated in the subject line, this is only a 99% solution so far, 
even if you don't do anything in your code to thwart the strategy 
(things to avoid are enumerated in the Java-doc).  Here's how it works.

1.  There's a subclass of ActionServlet that uses a class-loader-manager 
to watch for changes in the WEB-INF directory tree of the 
web-application.  It only looks for changes when it responds to the 
first request of a new session (that's both for performance reasons and 
to avoid class-loader collisions within a session).  You can override 
the out-of-date checking behavior by providing your own FileFilter in a 
subclass.

2.  The class-loader takes over loading classes and other resources from 
the WEB-INF/classes directory.  It does not do anything with jar files 
in the WEB-INF/lib directory, since in most cases those files are kept 
open for direct file access.

3.  When changes are detected and a new class-loader is constructed, the 
ActionServlet subclass re-initializes itself, re-loading the 
configuration XML files, etc.  This isn't a very straightforward thing 
to do, and there's probably code in there that's completely Struts-1.1 
specific.

This scheme has been fairly well tested, but only under Tomcat 4.x and 
5.0, and not in a production multi-client environment.

PLEASE NOTE:
I have noticed one peculiar problem that I haven't been able to track 
down.  If you modify classes in the WEB-INF/classes directory and start 
a new session, the changes take effect immediately.  But if you modify 
your struts-config.xml file and start a new session, those changes are 
not seen the first time.  If you touch the file again and start another 
session, the changes are then seen.  In fact, every even numbered change 
to the struts-config file works properly.  If anyone has any insights 
about that, I'd be very interested.  I've seen similar behavior using 
custom class-loaders with Tomcat, but don't know what causes it.

I expected that some J2EE containers will put up a fuss about this 
ActionServlet subclass creating new class-loaders.  You'll have to grant 
permissions in that case.  I also anticipate class-loader collisions 
with multiple concurrent sessions, and I'm working on a design to 
address that problem.

Please try this out.  I've already found it to be a great time-saver, 
despite its current limitations, and I'd like to make it even more 
useful based on your feedback.

All the best,
Dan Jacobs
President, JPlates Inc.


Re: forward vs redirect ?

2003-12-01 Thread Antony Paul
Thank u for the reply. I followed the same pattern in another non struts
based application. But on reading the struts users guide and articles and
going through the sample sapplication, I found that nobody is mentioning
about redirect and the problem with refresh. So I gott confused whether
there are other ways available.  The sample application is throwing an
exception, when the page displayed adding new subscriptions is refreshed.

Antony Paul

- Original Message -
From: "Claire Wall" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, December 01, 2003 7:29 PM
Subject: Re: forward vs redirect ?


> Hi Antony,
>
> As a rule i always use just forward unless there is a specific need to
> redirect to the page you're forwarding to.
>
> For example, say i had an action which saved some details from a form to a
> database. if the page is not redirected then if the user were to refresh
the
> page, the action would be called again and the data saved again. This
> obviously i would not want the user to do so in this case i redirect the
> page, so that if the user were to refresh the page, the save action would
> not be called again.
>
> The times when I would advise against using redirecting is when you're
> storing objects on the request object in your action. If you redirect then
> this information is lost. There are ways around this (like putting the
> objects on the session rather than on the request object) but i try to cut
> down on the amount of information being stored in the session.
>
> There are probably some better defined uses of the redirect attribute and
> when/where to use it, but the above is the general rules i go by, having
run
> into problems with both redirecting and not redirecting in the past.
>
> hope this helps
>
> Claire
>
>
> - Original Message -
> From: "Antony Paul" <[EMAIL PROTECTED]>
> To: "struts" <[EMAIL PROTECTED]>
> Sent: Monday, December 01, 2003 1:28 PM
> Subject: forward vs redirect ?
>
>
> > Hi,
> > I would like to receive comments on when to use forward and redirect
> in
> > action mapping. Do people use forward only. All the articles and
examples
> I
> > saw uses forward.
> >
> > Antony Paul.
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problem with Struts 1.1, Tomcat 4.1, SingleSignOn

2003-12-01 Thread Kevin A. Palfreyman
I have a problem using SingleSignOn with a Struts 1.1 app in Tomcat 4.1
(tried 24 & 29).

I have Tomcat set up with the SingleSignOn valve, and a number of web
apps (5) all using FORM based authentication.  The single sign-on seems
to be working fine for 4 out of the 5, but I have a problem with the
sessions in the 5th app.

The problem is that although at first glance the SSO appears to work, in
reality this single app is creating a separate new session for the user
on top of the one they already have.  This causes a problem upon logout,
because the common session is invalidated, but the one that is specific
to the struts app remains valid.  This means that if the user then
navigates directly to the struts application they are still logged in.
This is a Bad Thing.

In an attempt to trace this issue, I set up an HttpSessionListener in
the offending application and dumped the stack in the sessionCreated()
method.  It appears that a new session is created during processing of
the struts RequestProcessor.processLocale() method.  The JavaDoc warns
that this may happen if a session does not exist, but in my case a valid
session must already exist since I have used SSO to login in a different
app (and watched a session being created there using another listener)!

I'm confused.  Why does this one single application not see the existing
session?
Have I missed some silly config?  Is it a bug?

Thanks in advance,

Kev

---
Kev Palfreyman  
Cambridge, UK



Re: forward vs redirect ?

2003-12-01 Thread Hubert Rabago
Anthony,

I use redirect to separate actions which do work and actions which display
information.
Let's say I have 2 pages/Action objects:  DisplayItem, ProcessBid.
The user sees an item he likes (say displayItem.do?id=123) and enters a bid.  The
bid will get submitted to processBid.do.  Once ProcessBid is finished, it will
redirect to displayItem.do?id=123 which will show the item and (at this point)
the updated bid amount.  

The advantages are these:
* My "process" action (and any other action which does processing) doesn't need
to chain the display action.
* The user can refresh the resulting page without me having to worry about any
form getting processed twice. (this is a real ebay problem, by the way, and kinda
sucks when you're entering a bid at the last minute and need up-to-the-second
updates)
* The url of the resulting page is preserved, allowing the user to bookmark it or
forward it if he so desired.  (Not too helpful for the auction example, but think
about "New Record" processing where you show a page which displays a newly
entered record.)

HTH,

Hubert

--- Antony Paul <[EMAIL PROTECTED]> wrote:
> Hi,
> I would like to receive comments on when to use forward and redirect in
> action mapping. Do people use forward only. All the articles and examples I
> saw uses forward.
> 
> Antony Paul.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Question regarding ActionForms.

2003-12-01 Thread EXCELSIS - Sepand Oboudiyat
Hi,

I am currently using Struts 1.0.2 and have notice something with regard to
handling of ActionForms.

Why is it, that in the "perform()" method of my Action I am able to modify
the passed-in ActionForm and all modifications that I make to the
ActionForm in my Action have effect on the ActionForm in the session,
without the need to reset the modified form in the session. e.g.

public ActionForward peform(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response,
)throws IOException, ServletException

{
  MyForm myForm = (MyForm)form;

  form.setMemberA("valA");
  form.setMemberB("valB");

  // why dont I have to do the following: session.setAttribute
("myFormName", myForm);

  return "success";

}

I thought that since Java passes method arguments by value and not by
reference, then I would have to reset my modifed copy back into the session
for changes on the form to be visible in the form in the session ?

Any insights on how this mechanism works would be greatly appreciated.

Thanks,

Sepand



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] MVC Framework

2003-12-01 Thread Christian . Nedregard

Er...

Swing *is* a MVC framework...

..but maybe you'll find what you are looking for here:
http://www.d-haven.org/guiapp/

CHR



> -Original Message-
> From: AnilA [mailto:[EMAIL PROTECTED]
> Sent: 27. november 2003 14:41
> To: Struts Users Mailing List
> Subject: [OT] MVC Framework
> 
> 
> Hi All,
> 
> I have been using servlets since Jserv days and did AWT based stand 
> alone java application few years ago.  The question is:
> 
> is there any MVC framework for Swing [ Struts for web applications]??
> or
> Swing is good as is?
> 
> thanks you in advance for replies...
> 
> .anil
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Question regarding ActionForms.

2003-12-01 Thread Larry Meadors
Welcome to java 101, formerly known as the struts-users mailing list.

Object references are passed to method calls. While that reference
cannot be changed, the object that it references can. On the other hand,
if you create a new action form and assign it to the "form" parameter,
nothing will happen because that reference cannot be changed.

Larry

>>> [EMAIL PROTECTED] 12/01/03 8:42 AM >>>
Hi,

I am currently using Struts 1.0.2 and have notice something with regard
to
handling of ActionForms.

Why is it, that in the "perform()" method of my Action I am able to
modify
the passed-in ActionForm and all modifications that I make to the
ActionForm in my Action have effect on the ActionForm in the session,
without the need to reset the modified form in the session. e.g.

public ActionForward peform(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response,
)throws IOException, ServletException

{
  MyForm myForm = (MyForm)form;

  form.setMemberA("valA");
  form.setMemberB("valB");

  // why dont I have to do the following: session.setAttribute
("myFormName", myForm);

  return "success";

}

I thought that since Java passes method arguments by value and not by
reference, then I would have to reset my modifed copy back into the
session
for changes on the form to be visible in the form in the session ?

Any insights on how this mechanism works would be greatly appreciated.

Thanks,

Sepand



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Assigning a single struts action to a Weblogic 6.1 SP5 ExecuteQueue

2003-12-01 Thread Kris Schneider
Don't think so. Assignment to an execute queue is done through a servlet init
parameter like so:


  ...
  
wl-dispatch-policy
QueueName
  


Which means that you could assign the Struts ActionServlet to an execute queue,
but not a subset of its actions. If you really need some piece of code to run
within a different execute queue, you'll probably need to code up a separate
servlet. Of course, the usual cautions about coding to a specific container and
its feature set apply...

Quoting "Giangregorio, Paul" <[EMAIL PROTECTED]>:

> 
> Is it possible to assign a struts action (one action within the
> struts-config.xml file) to a specific ExecuteQueue within Weblogic? My
> application is currently being serviced by the *default* queue - i.e. all of
> the struts actions are serviced by the default queue. I have particular
> action that I want serviced by a different queue.
> 
> Many thanks.

-- 
Kris Schneider 
D.O.Tech   

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Question regarding ActionForms.

2003-12-01 Thread Geeta Ramani
Sepand:

google under "java pass by reference vs. pass by value" and look at the very
first result.  It contains a real nice discussion about this..

Geeta

EXCELSIS - Sepand Oboudiyat wrote:

> Hi,
>
> I am currently using Struts 1.0.2 and have notice something with regard to
> handling of ActionForms.
>
> Why is it, that in the "perform()" method of my Action I am able to modify
> the passed-in ActionForm and all modifications that I make to the
> ActionForm in my Action have effect on the ActionForm in the session,
> without the need to reset the modified form in the session. e.g.
>
> public ActionForward peform(ActionMapping mapping,
> ActionForm form,
> HttpServletRequest request,
> HttpServletResponse response,
> )throws IOException, ServletException
>
> {
>   MyForm myForm = (MyForm)form;
>
>   form.setMemberA("valA");
>   form.setMemberB("valB");
>
>   // why dont I have to do the following: session.setAttribute
> ("myFormName", myForm);
>
>   return "success";
>
> }
>
> I thought that since Java passes method arguments by value and not by
> reference, then I would have to reset my modifed copy back into the session
> for changes on the form to be visible in the form in the session ?
>
> Any insights on how this mechanism works would be greatly appreciated.
>
> Thanks,
>
> Sepand
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: forward vs redirect ?

2003-12-01 Thread Caroline Lauferon
> For example, say i had an action which saved some details from a form to a
> database. if the page is not redirected then if the user were to refresh
the
> page, the action would be called again and the data saved again. This
> obviously i would not want the user to do so in this case i redirect the
> page, so that if the user were to refresh the page, the save action would
> not be called again.

I'm not sure I understand what you mean. The case you describe is very close
to mine, and so I would like to prevent the user from making twice the
addition on refresh:
I've got one first form, Form1, which calls Action1:




but once the user is on page2, if he makes a refresh, action1 is called
again and the data added by action1 is added once more

What didn't I understand?
Thanks
Caroline


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Question regarding ActionForms.

2003-12-01 Thread Mainguy, Mike
Welll,
  Common misconception, but, technically all java calls are "by value".
That is, there is no such thing in java as passing something "by reference".
The hook is, the value passed in when something is an Object is actually a
reference (aka a pointer) to the existing object.  
While you can manipulate the thing that this points to, you cannot reassign
it point to something else.  I got all bunged up about this also and I think
it's a pretty important point that can easily be missed if you came into
java from another language that allows "by reference" calls.

By saying that objects are passed "by reference" folks are actually making
things more complicated than they need to be...  For a really good
explanation see http://www.yoda.arachsys.com/java/passing.html



worse is better 

-Original Message-
From: Larry Meadors [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 01, 2003 10:52 AM
To: [EMAIL PROTECTED]
Subject: Re: Question regarding ActionForms.


Welcome to java 101, formerly known as the struts-users mailing list.

Object references are passed to method calls. While that reference cannot be
changed, the object that it references can. On the other hand, if you create
a new action form and assign it to the "form" parameter, nothing will happen
because that reference cannot be changed.

Larry

>>> [EMAIL PROTECTED] 12/01/03 8:42 AM >>>
Hi,

I am currently using Struts 1.0.2 and have notice something with regard to
handling of ActionForms.

Why is it, that in the "perform()" method of my Action I am able to modify
the passed-in ActionForm and all modifications that I make to the ActionForm
in my Action have effect on the ActionForm in the session, without the need
to reset the modified form in the session. e.g.

public ActionForward peform(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response,
)throws IOException, ServletException

{
  MyForm myForm = (MyForm)form;

  form.setMemberA("valA");
  form.setMemberB("valB");

  // why dont I have to do the following: session.setAttribute
("myFormName", myForm);

  return "success";

}

I thought that since Java passes method arguments by value and not by
reference, then I would have to reset my modifed copy back into the session
for changes on the form to be visible in the form in the session ?

Any insights on how this mechanism works would be greatly appreciated.

Thanks,

Sepand



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
This message and its contents (to include attachments) are the property of Kmart 
Corporation (Kmart) and may contain confidential and proprietary information. You are 
hereby notified that any disclosure, copying, or distribution of this message, or the 
taking of any action based on information contained herein is strictly prohibited. 
Unauthorized use of information contained herein may subject you to civil and criminal 
prosecution and penalties. If you are not the intended recipient, you should delete 
this message immediately.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Dealing with submodules in a Tiles application - 2 issues

2003-12-01 Thread Aidan O'Loan
I'm migrating an application to Tiles. In my main struts-config.xml, I 
have the following forward defined to switch into a submodule:



This Forward is referenced in a menu.jsp tile which is recreated in ALL 
submodule tiles layouts. It works fine when I am working within the 
default module, but when I enter a submodule, and the menu.jsp tile is 
recreated, I get the following error:

[ServletException in:/menu.jsp] Cannot create rewrite URL: 
java.net.MalformedURLException: Cannot retrieve ActionForward named 
toNewsManager'

So I understand that this is because the Servlet is looking in my 
submodule Struts configuration file for the Forward, when in fact it is 
declared in the main struts-config.xml file. So what's the solution? Do I 
have to recreate all the relevant forwards in every submodule's Struts 
configuration files?

Another issue I have is with  links in submodule 
JSP's - for example:

View

These links have stopped working since I have migrated to tiles. Do I now 
need to hard-code the submodule so that the link now looks like:

View

or is there another solution?



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: forward vs redirect ?

2003-12-01 Thread Claire Wall
caroline,

when the user gets to page2, what is the url displayed in the address box?
is it the action or the jsp page?


claire

- Original Message -
From: "Caroline Lauferon" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, December 01, 2003 4:04 PM
Subject: Re: forward vs redirect ?


> > For example, say i had an action which saved some details from a form to
a
> > database. if the page is not redirected then if the user were to refresh
> the
> > page, the action would be called again and the data saved again. This
> > obviously i would not want the user to do so in this case i redirect the
> > page, so that if the user were to refresh the page, the save action
would
> > not be called again.
>
> I'm not sure I understand what you mean. The case you describe is very
close
> to mine, and so I would like to prevent the user from making twice the
> addition on refresh:
> I've got one first form, Form1, which calls Action1:
>  input="/form1.jsp">
> 
> 
>
> but once the user is on page2, if he makes a refresh, action1 is called
> again and the data added by action1 is added once more
>
> What didn't I understand?
> Thanks
> Caroline
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: forward vs redirect ?

2003-12-01 Thread Hubert Rabago
Hi Caroline,

I sent you a struts war file ready to deploy.  It includes all source files. 
Call up the displayItem.do, enter a bid amount, submit the form, then refresh on
the resulting page.  Both action objects do a System.out.println when they're
called.  When you refresh the page after submitting the bid, you'll see that
displayItem.do is the only one being called, and that the address bar will show
the displayItem.do URL.
I ran this in Tomcat 4.1.x.
Please reply to this mailing list so others can help if there are issues.

Here's the mappings:









Hubert

--- Caroline Lauferon <[EMAIL PROTECTED]> wrote:
> > For example, say i had an action which saved some details from a form to a
> > database. if the page is not redirected then if the user were to refresh
> the
> > page, the action would be called again and the data saved again. This
> > obviously i would not want the user to do so in this case i redirect the
> > page, so that if the user were to refresh the page, the save action would
> > not be called again.
> 
> I'm not sure I understand what you mean. The case you describe is very close
> to mine, and so I would like to prevent the user from making twice the
> addition on refresh:
> I've got one first form, Form1, which calls Action1:
>  input="/form1.jsp">
> 
> 
> 
> but once the user is on page2, if he makes a refresh, action1 is called
> again and the data added by action1 is added once more
> 
> What didn't I understand?
> Thanks
> Caroline
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: forward vs redirect ?

2003-12-01 Thread Caroline Lauferon
hum... tings are not exactly like I described them, but i thought it was the
same *.jsp are tiles tiles definitions names, not resources. does it
matter. the URL shown is the action path.

Caroline


> caroline,
>
> when the user gets to page2, what is the url displayed in the address box?
> is it the action or the jsp page?
>
>
> claire
>
> - Original Message -
> From: "Caroline Lauferon" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Monday, December 01, 2003 4:04 PM
> Subject: Re: forward vs redirect ?
>
>
> > > For example, say i had an action which saved some details from a form
to
> a
> > > database. if the page is not redirected then if the user were to
refresh
> > the
> > > page, the action would be called again and the data saved again. This
> > > obviously i would not want the user to do so in this case i redirect
the
> > > page, so that if the user were to refresh the page, the save action
> would
> > > not be called again.
> >
> > I'm not sure I understand what you mean. The case you describe is very
> close
> > to mine, and so I would like to prevent the user from making twice the
> > addition on refresh:
> > I've got one first form, Form1, which calls Action1:
> >  scope="session"
> > input="/form1.jsp">
> > 
> > 
> >
> > but once the user is on page2, if he makes a refresh, action1 is called
> > again and the data added by action1 is added once more
> >
> > What didn't I understand?
> > Thanks
> > Caroline
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: forward vs redirect ?

2003-12-01 Thread Caroline Lauferon
Thank you very much Hubert! and Thank you Claire!
it indeed works the way you describe it. I suppose redirect="true" works
only with /sthg.do or sthg.jsp, and not with a tile definition, isn't it?
So, to solve my problem, I should use a /mytiledefinition.do (being a
forward action), like this :






Caroline


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Question regarding ActionForms.

2003-12-01 Thread Kris Schneider
One small tangent on why you might still want to call session.setAttribute. If
you ever want your app to work in a clustered/distributed environment, you
should always call session.setAttribute after modifying the state of a session
attribute. It may seem redundant:

Address address = ...;
Object customer = session.getAttribute(Constants.CUSTOMER_KEY);
PropertyUtils.setProperty(customer, "address", address);
session.setAttribute(Constants.CUSTOMER_KEY, customer);

but it's really the simplest way for a container to determine that an attribute
has been added or changed and should be replicated.

Quoting "Mainguy, Mike" <[EMAIL PROTECTED]>:

> Welll,
>   Common misconception, but, technically all java calls are "by value".
> That is, there is no such thing in java as passing something "by
> reference".
> The hook is, the value passed in when something is an Object is actually a
> reference (aka a pointer) to the existing object.  
> While you can manipulate the thing that this points to, you cannot reassign
> it point to something else.  I got all bunged up about this also and I
> think
> it's a pretty important point that can easily be missed if you came into
> java from another language that allows "by reference" calls.
> 
> By saying that objects are passed "by reference" folks are actually making
> things more complicated than they need to be...  For a really good
> explanation see http://www.yoda.arachsys.com/java/passing.html
> 
> 
> 
> worse is better 
> 
> -Original Message-
> From: Larry Meadors [mailto:[EMAIL PROTECTED] 
> Sent: Monday, December 01, 2003 10:52 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Question regarding ActionForms.
> 
> 
> Welcome to java 101, formerly known as the struts-users mailing list.
> 
> Object references are passed to method calls. While that reference cannot
> be
> changed, the object that it references can. On the other hand, if you
> create
> a new action form and assign it to the "form" parameter, nothing will
> happen
> because that reference cannot be changed.
> 
> Larry
> 
> >>> [EMAIL PROTECTED] 12/01/03 8:42 AM >>>
> Hi,
> 
> I am currently using Struts 1.0.2 and have notice something with regard to
> handling of ActionForms.
> 
> Why is it, that in the "perform()" method of my Action I am able to modify
> the passed-in ActionForm and all modifications that I make to the
> ActionForm
> in my Action have effect on the ActionForm in the session, without the need
> to reset the modified form in the session. e.g.
> 
> public ActionForward peform(ActionMapping mapping,
> ActionForm form,
> HttpServletRequest request,
> HttpServletResponse response,
> )throws IOException, ServletException
> 
> {
>   MyForm myForm = (MyForm)form;
> 
>   form.setMemberA("valA");
>   form.setMemberB("valB");
> 
>   // why dont I have to do the following: session.setAttribute
> ("myFormName", myForm);
> 
>   return "success";
> 
> }
> 
> I thought that since Java passes method arguments by value and not by
> reference, then I would have to reset my modifed copy back into the session
> for changes on the form to be visible in the form in the session ?
> 
> Any insights on how this mechanism works would be greatly appreciated.
> 
> Thanks,
> 
> Sepand

-- 
Kris Schneider 
D.O.Tech   

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Validator datePattern difficulties

2003-12-01 Thread Andy Schmidgall
Hello,

For my webapp I need to make sure a date is in the form 'mm/dd/yy', but
I haven't been able to achieve this with the struts validator (I only
need the javascript to work for now). All the examples I can find use
'MM/dd/' or 'MM-dd-'. If I switch to one of these and put in a 4
char date, then it validates ok, but I need to validate on the 2 char
date, not 4. Is this doable with the struts validator?

This is my validation definition:





datePatternStrict
MM/dd/yy



If I switch to datePattern (rather than datePatternStrict) it lets
anything at all through! That's definitely not what I want either.

Thanks,
Andy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Struts Exception Handling

2003-12-01 Thread jacob hookom
I just picked up the new Core J2EE 2nd Ed. book and it
mentions this issue.  To summarize, any errors from
the database (SQL exceptions) should be considered
"compile-time" errors, and should be resolved as being
fatal to the program's successful operation.

In all my action code, i do a try/catch (Throwable) to
make sure I don't let any exceptions leak to the UI
that I don't want to.  In the cases of unhandled
exceptions, I let the catch(Throwable) log the error,
and then throw a "SystemException" which is handled by
an exception handler to show a technical difficulties
page.

Jacob Hookom


--- Baljinder Singh
<[EMAIL PROTECTED]> wrote:
> Is anybody having any comments on exception handling
> strategies ?? I am
> looking for solutions reagarding handling exceptions
> related to database.
> 
> Thanks,
> BS
> 
> -Original Message-
> From: Baljinder Singh
> [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 26, 2003 11:44 AM
> To: Struts Users Mailing List
> Subject: RE: Struts Exception Handling
> 
> 
> Phil & Mike,
> 
> The approach that I am using right now is to make an
> ExceptionHandler and
> configure it in struts-config.xml using something
> like following:
> 
> 
>  key="error.exception.SQL"
>   handler="com.exception.MyExceptionHandler"
>   path="error.jsp" />
> 
> 
> This way it would catch ALL database related
> exceptions and throw them. But
> the problem goes deep into into handling a specific
> database exception, for
> ex. duplicate key exception during insert operation
> or child dependency
> during delete operation. Now different databases
> would throw different kind
> of errors for these cases. My problem is how to
> catch these specific SQL
> errors and show a user friendly message according to
> each of them. For ex,
> when duplicate key exception is thrown, I want to
> show a message like
> "Duplicate key cannot be inserted" or show a message
> like "Child record
> exists for this key" for a child dependency case.
> How can I catch particular
> error codes or message thrown by the database and
> show them and STILL KEEP
> EVERYTHING GENERIC so that tommorrow if I change my
> database, I only need to
> change the DAOs.
> 
> Thanks & Rgds,
> BS
> 
> -Original Message-
> From: Mainguy, Mike [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 26, 2003 2:11 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Struts Exception Handling
> 
> 
> Welll,
>   The way I've done this before is to wrap all
> Exceptions in a Custom type
> and throw it all the way back to struts.  This seems
> to work well for
> trivial business style apps, I'm not sure how it
> would hold up in something
> with more complexity in the business layer.  For
> example, My CRUD code would
> catch SQL exceptions, check out what the real
> problem is, and, if it is a
> genuine problem, throw a new FrameWorkException with
> the proper error
> message (or message key) contained in it.
> 
>   I would also be curious on how other folks do such
> things however...
> 
> 
> worse is better
> 
> -Original Message-
> From: Baljinder Singh
> [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 25, 2003 9:55 AM
> To: Struts Users Mailing List
> Subject: Struts Exception Handling
> 
> 
> Hi All,
> 
> I am looking for a robust exception handling
> approach in struts. Can
> somebody help me in that. My framework consists of
> struts interacting with
> session beans which then interact with DB through
> DAO. Now if during a CRUD
> operation, for example there is a duplicate key
> exception thrown, how should
> I handle it so that I can show the user exact
> message that duplicate key is
> being inserted. Same for all kind of database
> messages and validations.
> 
> Thanks & Regards,
> BS
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> -
> This message and its contents (to include
> attachments) are the property of
> Kmart Corporation (Kmart) and may contain
> confidential and proprietary
> information. You are hereby notified that any
> disclosure, copying, or
> distribution of this message, or the taking of any
> action based on
> information contained herein is strictly prohibited.
> Unauthorized use of
> information contained herein may subject you to
> civil and criminal
> prosecution and penalties. If you are not the
> intended recipient, you should
> delete this message immediately.
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
>

FormFile not re-populated

2003-12-01 Thread Sharmila Pandith
Hi,

I am using FormFile and after it is validated it must be displayed on the
next JSP. However, the field is blank. When I look at the source in IE6, I
see the file name without the directory. But even that is not displayed.

Any thoughts?

S P

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Validating java.lang.Integer field with integer validation fails

2003-12-01 Thread Cláudio F. Gil
I have a form with a field that has type="java.lang.Integer".
This required by the rest of the application so I can't change it to String.

I'm using the depends="integer" in the field validation but it does not 
produce any error when I insert text garbage in the field. Instead it 
defaults to 0. 

Do I have the type="java.lang.String" to use the integer validation? Is there 
any way to verify a field of type java.lang.Integer with the default 
verifications provided by the validator plugin?

Thanks,
Cláudio


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Textarea validation, using validator and mask

2003-12-01 Thread Arne Brutschy
I wrote:
I'm trying to use the validator with a regexp mask on an textarea field. 
 There are two problems:

1) even if the regexp allows empty strings and the field is not
   required, the validator reports that the field is invalid. same
   mask works for a simple text input.
2) I'm trying to use the regexp on every line of the textarea, ie:
   Alternate EMail Addresses
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]
   Every line should evaluated by the email target of the validator. But
   this doesn't work. Even empty string don't work.
It turns out that the mask validator is not able to validate String[] 
objects at all, so it cannot validate textareas. I wrote my own 
validateMask method:

  /**
   * Checks if the field matches the regular expression in the field's mask attribute.
   *
   * @param bean The bean validation is being performed on.
   * @param va The ValidatorAction that is currently being
   * performed.
   * @param field The Field object associated with the current
   * field being validated.
   * @param errors   The ActionErrors object to add errors to if
   * any validation errors occur.
   * @param request Current request object.
   * @return true if field matches mask, false otherwise.
   */
  public static boolean validateMask(Object bean,
 ValidatorAction va, Field field,
 ActionErrors errors,
 HttpServletRequest request) {
String mask = field.getVarValue("mask");
String value = null;
Object object = null;
if (isString(bean)) {
  value = (String) bean;
} else {
  try {
object = PropertyUtils.getProperty(bean, field.getProperty());
  } catch (Exception e) {
log.error(e.getMessage(), e);
  }
  // check if we have a string array
  if (object instanceof String[]) {
String[] strarray = ((String[])object)[0].split("\\r\\n");
boolean valid = true;
int line;
// iterate over the array and apply the mask to ever string
// exit on first mismatch
for (line = 0; line < strarray.length; line++) {
  if (!GenericValidator.isBlankOrNull(strarray[line]) && 
!GenericValidator.matchRegexp(strarray[line], mask)) {
valid=false;
break;
  }
}
// get the key of the error message, and create a new action error with it.
// add the failed line number as parameter
if (!valid) {
  String arg[] = Resources.getArgs(va.getName(), 
Resources.getMessageResources(request), Resources.getLocale(request), field);
  String msg = (field.getMsg(va.getName()) != null ? 
field.getMsg(va.getName()) : va.getMsg());
  errors.add(field.getKey(), new ActionError(msg, arg[0], String.valueOf(line 
+ 1)));
  return false;
}
return true;
  }
  // no string array, we're simply going to convert the object to string
  value = object.toString();
}
if (!GenericValidator.isBlankOrNull(value) && !GenericValidator.matchRegexp(value, 
mask)) {
  errors.add(field.getKey(), Resources.getActionError(request, va, field));
  return false;
}
return true;
  }
It displays the number of the line that failed the validation in the 
error message. This is the entry of my validator-rules.xml

 
and the appropriate error message:

> errors.array.invalid={0} is invalid on line {1}.

Regards,
Arne
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: FormFile not re-populated

2003-12-01 Thread James Mitchell
On Mon, 1 Dec 2003, Sharmila Pandith wrote:

> Hi,
>
> I am using FormFile and after it is validated it must be displayed on the
> next JSP. However, the field is blank. When I look at the source in IE6, I
> see the file name without the directory. But even that is not displayed.
>
> Any thoughts?


Yes, basically, you cannot expect to pre-fill an input field of type
"file" (html file upload box with browse button).  It is not supported in
all browsers and those that do, prompt the user to so they can cancel the
field value or the form all-together.

You would be better off doing something like this:
1. Show page (with file upload button), and ask the user if they want
   to upload additional files (radio button or something)
2. If yes, then after that page is processed, show it again, only this
   time with file listed off to the side (similar to how a summary view
   of a shopping cart might do)
3. If no, then move along with your wizard.

Does that help?



>
> S P
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-- 
James Mitchell
Software Developer / Struts Evangelist
http://www.struts-atlanta.org


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Newbie to struts with a question on text fields

2003-12-01 Thread Nandita Rajagopalan
Hi,

I have a textbox which is supposed to hold a numeric value - ie the property 
corresponds to a numeric datatype in the Action form. If I leave this textbox empty , 
I want my validate method to catch it and print an error as this field is a required 
field. However, when I leave this text empty, a value of  0 gets placed in the 
property's value . 0 is an allowed value and hence no error gets dumped. How do I get 
around this problem ?

Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Using one Action class for several forms

2003-12-01 Thread Wendy Smoak

Unfortunately Google wasn't too helpful because I'm having trouble
defining the problem.

I have a small webapp with a single DynaValidatorForm that holds all the
fields.

I have an Action class called "ViewReport" which handles forwarding to
the 'input' page, receiving the input, then forwarding to the 'display'
page.

I've mapped this ViewReport action several times in struts-config:
balanceSheet.do, transactionDetail.do, etc.

All is well until I get to the JSP, which I'd like to be able to reuse
for several reports.  But this line trips me up since it seems I have to
hard-code the name of the Action mapping:

  

Short of stuffing something in request scope and using an expression, is
there a way to pick up the "current" action mapping in the 
tag?

Thanks,
-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RES: recursive tiles

2003-12-01 Thread Felipe Nascimento
That is my what I don´t know.
I don´t know if I have to define the two components subbody1 and 2 in my
foo.jsp (body file), or in my tiles-defs.xml.
I suppose it is better in my tiles-defs.xml. So in foo.jsp I could only
get the values and that´s it.

Could you give a simple example of the definition in tiles-defs.xml, the
getting and putting in foo.jsp?

In your code bellow () where is
defined subbody1? The name is the name in tiles-defs? And value is the
jsp page?

Tks a lot
Felipe

-Mensagem original-
De: Adam Hardy [mailto:[EMAIL PROTECTED] 
Enviada em: segunda-feira, 1 de dezembro de 2003 08:41
Para: Struts Users Mailing List
Assunto: Re: recursive tiles


Hi Felipe,
not quite sure exactly what you want to do - where do you expect 
subbody1 & subbody2 to come from? If you are defining them in your 
tiles-defs.xml then you need to pass them as variables explicitly to 
'body' in your maintemplate:


   


HTH
Adam

On 12/01/2003 06:41 AM Felipe Nascimento wrote:
> Hi,
> 
> I have the following definition in my tiles-defs.xml:  name="mainTemplate" path="/mainTemplate.jsp">
>
>
>
>
> 
> 
> 
>
> 
> 
> In mainTemplate.jsp I have:
> 
> 
> 
> 
> What I want is to put more variable content in my foo.jsp, the same 
> way I put in mainTemplate.jsp something like
> 
> foo.jsp:
> 
> 



-- 
struts 1.1 + tomcat 5.0.14 + java 1.4.2
Linux 2.4.20 RH9

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.544 / Virus Database: 338 - Release Date: 25/11/2003
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.544 / Virus Database: 338 - Release Date: 25/11/2003
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Struts & menu

2003-12-01 Thread Francesco Di Candia
Hi all, i'm a Struts newbie and i'm trying to move my web-application from 
JSP/Servlets to Struts/Tiles. Someone of you can suggest my the best way to implement 
menu tile using Struts & Tiles togheter? I need real experience mixing Struts & Tiles 
because I found something googling but real experience are better.
Thanks in advance, Francesco

RE: FormFile not re-populated

2003-12-01 Thread Sharmila Pandith
Thanks, that was helpful.

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 1:30 PM
To: Struts Users Mailing List
Subject: Re: FormFile not re-populated


On Mon, 1 Dec 2003, Sharmila Pandith wrote:

> Hi,
>
> I am using FormFile and after it is validated it must be displayed on the
> next JSP. However, the field is blank. When I look at the source in IE6, I
> see the file name without the directory. But even that is not displayed.
>
> Any thoughts?


Yes, basically, you cannot expect to pre-fill an input field of type
"file" (html file upload box with browse button).  It is not supported in
all browsers and those that do, prompt the user to so they can cancel the
field value or the form all-together.

You would be better off doing something like this:
1. Show page (with file upload button), and ask the user if they want
   to upload additional files (radio button or something)
2. If yes, then after that page is processed, show it again, only this
   time with file listed off to the side (similar to how a summary view
   of a shopping cart might do)
3. If no, then move along with your wizard.

Does that help?



>
> S P
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-- 
James Mitchell
Software Developer / Struts Evangelist
http://www.struts-atlanta.org


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Using one Action class for several forms

2003-12-01 Thread Ben Anderson
not sure I fully understand your problem.  This may be the answer you aren't 
looking for, but maybe it can help (it just gives the current path):

<%@ page import="org.apache.struts.Globals" %>



-Ben

From: Wendy Smoak <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Using one Action class for several forms
Date: Mon, 01 Dec 2003 11:49:40 -0700
Unfortunately Google wasn't too helpful because I'm having trouble
defining the problem.
I have a small webapp with a single DynaValidatorForm that holds all the
fields.
I have an Action class called "ViewReport" which handles forwarding to
the 'input' page, receiving the input, then forwarding to the 'display'
page.
I've mapped this ViewReport action several times in struts-config:
balanceSheet.do, transactionDetail.do, etc.
All is well until I get to the JSP, which I'd like to be able to reuse
for several reports.  But this line trips me up since it seems I have to
hard-code the name of the Action mapping:
  

Short of stuffing something in request scope and using an expression, is
there a way to pick up the "current" action mapping in the 
tag?
Thanks,
--
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Groove on the latest from the hot new rock groups!  Get downloads, videos, 
and more here.  http://special.msn.com/entertainment/wiredformusic.armx

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Struts & menu

2003-12-01 Thread Vic Cekvenich
Just today a new version of Struts Menu was released, that is what I use.

.V

Francesco Di Candia wrote:
Hi all, i'm a Struts newbie and i'm trying to move my web-application from JSP/Servlets to 
Struts/Tiles. Someone of you can suggest my the best way to implement menu tile using Struts 
& Tiles togheter? I need real experience mixing Struts & Tiles because I found 
something googling but real experience are better.
Thanks in advance, Francesco


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Which framework's validate if preferred? Struts - JSTL

2003-12-01 Thread ZYD
Dear all,

Struts and JSTL both have validator framework, which one is preferred if I'm using 
struts and JSTL in one web application?

Thanks.

bruce

saving values thro to a list

2003-12-01 Thread mohan
Hi All,
I have a loop this way

   
   


I am iterating thro a list called getAppCourses. Suppose i change these
values will the list also get updated with changed objects, given that
there are setters/getters for all the properties


Thanx
Mohan



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Returning raw data from an action

2003-12-01 Thread Jim Kennedy
I have a need to process a large amount of data and return a csv file to the
client.  Is it possible to do this with a Struts action?  Is so, what would
I return as an ActionForward (see below)?

return mapping.findForward("blabla);

or

return mapping.findForward(null);


I don't want to forward anywhere.  And I'm not returning HTML data either.
I know, I know should use model 2, but I can't in this case. Too much
overhead with 50k records.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Returning raw data from an action

2003-12-01 Thread Ben Anderson
from http://marc.theaimsgroup.com/?l=struts-user&m=106730742008404&w=2
modified slightly:
   // Now write the actual content type and data
   response.setContentType("text/plain");
   JspWriter stream = response.getWriter();
   ... write out the csv ...
   // Return null to tell Struts the response is complete
   return (null);
-Ben

From: "Jim Kennedy" <[EMAIL PROTECTED]>
Reply-To: "Jim Kennedy" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Returning raw data from an action
Date: Mon, 1 Dec 2003 14:49:54 -0500
I have a need to process a large amount of data and return a csv file to 
the
client.  Is it possible to do this with a Struts action?  Is so, what would
I return as an ActionForward (see below)?

return mapping.findForward("blabla);

or

return mapping.findForward(null);

I don't want to forward anywhere.  And I'm not returning HTML data either.
I know, I know should use model 2, but I can't in this case. Too much
overhead with 50k records.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Share holiday photos without swamping your Inbox.  Get MSN Extra Storage 
now!  http://join.msn.com/?PAGE=features/es

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Struts & menu

2003-12-01 Thread Witt, Mike (OH35)
I also use struts menu ... very easy to get started with.  Once installed
and configured, you can use a tag like: "" to add an upper level menu.

-Original Message-
From: Francesco Di Candia [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 1:52 PM
To: Struts Users Mailing List
Subject: Struts & menu


Hi all, i'm a Struts newbie and i'm trying to move my web-application
from JSP/Servlets to Struts/Tiles. Someone of you can suggest my the
best way to implement menu tile using Struts & Tiles togheter? I need
real experience mixing Struts & Tiles because I found something googling
but real experience are better.
Thanks in advance, Francesco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Returning raw data from an action

2003-12-01 Thread Witt, Mike (OH35)
When using FOP on a past project to output pdf, I used:

response.setContentType("application/pdf");
response.setHeader("Content-Disposition", "attachment;filename="
+ reportName + "; ");

The second line caused it the browser to give a open/save dialog so that
.csv does not appear in the browser window.  Also I'm not sure if a content
type other than text/plain is more appropriate for CSV, but it would be
worth looking in to.

Incidentally, when the action is completed, return null so that it does not
forward anywhere.

Mike

-Original Message-
From: Ben Anderson [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 3:12 PM
To: [EMAIL PROTECTED]
Subject: Re: Returning raw data from an action


from http://marc.theaimsgroup.com/?l=struts-user&m=106730742008404&w=2
modified slightly:

// Now write the actual content type and data
response.setContentType("text/plain");
JspWriter stream = response.getWriter();
... write out the csv ...

// Return null to tell Struts the response is complete
return (null);

-Ben

>From: "Jim Kennedy" <[EMAIL PROTECTED]>
>Reply-To: "Jim Kennedy" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: Returning raw data from an action
>Date: Mon, 1 Dec 2003 14:49:54 -0500
>
>I have a need to process a large amount of data and return a csv file to 
>the
>client.  Is it possible to do this with a Struts action?  Is so, what would
>I return as an ActionForward (see below)?
>
>return mapping.findForward("blabla);
>
>or
>
>return mapping.findForward(null);
>
>
>I don't want to forward anywhere.  And I'm not returning HTML data either.
>I know, I know should use model 2, but I can't in this case. Too much
>overhead with 50k records.
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

_
Share holiday photos without swamping your Inbox.  Get MSN Extra Storage 
now!  http://join.msn.com/?PAGE=features/es


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Newbie to struts with a question on text fields

2003-12-01 Thread Witt, Mike (OH35)
Not sure if you are using a form bean or a dynaactionform.  But, specify a
String type field and then validate the string and convert to numeric.

Mike

-Original Message-
From: Nandita Rajagopalan [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 1:47 PM
To: [EMAIL PROTECTED]
Subject: Newbie to struts with a question on text fields


Hi,

I have a textbox which is supposed to hold a numeric value - ie the property
corresponds to a numeric datatype in the Action form. If I leave this
textbox empty , I want my validate method to catch it and print an error as
this field is a required field. However, when I leave this text empty, a
value of  0 gets placed in the property's value . 0 is an allowed value and
hence no error gets dumped. How do I get around this problem ?

Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Struts and Commons Chain

2003-12-01 Thread Hookom, Jacob
I was looking at chain's implementation, instead of executing the commands
with the visitor pattern, wouldn't a more powerful/flexible method be to
implement it using a filter pattern?

See:
http://java.sun.com/blueprints/corej2eepatterns/Patterns/InterceptingFilter.
html


Sample Chain:
CommandServletStart
CommandExceptionHandler
CommandStoreState
CommandExceptionThrower

--

CommandStart.execute(Context ctx, Chain chain) throws Exception
{
ServletContext srvCtx = (ServletContext) ctx;
String usrId = srvCtx.getRequestScope().getParameter("id"));
String newName = srvCtx.getRequestScope().getParameter("name"));

// get user and save state
User user = SomeService.getUser(usrId);
String oldName = user.getName();

// set new state and execute
try
{
user.setName(newName);
ctx.setAttribute("user", user);
chain.executeNext(ctx);
}
catch (Exception e)
{
// on error, rollback change
user.setName(oldName);
throw e;
}
}

--

CommandExceptionHandler.execute(Context ctx, Chain chain) throws Exception
{
try
{
chain.executeNext(ctx);
}
catch (SQLException e)
{
chain.executeNext(ctx);
}
// let unhandled exceptions go up
}

CommandExceptionThrower.execute(Context ctx, Chain chain) throws Exception
{
throw new SQLException();
}

With this, you would not have to change your inheritance to add behavior
(going from a command to a filter).  The given command would already know
best on how to handle itself and since it calls the next item in the chain,
we can also wrap the context to take care of situations where we want to
have listener type behavior.

The chain could also allow for runtime manipulation by the commands, to
insert additional commands to handle errors.

chain.insert("SomeCommand").insert("AnotherCommand).executeNext(ctx);


Jacob Hookom
Senior Programmer/Analyst
McKesson Medical-Surgical
Golden Valley, MN



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: saving values thro to a list

2003-12-01 Thread Witt, Mike (OH35)
If the type is String[], you will get an array of values.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 2:40 PM
To: [EMAIL PROTECTED]
Subject: saving values thro  to a list


Hi All,
I have a loop this way

   
   


I am iterating thro a list called getAppCourses. Suppose i change these
values will the list also get updated with changed objects, given that
there are setters/getters for all the properties


Thanx
Mohan



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Returning raw data from an action

2003-12-01 Thread Jim Kennedy
OK, thanks for the return null; tip, that works great.  But the
Content-Disposition does not seem to work for my browser (IE 5.5).  I get
the save box when I left mouse click on the link, but it saves an HTML page
not the actual CSV data.  However, if I right click on the link, everything
works great.  Why doesn't the left click work.



Jim Kennedy
IT Consultant
Mobile Phone: 813-503-1484
-


- Original Message -
From: "Witt, Mike (OH35)" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, December 01, 2003 3:30 PM
Subject: RE: Returning raw data from an action


> When using FOP on a past project to output pdf, I used:
>
> response.setContentType("application/pdf");
> response.setHeader("Content-Disposition",
"attachment;filename="
> + reportName + "; ");
>
> The second line caused it the browser to give a open/save dialog so that
> .csv does not appear in the browser window.  Also I'm not sure if a
content
> type other than text/plain is more appropriate for CSV, but it would be
> worth looking in to.
>
> Incidentally, when the action is completed, return null so that it does
not
> forward anywhere.
>
> Mike
>
> -Original Message-
> From: Ben Anderson [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 01, 2003 3:12 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Returning raw data from an action
>
>
> from http://marc.theaimsgroup.com/?l=struts-user&m=106730742008404&w=2
> modified slightly:
>
> // Now write the actual content type and data
> response.setContentType("text/plain");
> JspWriter stream = response.getWriter();
> ... write out the csv ...
>
> // Return null to tell Struts the response is complete
> return (null);
>
> -Ben
>
> >From: "Jim Kennedy" <[EMAIL PROTECTED]>
> >Reply-To: "Jim Kennedy" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: Returning raw data from an action
> >Date: Mon, 1 Dec 2003 14:49:54 -0500
> >
> >I have a need to process a large amount of data and return a csv file to
> >the
> >client.  Is it possible to do this with a Struts action?  Is so, what
would
> >I return as an ActionForward (see below)?
> >
> >return mapping.findForward("blabla);
> >
> >or
> >
> >return mapping.findForward(null);
> >
> >
> >I don't want to forward anywhere.  And I'm not returning HTML data
either.
> >I know, I know should use model 2, but I can't in this case. Too much
> >overhead with 50k records.
> >
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> _
> Share holiday photos without swamping your Inbox.  Get MSN Extra Storage
> now!  http://join.msn.com/?PAGE=features/es
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Returning raw data from an action

2003-12-01 Thread Hookom, Jacob
We use:

String contentType = this.beanWriter.getContentType();
response.setContentType(contentType);
response.setHeader("Content-Disposition","attachment;filename=\""
+ this.beanWriter.getFileName(request)
+ "\"");

My formatting is a little different than the previous responder-- might fix
it?

-Original Message-
From: Jim Kennedy [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 01, 2003 4:09 PM
To: Struts Users Mailing List
Subject: Re: Returning raw data from an action

OK, thanks for the return null; tip, that works great.  But the
Content-Disposition does not seem to work for my browser (IE 5.5).  I get
the save box when I left mouse click on the link, but it saves an HTML page
not the actual CSV data.  However, if I right click on the link, everything
works great.  Why doesn't the left click work.



Jim Kennedy
IT Consultant
Mobile Phone: 813-503-1484
-


- Original Message -
From: "Witt, Mike (OH35)" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, December 01, 2003 3:30 PM
Subject: RE: Returning raw data from an action


> When using FOP on a past project to output pdf, I used:
>
> response.setContentType("application/pdf");
> response.setHeader("Content-Disposition",
"attachment;filename="
> + reportName + "; ");
>
> The second line caused it the browser to give a open/save dialog so that
> .csv does not appear in the browser window.  Also I'm not sure if a
content
> type other than text/plain is more appropriate for CSV, but it would be
> worth looking in to.
>
> Incidentally, when the action is completed, return null so that it does
not
> forward anywhere.
>
> Mike
>
> -Original Message-
> From: Ben Anderson [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 01, 2003 3:12 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Returning raw data from an action
>
>
> from http://marc.theaimsgroup.com/?l=struts-user&m=106730742008404&w=2
> modified slightly:
>
> // Now write the actual content type and data
> response.setContentType("text/plain");
> JspWriter stream = response.getWriter();
> ... write out the csv ...
>
> // Return null to tell Struts the response is complete
> return (null);
>
> -Ben
>
> >From: "Jim Kennedy" <[EMAIL PROTECTED]>
> >Reply-To: "Jim Kennedy" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: Returning raw data from an action
> >Date: Mon, 1 Dec 2003 14:49:54 -0500
> >
> >I have a need to process a large amount of data and return a csv file to
> >the
> >client.  Is it possible to do this with a Struts action?  Is so, what
would
> >I return as an ActionForward (see below)?
> >
> >return mapping.findForward("blabla);
> >
> >or
> >
> >return mapping.findForward(null);
> >
> >
> >I don't want to forward anywhere.  And I'm not returning HTML data
either.
> >I know, I know should use model 2, but I can't in this case. Too much
> >overhead with 50k records.
> >
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> _
> Share holiday photos without swamping your Inbox.  Get MSN Extra Storage
> now!  http://join.msn.com/?PAGE=features/es
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: forward vs redirect ?

2003-12-01 Thread Juan Alvarado
I know every situation is different depending on the
environment you are in.

However, the use of redirect to prevent double form
submissions is not an appropriate solution to that
problem. I prefer to use the built in mechanism in
struts (transactional tokens) to solve this problem
for me. This way I can still use the forwarding
mechanism and maintain my application within the
confines of an MVC architecture. If you redirect and
the user bookmarks that page, then anytime the user
goes to that page, he/she will bypass your controller
layer (action) where you could do any kind of
initializations you will need for your users.

In my case I am stuck with redirects because of some
issues with virtual hosting. In this case there is no choice.

__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Error creating form bean

2003-12-01 Thread Sasha Borodin
Howdy,

I'm having a bizarre problem with a new ActionForm I've just created: when I
hit a jsp that uses this form, the RequestUtils say there's an error
creating  form bean of my class.

2003-12-01 17:01:33,432 [Thread-2] ERROR org.apache.struts.util.RequestUtils

Error creating form bean of class com.ponyprinting.web.manager.UploadForm
java.lang.ClassNotFoundException: com.ponyprinting.web.manager.UploadForm

The class file is there (I checked the build directory that tomcat's being
pointed to for "docBase" of my web app).  And it obviously compiled fine.

Sigh. It's the little problems that take up 80% of the time :-(

Please help!  Thank you,

-Sasha Borodin


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: forward vs redirect ?

2003-12-01 Thread Hubert Rabago

If you define double submissions as the user clicking submit twice, then no,
redirect doesn't save you from that.  You should use transactional tokens
(assuming your app design/specs allow you to).

If your mappings are like this:








then when the form gets submitted, the URL on the browser remains
"/submitToThisAction.do" and the resulting page is the one which should not be
bookmarked.  Also, this is the case where the controller gets bypassed because
whatever code MyDisplayAction needs to run before showing "displayItem.jsp"
doesn't get executed. 

If the user refreshes this page, the form gets resubmitted.  If you use
transactional tokens, your "MyProcessingAction" will know to ignore that request,
but it still gets triggered, and "MyDisplayAction" still gets skipped.



If you change the  to this:





then the browser will send a separate HTTP request for "displayItem.do" which
calls the correct controller and displays your data.
If the user refreshes the resulting page, "MyProcesssingAction" gets skipped
entirely.


Transaction tokens and using redirect solve different problems.  Using one does
not fully help you solve the issues solved by the other.

hth,
Hubert


--- Juan Alvarado <[EMAIL PROTECTED]> wrote:
> I know every situation is different depending on the
> environment you are in.
> 
> However, the use of redirect to prevent double form
> submissions is not an appropriate solution to that
> problem. I prefer to use the built in mechanism in
> struts (transactional tokens) to solve this problem
> for me. This way I can still use the forwarding
> mechanism and maintain my application within the
> confines of an MVC architecture. If you redirect and
> the user bookmarks that page, then anytime the user
> goes to that page, he/she will bypass your controller
> layer (action) where you could do any kind of
> initializations you will need for your users.
> 
> In my case I am stuck with redirects because of some
> issues with virtual hosting. In this case there is no choice.
> 
> __
> Do you Yahoo!?
> Free Pop-Up Blocker - Get it now
> http://companion.yahoo.com/
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Trouble With Multiple Message Resources Bundles

2003-12-01 Thread Cornellious Mann
I am having trouble accessing a message from my
"non-default" message bundle.

I have the following entries in my struts-config.xml
file...







I then try to access a message in the "shared" bundle"
using this tag...



When I do this, I get the following error...

javax.servlet.jsp.JspException: Missing message for
key "com.it.label.error400Title"

I have researched the archives and have not found any
sufficient reasons as to why this doesn't work.  All
of the Struts documentation reads like this should
work.

I did see one or two message indicating this could be
a problem

Does anyone have any ideas?

 


=
Best Regards,
Cornellious Mann

__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [ANNOUNCE] Struts Menu 2.0 Released!

2003-12-01 Thread Kwok Peng Tuck
Wow, pretty nice and good looking, thanks for the heads up Matt.

FYI in Mozilla 1.4, the coolmenu4 example looks a bit messed up.

Matt Raible wrote:

This release is a significant refactoring of the 1.x codebase.  The
source 
and site is now built using Maven.  Menus can now be defined using
Velocity 
templates and support has been added for looking up dynamic values.
This 
means that if you have ${variableName} in your menu-config.xml (in a
link), 
the tag library will look in all scopes for a variable with the name 
"variableName".  The example app has been updated to improve
documentation.

IMO, the Velocity templates is huge because it means "if it's possible
with 
HTML" - it's possible with Struts Menu.

Changes (http://struts-menu.sourceforge.net/changes-report.html):

- Renamed package structure to net.sf.navigator.
- Added support for using Struts' actions and forwards for links in 
 menu-config.xml. 	
- Added support for using dynamic variables in menu-config.xml. 	
- Updated build process to use Maven for building/deploying.
- Refactored to use Velocity and allow dynamic variable substitution.

Read the nitty-gritty details about the Velocity enhancements at 
http://raibledesigns.com/wiki/Wiki.jsp?page=StrutsMenu.

Demo: http://raibledesigns.com/struts-menu
Download: http://tinyurl.com/x6p9
Enjoy!

Matt



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Trouble With Multiple Message Resources Bundles

2003-12-01 Thread Hubert Rabago
I haven't used the multi bundles before, but I remember recently someone saying
the order by which s/he declared the resources solved the problem:

 
 

instead of 

 
 

don't know if that helps.

Hubert

--- Cornellious Mann <[EMAIL PROTECTED]> wrote:
> I am having trouble accessing a message from my
> "non-default" message bundle.
> 
> I have the following entries in my struts-config.xml
> file...
> 
>  parameter="com.it.rfr.resources.rfrresources">
> 
> 
>  parameter="com.it.shared.resources.sharedresources">
> 
> 
> I then try to access a message in the "shared" bundle"
> using this tag...
> 
>  name="com.it.label.error400Title"/>
> 
> When I do this, I get the following error...
> 
> javax.servlet.jsp.JspException: Missing message for
> key "com.it.label.error400Title"
> 
> I have researched the archives and have not found any
> sufficient reasons as to why this doesn't work.  All
> of the Struts documentation reads like this should
> work.
> 
> I did see one or two message indicating this could be
> a problem
> 
> Does anyone have any ideas?
> 
>  
> 
> 
> =
> Best Regards,
> Cornellious Mann
> 
> __
> Do you Yahoo!?
> Free Pop-Up Blocker - Get it now
> http://companion.yahoo.com/
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



html:link appears not to respect scriptlets inside atribute values

2003-12-01 Thread Gus Heck
The following doesn't seem to be working as I would expect... I sort of 
suspect that this may not be a struts issue, but I really thought you 
were supposed to be able to drop in jsp expressions anywhere.

Edit

is giving me this html output:

Edit

should fail as this.should.fail cannot exist, but it is getting 
reproduced textually instead. I have this really bad feeling I am 
forgetting something, or have missed something basic, but cant figure 
out what searches would bring up the answer.

-Gus

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Error creating form bean

2003-12-01 Thread Sasha Borodin
Attention Todd Thorner! :-)

It look like you had  very similar problem, but I saw no replies to your
post.  Did you ever get this fixed:

http://www.mail-archive.com/[EMAIL PROTECTED]/msg86103.html

I'm working under an extreme deadline, please help :-(

-
Howdy,

I'm having a bizarre problem with a new ActionForm I've just created: when I
hit a jsp that uses this form, the RequestUtils say there's an error
creating  
form bean of my class.

2003-12-01 17:01:33,432 [Thread-2] ERROR org.apache.struts.util.RequestUtils

Error creating form bean of class com.ponyprinting.web.manager.UploadForm
java.lang.ClassNotFoundException: com.ponyprinting.web.manager.UploadForm

The class file is there (I checked the build directory that tomcat's being
pointed to for "docBase" of my web app).  And it obviously compiled fine.

Sigh. It's the little problems that take up 80% of the time :-(

Please help!  Thank you,

-Sasha Borodin


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Error creating form bean

2003-12-01 Thread David Friedman
Just to be explicit, you have a file in tomcat as:
WEB-INF/classes/com/ponyprinting/web/manager/UploadForm.class ?

Regards,
David

-Original Message-
From: Sasha Borodin [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 7:22 PM
To: Struts Users Mailing List
Subject: Re: Error creating form bean


Attention Todd Thorner! :-)

It look like you had  very similar problem, but I saw no replies to your
post.  Did you ever get this fixed:

http://www.mail-archive.com/[EMAIL PROTECTED]/msg86103.html

I'm working under an extreme deadline, please help :-(

-
Howdy,

I'm having a bizarre problem with a new ActionForm I've just created: when I
hit a jsp that uses this form, the RequestUtils say there's an error
creating
form bean of my class.

2003-12-01 17:01:33,432 [Thread-2] ERROR org.apache.struts.util.RequestUtils

Error creating form bean of class com.ponyprinting.web.manager.UploadForm
java.lang.ClassNotFoundException: com.ponyprinting.web.manager.UploadForm

The class file is there (I checked the build directory that tomcat's being
pointed to for "docBase" of my web app).  And it obviously compiled fine.

Sigh. It's the little problems that take up 80% of the time :-(

Please help!  Thank you,

-Sasha Borodin


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Drop-Down List - Cannot Retrieve Definition From Form Bean Null

2003-12-01 Thread Caroline Jen
My drop-down list got an error message:
org.apache.jasper.JasperException: Cannot retrieve
definition for form bean null

I have tried to display the drop-down list in two
ways:

First:




Second:



   

The editors is a Collection of EditorBean passed to
the JSP this way:
HttpSession session = request.getSession();
session.setAttribute( "editors", editors );

and Editor Bean is:
public class EditorBean 
{
   private String name;

   public EditorBean() {}

   public EditorBean( String name )
   {
  this.name = name;
   }
   public String getName() {
  return name;
   }
   public void setName( String name ) {
  this.name = name;
   }
} 



__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [ANNOUNCE] Struts Menu 2.0 Released!

2003-12-01 Thread David Chelimsky
Matt,

I'm using Maven to build my project and I see the 2.0 jar is not yet
deployed to the maven repository
(http://www.ibiblio.org/maven/struts-menu/jars/). Do you plan to have it
there? If so, when?

Thx

- Original Message - 
From: "Matt Raible" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 01, 2003 5:07 AM
Subject: [ANNOUNCE] Struts Menu 2.0 Released!


> This release is a significant refactoring of the 1.x codebase.  The
> source
> and site is now built using Maven.  Menus can now be defined using
> Velocity
> templates and support has been added for looking up dynamic values.
> This
> means that if you have ${variableName} in your menu-config.xml (in a
> link),
> the tag library will look in all scopes for a variable with the name
> "variableName".  The example app has been updated to improve
> documentation.
>
> IMO, the Velocity templates is huge because it means "if it's possible
> with
> HTML" - it's possible with Struts Menu.
>
> Changes (http://struts-menu.sourceforge.net/changes-report.html):
>
> - Renamed package structure to net.sf.navigator.
> - Added support for using Struts' actions and forwards for links in
>   menu-config.xml.
> - Added support for using dynamic variables in menu-config.xml.
> - Updated build process to use Maven for building/deploying.
> - Refactored to use Velocity and allow dynamic variable substitution.
>
> Read the nitty-gritty details about the Velocity enhancements at
> http://raibledesigns.com/wiki/Wiki.jsp?page=StrutsMenu.
>
> Demo: http://raibledesigns.com/struts-menu
> Download: http://tinyurl.com/x6p9
>
> Enjoy!
>
> Matt
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: FormFile not re-populated

2003-12-01 Thread David Friedman
Since you mentioned FormFiles and failed validations, I'd like to share
something:  It's a pain that you lose the uploaded file if the form
validation fails.  I decided to make my validation screen do a special
message to please upload the files again because form Validation failed IF
any files were uploaded.  My problem was: how do you detect if files were
uploaded?  I chose to examine my ActionForm's FormFile fields and count the
total bytes.  IF it's zero, nothing was uploaded so I won't show the
reminder to re-attach the files.

Does anyone have a better method for dealing with losing files on Validation
failure?

Thanks for any constructive feedback,
David

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 1:30 PM
To: Struts Users Mailing List
Subject: Re: FormFile not re-populated


On Mon, 1 Dec 2003, Sharmila Pandith wrote:

> Hi,
>
> I am using FormFile and after it is validated it must be displayed on the
> next JSP. However, the field is blank. When I look at the source in IE6, I
> see the file name without the directory. But even that is not displayed.
>
> Any thoughts?


Yes, basically, you cannot expect to pre-fill an input field of type
"file" (html file upload box with browse button).  It is not supported in
all browsers and those that do, prompt the user to so they can cancel the
field value or the form all-together.

You would be better off doing something like this:
1. Show page (with file upload button), and ask the user if they want
   to upload additional files (radio button or something)
2. If yes, then after that page is processed, show it again, only this
   time with file listed off to the side (similar to how a summary view
   of a shopping cart might do)
3. If no, then move along with your wizard.

Does that help?



>
> S P
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

--
James Mitchell
Software Developer / Struts Evangelist
http://www.struts-atlanta.org


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Error creating form bean

2003-12-01 Thread Sasha Borodin
> Just to be explicit, you have a file in tomcat as:
> WEB-INF/classes/com/ponyprinting/web/manager/UploadForm.class ?

Yep.

WEB-INF/classes/com/ponyprinting/web/manager/forms/UploadForm.class

...just to be precise.

Thanks,

-Sasha

On 12/1/03 6:27 PM, "David Friedman" <[EMAIL PROTECTED]> wrote:

> Just to be explicit, you have a file in tomcat as:
> WEB-INF/classes/com/ponyprinting/web/manager/UploadForm.class ?
> 
> Regards,
> David
> 
> -Original Message-
> From: Sasha Borodin [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 01, 2003 7:22 PM
> To: Struts Users Mailing List
> Subject: Re: Error creating form bean
> 
> 
> Attention Todd Thorner! :-)
> 
> It look like you had  very similar problem, but I saw no replies to your
> post.  Did you ever get this fixed:
> 
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg86103.html
> 
> I'm working under an extreme deadline, please help :-(
> 
> -
> Howdy,
> 
> I'm having a bizarre problem with a new ActionForm I've just created: when I
> hit a jsp that uses this form, the RequestUtils say there's an error
> creating
> form bean of my class.
> 
> 2003-12-01 17:01:33,432 [Thread-2] ERROR org.apache.struts.util.RequestUtils
> 
> Error creating form bean of class com.ponyprinting.web.manager.UploadForm
> java.lang.ClassNotFoundException: com.ponyprinting.web.manager.UploadForm
> 
> The class file is there (I checked the build directory that tomcat's being
> pointed to for "docBase" of my web app).  And it obviously compiled fine.
> 
> Sigh. It's the little problems that take up 80% of the time :-(
> 
> Please help!  Thank you,
> 
> -Sasha Borodin
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: problems with tiles:getAsString in nested tiles?

2003-12-01 Thread List Mailbox
The easiest way is to declare a bean and scope for the request - that way
the other jsps have a chance to use the attribute.  The tiles attributes are
only scoped (TilesContext) for the testpage.jsp declared in the path=
attribute in the first definition when using the getAsString.

Try this at the top of the template - testpage.jsp.


your mainLayout.jsp will be able to use the title if you reference the bean
in the jsp:


Cal
www.calandva.com

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Behalf Of Green, Noah
Sent: Friday, November 28, 2003 8:11 PM
To: '[EMAIL PROTECTED]'
Subject: problems with tiles:getAsString in nested tiles?


Hi,
Sorry to bother you all, I've looked thru the archives and seen some similar
threads, but without any clear conclusions.
I'm using a  element in a nested tile, and I'm
getting the following error:

ServletException in:/jsp/layout/mainLayout.jsp] Error - tag.getAsString :
attribute 'title' not found in context. Check tag syntax'

However, this same element works in a tile that is nested at the "top
level".


Here is my tiles-defs.xml:
   
  
  
   

   
  
  
   


Here is my testpage.jsp, where the  does work:
  
 

 

 

 
  

Here is my mainLayout.jsp, where the  is failing:
  


The end result is that when I use a ForwardAction to go to ".testpage.main",

the  element in the page header is populated correctly, but the call
to
populated the  area fails with the exception.

Any help on why this is happening is much appreciated :-)

Thanks!
Noah



Noah Green
LEHMAN BROTHERS, Inc.
Fixed Income Analytics
email: [EMAIL PROTECTED]
pager: [EMAIL PROTECTED]
work: 212.526.1689
cellular: 917.406.4930
fax: 646.758.2306




--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of
this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information
is
complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Error creating form bean

2003-12-01 Thread Sasha Borodin
And I think you just found my problem - it was a small typo:

In struts-config, I had:

type="com.ponyprinting.web.manager.UploadForm" />

Instead of:

type="com.ponyprinting.web.manager.forms.UploadForm" />

Thanks a lot David!  Sorry to bother the list with such a stupid mistake.
But when you've been looking at something for 15 hours...

-Sasha


On 12/1/03 6:38 PM, "Sasha Borodin" <[EMAIL PROTECTED]> wrote:

>> Just to be explicit, you have a file in tomcat as:
>> WEB-INF/classes/com/ponyprinting/web/manager/UploadForm.class ?
> 
> Yep.
> 
> WEB-INF/classes/com/ponyprinting/web/manager/forms/UploadForm.class
> 
> ...just to be precise.
> 
> Thanks,
> 
> -Sasha
> 
> On 12/1/03 6:27 PM, "David Friedman" <[EMAIL PROTECTED]> wrote:
> 
>> Just to be explicit, you have a file in tomcat as:
>> WEB-INF/classes/com/ponyprinting/web/manager/UploadForm.class ?
>> 
>> Regards,
>> David
>> 
>> -Original Message-
>> From: Sasha Borodin [mailto:[EMAIL PROTECTED]
>> Sent: Monday, December 01, 2003 7:22 PM
>> To: Struts Users Mailing List
>> Subject: Re: Error creating form bean
>> 
>> 
>> Attention Todd Thorner! :-)
>> 
>> It look like you had  very similar problem, but I saw no replies to your
>> post.  Did you ever get this fixed:
>> 
>> http://www.mail-archive.com/[EMAIL PROTECTED]/msg86103.html
>> 
>> I'm working under an extreme deadline, please help :-(
>> 
>> -
>> Howdy,
>> 
>> I'm having a bizarre problem with a new ActionForm I've just created: when I
>> hit a jsp that uses this form, the RequestUtils say there's an error
>> creating
>> form bean of my class.
>> 
>> 2003-12-01 17:01:33,432 [Thread-2] ERROR org.apache.struts.util.RequestUtils
>> 
>> Error creating form bean of class com.ponyprinting.web.manager.UploadForm
>> java.lang.ClassNotFoundException: com.ponyprinting.web.manager.UploadForm
>> 
>> The class file is there (I checked the build directory that tomcat's being
>> pointed to for "docBase" of my web app).  And it obviously compiled fine.
>> 
>> Sigh. It's the little problems that take up 80% of the time :-(
>> 
>> Please help!  Thank you,
>> 
>> -Sasha Borodin
>> 
>> 
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: problems with tiles:getAsString in nested tiles?

2003-12-01 Thread List Mailbox
Noah>> you can add attributes to extended definitions and then extend them.
I have an example using that technique on my site:
http://www.calandva.com/holmansite/do/blog/blogging?date=20030711#094831

  
  
  
  
  
  
  
  
  
  
  
  
  
  

   
  
  
  
  
  
  
  
  

   
  
  
  
  
  
  
  

When the level3.pagedef is used the template.jsp has access to all three
levels of crumbtitle values.  Some attributes are overridden and others are
added to the extended definitions.

Let me know if I am off base.

Cal
www.calandva.com

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Behalf Of Green, Noah
Sent: Friday, November 28, 2003 9:56 PM
To: 'Struts Users Mailing List'
Subject: RE: problems with tiles:getAsString in nested tiles?


Hi David,
I've experimented with the solution in the URL, and with the stuff mentioned
in the Monday posts.
I understand the explicit invocation concept, that is:





Instead of:


It took me awhile to get the solutions to work, but they now do.  What I was
missing at first was another piece of the puzzle, one that isn't really made
explicit in a lot of Tiles texts.  It has to do with extending Tiles
definitions.  The solutions didn't work until all the attributes I was using
were explicitly declared, even with empty values, in the root of the
definitions hierarchy.  So "extends" is kind of a misleading term,
especially for Java programmers - you can OVERRIDE attributes when you
extend a Tiles definition, but you can't ADD NEW attributes.  They must all
be mentioned in the base definition.


In other words, this is incorrect:







  



While this would be correct:












I think you mention as much in one of your posts,
http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]
he.org&msgNo=95557


It's important for people trained as Java programmers to realize that
"extends" in Tile definitions means something  very different from what it
means in Java.  Too bad that it does, it would be nice for things to be more
dynamic, but this would probably be very difficult to implement (essentially
you'd have to build polymorphism into the tile definitions factory.)

Please correct me if I'm just totally on the wrong track.


Thanks again for the help,
Noah



-Original Message-
From: David Friedman [mailto:[EMAIL PROTECTED]
Sent: Friday, November 28, 2003 8:30 PM
To: Struts Users Mailing List
Subject: RE: problems with tiles:getAsString in nested tiles?


Noah,

We talked about this king of problem Monday.  Basically, this old post
describes a solution for you, which I got working Monday, btw:

http://www.mail-archive.com/[EMAIL PROTECTED]/msg61368.html

Regards,
David

-Original Message-
From: Green, Noah [mailto:[EMAIL PROTECTED]
Sent: Friday, November 28, 2003 8:11 PM
To: '[EMAIL PROTECTED]'
Subject: problems with tiles:getAsString in nested tiles?



Hi,
Sorry to bother you all, I've looked thru the archives and seen some similar
threads, but without any clear conclusions. I'm using a  element in a nested tile, and I'm getting the following error:

ServletException in:/jsp/layout/mainLayout.jsp] Error - tag.getAsString :
attribute 'title' not found in context. Check tag syntax'

However, this same element works in a tile that is nested at the "top
level".


Here is my tiles-defs.xml:
   
  
  
   

   
  
  
   


Here is my testpage.jsp, where the  does work:
  
 

 

 

 
  

Here is my mainLayout.jsp, where the  is failing:
  


The end result is that when I use a ForwardAction to go to ".testpage.main",

the  element in the page header is populated correctly, but the call
to populated the  area fails with the exception.

Any help on why this is happening is much appreciated :-)

Thanks!
Noah



Noah Green
LEHMAN BROTHERS, Inc.
Fixed Income Analytics
email: [EMAIL PROTECTED]
pager: [EMAIL PROTECTED]
work: 212.526.1689
cellular: 917.406.4930
fax: 646.758.2306




--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information
is complete or accurate

RE: Error creating form bean

2003-12-01 Thread David Friedman
Yep.  That was the first thing I noticed when I read your email after
dinner: 'form' :)

Regards,
David

-Original Message-
From: Sasha Borodin [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 7:45 PM
To: Struts Users Mailing List
Subject: Re: Error creating form bean


And I think you just found my problem - it was a small typo:

In struts-config, I had:

type="com.ponyprinting.web.manager.UploadForm" />

Instead of:

type="com.ponyprinting.web.manager.forms.UploadForm" />

Thanks a lot David!  Sorry to bother the list with such a stupid mistake.
But when you've been looking at something for 15 hours...

-Sasha


On 12/1/03 6:38 PM, "Sasha Borodin" <[EMAIL PROTECTED]> wrote:

>> Just to be explicit, you have a file in tomcat as:
>> WEB-INF/classes/com/ponyprinting/web/manager/UploadForm.class ?
>
> Yep.
>
> WEB-INF/classes/com/ponyprinting/web/manager/forms/UploadForm.class
>
> ...just to be precise.
>
> Thanks,
>
> -Sasha
>
> On 12/1/03 6:27 PM, "David Friedman" <[EMAIL PROTECTED]> wrote:
>
>> Just to be explicit, you have a file in tomcat as:
>> WEB-INF/classes/com/ponyprinting/web/manager/UploadForm.class ?
>>
>> Regards,
>> David
>>
>> -Original Message-
>> From: Sasha Borodin [mailto:[EMAIL PROTECTED]
>> Sent: Monday, December 01, 2003 7:22 PM
>> To: Struts Users Mailing List
>> Subject: Re: Error creating form bean
>>
>>
>> Attention Todd Thorner! :-)
>>
>> It look like you had  very similar problem, but I saw no replies to your
>> post.  Did you ever get this fixed:
>>
>> http://www.mail-archive.com/[EMAIL PROTECTED]/msg86103.html
>>
>> I'm working under an extreme deadline, please help :-(
>>
>> -
>> Howdy,
>>
>> I'm having a bizarre problem with a new ActionForm I've just created:
when I
>> hit a jsp that uses this form, the RequestUtils say there's an error
>> creating
>> form bean of my class.
>>
>> 2003-12-01 17:01:33,432 [Thread-2] ERROR
org.apache.struts.util.RequestUtils
>>
>> Error creating form bean of class com.ponyprinting.web.manager.UploadForm
>> java.lang.ClassNotFoundException: com.ponyprinting.web.manager.UploadForm
>>
>> The class file is there (I checked the build directory that tomcat's
being
>> pointed to for "docBase" of my web app).  And it obviously compiled fine.
>>
>> Sigh. It's the little problems that take up 80% of the time :-(
>>
>> Please help!  Thank you,
>>
>> -Sasha Borodin
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:link appears not to respect scriptlets inside atribute values

2003-12-01 Thread Kris Schneider
Per the JSP spec about request-time attribute values:

The expression must appear by itself (multiple expressions, and mixing 
of expressions and string constants are not permitted).

Which means you have to use:

Edit

Gus Heck wrote:
The following doesn't seem to be working as I would expect... I sort of 
suspect that this may not be a struts issue, but I really thought you 
were supposed to be able to drop in jsp expressions anywhere.

Edit

is giving me this html output:

Edit

should fail as this.should.fail cannot exist, but it is getting 
reproduced textually instead. I have this really bad feeling I am 
forgetting something, or have missed something basic, but cant figure 
out what searches would bring up the answer.

-Gus
--
Kris Schneider 
D.O.Tech   


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Drop-Down List - Cannot Retrieve Definition From Form Bean Null

2003-12-01 Thread Ajay Patil
Hi Caroline,

The list should not be a session attribute.
Instead, you should declare member variables inside your Form bean
as follows..

public class EditorForm {
  String [] options;
  EditorBean editor;

  public String [] getOptions() {
return options;
  }

  public EditorBean getEditor() {
return this.editor;
  }
}

In your JSP page,


  


Hope this helps you...

Ajay



My drop-down list got an error message:
org.apache.jasper.JasperException: Cannot retrieve
definition for form bean null

I have tried to display the drop-down list in two
ways:

First:




Second:



 

The editors is a Collection of EditorBean passed to
the JSP this way:
HttpSession session = request.getSession();
session.setAttribute( "editors", editors );

and Editor Bean is:
public class EditorBean 
{
   private String name;

   public EditorBean() {}

   public EditorBean( String name )
   {
  this.name = name;
   }
   public String getName() {
  return name;
   }
   public void setName( String name ) {
  this.name = name;
   }
} 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSTL and DynaValidatorForm

2003-12-01 Thread Kris Schneider
I'm sorry, I sort of lost track of this thread. Do you ever get this 
working?

Alexander Kirsch wrote:

Hallo all!

Kris Schneider wrote:

Are you using a JSP 2.0 container (like Tomcat 5)? If not, you can't 
use JSTL
1.1, you have to use JSTL 1.0. For a quick sanity check, what do you 
get with
the following:


I'am using the JSP 2.0 Container Tomcat 5.0.14

JSTL: 
Struts: 


The Struts-Tags work, but not the JSTL-Tags!

If you really are using a JSP 2.0 container, you can also try:

JSP: ${lvform.map.method}

Also make sure you're using a Servlet 2.4 deployment descriptor:

http://java.sun.com/xml/ns/j2ee";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
 version="2.4">
  ...



Since I change the deployment discriptor, there is a exception in all 
JSTL Tags.

javax.servlet.jsp.el.ELException: Unable to find a value for "map" in 
object of class "org.apache.struts.validator.DynaValidatorForm" using 
operator "."
org.apache.commons.el.Logger.logError(Logger.java:481)
org.apache.commons.el.Logger.logError(Logger.java:498)
org.apache.commons.el.Logger.logError(Logger.java:611)
org.apache.commons.el.ArraySuffix.evaluate(ArraySuffix.java:340)
org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:263) 
org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:190) 

org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:936) 

org.apache.jsp.pages.lv_jsp._jspx_meth_html_html_0(lv_jsp.java:143)
org.apache.jsp.pages.lv_jsp._jspService(lv_jsp.java:101)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856) 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311) 

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856) 
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1014) 

org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:417) 
org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:390) 

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:271) 

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
Quoting Alexander Kirsch <[EMAIL PROTECTED]>:


Hallo all,

I have some problems with the JSTL 1.1 (From SUN jwsdp 1.3) Tags 
together
with
Struts 1.1 DynaValidatorForms.

I have defined the following DynaValidatorForm:


...

...

The Form is populated by an Action:

public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
DynaValidatorForm lvform = (DynaValidatorForm) form;
...
lvform.set("method", "add");
...
request.setAttribute(mapping.getAttribute(), lvform);
return mapping.findForward("continue");
}
After this the Fields in the Form-JSP are filled correct.

Depending on what method I use I want to output different messages.

For this I tried to use these JSTL-Tags:









 
   


But I allways run into the otherwise tree.

I also tries this without success:


   

So I hope that anybody can help me to solve this problem.

Kind Regards and thank you very much

Alexander Kirsch



Kind Regards and thank you very much

Alexander Kirsch
--
Kris Schneider 
D.O.Tech   


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: FormFile not re-populated

2003-12-01 Thread Andrew Hill
Heres (a very simplified description of) what I do (its conceptually the
same as what James suggested):

I use a session based form for upload pages especially since I usually need
to allow the user to upload multiple files for one 'field', and because some
of these files can be quite big and the user wont appreciate having to
upload them again (and again and again (Ive noticed users always seem to
have a knack for entering invalid data!))

I have the setter in the ActionForm add the FormFile to a collection.

On return to the page (due to either a validation error or the need to
upload additional files to that 'field') I will display above the upload
control a list of files uploaded to that 'field' along with checkboxes to
allow the user to tick any they change their mind about and want to trash.

The checkboxes submit to a field whose setter takes care of removing the
unwanted FormFiles.

In addition to the forms normal submission button(s) the file field will
usually have its own 'update/remove' button that triggers a form submission
followed by a return to the view without validation.

(In my current project I actually have a class an instance of which I nest
in the actionform to take care of all this - so all my file fields are
actually nested fieldnames ie: "bob.file", "bob.filesToDelete". Would you
believe I have one form where I have something like 60+ file 'fields'! (I
wasnt given a choice about it). Oh the humanity. (I handle that using popup
windows whose actions play with the main windows session based form).)

-Original Message-
From: David Friedman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 2 December 2003 08:40
To: Struts Users Mailing List
Subject: RE: FormFile not re-populated


Since you mentioned FormFiles and failed validations, I'd like to share
something:  It's a pain that you lose the uploaded file if the form
validation fails.  I decided to make my validation screen do a special
message to please upload the files again because form Validation failed IF
any files were uploaded.  My problem was: how do you detect if files were
uploaded?  I chose to examine my ActionForm's FormFile fields and count the
total bytes.  IF it's zero, nothing was uploaded so I won't show the
reminder to re-attach the files.

Does anyone have a better method for dealing with losing files on Validation
failure?

Thanks for any constructive feedback,
David

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 1:30 PM
To: Struts Users Mailing List
Subject: Re: FormFile not re-populated


On Mon, 1 Dec 2003, Sharmila Pandith wrote:

> Hi,
>
> I am using FormFile and after it is validated it must be displayed on the
> next JSP. However, the field is blank. When I look at the source in IE6, I
> see the file name without the directory. But even that is not displayed.
>
> Any thoughts?


Yes, basically, you cannot expect to pre-fill an input field of type
"file" (html file upload box with browse button).  It is not supported in
all browsers and those that do, prompt the user to so they can cancel the
field value or the form all-together.

You would be better off doing something like this:
1. Show page (with file upload button), and ask the user if they want
   to upload additional files (radio button or something)
2. If yes, then after that page is processed, show it again, only this
   time with file listed off to the side (similar to how a summary view
   of a shopping cart might do)
3. If no, then move along with your wizard.

Does that help?



>
> S P
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

--
James Mitchell
Software Developer / Struts Evangelist
http://www.struts-atlanta.org


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Can only redirect when forward path only has directories

2003-12-01 Thread Bessette
After days of trying to figure out why my actions wouldn't forward, only
redirect, I finally narrowed down the problem.

If I use a forward path of "/dir1/dir2" the action will always redirect, no
matter what the redirect value of the forward is.  However, if I use
"/dir1/dir2/index.jsp" then the action will redirect or forward correctly
depending on the value.

This seems like a bug to me.  Is there any reason why this should happen?
It doesn't really matter to me, since the action uri is displayed in the
address bar, but it seems very odd.

Thanks,
Eric


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Can only redirect when forward path only has directories

2003-12-01 Thread David Friedman
You might want to check your web server configuration to see if the
directory index knows to show the index.jsp as the index page or to do
something else, such as redirect to an error page or a particular page.
What is your web server?

Regards,
David

-Original Message-
From: Bessette [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 10:30 PM
To: [EMAIL PROTECTED]
Subject: Can only redirect when forward path only has directories


After days of trying to figure out why my actions wouldn't forward, only
redirect, I finally narrowed down the problem.

If I use a forward path of "/dir1/dir2" the action will always redirect, no
matter what the redirect value of the forward is.  However, if I use
"/dir1/dir2/index.jsp" then the action will redirect or forward correctly
depending on the value.

This seems like a bug to me.  Is there any reason why this should happen?
It doesn't really matter to me, since the action uri is displayed in the
address bar, but it seems very odd.

Thanks,
Eric


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Is it required to restart weblogic everytime after compiling ??? Need help Desperately .. :-(

2003-12-01 Thread Shakti

Hi,
 I am using Struts & weblogic , My Question is each time i do some changes in my 
.java files the changes dont' get reflected immediately. Each time after compiling i 
have to restart weblogic :-( .. which is taking a hell lot of my time .. Can anyone 
suggest some weblogic setting thru which i dont' have to restart the sever again & 
again to reflect my changes made on an already deployed application on weblogic .

Thanks & Regards,
Shakti.
P.S : I am getting frustrated while debugging my code after each and every minute 
change i have to restart it which is taking most of my development time :-(
I am using weblogic 72


Need to retain the data of the previous page

2003-12-01 Thread Kalra, Ashwani
hi,
I have the following flow.
Page A  :  Display some rows. These rows are not in DB.Initially there are
no rows. It contains add button

Page B : On clicking the add button of Page A,  page B opens up the form
which user  fills and forward back to page A. 
Page A now displays new row along with already existing rows  if there were.

my Question . How to retains the data of page A. Can struts handle it. Or I
have to use the session object .

TIA
Ashwani


This message contains information that may be privileged or confidential and
is the property of the Cap Gemini Ernst & Young Group. It is intended only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all copies
of this message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Need to retain the data of the previous page

2003-12-01 Thread Khalid K.
You have to persist your data. If you declare your form in request
scope, then once user clicks on submit on page A, you have to save the
data to a Value Object stored in session. 

Khalid


-Original Message-
From: Kalra, Ashwani [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 01, 2003 10:12 PM
To: Struts (E-mail)
Subject: Need to retain the data of the previous page


hi,
I have the following flow.
Page A  :  Display some rows. These rows are not in DB.Initially there
are no rows. It contains add button

Page B : On clicking the add button of Page A,  page B opens up the form
which user  fills and forward back to page A. 
Page A now displays new row along with already existing rows  if there
were.

my Question . How to retains the data of page A. Can struts handle it.
Or I have to use the session object .

TIA
Ashwani


This message contains information that may be privileged or confidential
and is the property of the Cap Gemini Ernst & Young Group. It is
intended only for the person to whom it is addressed. If you are not the
intended recipient, you are not authorised to read, print, retain, copy,
disseminate, distribute, or use this message or any part thereof. If you
receive this message in error, please notify the sender immediately and
delete all copies of this message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.545 / Virus Database: 339 - Release Date: 11/27/2003
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.545 / Virus Database: 339 - Release Date: 11/27/2003
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Need to retain the data of the previous page

2003-12-01 Thread Kalra, Ashwani
Yeah I was thinking of the same approach. I thought if there is better way.
Means I have to keep a collection of Page A form beans in session




>-Original Message-
>From: Khalid K. [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, December 02, 2003 11:54 AM
>To: 'Struts Users Mailing List'
>Subject: RE: Need to retain the data of the previous page
>
>
>You have to persist your data. If you declare your form in request
>scope, then once user clicks on submit on page A, you have to save the
>data to a Value Object stored in session. 
>
>Khalid
>
>
>-Original Message-
>From: Kalra, Ashwani [mailto:[EMAIL PROTECTED] 
>Sent: Monday, December 01, 2003 10:12 PM
>To: Struts (E-mail)
>Subject: Need to retain the data of the previous page
>
>
>hi,
>I have the following flow.
>Page A  :  Display some rows. These rows are not in DB.Initially there
>are no rows. It contains add button
>
>Page B : On clicking the add button of Page A,  page B opens 
>up the form
>which user  fills and forward back to page A. 
>Page A now displays new row along with already existing rows  if there
>were.
>
>my Question . How to retains the data of page A. Can struts handle it.
>Or I have to use the session object .
>
>TIA
>Ashwani
>
>
>This message contains information that may be privileged or 
>confidential
>and is the property of the Cap Gemini Ernst & Young Group. It is
>intended only for the person to whom it is addressed. If you 
>are not the
>intended recipient, you are not authorised to read, print, 
>retain, copy,
>disseminate, distribute, or use this message or any part 
>thereof. If you
>receive this message in error, please notify the sender immediately and
>delete all copies of this message.
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>---
>Incoming mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.545 / Virus Database: 339 - Release Date: 11/27/2003
> 
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.545 / Virus Database: 339 - Release Date: 11/27/2003
> 
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>


This message contains information that may be privileged or confidential and
is the property of the Cap Gemini Ernst & Young Group. It is intended only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all copies
of this message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Is it required to restart weblogic everytime after compiling ??? Need help Desperately .. :-(

2003-12-01 Thread Kalra, Ashwani
Hi,
Pls read this thread
http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.develo
per.interest.jsp&item=11050&utag=

IMO not possible. However I have heard that there are IDE tools which do the
equivalent for you. 

/Ashwani



>-Original Message-
>From: Shakti [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, December 02, 2003 10:30 AM
>To: Struts Users Mailing List
>Subject: Is it required to restart weblogic everytime after compiling
>??? Need help Desperately .. :-(
>
>
>
>Hi,
> I am using Struts & weblogic , My Question is each time i 
>do some changes in my .java files the changes dont' get 
>reflected immediately. Each time after compiling i have to 
>restart weblogic :-( .. which is taking a hell lot of my time 
>.. Can anyone suggest some weblogic setting thru which i dont' 
>have to restart the sever again & again to reflect my changes 
>made on an already deployed application on weblogic .
>
>Thanks & Regards,
>Shakti.
>P.S : I am getting frustrated while debugging my code after 
>each and every minute change i have to restart it which is 
>taking most of my development time :-(
>I am using weblogic 72
>


This message contains information that may be privileged or confidential and
is the property of the Cap Gemini Ernst & Young Group. It is intended only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all copies
of this message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Taglig to write from a map with a key rather than an iterate?

2003-12-01 Thread webmaster
Is there a way to call something like a bean write taglib with a 
map  key/value combination in jstl or something else?  Thanks.



LEGAL NOTICE

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank you 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]