update values in a collection of beans through JSP

2004-08-24 Thread Muhammad Momin Rashid
Hello,

I have a collection of a perticular type of bean.  I am displaying the
values of fields in each bean (bean values are of type strings, boolean
etc.) inside a logic:iterate.  The problem is when I change any value in the
webpage, the bean in the collection does not get updated.  Can anyone guide
me how to accomplish this?

Thanks for your time and effort

Regards,
Muhammad Momin Rashid.




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



Re: updating values in a collection of beans through JSP

2004-08-24 Thread Richard Yee
Muhammad,
The JSP is evaluated on the server and then sent to the browser. When you 
change a value on the web page, you submit the form to an Action class 
which then takes the form properties and should update your collection and 
then persist it or put it in request or session scope. You can then forward 
to another JSP to re-display the updated collection.

-Richard
At 11:44 PM 8/24/2004, you wrote:
Hello,
I have a collection of a perticular type of bean.  I am displaying the
values of fields in each bean (bean values are of type strings, boolean
etc.) inside a logic:iterate.  The problem is when I change any value in the
webpage, the bean in the collection does not get updated.  Can anyone guide
me how to accomplish this?
Thanks for your time and effort
Regards,
Muhammad Momin Rashid.

-
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: duplication of codes in different Action class

2004-08-24 Thread Sebastian Ho
I am already using DispatchAction.

I didn't use the scope in my action-mapping. Instead I use
session.setAttribute in my Action.

The codes to update the actionform is in action1. But I need to update
the same form in action2. One way is to duplicate the same codes in both
action. Or the common update codes can be executed before a JSP is
loaded. The latter will prevent duplicate codes.

sebastian


On Wed, 2004-08-25 at 14:26, Rick Reumann wrote:
> Sebastian Ho wrote:
> 
> > Hi
> > 
> > Scenario :
> > 
> > 1. User submits form in JSP1 which Action1 saves to database.
> > 2. Action1 set Form1 into session.
> > 3. Action1 forwards to JSP1 again, which is suppose to display newly
> > added form with other forms previously added.
> > 
> > How do I make JSP1 to get values from database BEFORE JSP1 displays and
> > set them into session? I suppose I have to do this in Action1 but for
> > the first submission of form1, Action1 is not called yet by JSP1.
> > 
> >>From my analysis, there will be situation where there will be multiple
> > input sources into a particular JSP. That means I need to have my
> > 'update from database and set in session' codes in all the Action
> > classes that forwards to JSP1? 
> > 
> > In another words, how do I call the update method in Action1 from
> > Action2 before forwarding to the JSP which display my updated data.
> > 
> > This is duplication of codes and inefficient to me. There must be a
> > better way to do this in Struts.
> > 
> > My question might be confusing..I am trying my best. Tell me if its
> > unclear.
> 
> It's unclear:)
> 
> Some of you terminology might just be wrong which is making it more 
> confusing. For example in step 2 above, are you setting the form in 
> session scope yourself? You normally don't need, or want, to manually do 
> this. You delcare the scope of your form in your action mapping.
> 
> I think what you are wondering about is "How do you get your form 
> populate for your JSP so that that user can alter it?" (I could be wrong 
> here)... anyway I like to use a DispatchAction which has several methods 
> in it... setUp, Update, etc. So your first call when the user clicks on 
> a link would call the setUp method and there you would make sure your 
> form is populated with the data it needs and you forward to your JSP. As 
> a side note, you do not need to be using Session scope for this. Do you 
> have a particular reason why you need to be using Session scope for your 
> form (many times you do, but I'm guessing in this case you don't and you 
> are using the Session because you are not understanding the flow of how 
> Struts operates).
> 


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



forwardPattern in -XML-Element

2004-08-24 Thread Matthias Wessendorf
Hi folks,

just a question on forwardPattern of .
Perhaps i missed something.

Default value is $M$P, which means,
module and path.

so what would be a good example of changing this
behavior?

Regards,
Matthias
--
Matthias Weßendorf
Email: matthias AT wessendorf DOT net
URL: http://www.wessendorf.net


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



updating values in a collection of beans through JSP

2004-08-24 Thread Muhammad Momin Rashid
Hello,

I have a collection of a perticular type of bean.  I am displaying the 
values of fields in each bean (bean values are of type strings, boolean 
etc.) inside a logic:iterate.  The problem is when I change any value in the 
webpage, the bean in the collection does not get updated.  Can anyone guide 
me how to accomplish this?

Thanks for your time and effort

Regards,
Muhammad Momin Rashid. 




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



Re: duplication of codes in different Action class

2004-08-24 Thread Rick Reumann
lixin chu wrote:
so JSP1 should be associated with another Action,
which fetch data from DB and setAttribute in request
or session.
Well everything should be going through an Action of some sort so "yes" 
just make sure the form is populated in your Action before forwarding on 
to the JSP.

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


Re: ActionForm and Transfer Object

2004-08-24 Thread Rick Reumann
Sebastian Ho wrote:
Say I retrieve a TO from database and convert it into a actionForm for
display. In this case I have 4 fields for my actionForm but 10 in my TO.
(6 are not needed for display). A user updates the 4 fields and the
action convert those into TO. In this case, the other 6 fields will be
reset to null(or empty) in my database!
To prevent this, I actually need to use hidden fields in my JSP or some
other ugly solutions in my Action class. They are still dependent on
each others afterall.
You can handle this several ways...
For example, one solution is you create a TransferObject that refers to 
only the fields you care about - in this case the 4 fields you 
mentioned. So your call to the business layer would return that 
TransferObject and you could then convert that easily to your form 
(using BeanUtils). Then going back the other way your business layer 
would take as an arguemnt the same type of TransferObject.

I actually don't prefer the above, though, because say later on you 
decide you want to add another field to your form now your backend has 
to worry about handling a new object with different fields.

I think the best solution is to simply make another call to get back the 
initial TO from the db, then simply use BeanUtils to populate that TO 
with the form fields. It will only set the fields in which it has the 
same names for so your other data will be fine.

So it looks like...
TransferObject to = BackendEnd.getMyTransferObject(..);
MyForm myForm = (MyForm)form;
BeanUtils.copyProperties( to, myForm);
BackEnd.doUpdate( to );
Pretty simple I think. Just make sure your ActionForm doesn't contain 
properties that you don't care about editing otherwise it will 
over-write the TO properties. If the JSP form is going to be very 
dyanmic, as in it will sometimes have some properties and sometimes have 
others, then you will have to use more complex 'tricks' such as using 
hidden variables.. or I'd just prefer to manually set the TO fields in 
the Action.

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


SV: HTML:TEXT tag and Internationalization

2004-08-24 Thread hermod . opstvedt
Hi

Yeah, but why invent something new every time when the framework can do
it for you ?

-Opprinnelig melding-
Fra: Jim Barrows [mailto:[EMAIL PROTECTED]
Sendt: 24. august 2004 18:47
Til: Struts Users Mailing List
Emne: RE: HTML:TEXT tag and Internationalization




> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 24, 2004 4:38 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: HTML:TEXT tag and Internationalization
> 
> 
> Hi
> 
> Is there any reasonable argument as to why the html:text tag uses
> default (value.toString()) formating, while the bean:write uses a
> formatter that is I18N aware. This is really anoying for locales that
> normally use comma as a decimal seperator. If you output the 
> value with
> bean:write it will look OK, but displaying it in an html:text it will
> use the English dot as a decimal seperator. I think that moving the
> formatValue from WriteTag into TagUtils, hence making it 
> avaiable to all
> tags would be a good idea. Then we would have a uniform formatting of
> values.

Then again, since html:text is usually used with a form bean, which is
supposed to be all strings, you could format them yourself, either in
the setter (yuck), or in the action.


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


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


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



Antw: Re: using struts and dbcp together throws sometimes a NoSuchElementException/SQLNestedException:

2004-08-24 Thread PANTA-RHEI WOLF
Hi Erik,

this is what i really do,
i believe that closing the connection will close automaticly the statement and the 
resultset, or?
the point is, i work with the resultset in a function, which is hidden from the db 
access,
so there i only have my resultset. From these i try to get the statement and from the 
statement i try to
get the connection. If there are all of these 3 not null i close the connection.
Yes i know it looks a bit strange, but depending on the javadoc these should do the 
same.

// this checks if the rset is available and if the statement is available and if the 
connection is available
if (rset!= null && rset.getStatement() != null && rset.getStatement().getConnection() 
!= null) { 
rset.getStatement().getConnection().close();
}

Never the less this seems to work, but sometimes i got an exception saying that my 
pool is exhausted... 
and this is what i do not understand. i checked if this connection i borrow and the 
connection i close
are the same and yes they are... so hey what is the problem? Can it be that i borrow 
my connections
to fast from the pool?
Sometimes 3 till 10 per second, but they are released immediately.

Any ideas how to avoid this exception

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted
 at 
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:103)  
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540) 
 at de.orb.quick.model.CommunicationLayer.executeStatement(CommunicationLayer.java:86) 
  at de.orb.quick.model.SystemDataBean.getResult(SystemDataBean.java:43)  at 
_renderSystem._jspService(renderSystem.jsp:8)   

have a nice day

mirko




Mit freundlichen Grüßen

Mirko Wolf

-
panta rhei systems gmbh
budapester straße 31
10787 berlin
tel +49.30.26 01-14 17
fax +49.30.26 01-414 13
[EMAIL PROTECTED] 
www.panta-rhei.de 

Diese Nachricht ist vertraulich und ausschliesslich für den Adressaten bestimmt. Jeder 
Gebrauch durch Dritte ist verboten. Falls Sie die Daten irrtuemlich erhalten haben, 
nehmen Sie bitte Kontakt mit dem Absender auf und loeschen Sie die Daten auf jedem 
Computer und Datentraeger. Der Absender ist nicht verantwortlich für die 
ordnungsgemaesse, vollstaendige oder verzoegerungsfreie Übertragung dieser Nachricht.

This message is confidential and intended solely for the use by the addressee. Any use 
of this message by a third party is prohibited. If you received this message in error, 
please contact the sender and delete the data from any computer and data carrier. The 
sender is neither liable for the proper and complete transmission of the information 
in the message nor for any delay in its receipt.


>>> [EMAIL PROTECTED] 08/24 4:34  >>>
Why not just close the connection if con != null && !con.isClosed() ?

I always:
try {
if (rs != null) rs.close();
}
catch {}

try {
if (ps != null) ps.close();
}
catch ()

try {
if (c != null && !c.isClosed()) c.close();
}
catch {}

Not sure if that is it, but I don't understand your logic for deciding 
whether to close the connection. I am using Oracle with DBCP. I have a 
couple of properties set differently from you, but I don't see any that 
would be the problem.

Erik


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



Re: duplication of codes in different Action class

2004-08-24 Thread lixin chu
so JSP1 should be associated with another Action,
which fetch data from DB and setAttribute in request
or session.

You should make your Action not the JSP1 available to
the user.

--- Sebastian Ho <[EMAIL PROTECTED]> wrote:

> Hi
> 
> Scenario :
> 
> 1. User submits form in JSP1 which Action1 saves to
> database.
> 2. Action1 set Form1 into session.
> 3. Action1 forwards to JSP1 again, which is suppose
> to display newly
> added form with other forms previously added.
> 
> How do I make JSP1 to get values from database
> BEFORE JSP1 displays and
> set them into session? I suppose I have to do this
> in Action1 but for
> the first submission of form1, Action1 is not called
> yet by JSP1.
> 
> >From my analysis, there will be situation where
> there will be multiple
> input sources into a particular JSP. That means I
> need to have my
> 'update from database and set in session' codes in
> all the Action
> classes that forwards to JSP1? 
> 
> In another words, how do I call the update method in
> Action1 from
> Action2 before forwarding to the JSP which display
> my updated data.
> 
> This is duplication of codes and inefficient to me.
> There must be a
> better way to do this in Struts.
> 
> My question might be confusing..I am trying my best.
> Tell me if its
> unclear.
> 
> Thanks
> 
> Sebastian Ho
> 
> 
> 
> 
> 
>
-
> 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: duplication of codes in different Action class

2004-08-24 Thread Rick Reumann
Sebastian Ho wrote:
Hi
Scenario :
1. User submits form in JSP1 which Action1 saves to database.
2. Action1 set Form1 into session.
3. Action1 forwards to JSP1 again, which is suppose to display newly
added form with other forms previously added.
How do I make JSP1 to get values from database BEFORE JSP1 displays and
set them into session? I suppose I have to do this in Action1 but for
the first submission of form1, Action1 is not called yet by JSP1.
From my analysis, there will be situation where there will be multiple
input sources into a particular JSP. That means I need to have my
'update from database and set in session' codes in all the Action
classes that forwards to JSP1? 

In another words, how do I call the update method in Action1 from
Action2 before forwarding to the JSP which display my updated data.
This is duplication of codes and inefficient to me. There must be a
better way to do this in Struts.
My question might be confusing..I am trying my best. Tell me if its
unclear.
It's unclear:)
Some of you terminology might just be wrong which is making it more 
confusing. For example in step 2 above, are you setting the form in 
session scope yourself? You normally don't need, or want, to manually do 
this. You delcare the scope of your form in your action mapping.

I think what you are wondering about is "How do you get your form 
populate for your JSP so that that user can alter it?" (I could be wrong 
here)... anyway I like to use a DispatchAction which has several methods 
in it... setUp, Update, etc. So your first call when the user clicks on 
a link would call the setUp method and there you would make sure your 
form is populated with the data it needs and you forward to your JSP. As 
a side note, you do not need to be using Session scope for this. Do you 
have a particular reason why you need to be using Session scope for your 
form (many times you do, but I'm guessing in this case you don't and you 
are using the Session because you are not understanding the flow of how 
Struts operates).

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


ActionForm and Transfer Object

2004-08-24 Thread Sebastian Ho
Hi

People have been telling me that ActionForm should not be dependent on
your TO. Simple because actionForm is for presentation and TO for your
business requirement. Sounds logical and right way to go.

Now that I started developing using struts, it is actually not that
simple. 

Say I retrieve a TO from database and convert it into a actionForm for
display. In this case I have 4 fields for my actionForm but 10 in my TO.
(6 are not needed for display). A user updates the 4 fields and the
action convert those into TO. In this case, the other 6 fields will be
reset to null(or empty) in my database!

To prevent this, I actually need to use hidden fields in my JSP or some
other ugly solutions in my Action class. They are still dependent on
each others afterall.

Is there a solution to this or I am missing something here?

Thanks

Sebastian Ho


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



duplication of codes in different Action class

2004-08-24 Thread Sebastian Ho
Hi

Scenario :

1. User submits form in JSP1 which Action1 saves to database.
2. Action1 set Form1 into session.
3. Action1 forwards to JSP1 again, which is suppose to display newly
added form with other forms previously added.

How do I make JSP1 to get values from database BEFORE JSP1 displays and
set them into session? I suppose I have to do this in Action1 but for
the first submission of form1, Action1 is not called yet by JSP1.

>From my analysis, there will be situation where there will be multiple
input sources into a particular JSP. That means I need to have my
'update from database and set in session' codes in all the Action
classes that forwards to JSP1? 

In another words, how do I call the update method in Action1 from
Action2 before forwarding to the JSP which display my updated data.

This is duplication of codes and inefficient to me. There must be a
better way to do this in Struts.

My question might be confusing..I am trying my best. Tell me if its
unclear.

Thanks

Sebastian Ho





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



Re: checkbox is not correct setted in ActionForm

2004-08-24 Thread Shinobu Kawai

Hi Stefan,

> I notice something really strange.
> I have a update form and the user disable a  check box :
>
> However the action form setter is every time triggered with a "true" 
> value. ;-o
> The really strange thing that I have a other action and form that 
> contains a checkbox as well and everything is perfect working.
Take a peek at
http://struts.apache.org/userGuide/struts-html.html#checkbox
especially the "WARNING".  Now compare the working form and the
not-working form.  They should give you a clue.  ;)
(If they're both the same ActionForm's, then THAT's something strange.)

Best regards,
-- Shinobu Kawai

--
Shinobu Kawai <[EMAIL PROTECTED], [EMAIL PROTECTED]>




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



checkbox is not correct setted in ActionForm

2004-08-24 Thread Stefan Groschupf
Hi,
I notice something really strange.
I have a update form and the user disable a  check box :
  
However the action form setter is every time triggered with a "true" 
value. ;-o
The really strange thing that I have a other action and form that 
contains a checkbox as well and everything is perfect working.

Has someone any idea what i can do find my mistake?
Thanks!
Stefan 

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


Re: forward and set url parameter

2004-08-24 Thread Stefan Groschupf
Thanks a lot!
Am 25.08.2004 um 00:05 schrieb Guillermo Meyer:
+1
Adding a redirect:
public ActionForward executeActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws
Exception {
ActionForward forward = mapping.findForward("success");
String path = forward.getPath();
path += "?foo=bar";
return new ActionForward(path, true);
}
should work.
If you cant perform a redirect, you could wrap the request in a filter
and simulate a putParameter by overriding the getParameter... but I
think that it would be overkilling in your situation, so with the
redirect stuff you'll be done.
Saludos.
Guillermo.
-Mensaje original-
De: Erik Weber [mailto:[EMAIL PROTECTED]
Enviado el: Martes, 24 de Agosto de 2004 05:57 p.m.
Para: Struts Users Mailing List
Asunto: Re: forward and set url parameter
public ActionForward executeActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws
Exception {
ActionForward forward = mapping.findForward("success");
String path = forward.getPath();
path += "?foo=bar";
return new ActionForward(path);
}
But in this case, I'm not sure why you wouldn't just use a request
attribute instead. By forward, perhaps you mean redirect?
Or, in a JSP link:
blah

Erik
Stefan Groschupf wrote:
Hi,
I wish to forward to a action that require a url parameter.
request.setAttribute does not set a urlParameter in the style
showBla.do?pk=2323;
How to set such a parameter, since request.getParameterMap().put() has

no effect?
Thanks for any hints.
Stefan
-
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]


submitting map-backed action forms

2004-08-24 Thread Olve Sæther Hansen
Ok, trying once more, hopeing for more help this time..
I have a jsp, getting values from an action. These values represent 
questions, and alternatives for each question rendered as radio-buttons.

The radiobuttons is preset to a choice if the user has visited and 
answered this question before, but he/she is free to revise the answer. 
So far I got it to work (by hardcoding the values sent from the action 
-  just for testing).

I am using the general approach from:
http://struts.apache.org/userGuide/building_controller.html#map_action_form_classes 

My problem comes when submitting the form, I get a:
javax.servlet.ServletException: BeanUtils.populate
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:844)
at 
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:823)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:243)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1176)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:472)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:68)
[snip]
The two actions involved is defined as:
* @struts.action name="mapValueForm" path="/answerQuestionGroup"
* parameter="action" scope="request"
*
* @struts.action name="mapValueForm" path="/openQuestionGroup"
* parameter="action" scope="request"
The form is defined as:
private Map values = new HashMap();
Object getValue(String key)
{return values.getKey(); }
void setValue(String key, Object value)
{ values.put(key, value); }
The form is specified as:



 


  <%--Todo: legg til innrykk--%>


<%-- Here I am retrtieving the value from mapValueForm, and it works --%>

  





  


As far as I understand, struts should use 
mapValueForm.setValue("someVal") when submitting this form. The 
generated html looks sane, in that it generates the following for a 
question with three alternatives, and one is checked (the hardcoded val 
from the action):

ja  
nei  
 kanskje 

I have struggled with this problem for some time now, please anyone who 
can help me with a pointer to what can be wrong, or how I can do this in 
another way?

Thanks,
Olve S. Hansen
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: forward and set url parameter

2004-08-24 Thread Guillermo Meyer
+1
Adding a redirect:

public ActionForward executeActionMapping mapping, ActionForm form, 
HttpServletRequest request, HttpServletResponse response) throws
Exception {
ActionForward forward = mapping.findForward("success");
String path = forward.getPath();
path += "?foo=bar";
return new ActionForward(path, true);
}

should work.

If you cant perform a redirect, you could wrap the request in a filter
and simulate a putParameter by overriding the getParameter... but I
think that it would be overkilling in your situation, so with the
redirect stuff you'll be done.


Saludos.
Guillermo.


-Mensaje original-
De: Erik Weber [mailto:[EMAIL PROTECTED] 
Enviado el: Martes, 24 de Agosto de 2004 05:57 p.m.
Para: Struts Users Mailing List
Asunto: Re: forward and set url parameter

public ActionForward executeActionMapping mapping, ActionForm form, 
HttpServletRequest request, HttpServletResponse response) throws
Exception {
ActionForward forward = mapping.findForward("success");
String path = forward.getPath();
path += "?foo=bar";
return new ActionForward(path);
}

But in this case, I'm not sure why you wouldn't just use a request 
attribute instead. By forward, perhaps you mean redirect?

Or, in a JSP link:

blah


Erik


Stefan Groschupf wrote:

> Hi,
>
> I wish to forward to a action that require a url parameter.
> request.setAttribute does not set a urlParameter in the style 
> showBla.do?pk=2323;
>
> How to set such a parameter, since request.getParameterMap().put() has

> no effect?
>
> Thanks for any hints.
> Stefan
>
>
> -
> 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: thanks, a technical question about using Eclipse with Struts (fwd)

2004-08-24 Thread keith . wright1
Hey Martin, that's a very good idea.  Will try and let you know if it worked

Thanks much, Keith

http://volunteer.johnkerry.com/member/832501 



-- Original message from "Martin Gainty" : -- 

> hey Keith- 
> 
> I would doubt the jar versions are changing unless of course your build 
> process is un jarring all the jars and then re-jarring them later altho why 
> eclipse would do that is beyond me- 
> sounds more like a config issue (by Eclipse) specifically what it is doing 
> to server.xml and web.xml? 
> I would copy server.xml and web.xml out to a 'safe' readonly folder and 
> then copy back in before building the war 
> 
> There was a similar problem for configuring SQLServer .. take a look at .. 
> http://www.experts-exchange.com/Web/Application_Servers/Q_21088482.html 
> 
> HTH, 
> 
> Martin Gainty 
> 
> 
> 
> 
> 
> >From: [EMAIL PROTECTED] 
> >Reply-To: "Struts Users Mailing List" 
> >To: [EMAIL PROTECTED] 
> >Subject: a technical question about using Eclipse with Struts (fwd) 
> >Date: Tue, 24 Aug 2004 20:31:22 + 
> >MIME-Version: 1.0 
> >Received: from mail.apache.org ([209.237.227.199]) by mc4-f29.hotmail.com 
> >with Microsoft SMTPSVC(5.0.2195.6824); Tue, 24 Aug 2004 13:31:43 -0700 
> >Received: (qmail 5659 invoked by uid 500); 24 Aug 2004 20:31:27 - 
> >Received: (qmail 5627 invoked by uid 99); 24 Aug 2004 20:31:26 - 
> >Received: from [204.127.131.117] (HELO mtiwmhc13.worldnet.att.net) 
> >(204.127.131.117) by apache.org (qpsmtpd/0.27.1) with ESMTP; Tue, 24 Aug 
> >2004 13:31:23 -0700 
> >Received: from 204.127.135.57 ([204.127.135.57]) by 
> >worldnet.att.net (mtiwmhc13) with SMTP id 
> ><200408242031221130072ftke>; Tue, 24 Aug 2004 20:31:22 + 
> >Received: from [67.101.64.41] by 204.127.135.57;Tue, 24 Aug 2004 20:31:22 
> >+ 
> >X-Message-Info: 6sSXyD95QpW2YBzVjXXZjxgtQB9XWTuU 
> >Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm 
> >Precedence: bulk 
> >List-Unsubscribe: 
> >List-Subscribe: 
> >List-Help: 
> >List-Post: 
> >List-Id: "Struts Users Mailing List" 
> >Delivered-To: mailing list [EMAIL PROTECTED] 
> >X-ASF-Spam-Status: No, hits=2.0 
> >required=10.0tests=HTML_30_40,HTML_MESSAGE,MIME_BOUND_NEXTPART,MIME_HTML_NO_CHA 
> RSET,NO_REAL_NAME,RCVD_BY_IP,RCVD_DOUBLE_IP_LOOSE,RCVD_NUMERIC_HELO 
> >X-Spam-Check-By: apache.org 
> >Message-Id: 
> ><082420042031.9017.412BA599000399AB23392160376316CE9B0809079D99D2089B070A05 
> @att.net> 
> >X-Mailer: AT&T Message Center Version 1 (Jul 19 2004) 
> >X-Authenticated-Sender: a2VpdGgud3JpZ2h0MUBhdHQubmV0 
> >X-Virus-Checked: Checked 
> >Return-Path: [EMAIL PROTECTED] 
> >X-OriginalArrivalTime: 24 Aug 2004 20:31:43.0636 (UTC) 
> >FILETIME=[5E6EED40:01C48A19] 
> > 
> >Hi, 
> > 
> >I can't seem to get the newest Struts-examples source code into Eclipse 3.0 
> > in such a way as to generate a good .war file that can deploy to TomCat 
> >5.027. The only public guide I see on how to set up struts in Eclipse is 
> >out of date. This happens no matter which version /build of Struts I 
> >download. 
> > 
> >I always get this exception: 
> > 
> >2004-08-23 20:53:29 StandardContext[/servlets-examples]ContextListener: 
> >contextInitialized() 
> >2004-08-23 20:53:29 StandardContext[/servlets-examples]SessionListener: 
> >contextInitialized() 
> >2004-08-23 20:53:33 StandardContext[/struts-example]action: []: Verifying 
> >ModuleConfig for this application module 
> >2004-08-23 20:53:33 StandardContext[/struts-example]action: []: Invalid 
> >className org.apache.struts.webapp.example.memory.MemoryDatabasePlugIn for 
> >PlugInConfig 
> >2004-08-23 20:53:33 StandardContext[/struts-example]action: []: 
> >Verification of ModuleConfig has been completed 
> >2004-08-23 20:53:33 StandardWrapperValve[action]: Allocate exception for 
> >servlet action 
> >javax.servlet.ServletException: Fatal module configuration error, see 
> >previous messages 
> > at 
> >org.apache.struts.plugins.ModuleConfigVerifier.init(ModuleConfigVerifier.java:2 
> 12) 
> > 
> >The Struts-examples.war as downloaded file runs fine, until I regenerate it 
> >using Eclipse. 
> > 
> >I am probably using some incorrect external .jar files, but I need a clue? 
> > 
> >Thoughts? 
> > 
> >Thanks a million! Keith 
> > 
> > 
> > 
> > 
> >http://volunteer.johnkerry.com/member/832501 
> 
> _ 
> Don’t just search. Find. Check out the new MSN Search! 
> http://search.msn.click-url.com/go/onm00200636ave/direct/01/ 
> 
> 
> - 
> To unsubscribe, e-mail: [EMAIL PROTECTED] 
> For additional commands, e-mail: [EMAIL PROTECTED] 
> 

Re: forward and set url parameter

2004-08-24 Thread Erik Weber
public ActionForward executeActionMapping mapping, ActionForm form, 
HttpServletRequest request, HttpServletResponse response) throws Exception {
ActionForward forward = mapping.findForward("success");
String path = forward.getPath();
path += "?foo=bar";
return new ActionForward(path);
}

But in this case, I'm not sure why you wouldn't just use a request 
attribute instead. By forward, perhaps you mean redirect?

Or, in a JSP link:
blah
Erik
Stefan Groschupf wrote:
Hi,
I wish to forward to a action that require a url parameter.
request.setAttribute does not set a urlParameter in the style 
showBla.do?pk=2323;

How to set such a parameter, since request.getParameterMap().put() has 
no effect?

Thanks for any hints.
Stefan
-
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: a technical question about using Eclipse with Struts (fwd)

2004-08-24 Thread Martin Gainty
hey Keith-
I would doubt the jar versions are changing unless of course your build 
process is un jarring all the jars and then re-jarring them later altho why 
eclipse would do that is beyond me-
sounds more like a config issue (by Eclipse) specifically what it is doing 
to server.xml and web.xml?
I would copy server.xml and web.xml  out to a 'safe' readonly folder and 
then copy back in before building the war

There was a similar problem for configuring SQLServer .. take a look at ..
http://www.experts-exchange.com/Web/Application_Servers/Q_21088482.html
HTH,
Martin Gainty


From: [EMAIL PROTECTED]
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: a technical question about using Eclipse with Struts (fwd)
Date: Tue, 24 Aug 2004 20:31:22 +
MIME-Version: 1.0
Received: from mail.apache.org ([209.237.227.199]) by mc4-f29.hotmail.com 
with Microsoft SMTPSVC(5.0.2195.6824); Tue, 24 Aug 2004 13:31:43 -0700
Received: (qmail 5659 invoked by uid 500); 24 Aug 2004 20:31:27 -
Received: (qmail 5627 invoked by uid 99); 24 Aug 2004 20:31:26 -
Received: from [204.127.131.117] (HELO mtiwmhc13.worldnet.att.net) 
(204.127.131.117)  by apache.org (qpsmtpd/0.27.1) with ESMTP; Tue, 24 Aug 
2004 13:31:23 -0700
Received: from 204.127.135.57 ([204.127.135.57])  by 
worldnet.att.net (mtiwmhc13) with SMTP  id 
<200408242031221130072ftke>; Tue, 24 Aug 2004 20:31:22 +
Received: from [67.101.64.41] by 204.127.135.57;Tue, 24 Aug 2004 20:31:22 
+
X-Message-Info: 6sSXyD95QpW2YBzVjXXZjxgtQB9XWTuU
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
List-Unsubscribe: 
List-Subscribe: 
List-Help: 
List-Post: 
List-Id: "Struts Users Mailing List" 
Delivered-To: mailing list [EMAIL PROTECTED]
X-ASF-Spam-Status: No, hits=2.0 
required=10.0tests=HTML_30_40,HTML_MESSAGE,MIME_BOUND_NEXTPART,MIME_HTML_NO_CHARSET,NO_REAL_NAME,RCVD_BY_IP,RCVD_DOUBLE_IP_LOOSE,RCVD_NUMERIC_HELO
X-Spam-Check-By: apache.org
Message-Id: 
<[EMAIL PROTECTED]>
X-Mailer: AT&T Message Center Version 1 (Jul 19 2004)
X-Authenticated-Sender: a2VpdGgud3JpZ2h0MUBhdHQubmV0
X-Virus-Checked: Checked
Return-Path: [EMAIL PROTECTED]
X-OriginalArrivalTime: 24 Aug 2004 20:31:43.0636 (UTC) 
FILETIME=[5E6EED40:01C48A19]

Hi,
I can't seem to get the newest Struts-examples source code into Eclipse 3.0 
 in such a way as to generate a good .war file that can deploy to TomCat 
5.027.   The only public guide I see on how to set up struts in Eclipse is 
out of date.  This happens no matter which version /build of Struts I 
download.

I always get this exception:
2004-08-23 20:53:29 StandardContext[/servlets-examples]ContextListener: 
contextInitialized()
2004-08-23 20:53:29 StandardContext[/servlets-examples]SessionListener: 
contextInitialized()
2004-08-23 20:53:33 StandardContext[/struts-example]action: []: Verifying 
ModuleConfig for this application module
2004-08-23 20:53:33 StandardContext[/struts-example]action: []: Invalid 
className org.apache.struts.webapp.example.memory.MemoryDatabasePlugIn for 
PlugInConfig
2004-08-23 20:53:33 StandardContext[/struts-example]action: []: 
Verification of ModuleConfig has been completed
2004-08-23 20:53:33 StandardWrapperValve[action]: Allocate exception for 
servlet action
javax.servlet.ServletException: Fatal module configuration error, see 
previous messages
 at 
org.apache.struts.plugins.ModuleConfigVerifier.init(ModuleConfigVerifier.java:212)

The Struts-examples.war as downloaded file runs fine, until I regenerate it 
using Eclipse.

I am probably using some incorrect external .jar files, but I need a clue?
Thoughts?
Thanks a million!  Keith

http://volunteer.johnkerry.com/member/832501
_
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/

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


RE: I suspect this is a bad idea...so what's a better one?

2004-08-24 Thread Yee, Richard K, CTR,, DMDCWEST
Joe,
Delegate the work that you are doing in your Action class to a service class
and think about using an ORM framework like Hibernate or Ibatis. Since the
service class will be local the Action, it will be threadsafe (unless you
use static vars in your service class or do something else that is unsafe).

-Richard


-Original Message-
From: Joe Hertz [mailto:[EMAIL PROTECTED] 
Sent: Sunday, August 08, 2004 12:24 AM
To: 'Struts Users Mailing List'
Subject: I suspect this is a bad idea...so what's a better one?


I got tired of, in all my action classes, beginning with something to get a
database connection and at the end destroy it. I want to automate this a
bit.

Here is a first shot at what I came with: 

In my subclass of whatever flavor of Action I'm using, a have a protected
variable which holds my Persistence class object. My subclass implements
execute() such that it will instantiate the persistence object, assign it to
the protected class variable and call super.execute(), getting rid of the
connection afterwards. The action methods themselves just refer to the
protected class variable, rather than doing anything to generate/obtain it
itself. 

Now, I can only count on this working if, and only if, the Action class
itself got instantiated for the purpose of processing the request, and
destroyed afterward (otherwise the protected variable is going to get shared
between requests). Am I safe here?

If not, I suppose I could make it a ThreadLocal, but then I'd just be
replacing the create/destroy steps with a casting step. And since my goal
here is to try abd have all the work done outside of the "real" methods,
that's kind of self-defeating. Same holds true with using
request.setAttribute() instead. Ideally the persistence layer shouldn't have
to know it's in a web application, so I'd like to not have to pass in a
request object to it at any point.

Am I safe with my first guess? (I suspect not).  Failing that, what's a
better idea?

TIA

-Joe

-Basically what I have now is something like this-

protected Persistence persistence;

public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
 HttpServletResponse response) throws Exception
{

 
 persistence = ActionHelper.getPersistenceObject(request);

 ActionForward result = super.execute(mapping, form, request, response);

 persistence.release();

 return result;
   }



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



a technical question about using Eclipse with Struts (fwd)

2004-08-24 Thread keith . wright1
Hi,

I can't seem to get the newest Struts-examples source code into Eclipse 3.0  in such a 
way as to generate a good .war file that can deploy to TomCat 5.027.   The only public 
guide I see on how to set up struts in Eclipse is out of date.  This happens no matter 
which version /build of Struts I download. 

I always get this exception:

2004-08-23 20:53:29 StandardContext[/servlets-examples]ContextListener: 
contextInitialized()
2004-08-23 20:53:29 StandardContext[/servlets-examples]SessionListener: 
contextInitialized()
2004-08-23 20:53:33 StandardContext[/struts-example]action: []: Verifying ModuleConfig 
for this application module
2004-08-23 20:53:33 StandardContext[/struts-example]action: []: Invalid className 
org.apache.struts.webapp.example.memory.MemoryDatabasePlugIn for PlugInConfig
2004-08-23 20:53:33 StandardContext[/struts-example]action: []: Verification of 
ModuleConfig has been completed
2004-08-23 20:53:33 StandardWrapperValve[action]: Allocate exception for servlet action
javax.servlet.ServletException: Fatal module configuration error, see previous messages
 at org.apache.struts.plugins.ModuleConfigVerifier.init(ModuleConfigVerifier.java:212)
 
The Struts-examples.war as downloaded file runs fine, until I regenerate it using 
Eclipse.

I am probably using some incorrect external .jar files, but I need a clue?

Thoughts?

Thanks a million!  Keith




http://volunteer.johnkerry.com/member/832501 

forward and set url parameter

2004-08-24 Thread Stefan Groschupf
Hi,
I wish to forward to a action that require a url parameter.
request.setAttribute does not set a urlParameter in the style 
showBla.do?pk=2323;

How to set such a parameter, since request.getParameterMap().put() has 
no effect?

Thanks for any hints.
Stefan
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: I suspect this is a bad idea...so what's a better one?

2004-08-24 Thread Joe Hertz
> > 
> > Sounds like you really want a Filter that creates the persistence
> > object on the way in (storing it in a request attribute, so 
> that it's
> > accessible in the Action.execute() method), and cleaning up 
> on the way
> > out.
> > 
> 
> Now, I hadn't thought of that.. Would you store it in session?

I think you and Craig are right. I might succeed with my goal of "firing (an
action) off and forgetting", but with creating a serious scalability issue
at the same time.  

Basically, I keep harkening back to one of my oft-repeated mantras: 

"If you write the same code more than once, make it into a method and call
it instead. If you call that method in too many places, find a better place
to call it from".

And I'm calling this one from *every* blessed action method. This _bothers_
me. 

So yeah, a filter is precisely what this idea is evolving into and Hibernate
even provides examples that do precisely this. Still the concept requires
code that explicitly gets the request object inside of each "real" Action
method, avoiding which is something I put (apparently way too much of) a
premium on. At least with the filter it's down to one line of code. 

So I can't declare the variable outside of my method. We all have our
crosses to bear :-)

Tx everyone.

> 
> 
> -
> 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:TEXT tag and Internationalization

2004-08-24 Thread bmf5




Thanks for the tip.


mailto: [EMAIL PROTECTED]




   
 "Jim Barrows" 
 <[EMAIL PROTECTED] 
 m> To 
   "Struts Users Mailing List" 
 08/24/2004 01:20  <[EMAIL PROTECTED]>
 PM cc 
   
   Subject 
 Please respond to RE: HTML:TEXT tag and   
   "Struts Users   Internationalization
   Mailing List"   
 <[EMAIL PROTECTED] 
  he.org>  
   
   
   






> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 24, 2004 10:09 AM
> To: Struts Users Mailing List
> Subject: RE: HTML:TEXT tag and Internationalization
>
>
>
>
>
>
> >>you could format them yourself, either in the setter
> (yuck), or in the
> action.
>
> Why not in the setter?  Sometimes I'll use the setter to populate some
> other fields privately that then get used later on in the
> form.  Example: I
> get a decimal number representing time off the db.  The
> setter moves left
> of the decimal to an hours field and right to a minutes
> field.  Is this a
> bad practice?

I think so... one method one function. The setter should not do anything
other then set the variable, because that's what its name implies.  A
getter on the other hand implies that its going to get something, from
somewhere, that has a name.
My distaste for setters doing more then one thing is born of way to many
hours hunting down bugs that were the result of setter sideeffects.


>
>
>
>
>
>
> "Jim Barrows" <[EMAIL PROTECTED]> wrote on 08/24/2004 12:47:04 PM:
>
> >
> >
> > > -Original Message-
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, August 24, 2004 4:38 AM
> > > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > > Subject: HTML:TEXT tag and Internationalization
> > >
> > >
> > > Hi
> > >
> > > Is there any reasonable argument as to why the html:text tag uses
> > > default (value.toString()) formating, while the bean:write uses a
> > > formatter that is I18N aware. This is really anoying for
> locales that
> > > normally use comma as a decimal seperator. If you output the
> > > value with
> > > bean:write it will look OK, but displaying it in an
> html:text it will
> > > use the English dot as a decimal seperator. I think that
> moving the
> > > formatValue from WriteTag into TagUtils, hence making it
> > > avaiable to all
> > > tags would be a good idea. Then we would have a uniform
> formatting of
> > > values.
> >
> > Then again, since html:text is usually used with a form bean, which
> > is supposed to be all strings, you could format them yourself,
> > either in the setter (yuck), or in the action.
> >
> >
> >
> -
> > 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: I suspect this is a bad idea...so what's a better one?

2004-08-24 Thread Jim Barrows


> -Original Message-
> From: Craig McClanahan [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 24, 2004 10:20 AM
> To: Struts Users Mailing List
> Subject: Re: I suspect this is a bad idea...so what's a better one?
> 
> 
> On Tue, 24 Aug 2004 13:10:50 -0400, Joe Hertz 
> <[EMAIL PROTECTED]> wrote:
> > > It seems like you're over engineering something that is
> > > simple... what problem are you trying to solve with this?
> > 
> > I want to be able to do alot of the mundane setup stuff 
> that happens in
> > every action method without having to think aboout it.
> > 
> > Rather than having every method create and destroy a 
> Persistence object, I'd
> > have an execute() method that created it, called super.execute() and
> > destroyed it.
> > 
> 
> Sounds like you really want a Filter that creates the persistence
> object on the way in (storing it in a request attribute, so that it's
> accessible in the Action.execute() method), and cleaning up on the way
> out.
> 

Now, I hadn't thought of that.. Would you store it in session?


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



RE: HTML:TEXT tag and Internationalization

2004-08-24 Thread Jim Barrows


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 24, 2004 10:09 AM
> To: Struts Users Mailing List
> Subject: RE: HTML:TEXT tag and Internationalization
> 
> 
> 
> 
> 
> 
> >>you could format them yourself, either in the setter 
> (yuck), or in the
> action.
> 
> Why not in the setter?  Sometimes I'll use the setter to populate some
> other fields privately that then get used later on in the 
> form.  Example: I
> get a decimal number representing time off the db.  The 
> setter moves left
> of the decimal to an hours field and right to a minutes 
> field.  Is this a
> bad practice?

I think so... one method one function. The setter should not do anything other then 
set the variable, because that's what its name implies.  A getter on the other hand 
implies that its going to get something, from somewhere, that has a name.
My distaste for setters doing more then one thing is born of way to many hours hunting 
down bugs that were the result of setter sideeffects.


> 
> 
> 
> 
> 
> 
> "Jim Barrows" <[EMAIL PROTECTED]> wrote on 08/24/2004 12:47:04 PM:
> 
> >
> >
> > > -Original Message-
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, August 24, 2004 4:38 AM
> > > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > > Subject: HTML:TEXT tag and Internationalization
> > >
> > >
> > > Hi
> > >
> > > Is there any reasonable argument as to why the html:text tag uses
> > > default (value.toString()) formating, while the bean:write uses a
> > > formatter that is I18N aware. This is really anoying for 
> locales that
> > > normally use comma as a decimal seperator. If you output the
> > > value with
> > > bean:write it will look OK, but displaying it in an 
> html:text it will
> > > use the English dot as a decimal seperator. I think that 
> moving the
> > > formatValue from WriteTag into TagUtils, hence making it
> > > avaiable to all
> > > tags would be a good idea. Then we would have a uniform 
> formatting of
> > > values.
> >
> > Then again, since html:text is usually used with a form bean, which
> > is supposed to be all strings, you could format them yourself,
> > either in the setter (yuck), or in the action.
> >
> >
> > 
> -
> > 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: I suspect this is a bad idea...so what's a better one?

2004-08-24 Thread Craig McClanahan
On Tue, 24 Aug 2004 13:10:50 -0400, Joe Hertz <[EMAIL PROTECTED]> wrote:
> > It seems like you're over engineering something that is
> > simple... what problem are you trying to solve with this?
> 
> I want to be able to do alot of the mundane setup stuff that happens in
> every action method without having to think aboout it.
> 
> Rather than having every method create and destroy a Persistence object, I'd
> have an execute() method that created it, called super.execute() and
> destroyed it.
> 

Sounds like you really want a Filter that creates the persistence
object on the way in (storing it in a request attribute, so that it's
accessible in the Action.execute() method), and cleaning up on the way
out.

> The problem is getting this thing into the scope of the "real" Action
> method. A class level protected variable to store the persistence object
> seemed the best option, but it's not safe as it gets shared by every call
> into the class.
> 
> I could make the Persistence Object itself a ThreadLocal, but then I've
> changed the creation step for a conversion step inside of the Action method.
> Delegates have a footprint alteration to the current Action methods. *That*
> seemed to me like over-engineering for this problem.
> 
> But If the Persistence class itself *is* threadsafe, then I shouldnt have an
> issue, I figure if the Actions share them. Nothing but static public methods
> and static ThreadLocal class variables. I really only need one or two class
> level variables, and making them ThreadLocal isn't as gross of a change for
> me. I'm just hoping a hole gets popped into the theory before rather than
> after implementation...
> 

I would investigate very very carefully before I ever believed that a
persistence object could really be shared safely.

I would think long and hard about how you would ever shut down the
thread local persistence objects when the application shuts down.

I would wonder about why you'd be willing to have ThreadLocal
variables hanging around just because I happened to use that thread
once for a request, and might never do so again (either because it
killed the thread or because the number of concurrent requests when
back down from a peak).

> -Joe

Craig

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



RE: I suspect this is a bad idea...so what's a better one?

2004-08-24 Thread Jim Barrows


> -Original Message-
> From: Joe Hertz [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 24, 2004 10:11 AM
> To: 'Struts Users Mailing List'
> Subject: RE: I suspect this is a bad idea...so what's a better one?
> 
> 
> > It seems like you're over engineering something that is 
> > simple... what problem are you trying to solve with this?
> 
> I want to be able to do alot of the mundane setup stuff that 
> happens in
> every action method without having to think aboout it.

Okay so what's wrong with a base action whose execute method then calls your execute 
method, but everything is setup.  Pass in the objects you've set up in a hash table 
for easy lookup.
Something like

blah execute( blah) {
//setup things
//put them in hash table
executeLogic( map, request, response, blah, setupStuff);
//close things whatever.
}

> 
> Rather than having every method create and destroy a 
> Persistence object, I'd
> have an execute() method that created it, called super.execute() and
> destroyed it.
> 
> The problem is getting this thing into the scope of the "real" Action
> method. A class level protected variable to store the 
> persistence object
> seemed the best option, but it's not safe as it gets shared 
> by every call
> into the class. 
> 
> I could make the Persistence Object itself a ThreadLocal, but 
> then I've
> changed the creation step for a conversion step inside of the 
> Action method.
> Delegates have a footprint alteration to the current Action 
> methods. *That*
> seemed to me like over-engineering for this problem.
> 
> But If the Persistence class itself *is* threadsafe, then I 
> shouldnt have an
> issue, I figure if the Actions share them. Nothing but static 
> public methods
> and static ThreadLocal class variables. I really only need 
> one or two class
> level variables, and making them ThreadLocal isn't as gross 
> of a change for
> me. I'm just hoping a hole gets popped into the theory before 
> rather than
> after implementation...

Except that you have just create a request scope variable ( one thread, one 
request)the painful way  When what you really want, it sounds like, is an 
application scope variable that you can get at.  
However, I think what you'll find is that you end up with a bottleneck on the 
persistance object, because you have multiple threads hitting it, which means that 
most of them will be waiting on the lock to be lifted.  This is why this particular 
problem  has never been solved, it creates a really nasty performance bottleneck.
Believe it or not it's actually cheaper to create and destroy the persistance objects 
on the fly then it is to make it thread safe because you will always have a lot of 
threads hitting the site.




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



RE: HTML:TEXT tag and Internationalization

2004-08-24 Thread bmf5




>>you could format them yourself, either in the setter (yuck), or in the
action.

Why not in the setter?  Sometimes I'll use the setter to populate some
other fields privately that then get used later on in the form.  Example: I
get a decimal number representing time off the db.  The setter moves left
of the decimal to an hours field and right to a minutes field.  Is this a
bad practice?






"Jim Barrows" <[EMAIL PROTECTED]> wrote on 08/24/2004 12:47:04 PM:

>
>
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, August 24, 2004 4:38 AM
> > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > Subject: HTML:TEXT tag and Internationalization
> >
> >
> > Hi
> >
> > Is there any reasonable argument as to why the html:text tag uses
> > default (value.toString()) formating, while the bean:write uses a
> > formatter that is I18N aware. This is really anoying for locales that
> > normally use comma as a decimal seperator. If you output the
> > value with
> > bean:write it will look OK, but displaying it in an html:text it will
> > use the English dot as a decimal seperator. I think that moving the
> > formatValue from WriteTag into TagUtils, hence making it
> > avaiable to all
> > tags would be a good idea. Then we would have a uniform formatting of
> > values.
>
> Then again, since html:text is usually used with a form bean, which
> is supposed to be all strings, you could format them yourself,
> either in the setter (yuck), or in the action.
>
>
> -
> 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: I suspect this is a bad idea...so what's a better one?

2004-08-24 Thread Joe Hertz
> It seems like you're over engineering something that is 
> simple... what problem are you trying to solve with this?

I want to be able to do alot of the mundane setup stuff that happens in
every action method without having to think aboout it.

Rather than having every method create and destroy a Persistence object, I'd
have an execute() method that created it, called super.execute() and
destroyed it.

The problem is getting this thing into the scope of the "real" Action
method. A class level protected variable to store the persistence object
seemed the best option, but it's not safe as it gets shared by every call
into the class. 

I could make the Persistence Object itself a ThreadLocal, but then I've
changed the creation step for a conversion step inside of the Action method.
Delegates have a footprint alteration to the current Action methods. *That*
seemed to me like over-engineering for this problem.

But If the Persistence class itself *is* threadsafe, then I shouldnt have an
issue, I figure if the Actions share them. Nothing but static public methods
and static ThreadLocal class variables. I really only need one or two class
level variables, and making them ThreadLocal isn't as gross of a change for
me. I'm just hoping a hole gets popped into the theory before rather than
after implementation...

-Joe


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

Re: Date Validation

2004-08-24 Thread bmf5




Thanks for the response.

>You can specify the action
> path in the  tag instead of the form name, and the
> javascript tag will work fine -- basically, html:javascript looks for
> the literal value from " in the Validator XML config
> -- whether it be a form name (ValidatorForm, DynaValidatorForm) or an
> action path (ValidatorActionForm, DynaValidatorActionForm).

This is the problem I'm having w/ the javascript validation in general.
The funcion name that's generated is not correct.  It puts the "/" from the
action path in the function name like this "function
validate/saveAuditAssignment(form) { ".  I don't know of a work around
other than going to a ValidatorForm or putting the javascript in the JSP
(I'll try the other suggestions).  I read at the Struts website that this
is resolved in 1.2 but I can't use it while it's in beta.

Thanks,
Bart

mailto: [EMAIL PROTECTED]


Joe Germuska <[EMAIL PROTECTED]> wrote on 08/24/2004 12:31:54 PM:

> The commons-validator date validation indeed, can only validate a
> single date pattern.  Joe Hertz made a good point that you must have
> the multi-format parsing problem solved, so subclassing a
> ValidatorForm will probably be a good solution.
>
> However, I don't understand your other comment:
> >I don't have the javascript validation available because I'm using
> >ValidatorActionForm.  It seems like my options are to switch to
> >ValidatorForm or code javascript in the JSP.
>
> the javascript is independent of whether you are using
> ValidatorActionForm or ValidatorForm (don't worry, this is one of the
> things that confuses a lot of people.)  You can specify the action
> path in the  tag instead of the form name, and the
> javascript tag will work fine -- basically, html:javascript looks for
> the literal value from " in the Validator XML config
> -- whether it be a form name (ValidatorForm, DynaValidatorForm) or an
> action path (ValidatorActionForm, DynaValidatorActionForm).
>
> Hope that  helps,
>Joe
>
>
> At 11:58 AM -0400 8/24/04, [EMAIL PROTECTED] wrote:
> >When I search the archive I get no results for the word "date" so here
> >goes.
> >
> >I've been using the validation plug-in to validate the date format of
> >MM/dd/.  A new requirement is to allow the user to enter a date in
one
> >of several formats(mmddyy, mm/dd/, and others).  Can the validator
do
> >this or will I have to write my own validation?  I tried multiple
> >datePattern vars in the validation.xml but as expected only one worked.
I
> >don't have the javascript validation available because I'm using
> >ValidatorActionForm.  It seems like my options are to switch to
> >ValidatorForm or code javascript in the JSP.  Experienced opinions would
be
> >appreciated as I'm learning as I go here.
> >
> >Thanks,
> >Bart
> >
> >
> >mailto: [EMAIL PROTECTED]
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> --
> Joe Germuska
> [EMAIL PROTECTED]
> http://blog.germuska.com
> "In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn
> back; I'll know I'm in the wrong place."
> - Carlos Santana
>
> -
> 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: What happended to Ted Husteds Struts pages?

2004-08-24 Thread David Evans
I found another location for the tips:
http://www.jguru.com/faq/topicindex.jsp?topic=Struts
then search for 
Tools:Framework:Struts:Tips


On Tue, 2004-08-24 at 08:48, Susan Bradeen wrote:
> David Evans <[EMAIL PROTECTED]> wrote on 08/23/2004 05:01:39 PM:
> 
> > Anyone know what happened to the website that used to live here:
> > http://husted.com/struts/index.html
> > 
> > there was a design patterns catalog and a tips page and alot of great
> > links. 
> 
> You should be able to get it from here 
> http://struts.apache.org/faqs/index.html
> but the 'Struts Tips' link on this page (under External FAQs) is not 
> working for me at the moment either.
> 
> Susan Bradeen
> 
> > 
> > has it been mirrored?
> > 
> > dave
> > 
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> 
> _
> Scanned for SoftLanding Systems, Inc. by IBM Email Security Management Services 
> powered by MessageLabs. 
> _
> 
> -
> 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: I suspect this is a bad idea...so what's a better one?

2004-08-24 Thread Jim Barrows


> -Original Message-
> From: Joe Hertz [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 24, 2004 9:49 AM
> To: 'Struts Users Mailing List'
> Subject: RE: I suspect this is a bad idea...so what's a better one?
> 
> 
> > You are not safe here ... there is one and only one instance of each
> > Action, shared by all requests through the lifetime of the web
> > application.
> 
> I'm picking this topic up again and actually, what I'm 
> kicking myself for
> just now occuring to me is this:
> 
> To recap: if I make my Persistence object a protected class 
> level variable
> inside of an Action subclass, it's not going to be threadsafe...
> 
> But...
> 
> If that class has only static public methods, and a static 
> ThreadLocal class
> variable for it's connection to the database, et al, then it 
> should be safe
> anyway.
> 
> Yeah, I'll have a type conversion for the ThreadLocal in each database
> method, but not in every blessed action method.
> 
> One last sanity check? :-)

It seems like you're over engineering something that is simple... what problem are you 
trying to solve with this?



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



RE: I suspect this is a bad idea...so what's a better one?

2004-08-24 Thread Joe Hertz
> You are not safe here ... there is one and only one instance of each
> Action, shared by all requests through the lifetime of the web
> application.

I'm picking this topic up again and actually, what I'm kicking myself for
just now occuring to me is this:

To recap: if I make my Persistence object a protected class level variable
inside of an Action subclass, it's not going to be threadsafe...

But...

If that class has only static public methods, and a static ThreadLocal class
variable for it's connection to the database, et al, then it should be safe
anyway.

Yeah, I'll have a type conversion for the ThreadLocal in each database
method, but not in every blessed action method.

One last sanity check? :-)




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



RE: HTML:TEXT tag and Internationalization

2004-08-24 Thread Jim Barrows


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 24, 2004 4:38 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: HTML:TEXT tag and Internationalization
> 
> 
> Hi
> 
> Is there any reasonable argument as to why the html:text tag uses
> default (value.toString()) formating, while the bean:write uses a
> formatter that is I18N aware. This is really anoying for locales that
> normally use comma as a decimal seperator. If you output the 
> value with
> bean:write it will look OK, but displaying it in an html:text it will
> use the English dot as a decimal seperator. I think that moving the
> formatValue from WriteTag into TagUtils, hence making it 
> avaiable to all
> tags would be a good idea. Then we would have a uniform formatting of
> values.

Then again, since html:text is usually used with a form bean, which is supposed to be 
all strings, you could format them yourself, either in the setter (yuck), or in the 
action.


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



Re: ot: dallas help wanted

2004-08-24 Thread Vic Cekvenich
repost
Please let me know if you somone.
(it's not Struts, but related).
.V

--
Please post on Rich Internet Applications User Interface (RiA/SoA) 


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


RE: Tiles and well formed html

2004-08-24 Thread Jim Barrows


> -Original Message-
> From: andy wix [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 24, 2004 3:27 AM
> To: [EMAIL PROTECTED]
> Subject: Tiles and well formed html
> 
> 
> Hi,
> 
> I have a trypical layout and each tile has its own style 
> sheet and is well 
> formed html.
> My problem is that only 1 style sheet is being used for the 
> whole page.  I 
> saw in the mail archives that someone suggested using  
> tags but this 
> doesn't seem to work for me (I've tried both in the tiles and in the 
> layout.jsp).  Does anyone know what is considered best 
> practice for this 
> requirement.  It seems counter-intuitive to have your tiles 
> not well formed 
> html but if this is the solution which tile would you pick 
> for the 'main' 
> html tags or does it even matter?

Like Ruben, I also use css and divs.  My CSS goes into the layout (since the layout 
page is the one with the 

Re: Date Validation

2004-08-24 Thread Joe Germuska
The commons-validator date validation indeed, can only validate a 
single date pattern.  Joe Hertz made a good point that you must have 
the multi-format parsing problem solved, so subclassing a 
ValidatorForm will probably be a good solution.

However, I don't understand your other comment:
I don't have the javascript validation available because I'm using
ValidatorActionForm.  It seems like my options are to switch to
ValidatorForm or code javascript in the JSP.
the javascript is independent of whether you are using 
ValidatorActionForm or ValidatorForm (don't worry, this is one of the 
things that confuses a lot of people.)  You can specify the action 
path in the  tag instead of the form name, and the 
javascript tag will work fine -- basically, html:javascript looks for 
the literal value from " in the Validator XML config 
-- whether it be a form name (ValidatorForm, DynaValidatorForm) or an 
action path (ValidatorActionForm, DynaValidatorActionForm).

Hope that  helps,
Joe
At 11:58 AM -0400 8/24/04, [EMAIL PROTECTED] wrote:
When I search the archive I get no results for the word "date" so here
goes.
I've been using the validation plug-in to validate the date format of
MM/dd/.  A new requirement is to allow the user to enter a date in one
of several formats(mmddyy, mm/dd/, and others).  Can the validator do
this or will I have to write my own validation?  I tried multiple
datePattern vars in the validation.xml but as expected only one worked.  I
don't have the javascript validation available because I'm using
ValidatorActionForm.  It seems like my options are to switch to
ValidatorForm or code javascript in the JSP.  Experienced opinions would be
appreciated as I'm learning as I go here.
Thanks,
Bart
mailto: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn 
back; I'll know I'm in the wrong place."
   - Carlos Santana

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


RE: preventing direct access to action

2004-08-24 Thread Jim Barrows


> -Original Message-
> From: Dan Allen [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 24, 2004 7:59 AM
> To: Struts Users Mailing List
> Subject: preventing direct access to action
> 
> 
> Normally we talk about preventing direct access to a JSP, but, in
> contrast, have a question regarding direct access to an action. 
> Consider the following scenario:
> 
> A portal application hosts several portlet modules.  Each of the
> modules is passed certain parameters from the portal when the user
> selects that module.  Some of these parameters determine the security
> restrictions of the user (such as what components are visible to the
> user).  However, if the user changes one of these GET parameters, the
> user could exploit greater access.  Up to this point, a servlet filter
> was checking that the "referer" field was non null.  I know that this
> form of security is highly discouraged (as it can be faked).  How can
> one be sure that the information passed from page to page can be
> trusted?

If you're talking about as parameters, then you can't.  If you're talking about 
session/request/application scoped variables then you can.  However, it sounds like 
you can't do that exclusivley, but you can mix the two.
So, your url would be something like 
http://blah/blah?key=someUniqueKeyThatIsNotTheSessionId that you use to pull the real 
parameters out of the session.  Because the key is only for the session, and unique to 
that session you can be reasonably sure that the request is from the session that was 
intially authenticated.  
The vulnerability here is that someone is able to get a legitimate users session key, 
and the unique key while the session is still valid.  If you're really paranoid, 
public key encryption of the unique key might even be possible, where the action that 
generates the link encrypts, and the action that performs the function decrypts the 
key before extracting from the session.
Generating that key would be fairly easy, depending on your definition of easy.. I 
would take a hash of the sessionId + timestamp + relavantInfo[1] and use that.

> 
> My guess is that the advice given is that the parameter must be
> validated against the database for the current user, not just trusted.
>  In this case, the referer field is irrelevant.
> 
> Dan
> 
> -- 

[1]Relevant Info being maybe the action name, category or something else that would, 
in your case, identify the portal.

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



RE: Date Validation

2004-08-24 Thread Jim Barrows


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 24, 2004 8:58 AM
> To: Struts Users Mailing List
> Subject: Date Validation
> 
> 
> 
> 
> 
> 
> When I search the archive I get no results for the word "date" so here
> goes.
> 
> I've been using the validation plug-in to validate the date format of
> MM/dd/.  A new requirement is to allow the user to enter 
> a date in one
> of several formats(mmddyy, mm/dd/, and others).  Can the 
> validator do
> this or will I have to write my own validation?  I tried multiple
> datePattern vars in the validation.xml but as expected only 
> one worked.  I
> don't have the javascript validation available because I'm using
> ValidatorActionForm.  It seems like my options are to switch to
> ValidatorForm or code javascript in the JSP.  Experienced 
> opinions would be
> appreciated as I'm learning as I go here.

You could also use a regex mask for this, which is what I normally do.

> 
> Thanks,
> Bart
> 
> 
> mailto: [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: Date Validation

2004-08-24 Thread Joe Hertz
Let me ask you this:

Presumably whatever the user enters is going to be used to construct a Date
object.

And if you do that, you presumably also know which of the various formats it
got entered in.

And if you have the logic somewhere to divine which format it's in, it
sounds like you have what you need to write your own validate() method to do
the job.

If you want to use the validator for your other validations, just make sure
you call super.validate().

-Joe

> -Original Message-

> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 24, 2004 11:58 AM
> To: Struts Users Mailing List
> Subject: Date Validation
>
>
>
>
>
>
> When I search the archive I get no results for the word "date" so here
> goes.
>
> I've been using the validation plug-in to validate the date format of
> MM/dd/.  A new requirement is to allow the user to enter
> a date in one
> of several formats(mmddyy, mm/dd/, and others).  Can the
> validator do
> this or will I have to write my own validation?  I tried multiple
> datePattern vars in the validation.xml but as expected only
> one worked.  I
> don't have the javascript validation available because I'm using
> ValidatorActionForm.  It seems like my options are to switch to
> ValidatorForm or code javascript in the JSP.  Experienced
> opinions would be
> appreciated as I'm learning as I go here.
>
> Thanks,
> Bart
>
>
> mailto: [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]



Date Validation

2004-08-24 Thread bmf5




When I search the archive I get no results for the word "date" so here
goes.

I've been using the validation plug-in to validate the date format of
MM/dd/.  A new requirement is to allow the user to enter a date in one
of several formats(mmddyy, mm/dd/, and others).  Can the validator do
this or will I have to write my own validation?  I tried multiple
datePattern vars in the validation.xml but as expected only one worked.  I
don't have the javascript validation available because I'm using
ValidatorActionForm.  It seems like my options are to switch to
ValidatorForm or code javascript in the JSP.  Experienced opinions would be
appreciated as I'm learning as I go here.

Thanks,
Bart


mailto: [EMAIL PROTECTED]


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



RE: Exception Handler Help!

2004-08-24 Thread Keith Bottner
errors.do is an action mapping.

But your question made me take a second look at something. It appears that
the exception was getting caught and turned into an ActionError in a base
class and therefore never thrown outside the servlet, which of course
prevents it from using the global-exception. If I do remove this
functionality then the global-exception does work in all cases, whether
HTML, jsp or an action mapping (for those of you who are interested).

So thanks for all the help guys, the questions spawned the right thought
processes to track it down. I should have seen this sooner but 18hours
looking at the screen must have got to me, now to sleep.

Thanks again,

Keith 

-Original Message-
From: Jitender K Chukkavenkata [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 24, 2004 7:49 AM
To: Struts Users Mailing List
Subject: Re: Exception Handler Help!


Hei Keith,

Could you be little detail regarding struts-config.xml...what is 
errors.do??


Jitender Kumar C.V.


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



preventing direct access to action

2004-08-24 Thread Dan Allen
Normally we talk about preventing direct access to a JSP, but, in
contrast, have a question regarding direct access to an action. 
Consider the following scenario:

A portal application hosts several portlet modules.  Each of the
modules is passed certain parameters from the portal when the user
selects that module.  Some of these parameters determine the security
restrictions of the user (such as what components are visible to the
user).  However, if the user changes one of these GET parameters, the
user could exploit greater access.  Up to this point, a servlet filter
was checking that the "referer" field was non null.  I know that this
form of security is highly discouraged (as it can be faked).  How can
one be sure that the information passed from page to page can be
trusted?

My guess is that the advice given is that the parameter must be
validated against the database for the current user, not just trusted.
 In this case, the referer field is irrelevant.

Dan

-- 
Open Source Advocacy
http://www.mojavelinux.com

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



RE: Tiles and well formed html

2004-08-24 Thread Ruben Cepeda
Andy,
I used s and they work fine.  Are you using pattern matching in you 
style sheet.

EXAMPLE:
//css1.css
#headerTile h1
{
 font-size: 400%;
}
#bodyTile h1
{
 font-size: 100%;
 color: navy;
}
//layou.html
...

 Hello World!!



 Body of text



*
Ruben Cepeda
[EMAIL PROTECTED]
*


Original Message Follows
From: "andy wix" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Tiles and well formed html
Date: Tue, 24 Aug 2004 10:27:19 +
Hi,
I have a trypical layout and each tile has its own style sheet and is well 
formed html.
My problem is that only 1 style sheet is being used for the whole page.  I 
saw in the mail archives that someone suggested using  tags but this 
doesn't seem to work for me (I've tried both in the tiles and in the 
layout.jsp).  Does anyone know what is considered best practice for this 
requirement.  It seems counter-intuitive to have your tiles not well formed 
html but if this is the solution which tile would you pick for the 'main' 
html tags or does it even matter?

Thanks,
Andy
_
Use MSN Messenger to send music and pics to your friends 
http://www.msn.co.uk/messenger

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
hthttp://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

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


Re: using struts and dbcp together throws sometimes a NoSuchElementException/SQLNestedException:

2004-08-24 Thread Erik Weber
Why not just close the connection if con != null && !con.isClosed() ?
I always:
try {
   if (rs != null) rs.close();
}
catch {}
try {
   if (ps != null) ps.close();
}
catch ()
try {
   if (c != null && !c.isClosed()) c.close();
}
catch {}
Not sure if that is it, but I don't understand your logic for deciding 
whether to close the connection. I am using Oracle with DBCP. I have a 
couple of properties set differently from you, but I don't see any that 
would be the problem.

Erik
PANTA-RHEI WOLF wrote:
Hi there, i have a very strange behaviour using DBCP. I have a small set of JSPs 
talking to an oracledatabase. after a while
it looks if my application hang. 2 till 3 minutes later it seems to work fine again. 
When i have a look in my logfile, i can see
the following exception. I do not know what happen exactly, can anyone help me please?
Below you is the Exception, the datasource-config and a snippet from my application.
Is it correct closing each connection after using it?
Thank you in advance
Mirko

The Exception is the following:
04/08/24 15:51:59 org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted 04/08/24 15:51:59 	at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:103) 04/08/24 15:51:59 	at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540) 04/08/24 15:51:59 	at de.orb.quick.model.CommunicationLayer.executeStatement(CommunicationLayer.java:86) 04/08/24 15:51:59 	at de.orb.quick.model.TreeDataBean.getResult(TreeDataBean.java:57) 04/08/24 15:51:59 	at _javascript._jspService(javascript.jsp:12)  ... bla bla  bla... 04/08/24 15:51:59 	at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) 04/08/24 15:51:59 	at java.lang.Thread.run(Thread.java:534) 04/08/24 15:51:59 Caused by: java.util.NoSuchElementException: Timeout waiting for idle object 04/08/24 15:51:59 	at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:756) 04/08/24 15:51:59 	at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:74) 04/08/24 15:51:59 	at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95) 04/08/24 15:51:59 	... 62 more 

The datasource Configuration in struts-config.xml:
   
 
 
 
 
 
 
 
 
 
 
 
 
   
the application snippet: 
// -
public ArrayList getResult(UserBean userBean) {
   ArrayList data = new ArrayList();
   ResultSet rset = null;
   int counter = 0;
   
   try  {
 rset = executeStatement( "my sql statement" );
 if(rset != null){
   while( rset.next() ) {

 .. do something with the result

   }
 }
   } catch (Exception ex)  {
 ex.printStackTrace();
   } finally {
 try {
   if (rset!= null && rset.getStatement() != null && 
rset.getStatement().getConnection() != null) { // Close resultset & statements
  rset.getStatement().getConnection().close();
   }
  } catch (Exception ignored) {   }
   }
   return data;
 }
// -
   public ResultSet executeStatement( List parameter ) {
 ResultSet rset = null;
 CallableStatement cstmt = null;
 try {
  
   Connection connection = dataSource.getConnection();
   String dbBuffer = new StringBuffer( parameter.get(0).toString() );

   if (connection != null) {
 cstmt = connection.prepareCall( dbBuffer );
 rset = cstmt.executeQuery();
   }
 } catch (SQLException ex) {
   ex.printStackTrace();
 } 
 return rset;
   }



Mit freundlichen Grüßen
Mirko Wolf
-
panta rhei systems gmbh
budapester straße 31
10787 berlin
tel +49.30.26 01-14 17
fax +49.30.26 01-414 13
[EMAIL PROTECTED] 
www.panta-rhei.de 

Diese Nachricht ist vertraulich und ausschliesslich für den Adressaten bestimmt. Jeder 
Gebrauch durch Dritte ist verboten. Falls Sie die Daten irrtuemlich erhalten haben, 
nehmen Sie bitte Kontakt mit dem Absender auf und loeschen Sie die Daten auf jedem 
Computer und Datentraeger. Der Absender ist nicht verantwortlich für die 
ordnungsgemaesse, vollstaendige oder verzoegerungsfreie Übertragung dieser Nachricht.
This message is confidential and intended solely for the use by the addressee. Any use 
of this message by a third party is prohibited. If you received this message in error, 
please contact the sender and delete the data from any computer and data carrier. The 
sender is neither liable for the proper and complete transmission of the information 
in the message nor for any delay in its receipt.
-
To unsu

using struts and dbcp together throws sometimes a NoSuchElementException/SQLNestedException:

2004-08-24 Thread PANTA-RHEI WOLF
Hi there, i have a very strange behaviour using DBCP. I have a small set of JSPs 
talking to an oracledatabase. after a while
it looks if my application hang. 2 till 3 minutes later it seems to work fine again. 
When i have a look in my logfile, i can see
the following exception. I do not know what happen exactly, can anyone help me please?

Below you is the Exception, the datasource-config and a snippet from my application.

Is it correct closing each connection after using it?

Thank you in advance

Mirko



The Exception is the following:

04/08/24 15:51:59 org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, 
pool exhausted 04/08/24 15:51:59 at 
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:103) 
04/08/24 15:51:59at 
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540) 
04/08/24 15:51:59at 
de.orb.quick.model.CommunicationLayer.executeStatement(CommunicationLayer.java:86) 
04/08/24 15:51:59 at 
de.orb.quick.model.TreeDataBean.getResult(TreeDataBean.java:57) 04/08/24 15:51:59
at _javascript._jspService(javascript.jsp:12)  
... bla bla  bla... 04/08/24 15:51:59at 
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
 04/08/24 15:51:59 at java.lang.Thread.run(Thread.java:534) 04/08/24 15:51:59 
Caused by: java.util.NoSuchElementException: Timeout waiting for idle object 04/08/24 
15:51:59   at 
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:756)
 04/08/24 15:51:59at 
org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:74) 
04/08/24 15:51:59  at 
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95) 
04/08/24 15:51:59 ... 62 more 

The datasource Configuration in struts-config.xml:


  
  
  
  
  
  
  
  
  
  
  
  



the application snippet: 
// -
 public ArrayList getResult(UserBean userBean) {
ArrayList data = new ArrayList();
ResultSet rset = null;
int counter = 0;

try  {
  rset = executeStatement( "my sql statement" );
  if(rset != null){
while( rset.next() ) {
 
  .. do something with the result

}
  }
} catch (Exception ex)  {
  ex.printStackTrace();
} finally {
  try {
if (rset!= null && rset.getStatement() != null && 
rset.getStatement().getConnection() != null) { // Close resultset & statements
   rset.getStatement().getConnection().close();
}
   } catch (Exception ignored) {   }
}
return data;
  }

// -
public ResultSet executeStatement( List parameter ) {
  ResultSet rset = null;
  CallableStatement cstmt = null;
  try {
   
Connection connection = dataSource.getConnection();
String dbBuffer = new StringBuffer( parameter.get(0).toString() );

if (connection != null) {
  cstmt = connection.prepareCall( dbBuffer );
  rset = cstmt.executeQuery();
}
  } catch (SQLException ex) {
ex.printStackTrace();
  } 
  return rset;
}





Mit freundlichen Grüßen

Mirko Wolf

-
panta rhei systems gmbh
budapester straße 31
10787 berlin
tel +49.30.26 01-14 17
fax +49.30.26 01-414 13
[EMAIL PROTECTED] 
www.panta-rhei.de 

Diese Nachricht ist vertraulich und ausschliesslich für den Adressaten bestimmt. Jeder 
Gebrauch durch Dritte ist verboten. Falls Sie die Daten irrtuemlich erhalten haben, 
nehmen Sie bitte Kontakt mit dem Absender auf und loeschen Sie die Daten auf jedem 
Computer und Datentraeger. Der Absender ist nicht verantwortlich für die 
ordnungsgemaesse, vollstaendige oder verzoegerungsfreie Übertragung dieser Nachricht.

This message is confidential and intended solely for the use by the addressee. Any use 
of this message by a third party is prohibited. If you received this message in error, 
please contact the sender and delete the data from any computer and data carrier. The 
sender is neither liable for the proper and complete transmission of the information 
in the message nor for any delay in its receipt.


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



Re: Exception Handler Help!

2004-08-24 Thread Jitender K Chukkavenkata
Hei Keith,

Could you be little detail regarding struts-config.xml...what is 
errors.do??


Jitender Kumar C.V.


Re: What happended to Ted Husteds Struts pages?

2004-08-24 Thread Susan Bradeen
David Evans <[EMAIL PROTECTED]> wrote on 08/23/2004 05:01:39 PM:

> Anyone know what happened to the website that used to live here:
> http://husted.com/struts/index.html
> 
> there was a design patterns catalog and a tips page and alot of great
> links. 

You should be able to get it from here 
http://struts.apache.org/faqs/index.html
but the 'Struts Tips' link on this page (under External FAQs) is not 
working for me at the moment either.

Susan Bradeen

> 
> has it been mirrored?
> 
> dave
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


_
Scanned for SoftLanding Systems, Inc. by IBM Email Security Management Services 
powered by MessageLabs. 
_

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



SV: Complicated select - option structure?

2004-08-24 Thread hermod . opstvedt
Hi

Your best bet for this is to add a new method to you bean, which returns
the first and last name concatenated into a single String value.

Hermod

-Opprinnelig melding-
Fra: Janne Mattila [mailto:[EMAIL PROTECTED]
Sendt: 24. august 2004 13:56
Til: [EMAIL PROTECTED]
Emne: Complicated select - option structure?


I am toying around with a simple test application. In one page user
creates 
a new record, and picks the artist for that record with a select
pulldown. 
My artist object has a first name and a last name separately. Initially
I 
displayed only last name:

  

  

Quite nice and compact. When I wanted to include also the last name,
best I 
could come up with was:

  

  

  

  

It seems quite complicated - is there any way to use EL and 
optionsCollectionTag, for example, to achieve a simpler structure?

_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail


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


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


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



Complicated select - option structure?

2004-08-24 Thread Janne Mattila
I am toying around with a simple test application. In one page user creates 
a new record, and picks the artist for that record with a select pulldown. 
My artist object has a first name and a last name separately. Initially I 
displayed only last name:

 
   
 

Quite nice and compact. When I wanted to include also the last name, best I 
could come up with was:

 
   
 
   
 
   
 
It seems quite complicated - is there any way to use EL and 
optionsCollectionTag, for example, to achieve a simpler structure?

_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail

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


Re: Validating Dynamically Creating Rows

2004-08-24 Thread DGraham

Return Receipt
   
Your  Re: Validating Dynamically Creating Rows 
document   
:  
   
was   Dennis Graham/EvergreenFunds 
received   
by:
   
at:   08/24/2004 07:45:39 AM   
   





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



Re: What happended to Ted Husteds Struts pages?

2004-08-24 Thread James Mitchell
Didn't you here?  Everyone is moving to .Net, if you are not, your are
missing the boat.  Get your ticket quick!
http://www.microsoft.com/titanic.Net/purchase.aspx;)



--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx

- Original Message -
From: "Stuart Guthrie" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, August 24, 2004 1:09 AM
Subject: Re: What happended to Ted Husteds Struts pages?


> I though Ted had bailed out to .NET?
>
> Is he still involved in Struts?
>
> On Tue, 2004-08-24 at 10:13, David Stevenson wrote:
> > On 23/8/04 23:51, "Nathan Maves" <[EMAIL PROTECTED]> wrote:
> >
> > > Yeah I know what happenedIt's still there :)
> >
> > Not from here.
> >
> >
> > -
> > 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]



HTML:TEXT tag and Internationalization

2004-08-24 Thread hermod . opstvedt
Hi

Is there any reasonable argument as to why the html:text tag uses
default (value.toString()) formating, while the bean:write uses a
formatter that is I18N aware. This is really anoying for locales that
normally use comma as a decimal seperator. If you output the value with
bean:write it will look OK, but displaying it in an html:text it will
use the English dot as a decimal seperator. I think that moving the
formatValue from WriteTag into TagUtils, hence making it avaiable to all
tags would be a good idea. Then we would have a uniform formatting of
values.

Hermod 


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


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



RE: Exception Handler Help!

2004-08-24 Thread Paul McCulloch
Is using forward as an exception handler's path valid? I didn't know you
could do that.

Anyway, I'd reduce the complexity of what you are doing: Start by using an
html page as your path, then try a JSP, then an action.

Paul

> -Original Message-
> From: Keith Bottner [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 24, 2004 11:43 AM
> To: Struts Users Mailing List
> Subject: Exception Handler Help!
> 
> 
> Configuration of global exceptions looks very simple. So I 
> cannot understand
> why the configuration of my global-exception refuses to pick up any
> exceptions. If an error occurs I just get the blank white 
> page. Here is my
> global-exception configuration section.
> 
> 
> 
>  type="java.lang.Exception" /> 
> 
> Then I have a global-forward that looks like this
> 
> 
> 
> I tried specifying /errors.do as the path for the 
> global-exception and that
> did not work either. Any ideas on why Exceptions may not be 
> getting routed?
> 
> Thanks,
> 
> Keith
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


**
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not 
the addressee indicated in this message (or responsible for delivery of the message to 
such person), you may not copy or deliver this message to anyone. In such case, you 
should destroy this message, and notify us immediately. If you or your employer does 
not consent to Internet email messages of this kind, please advise us immediately. 
Opinions, conclusions and other information expressed in this message are not given or 
endorsed by my Company or employer unless otherwise indicated by an authorised 
representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted 
via electronic mail attachments we cannot guarantee that attachments do not contain 
computer virus code.  You are therefore strongly advised to undertake anti virus 
checks prior to accessing the attachment to this electronic mail.  Axios Systems Ltd 
grants no warranties regarding performance use or quality of any attachment and 
undertakes no liability for loss or damage howsoever caused.
**


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



Re: DTD not found

2004-08-24 Thread Ron McNulty
Thanks Erik

Not the best solution maybe, but it works a treat and gets our first build
up and running.

Thanks again

Ron
- Original Message - 
From: "Erik Weber" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, August 24, 2004 5:58 AM
Subject: Re: DTD not found


> I solved this problem once and for all in my web apps by including the
> DTDs directly in the XML files. Now, if it can't be found *there*, it
> just wasn't meant to be.
>
> :)
>
> Erik
>
> Ron McNulty wrote:
>
> >I have today migrated my JBoss 3.2.5/Struts 1.1 application to our QA
server, which does not have Internet access.
> >
> >I am getting an error from the Digester, when looking for
tiles-config1_1.dtd. It seems it is trying to read it from http://. Sure
enough, turning off Internet access on my development box produces the same
error. This DTD is in struts.jar, and I have tried dropping copies in all
sorts of places to no avail.
> >
> >Some digging about on Google confirmed this is a problem, but was fixed
in a nightly build in July 2002!.
> >
> >About the only slightl non-standard config of my app is to put all
taglibs in WEBINF/taglib. web.xml has been updated to suit.
> >
> >Can anyone throw some light o this?
> >
> >Ron McNulty
> >
> >
>
> -
> 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]



Exception Handler Help!

2004-08-24 Thread Keith Bottner
Configuration of global exceptions looks very simple. So I cannot understand
why the configuration of my global-exception refuses to pick up any
exceptions. If an error occurs I just get the blank white page. Here is my
global-exception configuration section.



 

Then I have a global-forward that looks like this



I tried specifying /errors.do as the path for the global-exception and that
did not work either. Any ideas on why Exceptions may not be getting routed?

Thanks,

Keith


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



Re: Emulate a modal screen (Struts newbie)

2004-08-24 Thread Erik Weber
Perhaps the J2EE pattern "Use a Synchronizer Token" could be of use or 
even be a complete solution. Struts has built-in support for this in the 
form of several Action methods (such as isTokenValid(HttpServletRequest) 
-- which checks to see if the value of a "timestamp" stored as a session 
attribute is equal to the value of a "timestamp" that was enscribed in 
the last-issued HTML form as a hidden parameter).

I have used identifiers + timestamps (the timestamp can be just a random 
String) with my form tokens, so that I know if a submitted form is the 
one I expect, not only in terms of chronological ordering, but with 
respect to *the relevent actor*. If a user "checks out" a FooEdit form, 
then a BarEdit form, then submits the BarEdit Form, then tries to submit 
the FooEdit form, he will violate what the simplest of token-checking 
schemes would allow (the FooEdit token in the user's session would have 
been replaced by the BarEdit token at form checkout time). But 
obviously, he has followed proper workflow when you consider that two 
different *actors* were involved.

I don't know if Struts has any support for "complex" form timestamps, or 
in other words, multiple form tokens as simultaneous session attributes.

Hope that helps.
Erik
Varley, Roger wrote:
Hi
I'm trying to write what is esentially a web based data entry program using struts. I obviously can't use 
pessimistic database locking and optimistic locking becomes a nightmare when the client is able to open 
multiple edit windows across multiple records at the same time - so I'd like to simplify by treating the 
"edit" jsp as a modal dialog (i.e once the edit jsp is in use the client can't do anything else 
in the application until the "edit" is closed. Code samples or pointers to same would be useful. 
If trying to force a modal dialog is a really bad idea I would welcome suggestions on how to handle this 
scenario.
Regards
Roger
__
This e-mail and the documents attached are confidential and intended 
solely for the addressee; it may also be privileged. If you receive this 
e-mail in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group 
liability cannot be triggered for the message content. Although the 
sender endeavours to maintain a computer virus-free network, the sender 
does not warrant that this transmission is virus-free and will not be 
liable for any damages resulting from any virus transmitted.
__

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


Tiles and well formed html

2004-08-24 Thread andy wix
Hi,
I have a trypical layout and each tile has its own style sheet and is well 
formed html.
My problem is that only 1 style sheet is being used for the whole page.  I 
saw in the mail archives that someone suggested using  tags but this 
doesn't seem to work for me (I've tried both in the tiles and in the 
layout.jsp).  Does anyone know what is considered best practice for this 
requirement.  It seems counter-intuitive to have your tiles not well formed 
html but if this is the solution which tile would you pick for the 'main' 
html tags or does it even matter?

Thanks,
Andy
_
Use MSN Messenger to send music and pics to your friends 
http://www.msn.co.uk/messenger

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