request processing problems

2005-04-06 Thread Pavel Jbanov
Hello,

(Version: 1.2.4)

Situation: I have a Form
public class SomeForm extends ValidatorForm {
private HashMap quantity = new HashMap();

public String getQuantity(String key) {
return (String) quantity.get(key);
}

public void setQuantity(String key, String val) {
this.quantity.put(key, val);
}

public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
//...
}
}

I write:
html:text property=quantity(1) /
html:text property=quantity(2) /
...

Works fine.

But in my situation, in the action/jsp where I just draw this form, in
request (as a leftover from previous request, after several forwards) I
recieve a value from a distant
html:text property=quantity /

So I get this:
 java.lang.reflect.InvocationTargetException: Cannot set quantity
at
org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:1022)
at
org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
at
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:495)
at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:798)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:205)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
cut
Caused by: java.lang.NoSuchMethodException: Property 'quantity' has no
setter method
at
org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1782)
at
org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.java:1684)
at
org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:1713)
at
org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:1019)
... 44 more

Renaming quantity to qnty helped, but I think that this exception is
unnecessary and avoidable.

Is it a bug? I didn't have too much time to search the bugzilla, but I
didn't see anything similar during a quick scan...

Thanks.

Pavel




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



Re: (Newbie question) tiles:getAsString error attribute not found

2005-04-06 Thread brenmcguire
In Tiles, you can put attributes only into layout pages. In short terms
you should modify your tiles-defs.xml this way:

  definition name=header.with.title path=/header.jsp
put name=pageTitle value=Welcome /
  /definition

  definition name=base.definition path=/layout.jsp
put name=leftNav value=/leftNav.jsp /
put name=footer value=/footer.jsp /
  /definition

  definition name=page.home extends=base.definition
put name=header value=header.with.title /
put name=body value=/home.jsp /
  /definition

Ciao
Antonio Petrelli

Neil Aggarwal wrote:

Hello:

I am a newbie to struts and am trying to get a handle on
tiles:getAsString tag.  I am having a problem in
that is complains that the attribute I am trying to
get does not exist.

Here is what I have in my tiles-defs.xml:

tiles-definitions
  !-- Base Tiles Definition --
  definition name=base.definition path=/layout.jsp
put name=leftNav value=/leftNav.jsp /
put name=header value=/header.jsp /
put name=footer value=/footer.jsp /
  /definition

  !-- Tiles definition of home page --
  definition name=page.home extends=base.definition
put name=pageTitle value=Welcome /
put name=body value=/home.jsp /
  /definition
/tiles-definitions

I have an index.jsp that loads the page.home defintion:
[EMAIL PROTECTED] uri=/WEB-INF/struts-tiles.tld prefix=tiles %
tiles:insert definition=page.home /

Here is the layout.jsp (trimmed):
[EMAIL PROTECTED] language=java %
[EMAIL PROTECTED] file=/imports.jsp %
[EMAIL PROTECTED] uri=http://jakarta.apache.org/struts/tags-html; 
prefix=html
%
[EMAIL PROTECTED] uri=http://jakarta.apache.org/struts/tags-tiles;
prefix=tiles
%

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN

html:html locale=true
  body background=/images/pageBackground.gif
table border=0 width=100% cellspacing=0 cellpadding=0
  tr
td align=right valign=top width=150tiles:insert
attribute=leftNav //td
td valign=tophtml:img border=0 height=700
src=/images/transparent1x1.gif width=10 //td
td align=left valign=toptiles:insert attribute=header
/tiles:insert attribute=body /tiles:insert attribute=footer
//td
  /tr
/table
  /body
/html:html

Here is the header.jsp (trimmed):
[EMAIL PROTECTED] language=java %
[EMAIL PROTECTED] file=/imports.jsp %
[EMAIL PROTECTED] uri=http://jakarta.apache.org/struts/tags-html; 
prefix=html
%
[EMAIL PROTECTED] uri=http://jakarta.apache.org/struts/tags-tiles;
prefix=tiles
%

table
  tr
td class=pageTitletiles:getAsString name=pageTitle //td
  /tr

When I try to load the page (You can see what I have at
http://dev.crcbusinessservices.com/crcgroup/index.jsp)

I get this error in the tomcat log:
SEVERE: ServletException in '/layout.jsp':
ServletException in '/header.jsp':
Error - tag.getAsString :
attribute 'pageTitle' not found in context. Check tag syntax

Any ideas?

Thanks,
   Neil

--
Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com
FREE! Valuable info on how your business can reduce operating costs by
17% or more in 6 months or less! http://newsletter.JAMMConsulting.com


-
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: New to Struts

2005-04-06 Thread Kumar deepak
Please to to http://www.roseindia.net/struts
its nice tutorial

--- Ruben Cepeda [EMAIL PROTECTED] wrote:
 Balajj,
 
 I would go to the struts home page and start looking
 thru the documentation 
 and tutorial.  Here is a link:  
 http://struts.apache.org/userGuide/index.html to the
 user guide it come in 
 handy.
 
 *
 Ruben Cepeda
 [EMAIL PROTECTED]
 *
 
 
 
 Original Message Follows
 From: Balaji H. Kasal [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List
 user@struts.apache.org
 To: user@struts.apache.org
 Subject: New to Struts
 Date: Mon, 4 Apr 2005 17:27:26 +0530 (IST)
 
 
 Hi,
 
 I am quite new to struts. Please guide me which is
 the best place to start. 
 I will prefer to start with Struts example ()src
 code).
 
 
 Thanks in advance.
 
 --Balaji
 

-
 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]
 
 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: How to submit a variable number of text fields ?

2005-04-06 Thread Stéphane Zuckerman
Good stuff on LazyList here
http://wiki.apache.org/struts/StrutsCatalogLazyList
Thanks a lot for your help ... I think I'm as confused as you (maybe 
more !), even after reading the thread related to your question... I 
think I need a simple example (something like a form in a JSP, an 
ActionForm - or a DynaActionForm - processing it, an Action, and finally 
a JSP page for results display...)

I'll try to build one... :-)
--
Stéphane Zuckerman
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Struts with Tiles

2005-04-06 Thread Kade Jeevan Kumar
hi, let me explain problem in better way,
using tiles framework i've created a layout page , which embed various 
jsp's.Now u can say that each jsp is a region in the layout.say we have divided 
our layout into three regions one for header,one for footer and one for content.
Now if in my content area  i have say log in jsp(with struts), now if after 
taking inputs from the user , i wanna go to welcome page . now here is the 
problem, i want to display that welcome page into same content region.right now 
if action class returns sucesses,struts config take us to welcome page, but i 
want to embed that welcome page in the content region in layout page.
 
hope this will provide you witha better idea.

[EMAIL PROTECTED] wrote:

... but the the problem i'm facing is how to point to a particular
region in tiles framework from struts config.


What do you exactly mean? Please expose your problem with more details.


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



-
Yahoo! Messenger
 Show us what our next emoticon should look like. Join the fun.

change selected item in drop down list

2005-04-06 Thread Anja Friedrichsen
Hi!
My application is based on stuts and contains among other thing a 
dropdown list and a graph. What I want to do, is to change the selected 
item in the drop down list, when clicking on the corresponding node in 
the graph.
Is it possible to change the selected item in a dropdown list?

My drop down list looks like that:
 html:select property=cvIdentification
 html:options collection=cvIdentifications 
property=shortlabel labelProperty=shortlabel /
 /html:select

Thanks in advanced!
Anja
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: change selected item in drop down list

2005-04-06 Thread Mark Benussi
Yes you can select an option in a selection, but you would need to know the
index of the option.

form.elements['select'].options[i].selected = true;

When generating the select using the html:options argument your presentation
layer wont have much knowledge of the data passed so you will have to
recurse the options until you find one that matches your selection on the
map.

function somethingHappened(mapSelection) {
var options = form.elements['select'].options[i];
for(var i = 0; i  options.length; i++) {
var option = options[i];
if(option.value == mapSelection) {
option.selected = true;
break;
}
}   
}
-Original Message-
From: Anja Friedrichsen [mailto:[EMAIL PROTECTED] 
Sent: 06 April 2005 11:20
To: Struts Users Mailing List
Subject: change selected item in drop down list

Hi!

My application is based on stuts and contains among other thing a 
dropdown list and a graph. What I want to do, is to change the selected 
item in the drop down list, when clicking on the corresponding node in 
the graph.
Is it possible to change the selected item in a dropdown list?

My drop down list looks like that:

  html:select property=cvIdentification
  html:options collection=cvIdentifications 
property=shortlabel labelProperty=shortlabel /
  /html:select

Thanks in advanced!

Anja

-
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: Popup Windows with Struts Actions

2005-04-06 Thread Dakota Jack
Man, you guys are hot and helpful today.  Thanks loads!  I have
another question from an earlier helpful suggestion regarding
Netscape.  I am testing the following code and it works in everything
but Netscape.  With Netscape, nothing happens.  Anyone know what the
issue is?

Jack


  html:form
method=post
action=album_photo.CRACKWILLOW
target=x
onsubmit=window.open('',this.target, location='0',
directories='0', status='0', menubar='0', 'scrollbar='2', toolbar='0',
resizable='0', copyhistory='0',width='5000' height='5000',);return
true;
html:image src='resource.CRACKWILLOW?file=ALBUM.gif'
property='yo.method'/
!-- put radio values in here --
  /html:form

On Apr 5, 2005 5:03 PM, Smith, Thad [EMAIL PROTECTED] wrote:
 The window.open javascript method takes an optional target which is the
 named frame/window that you want to be the destination output. There are
 a few built in names such as _parent, _blank, _self that serve special
 purposes.
 
 If the browser is unable to find a frame called dontCareThatName, it
 attempts to find a window called dontCareThatName. If it is unable to
 find a window with that name it will open a new window
 altogether...hence dontCareThatName will open a new window the first
 time this method is called. Any subsequent calls to window.open with a
 target of dontCareThatName will send the output to the opened window.
 To guarantee that a new window is opened every time use _blank.
 
 Regards,
 
 Thad Smith
 
 -Original Message-
 From: Dakota Jack [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 05, 2005 6:25 PM
 To: Struts Users Mailing List
 Subject: Re: Popup Windows with Struts Actions
 
 This looks cool to me as well.  What is with the
 target=dontCareThatName?  Is this necessary, and, if so, what should
 dontCareThatName be?  Thanks,
 
 On Apr 5, 2005 2:29 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  Dakota Jack wrote:
 
  Anyone have some code on using JavaScript to open and close popup
  windows with a Struts Action?  Thanks.
  
  Jack
  
  
  
  I like very much:
 
  html:form action=/yourAction ... target=dontCareThatName
  onsubmit=window.open('',this.target,'scroolbar=no,
 toolbar=no');return
  true;
  html:text...
  html:hidden
  /html:form
 
  The output of yourAction will be shown in the popup, and all your form
  fields are brought the normal way to yourAction
  with no need to put them into a big query string after the url in the
  open() function.
 
 Wolfgang
 
 
 
 --
 You can lead a horse to water but you cannot make it float on its
 back.
 ~Dakota Jack~
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
You can lead a horse to water but you cannot make it float on its back.
~Dakota Jack~

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



logic:iterate and field indices

2005-04-06 Thread Andre Bonhote
Hi!
I am quite new to Struts and to java, but I god hooked (former addicted 
perl programmer). Please keep this in mind before newbie-bashing me ;-)

In my project, I have some application wide settings, launched using 
web.xml's load-on-startup1/load-on-startup thing. This loaded class 
populates some attributes with values for later use. One of the 
attributes for example is holding a String[].

Now, in the jsp, I have this:
logic:iterate id=element name=showFacilitiesArray
bean:write name=element /br /
/logic:iterate
This works fine so far, but because I'd like to put that into a select 
form, I would like to go one step further: How do I print out the index 
of the current field?

I mean, I could do it in a scriptlet with a simple for loop, printing 
the i each time, but actually I would appreciate no scriptlets at all.

Any hints here? Unfortunately it's not that easy to google for that kind 
of information :-/

Thanks in advance!
André

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


AW: logic:iterate and field indices

2005-04-06 Thread Leon Rosenberg
indexId will do
http://struts.apache.org/userGuide/struts-logic.html#iterate

select name=... 
 logic:iterate id=element name=showFacilitiesArray indexId=index
 option value=bean:write name=index/bean:write
name=element//option
/logic:iterate 
/select

You may also want to look at html:options and html:optionsCollection

This would make above code a two-liner, and work with action forms.

Regards
Leon

 -Ursprüngliche Nachricht-
 Von: news [mailto:[EMAIL PROTECTED] Im Auftrag von Andre Bonhote
 Gesendet: Mittwoch, 6. April 2005 13:21
 An: user@struts.apache.org
 Betreff: logic:iterate and field indices
 
 Hi!
 
 I am quite new to Struts and to java, but I god hooked 
 (former addicted perl programmer). Please keep this in mind 
 before newbie-bashing me ;-)
 
 In my project, I have some application wide settings, 
 launched using web.xml's load-on-startup1/load-on-startup 
 thing. This loaded class populates some attributes with 
 values for later use. One of the attributes for example is 
 holding a String[].
 
 Now, in the jsp, I have this:
 
 logic:iterate id=element name=showFacilitiesArray
  bean:write name=element /br / /logic:iterate
 
 This works fine so far, but because I'd like to put that into 
 a select form, I would like to go one step further: How do 
 I print out the index of the current field?
 
 I mean, I could do it in a scriptlet with a simple for loop, 
 printing the i each time, but actually I would appreciate no 
 scriptlets at all.
 
 Any hints here? Unfortunately it's not that easy to google 
 for that kind of information :-/
 
 Thanks in advance!
 
 André
 
 
 
 
 -
 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]



AW: logic:iterate and field indices

2005-04-06 Thread Leon Rosenberg
indexId will do
http://struts.apache.org/userGuide/struts-logic.html#iterate

select name=... 
 logic:iterate id=element name=showFacilitiesArray indexId=index
 option value=bean:write name=index/bean:write
name=element//option
/logic:iterate 
/select

You may also want to look at html:options and html:optionsCollection

This would make above code a two-liner, and work with action forms.

Regards
Leon

 -Ursprüngliche Nachricht-
 Von: news [mailto:[EMAIL PROTECTED] Im Auftrag von Andre Bonhote
 Gesendet: Mittwoch, 6. April 2005 13:21
 An: user@struts.apache.org
 Betreff: logic:iterate and field indices
 
 Hi!
 
 I am quite new to Struts and to java, but I god hooked 
 (former addicted perl programmer). Please keep this in mind 
 before newbie-bashing me ;-)
 
 In my project, I have some application wide settings, 
 launched using web.xml's load-on-startup1/load-on-startup 
 thing. This loaded class populates some attributes with 
 values for later use. One of the attributes for example is 
 holding a String[].
 
 Now, in the jsp, I have this:
 
 logic:iterate id=element name=showFacilitiesArray
  bean:write name=element /br / /logic:iterate
 
 This works fine so far, but because I'd like to put that into 
 a select form, I would like to go one step further: How do 
 I print out the index of the current field?
 
 I mean, I could do it in a scriptlet with a simple for loop, 
 printing the i each time, but actually I would appreciate no 
 scriptlets at all.
 
 Any hints here? Unfortunately it's not that easy to google 
 for that kind of information :-/
 
 Thanks in advance!
 
 André
 
 
 
 
 -
 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: Popup Windows with Struts Actions

2005-04-06 Thread James Neville
Jack,
I seem to remember having problems in a project with similar rqmnts some 
time ago.

I *think* your problem lies here:-
target=x
onsubmit=window.open('',this.target
Where in NS the form appears to submit before the new window is registered, and 
hence the window target is not valid.
I could be wrong though.
We prefer to separate the JS into different functions and call the form 
from an onClick event.
This way we know we have a target before form submission, and we gain 
common JS functions so we don't need to mess with the JSPs too often :)

// --- Javascript --- //
script   
function submitForm(formName)
{
// get the form element
var form = eval(createObjectRef(formName));
// open the window
openNewWindow('#','New_Window','width=600,height=745,menubar=no,resizable=no,scrollbars=no,status=yes');
// set the form target
form.target = 'New_Window';
// submit it to the target
form.submit();
}

function createObjectRef(name)
{
var obj = null;
if (document.getElementById != null)
   { // MS
   obj = document.getElementById(name);
   }
else if (document.all)
   { // NS
   obj = document.all[name];
   }
return obj
}
function openNewWindow(URL,windowName,features)
{
newin = window.open(URL,windowName,features);
}
script
// --- End Javascript --- //
html:form action=/EditObject styleId=EditObject
html:hidden property=objectid value=${object.objectid} /
/html:form
a href=# onClick=submitForm('c:out value=EditObject /');
edit [c:out value=${object.name} /]
/a
//  END //
Cheers
James.
Dakota Jack wrote:
Man, you guys are hot and helpful today.  Thanks loads!  I have
another question from an earlier helpful suggestion regarding
Netscape.  I am testing the following code and it works in everything
but Netscape.  With Netscape, nothing happens.  Anyone know what the
issue is?
Jack
 html:form
   method=post
   action=album_photo.CRACKWILLOW
   target=x
   onsubmit=window.open('',this.target, location='0',
directories='0', status='0', menubar='0', 'scrollbar='2', toolbar='0',
resizable='0', copyhistory='0',width='5000' height='5000',);return
true;
   html:image src='resource.CRACKWILLOW?file=ALBUM.gif'
property='yo.method'/
   !-- put radio values in here --
 /html:form
On Apr 5, 2005 5:03 PM, Smith, Thad [EMAIL PROTECTED] wrote:
The window.open javascript method takes an optional target which is the
named frame/window that you want to be the destination output. There are
a few built in names such as _parent, _blank, _self that serve special
purposes.
If the browser is unable to find a frame called dontCareThatName, it
attempts to find a window called dontCareThatName. If it is unable to
find a window with that name it will open a new window
altogether...hence dontCareThatName will open a new window the first
time this method is called. Any subsequent calls to window.open with a
target of dontCareThatName will send the output to the opened window.
To guarantee that a new window is opened every time use _blank.
Regards,
Thad Smith
-Original Message-
From: Dakota Jack [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 05, 2005 6:25 PM
To: Struts Users Mailing List
Subject: Re: Popup Windows with Struts Actions
This looks cool to me as well.  What is with the
target=dontCareThatName?  Is this necessary, and, if so, what should
dontCareThatName be?  Thanks,
On Apr 5, 2005 2:29 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Dakota Jack wrote:

Anyone have some code on using JavaScript to open and close popup
windows with a Struts Action?  Thanks.
Jack


I like very much:
html:form action=/yourAction ... target=dontCareThatName
onsubmit=window.open('',this.target,'scroolbar=no,
toolbar=no');return
true;
html:text...
html:hidden
/html:form
The output of yourAction will be shown in the popup, and all your form
fields are brought the normal way to yourAction
with no need to put them into a big query string after the url in the
open() function.
  Wolfgang

--
You can lead a horse to water but you cannot make it float on its
back.
~Dakota Jack~
-
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: AW: logic:iterate and field indices

2005-04-06 Thread Andre Bonhote
Hi Leon
Leon Rosenberg wrote:
indexId will do
http://struts.apache.org/userGuide/struts-logic.html#iterate
Been there, but somehow didn't get what it was about ... closer now.
select name=... 
 logic:iterate id=element name=showFacilitiesArray indexId=index
 option value=bean:write name=index/bean:write
name=element//option
/logic:iterate 
/select
Yeehaa! Thanks a lot!
You may also want to look at html:options and html:optionsCollection
Will do that.
This would make above code a two-liner, and work with action forms.
Hm ... Could you describe the latter? I am using a form bean specified 
in struts-config.xml and that works perfectly for other fields (like 
html:text). Is there something wrong with it?

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


JSP Precompilation Errors

2005-04-06 Thread Neuman, Ben J., AM IRM
I have a struts web-app (Struts 1.2.4, J2EE 1.3, Servlet 2.3, JSP 1.2) in
which the JSPs fail to compile. All of the exceptions are of the flavor
cannot be applied to:

_jspx_method_some_tag_#(someTag, java.servlet.PageContext) in
org.apache.jsp.xxx.some_jsp cannot be applied to (org.apache.SomeTag,
javax.servlet.jsp.PageContext)

Here is one exception word for word and the associated JSP:

D:\dev\HRMS\Modules\WebModule\build\generated\src\org\apache\jsp\common\mess
agePane_jsp.java:105:
_jspx_meth_bean_write_0(javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.Pa
geContext) in org.apache.jsp.common.messagePane_jsp cannot be applied to
(org.apache.struts.taglib.html.MessagesTag,javax.servlet.jsp.PageContext)
  if (_jspx_meth_bean_write_0(_jspx_th_html_messages_0,
_jspx_page_context))



%@ taglib uri=/struts-bean prefix=bean %

%@ taglib uri=/struts-html prefix=html %

%@ taglib uri=/struts-logic prefix=logic %

div id=messagePane

logic:messagesPresent message=true

table cellspacing=1 cellpadding=1 border=0 width=100%

tr

td

table width=100% align=center border=0

tr

tdhtml:messages id='message' message='true'

bean:write name=message/

/html:messages 

/td

/tr

/table 

/td

/tr 

/table

/logic:messagesPresent 

/div



I have a suspicion that this is a classpath problem and not related to
Struts directly, however, any help would be greatly appreciated. 

Thanks! 

Ben



HTML Map Definition

2005-04-06 Thread gdeschen
Greetings,

I have a small problem that I'd like to resolve.
I have just upgraded (sometimes it feels more like a downgrade!) from 
WebSphere Studio Application Developer (WSAD) v5.1.1 to v5.1.2.

The issue is that I now have a warning that the hrefs below: targets 
cannot be resolved.
It is just annoying to have these messages.

%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
map name=tabMap
   area shape=rect coords=96,5,5,23 href=
/personal/timeAndAttendance/LeaveAndOvertimeCalendar.do
  alt=bean:message key='title.calender'/
   area shape=rect coords=192,5,100,23 href=
/personal/timeAndAttendance/LeaveAndOvertimeBalances.do
alt=bean:message key='title.balances'/
   area shape=rect coords=276,5,195,23 href=
/personal/timeAndAttendance/LeaveAndOvertimeDetails.do
  alt=bean:message key='title.details'/
/map

Is there any better way to write this map definition?

- Glenn


Re: JSP Precompilation Errors

2005-04-06 Thread James Mitchell
This is working fine for me.  I run often run jspc against the current app 
I'm working on and it works fine with  500 jsp pages.  We use a mixture of 
Struts Tags, JSTL, and a few custom tags.


--
James Mitchell
Software Engineer / Open Source Evangelist
Consulting / Mentoring / Freelance
EdgeTech, Inc.
678.910.8017
AIM:   jmitchtx
Yahoo: jmitchtx
MSN:   [EMAIL PROTECTED]

- Original Message - 
From: Neuman, Ben J., AM IRM [EMAIL PROTECTED]
To: user@struts.apache.org
Sent: Wednesday, April 06, 2005 9:20 AM
Subject: JSP Precompilation Errors


I have a struts web-app (Struts 1.2.4, J2EE 1.3, Servlet 2.3, JSP 1.2) in
which the JSPs fail to compile. All of the exceptions are of the flavor
cannot be applied to:
_jspx_method_some_tag_#(someTag, java.servlet.PageContext) in
org.apache.jsp.xxx.some_jsp cannot be applied to (org.apache.SomeTag,
javax.servlet.jsp.PageContext)
Here is one exception word for word and the associated JSP:
D:\dev\HRMS\Modules\WebModule\build\generated\src\org\apache\jsp\common\mess
agePane_jsp.java:105:
_jspx_meth_bean_write_0(javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.Pa
geContext) in org.apache.jsp.common.messagePane_jsp cannot be applied to
(org.apache.struts.taglib.html.MessagesTag,javax.servlet.jsp.PageContext)
 if (_jspx_meth_bean_write_0(_jspx_th_html_messages_0,
_jspx_page_context))

   %@ taglib uri=/struts-bean prefix=bean %
   %@ taglib uri=/struts-html prefix=html %
   %@ taglib uri=/struts-logic prefix=logic %
   div id=messagePane
   logic:messagesPresent message=true
   table cellspacing=1 cellpadding=1 border=0 width=100%
   tr
   td
   table width=100% align=center border=0
   tr
   tdhtml:messages id='message' message='true'
   bean:write name=message/
   /html:messages
   /td
   /tr
   /table
   /td
   /tr
   /table
   /logic:messagesPresent
   /div

I have a suspicion that this is a classpath problem and not related to
Struts directly, however, any help would be greatly appreciated.
Thanks!
Ben


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


Re: JSP Precompilation Errors

2005-04-06 Thread Niall Pemberton
Haven't got a clue what your problem is, but one thing doesn't seem to add
up. Your stack trace refers to javax.servlet.jsp.tagext.JspTag which I
understood was introduced in Servlet 2.4 / JSP 2.0.

http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/jsp/tagext/JspTag.html

But you say the versions are Servlet 2.3, JSP 1.2?

Niall

- Original Message - 
From: Neuman, Ben J., AM IRM [EMAIL PROTECTED]
Sent: Wednesday, April 06, 2005 2:20 PM


 I have a struts web-app (Struts 1.2.4, J2EE 1.3, Servlet 2.3, JSP 1.2) in
 which the JSPs fail to compile.

 Here is one exception word for word and the associated JSP:


D:\dev\HRMS\Modules\WebModule\build\generated\src\org\apache\jsp\common\mess
 agePane_jsp.java:105:

_jspx_meth_bean_write_0(javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.Pa
 geContext) in org.apache.jsp.common.messagePane_jsp cannot be applied to
 (org.apache.struts.taglib.html.MessagesTag,javax.servlet.jsp.PageContext)
   if (_jspx_meth_bean_write_0(_jspx_th_html_messages_0,
 _jspx_page_context))



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



[OT] edit HTML code on fly using java

2005-04-06 Thread Ashish Kulkarni
Hi
does any one know a class or utility in java which
will allow to update or modify HTML code on the fly,
Here is what i am trying to do, i have a filter which
which intercepts the response before being send out to
browser, depending on some condition i want to modify
this response which is HTML code, and add some tags
and modify some text and then send this modified
response to the browser,
Is there some utility which will help in doing this, i
dont want to work with strings manipulation but some
kind of class which will allow me to work with the
HTML as XML file 

regards
Ashish

A$HI$H



__ 
Do you Yahoo!? 
Yahoo! Personals - Better first dates. More second dates. 
http://personals.yahoo.com


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



RE: [OT] edit HTML code on fly using java

2005-04-06 Thread Fogleson, Allen
I imagine there are several options here.

1) assuming you know the html is well formatted. And if you use the
struts tags it is not necessarily well formatted (i.e. the base tag does
not include a closing tag it renders as base href= ... not base
href=.../) you could simply run the html into jaxp

2) use an object oriented framework to parse the html. Check out
HTMLParser (http://htmlparser.sourceforge.net/) on sourceforge.net. This
framework has grown up quite a bit and will probably at least assist you
in what you want to do... 

Al


-Original Message-
From: Ashish Kulkarni [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 06, 2005 9:56 AM
To: user@struts.apache.org
Subject: [OT] edit HTML code on fly using java

Hi
does any one know a class or utility in java which
will allow to update or modify HTML code on the fly,
Here is what i am trying to do, i have a filter which
which intercepts the response before being send out to
browser, depending on some condition i want to modify
this response which is HTML code, and add some tags
and modify some text and then send this modified
response to the browser,
Is there some utility which will help in doing this, i
dont want to work with strings manipulation but some
kind of class which will allow me to work with the
HTML as XML file 

regards
Ashish

A$HI$H



__ 
Do you Yahoo!? 
Yahoo! Personals - Better first dates. More second dates. 
http://personals.yahoo.com


-
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: [OT] edit HTML code on fly using java

2005-04-06 Thread Frank W. Zammetti
If your HTML is valid XHTML, you should be able to apply XSLT
transformations on it without too much trouble.  But, this would be an
expensive operation per request, probably a VERY expensive one at that, so
if it is something that is going to happen frequently I wouldn't go this
route.  In fact, if it is anything other than trivial changes and it will
be frequent (on every single request?), my first instinct would actually
be to use string manipulations because I think you would be hard-pressed
to find something else that performs well enough (assuming your code was
relatively tight of course).  I'm sure something is out there, but if
we're talking something that happens every request, I'd certainly want
maximum control over it.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Wed, April 6, 2005 10:56 am, Ashish Kulkarni said:
 Hi
 does any one know a class or utility in java which
 will allow to update or modify HTML code on the fly,
 Here is what i am trying to do, i have a filter which
 which intercepts the response before being send out to
 browser, depending on some condition i want to modify
 this response which is HTML code, and add some tags
 and modify some text and then send this modified
 response to the browser,
 Is there some utility which will help in doing this, i
 dont want to work with strings manipulation but some
 kind of class which will allow me to work with the
 HTML as XML file

 regards
 Ashish

 A$HI$H



 __
 Do you Yahoo!?
 Yahoo! Personals - Better first dates. More second dates.
 http://personals.yahoo.com


 -
 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: [OT] edit HTML code on fly using java

2005-04-06 Thread Fogleson, Allen
Actually if it is something that occurs on every request im not even
sure I would go the filter route. Post processing the html is going to
be expensive in terms of performance then no matter what you do. I would
probably reconsider the architecture and see if I couldn't somehow
pre-process the html either by the addition of request attributes or
something so that the jsp renders what I want instead of doing it in the
filter by post processing. If it is just an occasional request then you
could probably get away with the filter and doing xslt, or some other
parsing without a huge negative impact. Lets face it there will be some
impact on at least some requests no matter what :)

Al

-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 06, 2005 10:06 AM
To: Struts Users Mailing List
Cc: user@struts.apache.org
Subject: Re: [OT] edit HTML code on fly using java

If your HTML is valid XHTML, you should be able to apply XSLT
transformations on it without too much trouble.  But, this would be an
expensive operation per request, probably a VERY expensive one at that,
so
if it is something that is going to happen frequently I wouldn't go this
route.  In fact, if it is anything other than trivial changes and it
will
be frequent (on every single request?), my first instinct would actually
be to use string manipulations because I think you would be hard-pressed
to find something else that performs well enough (assuming your code was
relatively tight of course).  I'm sure something is out there, but if
we're talking something that happens every request, I'd certainly want
maximum control over it.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


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



MessageResources

2005-04-06 Thread Fogleson, Allen
I know last week we had some discussions about MessageResources (mostly
about pulling from a DB). I did a little digging and extending and came
up with a quick hit that pulled the resources from a db. At the same
time I rememebered an earlier discussion about having submessages in
messages. That is something like:

User.name=Name
User.firstName=First ${Name}

Calling user.firstName would of course render First Name.

I did a quick addition to the DB code to allow such things (but did not
check circularity.. the form where a child message includes a parent (or
itself). 

Long story short is there any interest in this? I can have a quick patch
to the core source in bugzilla relatively quickly. Although in testing I
think that $( instead of ${ would be better since if ${msg} is not found
then the argument processor fails on the argument ${msg} because it is
not a number. But that's a small implementation detail. 

I personally probably wouldn't use the facility much. I think it becomes
quickly confusing, but others may see a use for it. (My mileage has
certainly varied)

Al


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



Re: change selected item in drop down list

2005-04-06 Thread Anja Friedrichsen
Thanks for your answer Mark,
I am new with JavaScripts and I tried your example, but it does not 
really work...

I tried to do
   alert(options);
after
   var options = form.elements['select'].options[i];
but nothing happend. What exactly is that line doing?
Thanks, Anja

Mark Benussi wrote:

Yes you can select an option in a selection, but you would need to know the
index of the option.
form.elements['select'].options[i].selected = true;
When generating the select using the html:options argument your presentation
layer wont have much knowledge of the data passed so you will have to
recurse the options until you find one that matches your selection on the
map.
function somethingHappened(mapSelection) {
	var options = form.elements['select'].options[i];
	for(var i = 0; i  options.length; i++) {
		var option = options[i];
		if(option.value == mapSelection) {
			option.selected = true;
			break;
		}
	}	
}
-Original Message-
From: Anja Friedrichsen [mailto:[EMAIL PROTECTED] 
Sent: 06 April 2005 11:20
To: Struts Users Mailing List
Subject: change selected item in drop down list

Hi!
My application is based on stuts and contains among other thing a 
dropdown list and a graph. What I want to do, is to change the selected 
item in the drop down list, when clicking on the corresponding node in 
the graph.
Is it possible to change the selected item in a dropdown list?

My drop down list looks like that:
 html:select property=cvIdentification
 html:options collection=cvIdentifications 
property=shortlabel labelProperty=shortlabel /
 /html:select

Thanks in advanced!
Anja
-
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-el:submit 'value' attribute behavior change 1.2.0 to 1.2.6

2005-04-06 Thread Wendy Smoak
From: Niall Pemberton [EMAIL PROTECTED]

 Apologies, this was my fault - I added a trim() to the value when I
 re-factored this tag :-(

 I'll change this back.

Thanks, I saw the fix go in.  But now... how do I get a 1.2.7-dev (or
whatever it would be called) build?  Specifically, what do I type with
command-line svn to get the right branch?   From there I think I can build
it.

Thanks,
-- 
Wendy Smoak


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



Re: change selected item in drop down list

2005-04-06 Thread Frank W. Zammetti
My code for this (written probably five years ago) looks very similar, but
maybe two versions would help...

function locateDDValue(drop_down, find_me) {
 found_it = false;
 for (i = 0; (i  drop_down.length)  !found_it; i++) {
  if (drop_down.options[i].value == find_me) {
   found_it = true;
   drop_down.options[i].selected = true;
  }
 }
 return found;
}

Has the minor benefit of telling the caller whether the value was found or
not.  Also, not that this is case-sensitive, so you may want to do some
toLowerCase() calls on find_me and each value checked against from the
dropdown.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Wed, April 6, 2005 11:23 am, Anja Friedrichsen said:
 Thanks for your answer Mark,

 I am new with JavaScripts and I tried your example, but it does not
 really work...

 I tried to do

 alert(options);

 after
 var options = form.elements['select'].options[i];


 but nothing happend. What exactly is that line doing?

 Thanks, Anja



 Mark Benussi wrote:


Yes you can select an option in a selection, but you would need to know
 the
index of the option.

form.elements['select'].options[i].selected = true;

When generating the select using the html:options argument your
 presentation
layer wont have much knowledge of the data passed so you will have to
recurse the options until you find one that matches your selection on the
map.

function somethingHappened(mapSelection) {
  var options = form.elements['select'].options[i];
  for(var i = 0; i  options.length; i++) {
  var option = options[i];
  if(option.value == mapSelection) {
  option.selected = true;
  break;
  }
  }
}
-Original Message-
From: Anja Friedrichsen [mailto:[EMAIL PROTECTED]
Sent: 06 April 2005 11:20
To: Struts Users Mailing List
Subject: change selected item in drop down list

Hi!

My application is based on stuts and contains among other thing a
dropdown list and a graph. What I want to do, is to change the selected
item in the drop down list, when clicking on the corresponding node in
the graph.
Is it possible to change the selected item in a dropdown list?

My drop down list looks like that:

  html:select property=cvIdentification
  html:options collection=cvIdentifications
property=shortlabel labelProperty=shortlabel /
  /html:select

Thanks in advanced!

Anja

-
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: MessageResources

2005-04-06 Thread Niall Pemberton
Its not something I would want and it sounds like its over-complicating the
situation.

You may want to see if there is any interest from any of the other
committers before going to the trouble of coding something. It can be
frustrating to bother to submit patches and then have them ignored - either
ping the dev list or create a bugzilla enhancement ticket. Having said that,
if you don't code up a patch you're just as likely to have someone saying
code talks - its a bit chicken and egg!!!

Niall

- Original Message - 
From: Fogleson, Allen [EMAIL PROTECTED]
Sent: Wednesday, April 06, 2005 4:18 PM


I know last week we had some discussions about MessageResources (mostly
about pulling from a DB). I did a little digging and extending and came
up with a quick hit that pulled the resources from a db. At the same
time I rememebered an earlier discussion about having submessages in
messages. That is something like:

User.name=Name
User.firstName=First ${Name}

Calling user.firstName would of course render First Name.

I did a quick addition to the DB code to allow such things (but did not
check circularity.. the form where a child message includes a parent (or
itself).

Long story short is there any interest in this? I can have a quick patch
to the core source in bugzilla relatively quickly. Although in testing I
think that $( instead of ${ would be better since if ${msg} is not found
then the argument processor fails on the argument ${msg} because it is
not a number. But that's a small implementation detail.

I personally probably wouldn't use the facility much. I think it becomes
quickly confusing, but others may see a use for it. (My mileage has
certainly varied)



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



RE: [OT] edit HTML code on fly using java

2005-04-06 Thread Ashish Kulkarni
Hello
My project is sort of screen scrpaer (web facing on
AS400)
In this i want to add some features which are not
available in green screen, like adding some graphics
on the fly by modifying the response generated  by web
facing tool
Any guidance on doing so with speed, it will be for
every request for that particular jsp

Ashish

--- Fogleson, Allen [EMAIL PROTECTED]
wrote:
 Actually if it is something that occurs on every
 request im not even
 sure I would go the filter route. Post processing
 the html is going to
 be expensive in terms of performance then no matter
 what you do. I would
 probably reconsider the architecture and see if I
 couldn't somehow
 pre-process the html either by the addition of
 request attributes or
 something so that the jsp renders what I want
 instead of doing it in the
 filter by post processing. If it is just an
 occasional request then you
 could probably get away with the filter and doing
 xslt, or some other
 parsing without a huge negative impact. Lets face it
 there will be some
 impact on at least some requests no matter what :)
 
 Al
 
 -Original Message-
 From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
 
 Sent: Wednesday, April 06, 2005 10:06 AM
 To: Struts Users Mailing List
 Cc: user@struts.apache.org
 Subject: Re: [OT] edit HTML code on fly using java
 
 If your HTML is valid XHTML, you should be able to
 apply XSLT
 transformations on it without too much trouble. 
 But, this would be an
 expensive operation per request, probably a VERY
 expensive one at that,
 so
 if it is something that is going to happen
 frequently I wouldn't go this
 route.  In fact, if it is anything other than
 trivial changes and it
 will
 be frequent (on every single request?), my first
 instinct would actually
 be to use string manipulations because I think you
 would be hard-pressed
 to find something else that performs well enough
 (assuming your code was
 relatively tight of course).  I'm sure something is
 out there, but if
 we're talking something that happens every request,
 I'd certainly want
 maximum control over it.
 
 -- 
 Frank W. Zammetti
 Founder and Chief Software Architect
 Omnytex Technologies
 http://www.omnytex.com
 
 

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



__ 
Yahoo! Messenger 
Show us what our next emoticon should look like. Join the fun. 
http://www.advision.webevents.yahoo.com/emoticontest

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



RE: MessageResources

2005-04-06 Thread Fogleson, Allen
Niall

I personally agree with you. Its not something I would necessarily use.
It adds complexity to the message resource in my opinion since now one
must check for circularity, and what does one do if there is
circularity? 

Secondly I'm not entirely sure the patch really belongs in struts since
in 1.3 it looks like we are moving to commons-resources (at least I saw
a patch in there to do that although it does not yet seem to be applied
to the trunk of 1.3) and in that case the patch probably should go to
common resources. 

I totally understand the chicken egg thing :) I wouldn't bother the user
list if I didn't have code to do it already. Heh. I already have the
patch or at least can create the svn diff within seconds. Just wondered
if it was a one time person saying it would be nice or if there really
was interest before even bothering with creating a bug/patch
combination.


-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 06, 2005 10:44 AM
To: Struts Users Mailing List
Subject: Re: MessageResources

Its not something I would want and it sounds like its over-complicating
the
situation.

You may want to see if there is any interest from any of the other
committers before going to the trouble of coding something. It can be
frustrating to bother to submit patches and then have them ignored -
either
ping the dev list or create a bugzilla enhancement ticket. Having said
that,
if you don't code up a patch you're just as likely to have someone
saying
code talks - its a bit chicken and egg!!!

Niall

- Original Message - 
From: Fogleson, Allen [EMAIL PROTECTED]
Sent: Wednesday, April 06, 2005 4:18 PM


I know last week we had some discussions about MessageResources (mostly
about pulling from a DB). I did a little digging and extending and came
up with a quick hit that pulled the resources from a db. At the same
time I rememebered an earlier discussion about having submessages in
messages. That is something like:

User.name=Name
User.firstName=First ${Name}

Calling user.firstName would of course render First Name.

I did a quick addition to the DB code to allow such things (but did not
check circularity.. the form where a child message includes a parent (or
itself).

Long story short is there any interest in this? I can have a quick patch
to the core source in bugzilla relatively quickly. Although in testing I
think that $( instead of ${ would be better since if ${msg} is not found
then the argument processor fails on the argument ${msg} because it is
not a number. But that's a small implementation detail.

I personally probably wouldn't use the facility much. I think it becomes
quickly confusing, but others may see a use for it. (My mileage has
certainly varied)



-
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-el:submit 'value' attribute behavior change 1.2.0 to 1.2.6

2005-04-06 Thread Niall Pemberton
Nightlies for 1.2.x are being created here...

http://svn.apache.org/builds/struts/maven/STRUTS_1_2_BRANCH/

...but I think you'll need to wait till the next one to pick up that change.

You want the STRUTS_1_2_BRANCH branch if you're going to check it out and
build it yourself. A word of warning changes to the build process  for the
1.2.x branch were going in as recently as last night, so you need to be
aware that the build process is in a state of flux.

James posted a useful mail here

http://www.mail-archive.com/dev@struts.apache.org/msg07192.html

... although the url for the 1.2.x branch should be

http://svn.apache.org/repos/asf/struts/core/branches/STRUTS_1_2_BRANCH

Niall

- Original Message - 
From: Wendy Smoak [EMAIL PROTECTED]
Sent: Wednesday, April 06, 2005 4:35 PM


 Thanks, I saw the fix go in.  But now... how do I get a 1.2.7-dev (or
 whatever it would be called) build?  Specifically, what do I type with
 command-line svn to get the right branch?   From there I think I can build
 it.



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



RE: [OT] edit HTML code on fly using java

2005-04-06 Thread Fogleson, Allen
Ashish,

Assuming you have a limited set of changes (for instance set A adds
images 1,2,3 for user type X, setB adds 2,4,7 for user type y, etc) then
I would probably consider creating separate jsps that already have the
enhancements and use my forwards to forward to the correct jsp (along
with the objects returned from the scraping of course) versus trying to
post process a single jsp. The screen scraping (IMHO) should be the
biggest hit to performance not enhancements to the scraped page and this
method allows for that. 

Barring having N+1 jsps out there with minor changes you could also use
tiles in this case and perhaps cut down on the sheer number of jsp's
since likely a major portion of the page will be the scraped content.

Al
 

-Original Message-
From: Ashish Kulkarni [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 06, 2005 10:45 AM
To: Struts Users Mailing List
Subject: RE: [OT] edit HTML code on fly using java

Hello
My project is sort of screen scrpaer (web facing on
AS400)
In this i want to add some features which are not
available in green screen, like adding some graphics
on the fly by modifying the response generated  by web
facing tool
Any guidance on doing so with speed, it will be for
every request for that particular jsp

Ashish

--- Fogleson, Allen [EMAIL PROTECTED]
wrote:
 Actually if it is something that occurs on every
 request im not even
 sure I would go the filter route. Post processing
 the html is going to
 be expensive in terms of performance then no matter
 what you do. I would
 probably reconsider the architecture and see if I
 couldn't somehow
 pre-process the html either by the addition of
 request attributes or
 something so that the jsp renders what I want
 instead of doing it in the
 filter by post processing. If it is just an
 occasional request then you
 could probably get away with the filter and doing
 xslt, or some other
 parsing without a huge negative impact. Lets face it
 there will be some
 impact on at least some requests no matter what :)
 
 Al
 
 -Original Message-
 From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
 
 Sent: Wednesday, April 06, 2005 10:06 AM
 To: Struts Users Mailing List
 Cc: user@struts.apache.org
 Subject: Re: [OT] edit HTML code on fly using java
 
 If your HTML is valid XHTML, you should be able to
 apply XSLT
 transformations on it without too much trouble. 
 But, this would be an
 expensive operation per request, probably a VERY
 expensive one at that,
 so
 if it is something that is going to happen
 frequently I wouldn't go this
 route.  In fact, if it is anything other than
 trivial changes and it
 will
 be frequent (on every single request?), my first
 instinct would actually
 be to use string manipulations because I think you
 would be hard-pressed
 to find something else that performs well enough
 (assuming your code was
 relatively tight of course).  I'm sure something is
 out there, but if
 we're talking something that happens every request,
 I'd certainly want
 maximum control over it.
 
 -- 
 Frank W. Zammetti
 Founder and Chief Software Architect
 Omnytex Technologies
 http://www.omnytex.com
 
 

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



__ 
Yahoo! Messenger 
Show us what our next emoticon should look like. Join the fun. 
http://www.advision.webevents.yahoo.com/emoticontest

-
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:messages vs html:errors

2005-04-06 Thread Michael Oliver
Still not displaying messages, here is what I have so far.

struts-config.xml entry:

snip
...controller/
 message-resources id=ApplicationResources key=ApplicationResources
  null=false parameter=ApplicationResources/
 plug-in className=org.apache.struts.tiles.TilesPlugin...

The ApplicationResources.properties file is located at 

/WEB-INF/classes/ApplicationResources.properties

it contains:

snip
... 
label.phone.number=Phone Number
label.welcome=Welcome back {0} {1}\!

message.body={0}

error.detail={0}
error.min.length=The input must be at least {0} characters in length.
error.max.length=The input cannot be longer than {0} characters in
length.
errors.required={0} is required.
errors.invalid={0} is invalid.
...
/snip

I have log4j setup with 
log4j.logger.org.apache.struts=DEBUG,A1,A2

and on startup the log4j related output is:

656   DEBUG [main] action.ActionServlet - Initializing module path ''
message resources from 'ApplicationResources'
656   INFO  [main] util.PropertyMessageResources - Initializing,
config='ApplicationResources', returnNull=true

I have an Action that forwards to a jsp, the action execute has:

snip
...
if (uri.indexOf(Al) = 0){
ActionMessages messages = new ActionMessages();
messages.add(ActionMessages.GLOBAL_MESSAGE, 
new ActionMessage(message.body,retStatus));
  this.saveMessages(request, messages);
}
...
/snip

where uri is a string variable of the resource the action is looking at,
and retStatus is a string that contains the status of the request.

The jsp has near the top if the body tile

snip
tiles:put name=body type=string

hr align=left width=800 color=#00 noshade
logic:messagesPresent message=true
   h3font color=redMessages:/font/h3
  ul
  html:messages id=msg
 libean:write name=msg //li
  /html:messages
  /ul
/logic:messagesPresent
...the rest of the body
/snip

When I test this setup, when the uri contains 'Al' I get the red
Messages: as I suspect, but no list of messages under it.  When I
traverse a resource without the 'Al' in the uri, I do NOT get the red
Messages:.

I have verified that xerces and the ApplicationResources are loaded from
the Catalina log:

2005-04-06 09:00:02 WebappLoader[/AJDocMan]: Deploy JAR
/WEB-INF/lib/struts.jar to
C:\Java\ArchivedWorkspaces\AJDocMan\WebContent\WEB-INF\lib\struts.jar
2005-04-06 09:00:02 WebappLoader[/AJDocMan]: Deploy JAR
/WEB-INF/lib/xercesImpl.jar to
C:\Java\ArchivedWorkspaces\AJDocMan\WebContent\WEB-INF\lib\xercesImpl.ja
r
2005-04-06 09:00:03 WebappLoader[/AJDocMan]: Deploy JAR
/WEB-INF/lib/xmlParserAPIs.jar to
C:\Java\ArchivedWorkspaces\AJDocMan\WebContent\WEB-INF\lib\xmlParserAPIs
.jar
2005-04-06 09:00:03 ContextConfig[/AJDocMan]:Adding path
'/WEB-INF/lib/xercesImpl.jar'
2005-04-06 09:00:03 ContextConfig[/AJDocMan]:Adding path
'/WEB-INF/lib/xmlParserAPIs.jar'
2005-04-06 09:00:07,500 DEBUG [main] action.ActionServlet
(ActionServlet.java:1209) - Initializing module path '' message
resources from 'ApplicationResources'
2005-04-06 09:00:07,500 INFO  [main] util.PropertyMessageResources
(PropertyMessageResources.java:127) - Initializing,
config='ApplicationResources', returnNull=true

These are the xerces-2_6_2 jars from the dist.

What can I check next?


Michael Oliver
CTO
Alarius Systems LLC
3325 N. Nellis Blvd, #1
Las Vegas, NV 89115
Phone:(702)643-7425
Fax:(702)974-0341
*Note new email changed from [EMAIL PROTECTED]
-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 05, 2005 5:09 PM
To: Struts Users Mailing List
Subject: Re: Html:messages vs html:errors

One cause of this is if it can't find the message key in your
application
resources and you have your message resources configured with
null=true.
If you change your message resources config to null=false in your
struts-config.xml

 message-resources null=false
parameter=myPackage.ApplicationResources/

Then if it can't find the message for some reason, you should get the
following displayed.

h3font color=red/fontMessages:/h3
ul

li ???en_US.error.detail/li
/ul

Another cause...do you have the taglib declaration for the html tags at
the
top of your page?

Anyway, what you have looks good, just a matter of debugging which bits
of
struts are not configured properly.

Nialll

- Original Message - 
From: Michael Oliver [EMAIL PROTECTED]
Sent: Wednesday, April 06, 2005 12:25 AM


 I tried the example from the HelpTagsErrorsAndMessages.html in my jsp
 near the top of the body.

 logic:messagesPresent

h3font color=red/fontMessages:/h3
ul
html:messages id=msg
libean:write name=msg //li
/html:messages
/ul

 /logic:messagesPresent

 The action that forwards to that jsp has:

 ActionErrors errors = new ActionErrors();
 errors.add(ActionErrors.GLOBAL_MESSAGE, new
 

Re: MessageResources

2005-04-06 Thread Dave Newton
Fogleson, Allen wrote:
I did a quick addition to the DB code to allow such things (but did not
check circularity.. the form where a child message includes a parent (or
itself). 

Long story short is there any interest in this? I can have a quick patch
to the core source in bugzilla relatively quickly. Although in testing I
think that $( instead of ${ would be better since if ${msg} is not found
then the argument processor fails on the argument ${msg} because it is
not a number. But that's a small implementation detail. 
 

What _I'm_ interested in is the same but different: I have a need for 
dynamic resources that would come from a database table in _addition_ to 
the existing resources in a regular property file.

Could your code be modified for something like that? I ahven't had a 
chance to see how this works, if its possible, etc. (It all boils down 
to a need to have classes be able to add ActionErrors (yeah, yeah, 
ActionMessages) during form processing, but without having to have 
access to any property files.)

Dave

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


RE: (Newbie question) tiles:getAsString error attribute not found

2005-04-06 Thread Neil Aggarwal
Antonio:

That seems counterintuitive to me, but it worked.

Thanks for your help!

Neil


--
Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com
FREE! Valuable info on how your business can reduce operating costs by
17% or more in 6 months or less! http://newsletter.JAMMConsulting.com

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, April 06, 2005 1:44 AM
 To: user@struts.apache.org
 Subject: Re: (Newbie question) tiles:getAsString error 
 attribute not found
 
 
 In Tiles, you can put attributes only into layout pages. In 
 short terms
 you should modify your tiles-defs.xml this way:
 
   definition name=header.with.title path=/header.jsp
 put name=pageTitle value=Welcome /
   /definition
 
   definition name=base.definition path=/layout.jsp
 put name=leftNav value=/leftNav.jsp /
 put name=footer value=/footer.jsp /
   /definition
 
   definition name=page.home extends=base.definition
 put name=header value=header.with.title /
 put name=body value=/home.jsp /
   /definition
 
 Ciao
 Antonio Petrelli
 
 Neil Aggarwal wrote:
 
 Hello:
 
 I am a newbie to struts and am trying to get a handle on
 tiles:getAsString tag.  I am having a problem in
 that is complains that the attribute I am trying to
 get does not exist.
 
 Here is what I have in my tiles-defs.xml:
 
 tiles-definitions
   !-- Base Tiles Definition --
   definition name=base.definition path=/layout.jsp
 put name=leftNav value=/leftNav.jsp /
 put name=header value=/header.jsp /
 put name=footer value=/footer.jsp /
   /definition
 
   !-- Tiles definition of home page --
   definition name=page.home extends=base.definition
 put name=pageTitle value=Welcome /
 put name=body value=/home.jsp /
   /definition
 /tiles-definitions
 
 I have an index.jsp that loads the page.home defintion:
 [EMAIL PROTECTED] uri=/WEB-INF/struts-tiles.tld prefix=tiles %
 tiles:insert definition=page.home /
 
 Here is the layout.jsp (trimmed):
 [EMAIL PROTECTED] language=java %
 [EMAIL PROTECTED] file=/imports.jsp %
 [EMAIL PROTECTED] uri=http://jakarta.apache.org/struts/tags-html; 
 prefix=html
 %
 [EMAIL PROTECTED] uri=http://jakarta.apache.org/struts/tags-tiles;
 prefix=tiles
 %
 
 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
 
 html:html locale=true
   body background=/images/pageBackground.gif
 table border=0 width=100% cellspacing=0 cellpadding=0
   tr
 td align=right valign=top width=150tiles:insert
 attribute=leftNav //td
 td valign=tophtml:img border=0 height=700
 src=/images/transparent1x1.gif width=10 //td
 td align=left valign=toptiles:insert 
 attribute=header
 /tiles:insert attribute=body /tiles:insert attribute=footer
 //td
   /tr
 /table
   /body
 /html:html
 
 Here is the header.jsp (trimmed):
 [EMAIL PROTECTED] language=java %
 [EMAIL PROTECTED] file=/imports.jsp %
 [EMAIL PROTECTED] uri=http://jakarta.apache.org/struts/tags-html; 
 prefix=html
 %
 [EMAIL PROTECTED] uri=http://jakarta.apache.org/struts/tags-tiles;
 prefix=tiles
 %
 
 table
   tr
 td class=pageTitletiles:getAsString name=pageTitle //td
   /tr
 
 When I try to load the page (You can see what I have at
 http://dev.crcbusinessservices.com/crcgroup/index.jsp)
 
 I get this error in the tomcat log:
 SEVERE: ServletException in '/layout.jsp':
 ServletException in '/header.jsp':
 Error - tag.getAsString :
 attribute 'pageTitle' not found in context. Check tag syntax
 
 Any ideas?
 
 Thanks,
  Neil
 
 --
 Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com
 FREE! Valuable info on how your business can reduce 
 operating costs by
 17% or more in 6 months or less! http://newsletter.JAMMConsulting.com
 
 
 -
 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: change selected item in drop down list

2005-04-06 Thread Mark Benussi
I am guessing in this instance you have not changed the variables I supplied
with the script with your actual form and select names.

var options = document.forms['formName'].elements['selectName'].options;

-Original Message-
From: Anja Friedrichsen [mailto:[EMAIL PROTECTED] 
Sent: 06 April 2005 16:24
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: change selected item in drop down list

Thanks for your answer Mark,

I am new with JavaScripts and I tried your example, but it does not 
really work...

I tried to do

alert(options);

after
var options = form.elements['select'].options[i];


but nothing happend. What exactly is that line doing?

Thanks, Anja



Mark Benussi wrote:


Yes you can select an option in a selection, but you would need to know the
index of the option.

form.elements['select'].options[i].selected = true;

When generating the select using the html:options argument your
presentation
layer wont have much knowledge of the data passed so you will have to
recurse the options until you find one that matches your selection on the
map.

function somethingHappened(mapSelection) {
   var options = form.elements['select'].options[i];
   for(var i = 0; i  options.length; i++) {
   var option = options[i];
   if(option.value == mapSelection) {
   option.selected = true;
   break;
   }
   }   
}
-Original Message-
From: Anja Friedrichsen [mailto:[EMAIL PROTECTED] 
Sent: 06 April 2005 11:20
To: Struts Users Mailing List
Subject: change selected item in drop down list

Hi!

My application is based on stuts and contains among other thing a 
dropdown list and a graph. What I want to do, is to change the selected 
item in the drop down list, when clicking on the corresponding node in 
the graph.
Is it possible to change the selected item in a dropdown list?

My drop down list looks like that:

  html:select property=cvIdentification
  html:options collection=cvIdentifications 
property=shortlabel labelProperty=shortlabel /
  /html:select

Thanks in advanced!

Anja

-
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: MessageResources

2005-04-06 Thread Niall Pemberton
I believe you should be able to do this already, since you can define
different factories for different bundles. So you could have your regular
standard properties files, but then define a DB bundle with your own factory
as well.

Something like this in the struts-config.xml

message-resources parameter=myPackage.ApllicationResources /
message-resources key=dbBundlefactory=myPackage.MyDbResourcesFactory /

Then you use the bundle attribute on the JSP tags to use your custom db
bundle...

  bean:message key=something bundle=dbBundle /

Niall

- Original Message - 
From: Dave Newton [EMAIL PROTECTED]
Sent: Wednesday, April 06, 2005 5:23 PM

 What _I'm_ interested in is the same but different: I have a need for
 dynamic resources that would come from a database table in _addition_ to
 the existing resources in a regular property file.

 Could your code be modified for something like that? I ahven't had a
 chance to see how this works, if its possible, etc. (It all boils down
 to a need to have classes be able to add ActionErrors (yeah, yeah,
 ActionMessages) during form processing, but without having to have
 access to any property files.)

 Dave



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



Re: html-el:submit 'value' attribute behavior change 1.2.0 to 1.2.6

2005-04-06 Thread Wendy Smoak
From: Niall Pemberton [EMAIL PROTECTED]

 Nightlies for 1.2.x are being created here...
 http://svn.apache.org/builds/struts/maven/STRUTS_1_2_BRANCH/

 ...but I think you'll need to wait till the next one to pick up that
change.

Great!  I thought the only nightlies were for 1.3. :)

Speaking of... has the dust settled sufficiently that it would be safe to
start working with the 1.3 nightlies?  There was an invitation to do so a
few weeks ago, but the build process wasn't _quite_ there yet.  I haven't
tried again.

-- 
Wendy




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



Re: html-el:submit 'value' attribute behavior change 1.2.0 to 1.2.6

2005-04-06 Thread Niall Pemberton
I got the build working a couple of weeks ago - but I didn't pick up the
recent build changes until after I'd finished the changes I was doing last
night. So I haven't tried the very latest. I have to say though that I think
James has done a great job - after struggling with a few things initially
(I'm a maven newbie) it worked very well. There are still things missing
though (docs/web site are not generated) - but all the code/jars I needed
worked for me.

Its hard to say about the nightlies, since there is still more work to
do.

http://www.mail-archive.com/dev%40struts.apache.org/msg08156.html

The main pain I found with trying out 1.3 is that instead of one distro
there are now multiple (I needed 3 for core, taglib and tiles) and you
have to distribute a jar for each of those -  plus the commons chain jar.
Other than that, everything worked fine. The only thing was - I wasn't
actually using the new ComposableRequestProcessor - I had the same one
plugged in I use for 1.2.x


Niall

- Original Message - 
From: Wendy Smoak [EMAIL PROTECTED]
Sent: Wednesday, April 06, 2005 5:45 PM


 From: Niall Pemberton [EMAIL PROTECTED]

  Nightlies for 1.2.x are being created here...
  http://svn.apache.org/builds/struts/maven/STRUTS_1_2_BRANCH/
 
  ...but I think you'll need to wait till the next one to pick up that
 change.

 Great!  I thought the only nightlies were for 1.3. :)

 Speaking of... has the dust settled sufficiently that it would be safe to
 start working with the 1.3 nightlies?  There was an invitation to do so a
 few weeks ago, but the build process wasn't _quite_ there yet.  I haven't
 tried again.



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



Re: RESEND: RE: Load message resources from DB???

2005-04-06 Thread Nic Werner
Reading from the 'Jakarta Struts Cookbook' by Bill Siggelkow, he 
discusses this problem. You want to store all labels,messages, and 
other static text in a database rather than a properties file, while 
still being able to access the values using the bean:message tag

If this is what you're looking for, go to: 
http://prdownloads.sourceforge.net/struts/OJBMessageResources.war.zip

The only date I can find on this is 2003 however. More on OJB is here 
:http://db.apache.org/ojb/

- Nix.
Günther Wieser wrote:
resend because i didn't receive it on the list. sorry if this comes to you
for the second time.
hi,
as it isn't possible to send zip files to the list, i need to copy and paste
the most important things out of our implementation:
the factory is simple:
public class DBPropertyMessageResourcesFactory extends
MessageResourcesFactory {
   /* (non-Javadoc)
* @see
org.apache.struts.util.MessageResourcesFactory#createResources(java.lang.Str
ing)
*/
   public MessageResources createResources(String config) {
   return new DBPropertyMessageResources(this, config,
this.returnNull);
   }
}
also, the DBMessageResources class is quite simple, here's the most
important method:
  public String getMessage(Locale locale, String key) {
   String result = DBPropertyMessageService.getMessage(locale, key,
returnNull);
   // we need to flush the cache of the super class MessageResource as
we want to have real 	  // dynamic data here (no caches
   // except the one in DBPropertyMessageService)
   formats.clear();
   return result; 
  }

so the REAL thing is happening in DBPropertyMessageService, and this class
just loads everything at startup (static constructor) into a hashmap. we
have implemented the service class in such way that it's the one and only
point where changes to a property have to go. this allows us to change
values during runtime, and even add new key value pairs during runtime
without reloading from the db.
it's also easy to implement a feature that reloads the db entries ater a
given period of time.
kr,
guenther
--
Günther Wieser
creative-it
Guglgasse 6/1/11/1
A-1110 Wien
Austria
http://www.creative-it.com
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 30, 2005 2:52 AM
To: user@struts.apache.org; [EMAIL PROTECTED]
Subject: RE: Load message resources from DB???

Even if I could just get some general directions on what method to pull the
data in, and what method to put the data into what type of container.
Just something would be good.
--
Thanks...
Mick Knutson
Systems Developer
Business Direct Services, Wells Fargo Bank
333 Market Street, SF, CA  94103
(415) 371-2553
[EMAIL PROTECTED]
MAC A0103-223
This message may contain confidential and/or privileged information. If you
are not the addressee or authorized to receive this for the addressee, you
must not use, copy, disclose, or take any action based on this message or
any information herein. If you have received this message in error, please
advise the sender immediately by reply e-mail and delete this message. Thank
you for your cooperation.
--

-Original Message-
From: Jason Long [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 29, 2005 4:41 PM
To: 'Struts Users Mailing List'
Subject: RE: Load message resources from DB???
I am still waiting for an example of this as well.  I would very much like
to add this feature, but is not critical and I have other things to work on.
If you find an example please let me know.
Thank you for your time,
Jason Long
CEO and Chief Software Engineer
BS Physics, MS Chemical Engineering
http://www.supernovasoftware.com 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 29, 2005 6:38 PM
To: user@struts.apache.org
Subject: RE: Load message resources from DB???
Does anyone ahve any examples of extending the PropertyMessageResources  and
PropertyMessageResources Factory?
-Original Message-
From: Daniel Lipofsky [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 15, 2005 1:35 PM
To: Struts Users Mailing List
Cc: [EMAIL PROTECTED]
Subject: RE: Load message resources from DB???
Yes, just extend the PropertyMessageResources and overide the
loadLocale() method.  You should extend the factory too and specify the new
factory in struts-config.xml.  Add a method to clear the cache in the
PropertyMessageResources and clear it when the user changes something.
- Dan
 

-Original Message-
From: Jason Long [mailto:[EMAIL PROTECTED]
Sent: Monday, March 14, 2005 11:21 PM
To: 'Struts Users Mailing List'
Subject: Load message resources from DB???
Is it possible to load the message resources from a database instead 
of a file?  If so can this be done without reloading the entire 
application?  I would like to let users manage these.

Thank you for your time,
Jason Long
CEO and Chief Software Engineer
BS Physics, MS Chemical Engineering
http://www.supernovasoftware.com
   



Re: MessageResources

2005-04-06 Thread Dave Newton
Niall Pemberton wrote:
I believe you should be able to do this already, since you can define
different factories for different bundles. So you could have your regular
standard properties files, but then define a DB bundle with your own factory
as well.
Something like this in the struts-config.xml
message-resources parameter=myPackage.ApllicationResources /
message-resources key=dbBundlefactory=myPackage.MyDbResourcesFactory /
Then you use the bundle attribute on the JSP tags to use your custom db
bundle...
 bean:message key=something bundle=dbBundle /
 

Ah, but without access to the struts-config.xml, and the messages are 
being retrieved within an Action, not a JSP.

Basically I have classes instantiated at run-time that can do magic 
things. When the magic breaks, I need ActionErrors.

Part of it is that I just haven't had the time to dig down far enough 
into the stack to see how easy/hard this is.

I'm not yet sure that I can use the framework as it is to do what I need 
to do. No time. *sigh* I posted about this a few weeks ago and haven't 
had time to follow up on the few answers I received. Concisely, I need 
to be able to dynamically render form elements that are defined outside 
the system, validate them, and process them.

Dave

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


Re: Re: html:select: Setting property directly instead of using a ####Id property and loading object when saving?

2005-04-06 Thread Simon MARTIN
Hi,
I've tried as you told be, but binding to the teacher's id does not work either.
It seems as if this part of the form was never populated, because neither the setter
of matTeacher nor the one of teacherId is ever called, as debugging through my 
application
told me.

Any further ideas / full struts example that provides a solution for the same 
problem?

Thanks in advance.
Kind regards,
  Simon
Rick Reumann wrote:
  public class Student {
 ...
 private Teacher matTeacher;
 ...
  }

Ah yes, I should have read your initial post longer. You definitely 
don't want to use an object for your property for the select. use the id 
of the matTeacher like I've shown and you should be all set.

Rick Reumann wrote the following on 4/4/2005 6:06 PM:
  Simon MARTIN wrote the following on 4/4/2005 5:37 PM:
 
  In my JSP, I'm using this property like this:
 
  html:select property=matTeacher 
c:set var=CURTEACHER value=${student.matTeacher.teacherId} /
c:forEach var=teacher items=${TEACHERMAT} varStatus=status
  option value=${teacher.teacherId} c:if 
test=${teacher.teacherId == CURTEACHER}selected/c:if
  c:out value=${teacher.firstName} / c:out 
value=${teacher.lastName} /
  /option
/c:forEach
  /html:select
 
 
 
  property=matTeacher. The property in your form matTeacher should 
be a number type (int, Integer, etc) or a String. Are  you sure it's 
nott an Object of type Teacher? You probably want this...
 
  html:select property=student.matTeacher.teacherId 
c:forEach var=teacher items=${TEACHERMAT} varStatus=status
  option value=${teacher.teacherId}
  c:out value=${teacher.firstName} / c:out 
value=${teacher.lastName} /
  /option
/c:forEach
  /html:select
 
  You don't need the if test. If the id of 
property=student.matTeacher.teacherId  equals the teacherId, the tag 
takes care of setting this for you.
 
  My guess is your property for the select is wrong. You want some kind 
of id for that property that you can deal with.
 



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


RE: Session Idle

2005-04-06 Thread Justin Morgan
I think Eain is saying that he has some operations that take a long
time, and he wants to suspend the timeout counter during those
operations.

So suppose the timeout in web.xml is 5 minutes.  One particular
operation takes 10 minutes to complete.  Do not expire session.

However, if the user is idle when there is NOT a long process running,
expire after 5 minutes.

Is that what you meant, Eain?

-Justin



-Original Message-
From: Fogleson, Allen [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 05, 2005 8:57 PM
To: Struts Users Mailing List
Subject: RE: Session Idle

That is exactly how the session timeout works. If the user is idle (i.e
has not submitted a request in X time) then it is timed out (assuming X
is the timeout) otherwise a request acts sort of as a renew this
session for X more minutes

Al


-Original Message-
From: Eain Mat [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 05, 2005 7:32 PM
To: Struts Users Mailing List
Subject: Re: Session Idle

if i invalidate the session, everything will be destory in the session.
I still want the session to keep alive when user is in the middle of
their processing operation even the session-timeout is passed. I only
want to timeout their session, if they are not doing anything.
 
 
Eain mat

Martin Gainty [EMAIL PROTECTED] wrote:
--web.xml contents--


5 


then trap on the invalidate method for your HttpSession object
Makes sense???
Martin-
- Original Message -
From: Eain Mat 
To: 
Sent: Tuesday, April 05, 2005 7:44 PM
Subject: Session Idle


 What is the simplest way to track the session idle? We cannot use
session-timeout in web.xml because there may be leftover operation that
is
needed to process.

 Eain Mat


-
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:select: Setting property directly instead of using a ####Id property and loading object when saving?

2005-04-06 Thread Rick Reumann
Simon MARTIN wrote the following on 4/6/2005 1:26 PM:
I've tried as you told be, but binding to the teacher's id does not work 
either.
I'm not sure what you actually ended up trying to implement..
1) What are the pertinent fields in your ActionForm (do you just have 
'student' in there, which is fine, juut not sure what you have)
2) Paste your JSP select stuff that you decided to use.

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


Re: One click on a link - two requests/calls to Action (?!)

2005-04-06 Thread Wendy Smoak
From: Wendy Smoak [EMAIL PROTECTED]

 Thanks Nic and David for confirming that I'm not [necessarily] crazy.  I
do
 think it's the JavaScript, and will check that next.

And the answer turned out to be a Filter that called chain.doFilter(...)
twice.  JSwat (debugger) exposed the problem in a few minutes.

-- 
Wendy Smoak



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



RE: html-el:submit 'value' attribute behavior change 1.2.0 to 1.2.6

2005-04-06 Thread Karr, David
Ah.  It's good to trim element values, but probably not attribute
values.  Does this happen anywhere else?

 -Original Message-
 From: Niall Pemberton [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, April 05, 2005 3:50 PM
 To: Struts Users Mailing List
 Subject: Re: html-el:submit 'value' attribute behavior 
 change 1.2.0 to 1.2.6
 
 
 Apologies, this was my fault - I added a trim() to the value 
 when I re-factored this tag :-(
 
 I'll change this back.
 
 Niall
 
 - Original Message - 
 From: Wendy Smoak [EMAIL PROTECTED]
 Sent: Tuesday, April 05, 2005 11:28 PM
 
 
  I'm getting the following HTML rendered from the JSP below:
 
  html-el:submit property=submit  value= 
  onclick=setUserAction('Add Prospect'); styleClass=addButton 
  titleKey=button.add.prospect /
 
  input type=submit name=submit value=Submit 
  onclick=setUserAction('Add Prospect'); class=addButton 
 title=Add 
  Prospect
 
  This is supposed to be a submit button with an image and no 
 text (just 
  spaces).  It worked in 1.2.0, but 1.2.6 is ignoring the 'value' 
  attribute and I'm getting the word 'Submit' plastered over 
 the image.
 
  Before I open a bug, can anyone comment if they think it's 
 _supposed_ 
  to
 do
  this?  Thanks.
 
  --
  Wendy Smoak
 
 
 
 -
 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: Session Idle

2005-04-06 Thread Wiebe de Jong
Is it possible to create a listener for the session timeout event? This
listener would check to see if there is an operation in progress. If there
is, reset the timeout counter. If not, let the session expire.

Wiebe

-Original Message-
From: Justin Morgan [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 06, 2005 10:20 AM
To: Struts Users Mailing List
Subject: RE: Session Idle

I think Eain is saying that he has some operations that take a long
time, and he wants to suspend the timeout counter during those
operations.

So suppose the timeout in web.xml is 5 minutes.  One particular
operation takes 10 minutes to complete.  Do not expire session.

However, if the user is idle when there is NOT a long process running,
expire after 5 minutes.

Is that what you meant, Eain?

-Justin



-Original Message-
From: Fogleson, Allen [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 05, 2005 8:57 PM
To: Struts Users Mailing List
Subject: RE: Session Idle

That is exactly how the session timeout works. If the user is idle (i.e
has not submitted a request in X time) then it is timed out (assuming X
is the timeout) otherwise a request acts sort of as a renew this
session for X more minutes

Al


-Original Message-
From: Eain Mat [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 05, 2005 7:32 PM
To: Struts Users Mailing List
Subject: Re: Session Idle

if i invalidate the session, everything will be destory in the session.
I still want the session to keep alive when user is in the middle of
their processing operation even the session-timeout is passed. I only
want to timeout their session, if they are not doing anything.
 
 
Eain mat

Martin Gainty [EMAIL PROTECTED] wrote:
--web.xml contents--


5 


then trap on the invalidate method for your HttpSession object
Makes sense???
Martin-
- Original Message -
From: Eain Mat 
To: 
Sent: Tuesday, April 05, 2005 7:44 PM
Subject: Session Idle


 What is the simplest way to track the session idle? We cannot use
session-timeout in web.xml because there may be leftover operation that
is
needed to process.

 Eain Mat


-
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: Session Idle

2005-04-06 Thread Benedict, Paul C
If you are using a Servlet 2.3 container, J2EE provides a
HttpSessionListener class

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSession
Listener.html

But it is only for listening; not altering the event's state. If you are
using Tomcat, perhaps you could write some internal API that lets you do
this, but that would be a very vendor specific solution (which is OK if
that's what fits the bill).

Thanks,
Paul

-Original Message-
From: Wiebe de Jong [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 06, 2005 2:02 PM
To: 'Struts Users Mailing List'
Subject: RE: Session Idle


Is it possible to create a listener for the session timeout event? This
listener would check to see if there is an operation in progress. If there
is, reset the timeout counter. If not, let the session expire.

Wiebe

-Original Message-
From: Justin Morgan [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 06, 2005 10:20 AM
To: Struts Users Mailing List
Subject: RE: Session Idle

I think Eain is saying that he has some operations that take a long
time, and he wants to suspend the timeout counter during those
operations.

So suppose the timeout in web.xml is 5 minutes.  One particular
operation takes 10 minutes to complete.  Do not expire session.

However, if the user is idle when there is NOT a long process running,
expire after 5 minutes.

Is that what you meant, Eain?

-Justin



-Original Message-
From: Fogleson, Allen [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 05, 2005 8:57 PM
To: Struts Users Mailing List
Subject: RE: Session Idle

That is exactly how the session timeout works. If the user is idle (i.e
has not submitted a request in X time) then it is timed out (assuming X
is the timeout) otherwise a request acts sort of as a renew this
session for X more minutes

Al


-Original Message-
From: Eain Mat [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 05, 2005 7:32 PM
To: Struts Users Mailing List
Subject: Re: Session Idle

if i invalidate the session, everything will be destory in the session.
I still want the session to keep alive when user is in the middle of
their processing operation even the session-timeout is passed. I only
want to timeout their session, if they are not doing anything.
 
 
Eain mat

Martin Gainty [EMAIL PROTECTED] wrote:
--web.xml contents--


5 


then trap on the invalidate method for your HttpSession object
Makes sense???
Martin-
- Original Message -
From: Eain Mat 
To: 
Sent: Tuesday, April 05, 2005 7:44 PM
Subject: Session Idle


 What is the simplest way to track the session idle? We cannot use
session-timeout in web.xml because there may be leftover operation that
is
needed to process.

 Eain Mat


-
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]





--
Notice:  This e-mail message, together with any attachments, contains 
information of Merck  Co., Inc. (One Merck Drive, Whitehouse Station, New 
Jersey, USA 08889), and/or its affiliates (which may be known outside the 
United States as Merck Frosst, Merck Sharp  Dohme or MSD and in Japan, as 
Banyu) that may be confidential, proprietary copyrighted and/or legally 
privileged. It is intended solely for the use of the individual or entity named 
on this message.  If you are not the intended recipient, and have received this 
message in error, please notify us immediately by reply e-mail and then delete 
it from your system.
--

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



re: Session Idle

2005-04-06 Thread Leon Rosenberg
I would solve it by adding a 1 minute refresh in a hidden frame in your page
to a action which just delivers next refresh header. As long as the user has
the page open, the session will never expire. After he closes the browser,
the session expires normally.

Regards
Leon

 -Ursprüngliche Nachricht-
 Von: Wiebe de Jong [mailto:[EMAIL PROTECTED] 
 Gesendet: Mittwoch, 6. April 2005 20:02
 An: 'Struts Users Mailing List'
 Betreff: RE: Session Idle
 
 Is it possible to create a listener for the session timeout 
 event? This listener would check to see if there is an 
 operation in progress. If there is, reset the timeout 
 counter. If not, let the session expire.
 
 Wiebe
 
 -Original Message-
 From: Justin Morgan [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, April 06, 2005 10:20 AM
 To: Struts Users Mailing List
 Subject: RE: Session Idle
 
 I think Eain is saying that he has some operations that take 
 a long time, and he wants to suspend the timeout counter 
 during those operations.
 
 So suppose the timeout in web.xml is 5 minutes.  One 
 particular operation takes 10 minutes to complete.  Do not 
 expire session.
 
 However, if the user is idle when there is NOT a long process 
 running, expire after 5 minutes.
 
 Is that what you meant, Eain?
 
 -Justin
 
 
 
 -Original Message-
 From: Fogleson, Allen [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 05, 2005 8:57 PM
 To: Struts Users Mailing List
 Subject: RE: Session Idle
 
 That is exactly how the session timeout works. If the user is 
 idle (i.e has not submitted a request in X time) then it is 
 timed out (assuming X is the timeout) otherwise a request 
 acts sort of as a renew this session for X more minutes
 
 Al
 
 
 -Original Message-
 From: Eain Mat [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 05, 2005 7:32 PM
 To: Struts Users Mailing List
 Subject: Re: Session Idle
 
 if i invalidate the session, everything will be destory in 
 the session.
 I still want the session to keep alive when user is in the 
 middle of their processing operation even the session-timeout 
 is passed. I only want to timeout their session, if they are 
 not doing anything.
  
  
 Eain mat
 
 Martin Gainty [EMAIL PROTECTED] wrote:
 --web.xml contents--
 
 
 5 
 
 
 then trap on the invalidate method for your HttpSession 
 object Makes sense???
 Martin-
 - Original Message -
 From: Eain Mat 
 To: 
 Sent: Tuesday, April 05, 2005 7:44 PM
 Subject: Session Idle
 
 
  What is the simplest way to track the session idle? We cannot use
 session-timeout in web.xml because there may be leftover 
 operation that is needed to process.
 
  Eain Mat
 
 
 -
 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: Session Idle

2005-04-06 Thread Leon Rosenberg
I would solve it by adding a 1 minute refresh in a hidden frame in your page
to a action which just delivers next refresh header. As long as the user has
the page open, the session will never expire. After he closes the browser,
the session expires normally.

Regards
Leon

 -Ursprüngliche Nachricht-
 Von: Wiebe de Jong [mailto:[EMAIL PROTECTED] 
 Gesendet: Mittwoch, 6. April 2005 20:02
 An: 'Struts Users Mailing List'
 Betreff: RE: Session Idle
 
 Is it possible to create a listener for the session timeout 
 event? This listener would check to see if there is an 
 operation in progress. If there is, reset the timeout 
 counter. If not, let the session expire.
 
 Wiebe
 
 -Original Message-
 From: Justin Morgan [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, April 06, 2005 10:20 AM
 To: Struts Users Mailing List
 Subject: RE: Session Idle
 
 I think Eain is saying that he has some operations that take 
 a long time, and he wants to suspend the timeout counter 
 during those operations.
 
 So suppose the timeout in web.xml is 5 minutes.  One 
 particular operation takes 10 minutes to complete.  Do not 
 expire session.
 
 However, if the user is idle when there is NOT a long process 
 running, expire after 5 minutes.
 
 Is that what you meant, Eain?
 
 -Justin
 
 
 
 -Original Message-
 From: Fogleson, Allen [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 05, 2005 8:57 PM
 To: Struts Users Mailing List
 Subject: RE: Session Idle
 
 That is exactly how the session timeout works. If the user is 
 idle (i.e has not submitted a request in X time) then it is 
 timed out (assuming X is the timeout) otherwise a request 
 acts sort of as a renew this session for X more minutes
 
 Al
 
 
 -Original Message-
 From: Eain Mat [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 05, 2005 7:32 PM
 To: Struts Users Mailing List
 Subject: Re: Session Idle
 
 if i invalidate the session, everything will be destory in 
 the session.
 I still want the session to keep alive when user is in the 
 middle of their processing operation even the session-timeout 
 is passed. I only want to timeout their session, if they are 
 not doing anything.
  
  
 Eain mat
 
 Martin Gainty [EMAIL PROTECTED] wrote:
 --web.xml contents--
 
 
 5 
 
 
 then trap on the invalidate method for your HttpSession 
 object Makes sense???
 Martin-
 - Original Message -
 From: Eain Mat 
 To: 
 Sent: Tuesday, April 05, 2005 7:44 PM
 Subject: Session Idle
 
 
  What is the simplest way to track the session idle? We cannot use
 session-timeout in web.xml because there may be leftover 
 operation that is needed to process.
 
  Eain Mat
 
 
 -
 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: MessageResources

2005-04-06 Thread Niall Pemberton
I just committed a new feature (available now in the nightly build, coming
soon in 1.2.7 hopefully) where you can specify a message directly, so you
don't actually need message resources in the JSP. I don't know if that helps
you or not?

You simply construct an ActionMessage with the actual message, for
example

ActionMessages messages = new ActionMessages();
ActionMessage msg = new ActionMessage(Customer Number is invalid, false);
messages.add(custNo, msg);

(The false is specifying resource=false - new property in ActionMessage)

Niall

- Original Message - 
From: Dave Newton [EMAIL PROTECTED]
Sent: Wednesday, April 06, 2005 6:20 PM


 Ah, but without access to the struts-config.xml, and the messages are
 being retrieved within an Action, not a JSP.

 Basically I have classes instantiated at run-time that can do magic
 things. When the magic breaks, I need ActionErrors.

 Part of it is that I just haven't had the time to dig down far enough
 into the stack to see how easy/hard this is.

 I'm not yet sure that I can use the framework as it is to do what I need
 to do. No time. *sigh* I posted about this a few weeks ago and haven't
 had time to follow up on the few answers I received. Concisely, I need
 to be able to dynamically render form elements that are defined outside
 the system, validate them, and process them.

 Dave



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



Javascript with html:button gives document.forms[0].submit not a function error

2005-04-06 Thread Ramaiah, Sunil
Hi I have a Java Script code like this - 

 

function displayRemovePackageMessage( )

{

returnValue = confirm(You are about to permanently
remove this package.);

 

if( returnValue == true )

{   

alert(document.forms[0].name.value);

document.forms[0].submit ();

 }

else

{

return returnValue;

}

}

 

I call this java script function from the struts code - 

 

html:button property=submit onclick='javascript:
displayRemovePackageMessage (document.forms[0])'

bean:message key=mf.common.remove /

/html: button 

 

I am getting the javascript error -
document.forms[0].submit is not a function

 

Any clues ? 

 

Thanks,

Sunil.



re: Session Idle

2005-04-06 Thread gdeschen
Perhaps a different approach can be used for processes that are time 
consuming.
Some form of batch process.
The user can submit a request... this is queued... and then processed by a 
DB trigger (as an example).
The results of the processing is stored and the user can view the status 
of their requests via a sort of history of requests page.
myTwoCents/

- Glenn





Leon Rosenberg [EMAIL PROTECTED]
06/04/2005 02:11 PM
Please respond to Struts Users Mailing List




 
To: 'Struts Users Mailing List' user@struts.apache.org
cc: (bcc: Glenn Deschenes/NAT/CMHC-SCHL/CA)

Subject:re: Session Idle
 Classification: 
 


I would solve it by adding a 1 minute refresh in a hidden frame in your 
page
to a action which just delivers next refresh header. As long as the user 
has
the page open, the session will never expire. After he closes the browser,
the session expires normally.

Regards
Leon

 -Ursprüngliche Nachricht-
 Von: Wiebe de Jong [mailto:[EMAIL PROTECTED] 
 Gesendet: Mittwoch, 6. April 2005 20:02
 An: 'Struts Users Mailing List'
 Betreff: RE: Session Idle
 
 Is it possible to create a listener for the session timeout 
 event? This listener would check to see if there is an 
 operation in progress. If there is, reset the timeout 
 counter. If not, let the session expire.
 
 Wiebe
 
 -Original Message-
 From: Justin Morgan [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, April 06, 2005 10:20 AM
 To: Struts Users Mailing List
 Subject: RE: Session Idle
 
 I think Eain is saying that he has some operations that take 
 a long time, and he wants to suspend the timeout counter 
 during those operations.
 
 So suppose the timeout in web.xml is 5 minutes.  One 
 particular operation takes 10 minutes to complete.  Do not 
 expire session.
 
 However, if the user is idle when there is NOT a long process 
 running, expire after 5 minutes.
 
 Is that what you meant, Eain?
 
 -Justin
 
 
 
 -Original Message-
 From: Fogleson, Allen [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 05, 2005 8:57 PM
 To: Struts Users Mailing List
 Subject: RE: Session Idle
 
 That is exactly how the session timeout works. If the user is 
 idle (i.e has not submitted a request in X time) then it is 
 timed out (assuming X is the timeout) otherwise a request 
 acts sort of as a renew this session for X more minutes
 
 Al
 
 
 -Original Message-
 From: Eain Mat [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 05, 2005 7:32 PM
 To: Struts Users Mailing List
 Subject: Re: Session Idle
 
 if i invalidate the session, everything will be destory in 
 the session.
 I still want the session to keep alive when user is in the 
 middle of their processing operation even the session-timeout 
 is passed. I only want to timeout their session, if they are 
 not doing anything.
 
 
 Eain mat
 
 Martin Gainty [EMAIL PROTECTED] wrote:
 --web.xml contents--
 
 
 5 
 
 
 then trap on the invalidate method for your HttpSession 
 object Makes sense???
 Martin-
 - Original Message -
 From: Eain Mat 
 To: 
 Sent: Tuesday, April 05, 2005 7:44 PM
 Subject: Session Idle
 
 
  What is the simplest way to track the session idle? We cannot use
 session-timeout in web.xml because there may be leftover 
 operation that is needed to process.
 
  Eain Mat
 
 
 -
 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: Session Idle

2005-04-06 Thread Wiebe de Jong
Actually, this is similar to something that happens when I do my online
banking at www.bmo.com

Their page has a timer in it that creates a popup notifying you that the
session is about to expire. If you click the button in the popup, the page
does a refresh and resets the timer.

Wiebe

-Original Message-
From: Leon Rosenberg [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 06, 2005 11:11 AM
To: 'Struts Users Mailing List'
Subject: re: Session Idle

I would solve it by adding a 1 minute refresh in a hidden frame in your page
to a action which just delivers next refresh header. As long as the user has
the page open, the session will never expire. After he closes the browser,
the session expires normally.

Regards
Leon

 -Ursprüngliche Nachricht-
 Von: Wiebe de Jong [mailto:[EMAIL PROTECTED] 
 Gesendet: Mittwoch, 6. April 2005 20:02
 An: 'Struts Users Mailing List'
 Betreff: RE: Session Idle
 
 Is it possible to create a listener for the session timeout 
 event? This listener would check to see if there is an 
 operation in progress. If there is, reset the timeout 
 counter. If not, let the session expire.
 
 Wiebe
 
 -Original Message-
 From: Justin Morgan [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, April 06, 2005 10:20 AM
 To: Struts Users Mailing List
 Subject: RE: Session Idle
 
 I think Eain is saying that he has some operations that take 
 a long time, and he wants to suspend the timeout counter 
 during those operations.
 
 So suppose the timeout in web.xml is 5 minutes.  One 
 particular operation takes 10 minutes to complete.  Do not 
 expire session.
 
 However, if the user is idle when there is NOT a long process 
 running, expire after 5 minutes.
 
 Is that what you meant, Eain?
 
 -Justin
 
 
 
 -Original Message-
 From: Fogleson, Allen [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 05, 2005 8:57 PM
 To: Struts Users Mailing List
 Subject: RE: Session Idle
 
 That is exactly how the session timeout works. If the user is 
 idle (i.e has not submitted a request in X time) then it is 
 timed out (assuming X is the timeout) otherwise a request 
 acts sort of as a renew this session for X more minutes
 
 Al
 
 
 -Original Message-
 From: Eain Mat [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 05, 2005 7:32 PM
 To: Struts Users Mailing List
 Subject: Re: Session Idle
 
 if i invalidate the session, everything will be destory in 
 the session.
 I still want the session to keep alive when user is in the 
 middle of their processing operation even the session-timeout 
 is passed. I only want to timeout their session, if they are 
 not doing anything.
  
  
 Eain mat
 
 Martin Gainty [EMAIL PROTECTED] wrote:
 --web.xml contents--
 
 
 5 
 
 
 then trap on the invalidate method for your HttpSession 
 object Makes sense???
 Martin-
 - Original Message -
 From: Eain Mat 
 To: 
 Sent: Tuesday, April 05, 2005 7:44 PM
 Subject: Session Idle
 
 
  What is the simplest way to track the session idle? We cannot use
 session-timeout in web.xml because there may be leftover 
 operation that is needed to process.
 
  Eain Mat
 
 
 -
 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]


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



Re: Html:messages vs html:errors

2005-04-06 Thread Niall Pemberton
The problem is with how you've configured your messages resources. Because
you've specified a key your message resources are not being stored under the
default messages resources key. There being stored under the bundle key
ApplicationResources. You just need to remove that (and the id, its
unnecessary) and have the following...

  message-resources null=false parameter=ApplicationResources/

If you do specify a key value in the message-resources element,  then
you need to use the same value in the bundle attribute of the JSP tags,
something like the following should work with what you had set up...

   bean:message key=myMessage.key bundle=ApplicationResources /

I'm going to post an update to the page I originally put up which includes
info on this - I'll post to the list when its ready.

Niall

- Original Message - 
From: Michael Oliver [EMAIL PROTECTED]
Sent: Wednesday, April 06, 2005 5:12 PM


 Still not displaying messages, here is what I have so far.

 struts-config.xml entry:

 snip
 ...controller/
  message-resources id=ApplicationResources key=ApplicationResources
   null=false parameter=ApplicationResources/
  plug-in className=org.apache.struts.tiles.TilesPlugin...

 The ApplicationResources.properties file is located at

 /WEB-INF/classes/ApplicationResources.properties

 it contains:



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



Re: MessageResources

2005-04-06 Thread Dave Newton
Niall Pemberton wrote:
I just committed a new feature (available now in the nightly build, coming
soon in 1.2.7 hopefully) where you can specify a message directly, so you
don't actually need message resources in the JSP. I don't know if that helps
you or not?
 

Yes; that's it exactly; a pint on me next time I'm over.
Um... I don't suppose there's any way to do that without using the nightly?
Dave

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


RE: Javascript with html:button gives document.forms[0].submit not a function error

2005-04-06 Thread Ramaiah, Sunil
I got the answer.

I was using submit as the property value. 

Changed it to something else and it works

-Original Message-
From: Ramaiah, Sunil [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 06, 2005 11:16 AM
To: user@struts.apache.org
Subject: Javascript with html:button gives document.forms[0].submit
not a function error

Hi I have a Java Script code like this - 

 

function displayRemovePackageMessage( )

{

returnValue = confirm(You are about to permanently
remove this package.);

 

if( returnValue == true )

{   

alert(document.forms[0].name.value);

document.forms[0].submit ();

 }

else

{

return returnValue;

}

}

 

I call this java script function from the struts code - 

 

html:button property=submit onclick='javascript:
displayRemovePackageMessage (document.forms[0])'

bean:message key=mf.common.remove /

/html: button 

 

I am getting the javascript error -
document.forms[0].submit is not a function

 

Any clues ? 

 

Thanks,

Sunil.


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



RE: Session Idle

2005-04-06 Thread Wiebe de Jong
If you want the page to do refreshes while waiting for the operation to
complete, why not implement a progress bar?

http://www.onjava.com/pub/a/onjava/2003/06/11/jsp_progressbars.html

Here, each time the page refreshes, a progress bar is updated, showing the
user how the long-running operation is going.

Wiebe

-Original Message-
From: Leon Rosenberg [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 06, 2005 11:11 AM
To: 'Struts Users Mailing List'
Subject: re: Session Idle

I would solve it by adding a 1 minute refresh in a hidden frame in your page
to a action which just delivers next refresh header. As long as the user has
the page open, the session will never expire. After he closes the browser,
the session expires normally.

Regards
Leon

 -Ursprüngliche Nachricht-
 Von: Wiebe de Jong [mailto:[EMAIL PROTECTED] 
 Gesendet: Mittwoch, 6. April 2005 20:02
 An: 'Struts Users Mailing List'
 Betreff: RE: Session Idle
 
 Is it possible to create a listener for the session timeout 
 event? This listener would check to see if there is an 
 operation in progress. If there is, reset the timeout 
 counter. If not, let the session expire.
 
 Wiebe
 
 -Original Message-
 From: Justin Morgan [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, April 06, 2005 10:20 AM
 To: Struts Users Mailing List
 Subject: RE: Session Idle
 
 I think Eain is saying that he has some operations that take 
 a long time, and he wants to suspend the timeout counter 
 during those operations.
 
 So suppose the timeout in web.xml is 5 minutes.  One 
 particular operation takes 10 minutes to complete.  Do not 
 expire session.
 
 However, if the user is idle when there is NOT a long process 
 running, expire after 5 minutes.
 
 Is that what you meant, Eain?
 
 -Justin
 
 
 
 -Original Message-
 From: Fogleson, Allen [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 05, 2005 8:57 PM
 To: Struts Users Mailing List
 Subject: RE: Session Idle
 
 That is exactly how the session timeout works. If the user is 
 idle (i.e has not submitted a request in X time) then it is 
 timed out (assuming X is the timeout) otherwise a request 
 acts sort of as a renew this session for X more minutes
 
 Al
 
 
 -Original Message-
 From: Eain Mat [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 05, 2005 7:32 PM
 To: Struts Users Mailing List
 Subject: Re: Session Idle
 
 if i invalidate the session, everything will be destory in 
 the session.
 I still want the session to keep alive when user is in the 
 middle of their processing operation even the session-timeout 
 is passed. I only want to timeout their session, if they are 
 not doing anything.
  
  
 Eain mat
 
 Martin Gainty [EMAIL PROTECTED] wrote:
 --web.xml contents--
 
 
 5 
 
 
 then trap on the invalidate method for your HttpSession 
 object Makes sense???
 Martin-
 - Original Message -
 From: Eain Mat 
 To: 
 Sent: Tuesday, April 05, 2005 7:44 PM
 Subject: Session Idle
 
 
  What is the simplest way to track the session idle? We cannot use
 session-timeout in web.xml because there may be leftover 
 operation that is needed to process.
 
  Eain Mat
 
 
 -
 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]


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



message-resources null=false returnNull=true

2005-04-06 Thread Michael Oliver
I am trying to debug why I cannot get ActionMessages to display.

I have set my struts-config.xml as follows:

message-resources key=AJDocManResources
  null=false parameter=AJDocManResources/

AJDocManResources.properties is located in:

/WEB-INF/classes/AJDocManResources.properties

My log shows:

656   INFO  [main] util.PropertyMessageResources - Initializing,
config='AJDocManResources', returnNull=true

it appears the Message Resources file is loading but I cannot get
anything to display, it throws no exceptions and no ???null like
messages.  

Shouldn't returnNull=false with the null=false in the
struts-config.xml???

Michael Oliver
Alarius Systems LLC
3325 N. Nellis Blvd, #1
Las Vegas, NV 89115
Phone:(702)643-7425
Fax:(702)974-0341
*Note new email changed from [EMAIL PROTECTED]

-Original Message-
From: Michael Oliver [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 06, 2005 9:12 AM
To: 'Struts Users Mailing List'
Subject: RE: Html:messages vs html:errors

Still not displaying messages, here is what I have so far.

struts-config.xml entry:

snip
...controller/
 message-resources id=ApplicationResources key=ApplicationResources
  null=false parameter=ApplicationResources/
 plug-in className=org.apache.struts.tiles.TilesPlugin...

The ApplicationResources.properties file is located at 

/WEB-INF/classes/ApplicationResources.properties

it contains:

snip
... 
label.phone.number=Phone Number
label.welcome=Welcome back {0} {1}\!

message.body={0}

error.detail={0}
error.min.length=The input must be at least {0} characters in length.
error.max.length=The input cannot be longer than {0} characters in
length.
errors.required={0} is required.
errors.invalid={0} is invalid.
...
/snip

I have log4j setup with 
log4j.logger.org.apache.struts=DEBUG,A1,A2

and on startup the log4j related output is:

656   DEBUG [main] action.ActionServlet - Initializing module path ''
message resources from 'ApplicationResources'
656   INFO  [main] util.PropertyMessageResources - Initializing,
config='ApplicationResources', returnNull=true

I have an Action that forwards to a jsp, the action execute has:

snip
...
if (uri.indexOf(Al) = 0){
ActionMessages messages = new ActionMessages();
messages.add(ActionMessages.GLOBAL_MESSAGE, 
new ActionMessage(message.body,retStatus));
  this.saveMessages(request, messages);
}
...
/snip

where uri is a string variable of the resource the action is looking at,
and retStatus is a string that contains the status of the request.

The jsp has near the top if the body tile

snip
tiles:put name=body type=string

hr align=left width=800 color=#00 noshade
logic:messagesPresent message=true
   h3font color=redMessages:/font/h3
  ul
  html:messages id=msg
 libean:write name=msg //li
  /html:messages
  /ul
/logic:messagesPresent
...the rest of the body
/snip

When I test this setup, when the uri contains 'Al' I get the red
Messages: as I suspect, but no list of messages under it.  When I
traverse a resource without the 'Al' in the uri, I do NOT get the red
Messages:.

I have verified that xerces and the ApplicationResources are loaded from
the Catalina log:

2005-04-06 09:00:02 WebappLoader[/AJDocMan]: Deploy JAR
/WEB-INF/lib/struts.jar to
C:\Java\ArchivedWorkspaces\AJDocMan\WebContent\WEB-INF\lib\struts.jar
2005-04-06 09:00:02 WebappLoader[/AJDocMan]: Deploy JAR
/WEB-INF/lib/xercesImpl.jar to
C:\Java\ArchivedWorkspaces\AJDocMan\WebContent\WEB-INF\lib\xercesImpl.ja
r
2005-04-06 09:00:03 WebappLoader[/AJDocMan]: Deploy JAR
/WEB-INF/lib/xmlParserAPIs.jar to
C:\Java\ArchivedWorkspaces\AJDocMan\WebContent\WEB-INF\lib\xmlParserAPIs
.jar
2005-04-06 09:00:03 ContextConfig[/AJDocMan]:Adding path
'/WEB-INF/lib/xercesImpl.jar'
2005-04-06 09:00:03 ContextConfig[/AJDocMan]:Adding path
'/WEB-INF/lib/xmlParserAPIs.jar'
2005-04-06 09:00:07,500 DEBUG [main] action.ActionServlet
(ActionServlet.java:1209) - Initializing module path '' message
resources from 'ApplicationResources'
2005-04-06 09:00:07,500 INFO  [main] util.PropertyMessageResources
(PropertyMessageResources.java:127) - Initializing,
config='ApplicationResources', returnNull=true

These are the xerces-2_6_2 jars from the dist.

What can I check next?


Michael Oliver
CTO
Alarius Systems LLC
3325 N. Nellis Blvd, #1
Las Vegas, NV 89115
Phone:(702)643-7425
Fax:(702)974-0341
*Note new email changed from [EMAIL PROTECTED]
-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 05, 2005 5:09 PM
To: Struts Users Mailing List
Subject: Re: Html:messages vs html:errors

One cause of this is if it can't find the message key in your
application
resources and you have your message resources configured with
null=true.
If you change your message resources config to null=false in your
struts-config.xml

 message-resources null=false
parameter=myPackage.ApplicationResources/

Then if it can't find the message for some reason, 

Re: Javascript with html:button gives document.forms[0].submit not a function error

2005-04-06 Thread Dave Newton
Ramaiah, Sunil wrote:
function displayRemovePackageMessage( )
   {
   returnValue = confirm(You are about to permanently
remove this package.);
   if( returnValue == true )
   {   
alert(document.forms[0].name.value);
   document.forms[0].submit ();
}
   else
   {
   return returnValue;
   }
   }

html:button property=submit onclick='javascript:
displayRemovePackageMessage (document.forms[0])'
bean:message key=mf.common.remove /
/html: button 
 

Don't know; I use similar code with no issues.
Might be cleaner to say:
onclick='displayRemovePackageMessage(this.form)'
and actually use the parameter in the function. I use the above fairly 
frequently (or I pass in the form element I'm clicking and grab the form 
from it) with no issues. What browser are you testing on?

Dave Yeah, I know, it's not a struts question Newton

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


RE: RESEND: RE: Load message resources from DB???

2005-04-06 Thread Fogleson, Allen
Yes there is the OJBMessageResource class and I believe the same author wrote a 
HibernateMessageResource class. The class I wrote is mostly a 
JNDIJDBCMessageResource which has a timeout cache attached to it. The config 
is comprised of three elements (comma separated) 
1) The JNDI Name of the datasource to use that maps to a table.
2) The sql to use basically this sql relies on the fact that variable 1 is the 
locale, and variable 2 is the key .
3) The time that the cached value previously retrieved from the DB is valid. If 
this is 0 timeout is never. 

The ones mentioned in Bill's book are very good implementations but I feel that 
it is sometimes nicer to have an implementation that does not add extra class 
libraries (i.e. OJB or Hibernate). If you are already using one of those in 
your app I would say then use those Message Resource extensions, but if you 
want something relatively simple that just uses standard J2EE and the struts 
libs then use mine. (I really should get it up on a site somewhere :)

Al


-Original Message-
From: Nic Werner [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 06, 2005 12:13 PM
To: Struts Users Mailing List
Subject: Re: RESEND: RE: Load message resources from DB???

Reading from the 'Jakarta Struts Cookbook' by Bill Siggelkow, he 
discusses this problem. You want to store all labels,messages, and 
other static text in a database rather than a properties file, while 
still being able to access the values using the bean:message tag

If this is what you're looking for, go to: 
http://prdownloads.sourceforge.net/struts/OJBMessageResources.war.zip

The only date I can find on this is 2003 however. More on OJB is here 
:http://db.apache.org/ojb/

- Nix.

Günther Wieser wrote:

resend because i didn't receive it on the list. sorry if this comes to you
for the second time.

hi,

as it isn't possible to send zip files to the list, i need to copy and paste
the most important things out of our implementation:

the factory is simple:
public class DBPropertyMessageResourcesFactory extends
MessageResourcesFactory {

/* (non-Javadoc)
 * @see
org.apache.struts.util.MessageResourcesFactory#createResources(java.lang.Str
ing)
 */
public MessageResources createResources(String config) {
return new DBPropertyMessageResources(this, config,
this.returnNull);
}
}

also, the DBMessageResources class is quite simple, here's the most
important method:

   public String getMessage(Locale locale, String key) {
String result = DBPropertyMessageService.getMessage(locale, key,
returnNull);
// we need to flush the cache of the super class MessageResource as
we want to have real // dynamic data here (no caches
// except the one in DBPropertyMessageService)
formats.clear();
return result; 
   }

so the REAL thing is happening in DBPropertyMessageService, and this class
just loads everything at startup (static constructor) into a hashmap. we
have implemented the service class in such way that it's the one and only
point where changes to a property have to go. this allows us to change
values during runtime, and even add new key value pairs during runtime
without reloading from the db.
it's also easy to implement a feature that reloads the db entries ater a
given period of time.

kr,
guenther

--
Günther Wieser

creative-it
Guglgasse 6/1/11/1
A-1110 Wien
Austria
http://www.creative-it.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 30, 2005 2:52 AM
To: user@struts.apache.org; [EMAIL PROTECTED]
Subject: RE: Load message resources from DB???

Even if I could just get some general directions on what method to pull the
data in, and what method to put the data into what type of container.
Just something would be good.

--
Thanks...
Mick Knutson

Systems Developer
Business Direct Services, Wells Fargo Bank
333 Market Street, SF, CA  94103
(415) 371-2553
[EMAIL PROTECTED]
MAC A0103-223

This message may contain confidential and/or privileged information. If you
are not the addressee or authorized to receive this for the addressee, you
must not use, copy, disclose, or take any action based on this message or
any information herein. If you have received this message in error, please
advise the sender immediately by reply e-mail and delete this message. Thank
you for your cooperation.
--



-Original Message-
From: Jason Long [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 29, 2005 4:41 PM
To: 'Struts Users Mailing List'
Subject: RE: Load message resources from DB???


I am still waiting for an example of this as well.  I would very much like
to add this feature, but is not critical and I have other things to work on.
If you find an example please let me know.

Thank you for your time,
 
Jason Long
CEO and Chief Software Engineer
BS Physics, MS Chemical Engineering
http://www.supernovasoftware.com 

-Original Message-
From: [EMAIL PROTECTED] 

RE: Html:messages vs html:errors

2005-04-06 Thread Michael Oliver
Thanks,

But ARG That wasn't it.  I changed the message-resources tag as you
suggest, 

message-resources null=false parameter=ApplicationResources/

however I am still not displaying any messages not even the ???null???
there are also no exceptions in the log.

Is there some other package I can add a logger for that might yield a
hint as to what's going on?

Michael Oliver
CTO
Alarius Systems LLC
3325 N. Nellis Blvd, #1
Las Vegas, NV 89115
Phone:(702)643-7425
Fax:(702)974-0341
*Note new email changed from [EMAIL PROTECTED]

-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 06, 2005 11:30 AM
To: Struts Users Mailing List
Subject: Re: Html:messages vs html:errors

The problem is with how you've configured your messages resources.
Because
you've specified a key your message resources are not being stored under
the
default messages resources key. There being stored under the bundle
key
ApplicationResources. You just need to remove that (and the id, its
unnecessary) and have the following...

  message-resources null=false parameter=ApplicationResources/

If you do specify a key value in the message-resources element,
then
you need to use the same value in the bundle attribute of the JSP
tags,
something like the following should work with what you had set up...

   bean:message key=myMessage.key bundle=ApplicationResources /

I'm going to post an update to the page I originally put up which
includes
info on this - I'll post to the list when its ready.

Niall

- Original Message - 
From: Michael Oliver [EMAIL PROTECTED]
Sent: Wednesday, April 06, 2005 5:12 PM


 Still not displaying messages, here is what I have so far.

 struts-config.xml entry:

 snip
 ...controller/
  message-resources id=ApplicationResources
key=ApplicationResources
   null=false parameter=ApplicationResources/
  plug-in className=org.apache.struts.tiles.TilesPlugin...

 The ApplicationResources.properties file is located at

 /WEB-INF/classes/ApplicationResources.properties

 it contains:



-
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:messages vs html:errors

2005-04-06 Thread Fogleson, Allen
Michael,

Are you capturing exceptions in the jsp? (i.e. do you wrap a giant try
catch block or something?) I ask this because it must be finding the
message since if a key is not found you should get an exception along
the lines of Cannot find message resource for key  (I cant
remember the exact text) and sorry I cant see your entire text. Can you
forward the applicationResources file and the jsp bean:message call to
me? 

You could turn your logging to debug for org.apache.struts.util and that
may help you some also. 

Al

-Original Message-
From: Michael Oliver [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 06, 2005 2:14 PM
To: 'Struts Users Mailing List'
Subject: RE: Html:messages vs html:errors

Thanks,

But ARG That wasn't it.  I changed the message-resources tag as you
suggest, 

message-resources null=false parameter=ApplicationResources/

however I am still not displaying any messages not even the ???null???
there are also no exceptions in the log.

Is there some other package I can add a logger for that might yield a
hint as to what's going on?

Michael Oliver
CTO
Alarius Systems LLC
3325 N. Nellis Blvd, #1
Las Vegas, NV 89115
Phone:(702)643-7425
Fax:(702)974-0341
*Note new email changed from [EMAIL PROTECTED]

-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 06, 2005 11:30 AM
To: Struts Users Mailing List
Subject: Re: Html:messages vs html:errors

The problem is with how you've configured your messages resources.
Because
you've specified a key your message resources are not being stored under
the
default messages resources key. There being stored under the bundle
key
ApplicationResources. You just need to remove that (and the id, its
unnecessary) and have the following...

  message-resources null=false parameter=ApplicationResources/

If you do specify a key value in the message-resources element,
then
you need to use the same value in the bundle attribute of the JSP
tags,
something like the following should work with what you had set up...

   bean:message key=myMessage.key bundle=ApplicationResources /

I'm going to post an update to the page I originally put up which
includes
info on this - I'll post to the list when its ready.

Niall

- Original Message - 
From: Michael Oliver [EMAIL PROTECTED]
Sent: Wednesday, April 06, 2005 5:12 PM


 Still not displaying messages, here is what I have so far.

 struts-config.xml entry:

 snip
 ...controller/
  message-resources id=ApplicationResources
key=ApplicationResources
   null=false parameter=ApplicationResources/
  plug-in className=org.apache.struts.tiles.TilesPlugin...

 The ApplicationResources.properties file is located at

 /WEB-INF/classes/ApplicationResources.properties

 it contains:



-
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: RESEND: RE: Load message resources from DB???

2005-04-06 Thread James Mitchell
- Original Message - 
From: Fogleson, Allen [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org; 
[EMAIL PROTECTED]
Sent: Wednesday, April 06, 2005 2:40 PM
Subject: RE: RESEND: RE: Load message resources from DB???

Yes there is the OJBMessageResource class and I believe the same author 
wrote a HibernateMessageResource class. The class I wrote is mostly a 
JNDIJDBCMessageResource which has a timeout cache attached to it. The 
config is comprised of three elements (comma separated)
1) The JNDI Name of the datasource to use that maps to a table.
2) The sql to use basically this sql relies on the fact that variable 1 is 
the locale, and variable 2 is the key .
3) The time that the cached value previously retrieved from the DB is 
valid. If this is 0 timeout is never.

The ones mentioned in Bill's book are very good implementations but I feel 
that it is sometimes nicer to have an implementation that does not add 
extra class libraries (i.e. OJB or Hibernate). If you are already using 
one of those in your app I would say then use those Message Resource 
extensions, but if you want something relatively simple that just uses 
standard J2EE and the struts libs then use mine. (I really should get it 
up on a site somewhere :)

Hi, I wrote OJBMessageResources a while back and it has not been updated 
since it was last published.

Struts will soon be changing (1.3.something) the internal mechanism from 
MessageResources/PropertyMessageResources (and factory) to 
commons-resources.  That's why I wrote 3 implementations for 
commons-resources:
HibernateResources
IBatisResources
JDBCResources (not in CVS yet)

http://cvs.sourceforge.net/viewcvs.py/struts/commons-resources-optional/
These are not released (because commons-resources has not been released, but 
it is out of the sandbox, which is a good thing), but I will publish and 
announce the extensions when it get's the 1.0 stamp of approval.


Al
Thanks.
--
James Mitchell
Software Engineer / Open Source Evangelist
Consulting / Mentoring / Freelance
EdgeTech, Inc.
678.910.8017
AIM:   jmitchtx
Yahoo: jmitchtx
MSN:   [EMAIL PROTECTED]

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


RE: RESEND: RE: Load message resources from DB???

2005-04-06 Thread Fogleson, Allen
James,

Does your JDBCResources differ greatly from the one that is in
Commons-resources already? (I'm trying to remember which version of CR I
checked out but I cant heh) i.e. does it take advantage of any container
connection pooling etc? The one I see in cr basically does a connection
to the db via the standard drivermanager methods, and shoves them into a
properties file. 

The biggest reason I can ever see to use a db vs a file is for
relatively real time updates of the message resources.  The use case
being that some admin user can change the messages via some interface
(whether that be web or isql, or whatever) and then those changes are
propagated to the web application almost automatically, or at least
within some time period. 

On the one I wrote I went for lazy loading of the properties at request
time for this reason, and it has a timeout that the webapp developer
could set to allow for a variable timeout. Flow was basically check the
cache, is the cache valid? 

Yes - return the message
No  - invalidate the cache entry and lookup the message in the db, place
new message in cache, and return the message. 

I mainly wrote it as an example of how to extend the struts
MessageResources and implement your own custom one. Since I mainly use
full j2ee app servers I decided on a JNDI lookup to the DS instead of
drivermanager type stuff. (plus with the lazy loading it helps to use a
connection pool :)

Anyway just wondering. (You know... comparing code sort of)

Al



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



RE: Html:messages vs html:errors

2005-04-06 Thread Michael Oliver
Hooray, I found it, thanks to Allen and Niall.

logic:messagesPresent message=true

   h3font color=redMessages:/font/h3
   ul
   html:messages id=msg message=true
   libean:write name=msg //li
   /html:messages
   /ul

/logic:messagesPresent

Since it was finding messages present when it should, but wasn't finding
the messages themselves, it should have dawned on me that if
logic:messagesPresent needs to know if you are looking for
message=true so then the html:messages might need message=true as
well.

So back to the grindstone, thanks again.

Michael Oliver
CTO
Alarius Systems LLC
3325 N. Nellis Blvd, #1
Las Vegas, NV 89115
Phone:(702)643-7425
Fax:(702)974-0341
*Note new email changed from [EMAIL PROTECTED]

-Original Message-
From: Fogleson, Allen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 06, 2005 12:25 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: Html:messages vs html:errors

Michael,

Are you capturing exceptions in the jsp? (i.e. do you wrap a giant try
catch block or something?) I ask this because it must be finding the
message since if a key is not found you should get an exception along
the lines of Cannot find message resource for key  (I cant
remember the exact text) and sorry I cant see your entire text. Can you
forward the applicationResources file and the jsp bean:message call to
me? 

You could turn your logging to debug for org.apache.struts.util and that
may help you some also. 

Al

-Original Message-
From: Michael Oliver [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 06, 2005 2:14 PM
To: 'Struts Users Mailing List'
Subject: RE: Html:messages vs html:errors

Thanks,

But ARG That wasn't it.  I changed the message-resources tag as you
suggest, 

message-resources null=false parameter=ApplicationResources/

however I am still not displaying any messages not even the ???null???
there are also no exceptions in the log.

Is there some other package I can add a logger for that might yield a
hint as to what's going on?

Michael Oliver
CTO
Alarius Systems LLC
3325 N. Nellis Blvd, #1
Las Vegas, NV 89115
Phone:(702)643-7425
Fax:(702)974-0341
*Note new email changed from [EMAIL PROTECTED]

-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 06, 2005 11:30 AM
To: Struts Users Mailing List
Subject: Re: Html:messages vs html:errors

The problem is with how you've configured your messages resources.
Because
you've specified a key your message resources are not being stored under
the
default messages resources key. There being stored under the bundle
key
ApplicationResources. You just need to remove that (and the id, its
unnecessary) and have the following...

  message-resources null=false parameter=ApplicationResources/

If you do specify a key value in the message-resources element,
then
you need to use the same value in the bundle attribute of the JSP
tags,
something like the following should work with what you had set up...

   bean:message key=myMessage.key bundle=ApplicationResources /

I'm going to post an update to the page I originally put up which
includes
info on this - I'll post to the list when its ready.

Niall

- Original Message - 
From: Michael Oliver [EMAIL PROTECTED]
Sent: Wednesday, April 06, 2005 5:12 PM


 Still not displaying messages, here is what I have so far.

 struts-config.xml entry:

 snip
 ...controller/
  message-resources id=ApplicationResources
key=ApplicationResources
   null=false parameter=ApplicationResources/
  plug-in className=org.apache.struts.tiles.TilesPlugin...

 The ApplicationResources.properties file is located at

 /WEB-INF/classes/ApplicationResources.properties

 it contains:



-
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]



Validating an amount with commas allowed

2005-04-06 Thread Wendy Smoak
I have a form with a required amount.  The users like to enter things like
$50k which thoroughly confuses the system that tries to send a different
email if the amount is over or under $25,000.  I think I can make them stop
entering dollar signs and letters... but I don't think they'll part with the
commas.

Before I write a custom validator, am I missing something simple that would
allow me to accept 40,000 as a valid amount?  The only thing I see is
integer validation, which is too strict.

Thanks,
-- 
Wendy Smoak


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



Re: Validating an amount with commas allowed

2005-04-06 Thread Hubert Rabago
I'm useless with regex.  However, I found this on the web some time
ago and seemed to match what I needed back then:

var
var-namemask/var-name
var-value^(?:\d+|\d{1,3}(?:,\d{3})*)(?:\.\d{1,2}){0,1}$/var-value
/var

This allows them to include the .00 if they so desire.

hth,
Hubert

On Apr 6, 2005 5:08 PM, Wendy Smoak [EMAIL PROTECTED] wrote:
 I have a form with a required amount.  The users like to enter things like
 $50k which thoroughly confuses the system that tries to send a different
 email if the amount is over or under $25,000.  I think I can make them stop
 entering dollar signs and letters... but I don't think they'll part with the
 commas.
 
 Before I write a custom validator, am I missing something simple that would
 allow me to accept 40,000 as a valid amount?  The only thing I see is
 integer validation, which is too strict.
 
 Thanks,
 --
 Wendy Smoak
 
 -
 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: Validating an amount with commas allowed

2005-04-06 Thread Greg Pelly
Here's a better mask to use: 
var
var-namemask/var-name
var-value^\$?\d+(,\d{3})*(\.\d{2})?$/var-value
/var

This mask: 
--allows (but does not require) a leading dollar sign (if you want to remove
this feature, get rid of the \$? at the beginning (but leave the ^)
--allows (but does not require) a decimal point + 2 trailing digits.  

It requires:
--each comma to have at least 1 digit before it (fails on ,500) 
--exactly three digits after each comma (fails on $1,00.00)

Here's a tester you can put in your HTML:
script
 var pattern = /^\$?\d+(,\d{3})*(\.\d{2})?$/;
 if (pattern.exec($1,500,200.99)) {
alert ('matches');
  } else {
alert ('does not match');
  }
/script 

HTH,
Greg

-Original Message-
From: Hubert Rabago [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 06, 2005 3:39 PM
To: Struts Users Mailing List
Subject: Re: Validating an amount with commas allowed

I'm useless with regex.  However, I found this on the web some time ago and
seemed to match what I needed back then:

var
var-namemask/var-name
var-value^(?:\d+|\d{1,3}(?:,\d{3})*)(?:\.\d{1,2}){0,1}$/var-value
/var

This allows them to include the .00 if they so desire.

hth,
Hubert

On Apr 6, 2005 5:08 PM, Wendy Smoak [EMAIL PROTECTED] wrote:
 I have a form with a required amount.  The users like to enter 
 things like $50k which thoroughly confuses the system that tries to 
 send a different email if the amount is over or under $25,000.  I 
 think I can make them stop entering dollar signs and letters... but I 
 don't think they'll part with the commas.
 
 Before I write a custom validator, am I missing something simple that 
 would allow me to accept 40,000 as a valid amount?  The only thing I 
 see is integer validation, which is too strict.
 
 Thanks,
 --
 Wendy Smoak
 
 -
 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]



Info on Using Messages in Struts

2005-04-06 Thread Niall Pemberton
I started setting up this page just to show a few examples of the
html:errors and html:messages tags in response to a question on this
list. Got a bit carried away and wrote a bit of an essay. Its been updated
since I posted the link in response to someone, so here it is again.

http://www.niallp.pwp.blueyonder.co.uk/HelpTagsErrorsAndMessages.html

Sorry its not the best organized, but it grew organically.

Comments and feedback welcome.

Niall



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



Struts, Tomcat 5.0, JBuilder JPetstore

2005-04-06 Thread Folashade Adeyosoye
Was wondering if anyone has successfully loaded JPetStore Demo into
JBuilder 2005. After trying and compiling not all the classes were
compiled



Struts
JBuilder
JDK 1.5
Tomcat 5
iBatis DAO
iBatis SQLMapper

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



ANN: SWF In place Page Updating (IPU) for Struts

2005-04-06 Thread William Connor
We are pleased to announce the 0.6 release of the Simple Web Framework 
(SWF), including a standalone port of the IPU/Ajax capabilities to 
Struts. Now you can IPU enable Struts for a richer user experience. 
(The port will also work with other similar Web application frameworks, 
though not JSF.)

To download the Struts IPU example WAR: http://tangoone.com/swf/ipu.war
The source code for the example is available at 
http://tangoone.com/swf/struts-ipu.zip
Walk through the example at https://swf.dev.java.net/docs/Struts.html

To explore the 0.6 release of the SWF, see https://swf.dev.java.net/ 
and download the SWF examples from 
http://tangoone.com/swf/examples.war.

Cheers from (and for:) the SWF team!
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: ANN: SWF In place Page Updating (IPU) for Struts

2005-04-06 Thread Frank W. Zammetti
Looks interesting!  I'm going to have to look at this in much more 
detail first chance I get.  One question... I saw this comment on the 
overview...

For reasons cited by many, JSF has fallen short of our needs and we 
were disappointed to see Struts choose JSF as its basis going forward.

What are you basing this statement on?  To the best of my knowledge (and 
someone please correct me if I am misinformed), Struts itself continues 
on a non-JSF path right now, and while JSF could come into it later, 
there are no plans at the moment for that.  If the reference was to 
Shale, that is Craig's blending of Struts and JSF, but that is not the 
sanctioned Struts direction right now, as far as I know.

Just curious because if my understanding is mistaken, I most certainly 
want to know! :)

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
William Connor wrote:
We are pleased to announce the 0.6 release of the Simple Web Framework 
(SWF), including a standalone port of the IPU/Ajax capabilities to 
Struts. Now you can IPU enable Struts for a richer user experience. (The 
port will also work with other similar Web application frameworks, 
though not JSF.)

To download the Struts IPU example WAR: http://tangoone.com/swf/ipu.war
The source code for the example is available at 
http://tangoone.com/swf/struts-ipu.zip
Walk through the example at https://swf.dev.java.net/docs/Struts.html

To explore the 0.6 release of the SWF, see https://swf.dev.java.net/ and 
download the SWF examples from http://tangoone.com/swf/examples.war.

Cheers from (and for:) the SWF team!
-
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: ANN: SWF In place Page Updating (IPU) for Struts

2005-04-06 Thread William Connor
On Apr 6, 2005, at 9:55 PM, Frank W. Zammetti wrote:
Looks interesting!  I'm going to have to look at this in much more 
detail first chance I get.  One question... I saw this comment on the 
overview...

For reasons cited by many, JSF has fallen short of our needs and we 
were disappointed to see Struts choose JSF as its basis going 
forward.

What are you basing this statement on?  To the best of my knowledge 
(and someone please correct me if I am misinformed), Struts itself 
continues on a non-JSF path right now, and while JSF could come into 
it later, there are no plans at the moment for that.  If the reference 
was to Shale, that is Craig's blending of Struts and JSF, but that is 
not the sanctioned Struts direction right now, as far as I know.

Just curious because if my understanding is mistaken, I most certainly 
want to know! :)
My bad. That thought was formulated when Shale appeared to be where 
Struts was going, prior to forking off as its own thing.

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


RE: Session Idle and Progress Bar

2005-04-06 Thread Eain Mat
 
I would solve it by adding a 1 minute refresh in a hidden frame in your page
to a action which just delivers next refresh header. As long as the user has
the page open, the session will never expire. After he closes the browser,
the session expires normally.
I think this is the simplest solution. Thanks Leo.
 
Eain
 
 
Wiebe, 
 
If you want the page to do refreshes while waiting for the operation to
complete, why not implement a progress bar?

http://www.onjava.com/pub/a/onjava/2003/06/11/jsp_progressbars.html

We are considering to have the progress bar but is there way to figure out or 
formula, how long does it take to load a respone/file by size? I think someone 
must already implemented.
 
Let say I wanted to retreive response size of 1 MB, how can I determine how 
long is it going to take to load a reponse depending on cpu?
 
Eain


Wiebe de Jong [EMAIL PROTECTED] wrote:
If you want the page to do refreshes while waiting for the operation to
complete, why not implement a progress bar?

http://www.onjava.com/pub/a/onjava/2003/06/11/jsp_progressbars.html

Here, each time the page refreshes, a progress bar is updated, showing the
user how the long-running operation is going.

Wiebe

-Original Message-
From: Leon Rosenberg [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 06, 2005 11:11 AM
To: 'Struts Users Mailing List'
Subject: re: Session Idle

I would solve it by adding a 1 minute refresh in a hidden frame in your page
to a action which just delivers next refresh header. As long as the user has
the page open, the session will never expire. After he closes the browser,
the session expires normally.

Regards
Leon

 -Ursprüngliche Nachricht-
 Von: Wiebe de Jong [mailto:[EMAIL PROTECTED] 
 Gesendet: Mittwoch, 6. April 2005 20:02
 An: 'Struts Users Mailing List'
 Betreff: RE: Session Idle
 
 Is it possible to create a listener for the session timeout 
 event? This listener would check to see if there is an 
 operation in progress. If there is, reset the timeout 
 counter. If not, let the session expire.
 
 Wiebe
 
 -Original Message-
 From: Justin Morgan [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, April 06, 2005 10:20 AM
 To: Struts Users Mailing List
 Subject: RE: Session Idle
 
 I think Eain is saying that he has some operations that take 
 a long time, and he wants to suspend the timeout counter 
 during those operations.
 
 So suppose the timeout in web.xml is 5 minutes. One 
 particular operation takes 10 minutes to complete. Do not 
 expire session.
 
 However, if the user is idle when there is NOT a long process 
 running, expire after 5 minutes.
 
 Is that what you meant, Eain?
 
 -Justin
 
 
 
 -Original Message-
 From: Fogleson, Allen [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 05, 2005 8:57 PM
 To: Struts Users Mailing List
 Subject: RE: Session Idle
 
 That is exactly how the session timeout works. If the user is 
 idle (i.e has not submitted a request in X time) then it is 
 timed out (assuming X is the timeout) otherwise a request 
 acts sort of as a renew this session for X more minutes
 
 Al
 
 
 -Original Message-
 From: Eain Mat [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 05, 2005 7:32 PM
 To: Struts Users Mailing List
 Subject: Re: Session Idle
 
 if i invalidate the session, everything will be destory in 
 the session.
 I still want the session to keep alive when user is in the 
 middle of their processing operation even the session-timeout 
 is passed. I only want to timeout their session, if they are 
 not doing anything.
 
 
 Eain mat
 
 Martin Gainty wrote:
 --web.xml contents--
 
 
 5 
 
 
 then trap on the invalidate method for your HttpSession 
 object Makes sense???
 Martin-
 - Original Message -
 From: Eain Mat 
 To: 
 Sent: Tuesday, April 05, 2005 7:44 PM
 Subject: Session Idle
 
 
  What is the simplest way to track the session idle? We cannot use
 session-timeout in web.xml because there may be leftover 
 operation that is needed to process.
 
  Eain Mat
 
 
 -
 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]


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