use of session object in Action Form?

2004-05-17 Thread Shyamal Shah
I need to use session object in my Action Form class. Can I use either session or 
request object in my form class? If yes can someone please suggest how can I do that?

Thanks,

Re: Session attributes lost when open a popup window

2004-05-17 Thread brati . sankarghosh

Hi lozano
I had the same problem. whenever i close
the pop up window the session is lost in the parent window too. I am using
JDeveloper as IDE and weblogic to deply. Someone adviced me that this is
a problem with the OC4J contained shipped with JDeveloper. But I doubt
this may also be due to some bug in IE.

Brati Sankar Ghosh
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com





grati_a_lozano
[EMAIL PROTECTED] 
05/14/2004 04:14 PM




Please respond to
Struts Users Mailing List [EMAIL PROTECTED]





To
[EMAIL PROTECTED]


cc



Subject
Session attributes lost when
open a popup window








Hi all, 

I'm working with Struts 1.1.

When open a JSP page in a popup window with _javascript_, the Session 
attributes are lost.

I make a little example:

The test1.jsp put one attribute (test1) in Session and invoke

test2.jsp in two ways:

a) When submit the form, a forward is defined to return test2.jsp

b) Using a _javascript_ function

Test2.jsp only must check that the attribute test1 exists and

display it:

That is TEST1.JSP 

SCRIPT language=_javascript_ 
function openwindow(){ 
aBase='html:rewrite
page=/test2.jsp /'; 
window.open(aBase,
test2,
200, 200); 
} 
/SCRIPT 

TITLETEST1/TITLE 
% request.getSession().setAttribute(test1, hola);
% 
/HEAD 

BODY 
html:form action=""

html:text property
= texto/ 
html:submit
value=test2/br 
/html:form 

a href=''test2/a


/BODY 

That is TEST2.JSP 

BODY 
 logic:present name=test1

   session.test1: 
   bean:write name=test1
scope=session /br 
 /logic:present 
/BODY


That is the piece of struts-config.xml concerned (test1Action do 
nothing but returns the addecuate forward ). 

action-mappings 
  action 
 name=test1

 path=/test1Action

 scope=request

 type=test_struts.forms.test1Action

 forward
  
name=success 
  
path=/test2.jsp / 
  /action 
/action-mappings 


And that is the result:

If test2.jsp is invoked via the Submit button, it is open in the same 
browser window and display:

session.test1: hola

If test2.jsp is invoked via the link, nothing is displayed.

I'm looking in Google and it seems that the session ID (jsession)
is 
lost.

To avoid that I tried to change the _javascript_ code using the next:
  % String url =""
% 
  window.open( %=url%,TEST, 200,
200); 

but with the same results.

My questions are: 
How can I open a popup window without losing session?
Is there another way to do that using Struts tags?. 

Thanks in advance and excuses for my English.

Regards.


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


ForwardSourceID:NT8F22
 
DISCLAIMER: The information contained in this message is intended only and solely for 
the addressed individual or entity indicated in this message and for the exclusive use 
of the said addressed individual or entity indicated in this message (or responsible 
for delivery
of the message to such person) and may contain legally privileged and confidential 
information belonging to Tata Consultancy Services. It must not be printed, read, 
copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person 
other than the addressee. 
Unauthorized use, disclosure or copying is strictly prohibited and may constitute 
unlawful act and can possibly attract legal action, civil and/or criminal. The 
contents of this message need not necessarily reflect or endorse the views of Tata 
Consultancy Services on any subject matter.
Any action taken or omitted to be taken based on this message is entirely at your risk 
and neither the originator of this message nor Tata Consultancy Services takes any 
responsibility or liability towards the same. Opinions, conclusions and any other 
information contained in this message 
that do not relate to the official business of Tata Consultancy Services shall be 
understood as neither given nor endorsed by Tata Consultancy Services or any affiliate 
of Tata Consultancy Services. If you have received this message in error, you should 
destroy this message and may please notify the sender by e-mail. Thank you.


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

Re: Sharing what I've learned: locale switching

2004-05-17 Thread Jan Normann Nielsen
None None wrote:
Because this might be helpful to others, and because I probably would 
have spent another couple of hours figuring it out on my own without 
the help of some people on this lsit, I wanted to give back as much as 
I could.  So, here's a consolidated bit of info I've learned about 
switching language in your Struts apps...

What I have is a file manager application, more or less just for me to 
learn Struts.  I wanted to have the ability to switch languages 
on-the-fly.  To do this, I've done the following:
Does anyone know how to make the Locale settings global for all web 
applications deployed in a web container? Is it at all possible? I have 
four web applications deployed in Jetty and I want to have them share 
the user chosen locale.

Best regards,
Jan Nielsen
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: UTF8 and Chinese

2004-05-17 Thread Kransen, J.
Anyone tell me if I'm wrong, but I doubt if UTF-8 covers Chinese. As I see
it, it only contains 8 bits per character, instead of ASCII's 7 bits, and
for that reason I assume it only covers 2* the number of chars. Maybe you
can try UTF-16 instead? 

Jeroen

 -Oorspronkelijk bericht-
 Van: Michael McGrady [mailto:[EMAIL PROTECTED]
 Verzonden: zondag 16 mei 2004 17:47
 Aan: Struts Users Mailing List
 Onderwerp: UTF8 and Chinese
 
 I am trying to use the image tags from Commons sandbox taglibs.  I am
 trying to use them with Chinese.  The Western European languages work fine
 with them, but the same thing does not work with Chinese.  I am doing the
 following, in essence:
 
 // Welcome in Chinese
 String original = new String(\u6b22\u8fce);
 
 and
 // Welcome in Chinese
 String original = new String(\u6b22\u8fce);
 byte[] utf8Bytes = original.getBytes(UTF8);
 original = new String(utf8Bytes,UTF8);
 
 Neither works.  I just get the proverbial square boxes on the resultant
 images.  Anyone have any ideas?
 
 Thanks, Michael


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



R: Sharing what I've learned: locale switching

2004-05-17 Thread Andrea M.
Hi Jan
What do you mean with sharing user chosen locale?
Does your user access thru a common login application?
If it's something like that, then you might share your Locale putting it in
session
Session.setAttribute(myLocale, myLocale);

Then retrieving it in the other applications with
(Locale)request.getSession().getAttribute(myLocale);

This usually works pretty well since Session is a serializable object.
Not sure it would work in a clustered environment though

-Messaggio originale-
Da: Jan Normann Nielsen [mailto:[EMAIL PROTECTED] 
Inviato: lunedì 17 maggio 2004 10.42
A: Struts Users Mailing List
Oggetto: Re: Sharing what I've learned: locale switching

None None wrote:

 Because this might be helpful to others, and because I probably would 
 have spent another couple of hours figuring it out on my own without 
 the help of some people on this lsit, I wanted to give back as much as 
 I could.  So, here's a consolidated bit of info I've learned about 
 switching language in your Struts apps...

 What I have is a file manager application, more or less just for me to 
 learn Struts.  I wanted to have the ability to switch languages 
 on-the-fly.  To do this, I've done the following:

Does anyone know how to make the Locale settings global for all web 
applications deployed in a web container? Is it at all possible? I have 
four web applications deployed in Jetty and I want to have them share 
the user chosen locale.

Best regards,
Jan Nielsen

-
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: UTF8 and Chinese

2004-05-17 Thread Cees van de Griend
Hello Jeroen,

On Monday 17 May 2004 10:42, Kransen, J. wrote:
 Anyone tell me if I'm wrong, but I doubt if UTF-8 covers Chinese. As I see
 it, it only contains 8 bits per character, instead of ASCII's 7 bits, and
 for that reason I assume it only covers 2* the number of chars. Maybe you
 can try UTF-16 instead?

You are wrong.

By default UTF-8 uses 1 byte per character. It uses a special character to 
indicates that the next character is 'high' and stored in 2 bytes. This makes 
a total of 3 bytes for a 'high' character.

So UTF-8 is a good choice for western languages with normally only a few 
'high' characters in the document.

 Jeroen

Regards,
Cees.

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



RE: UTF8 and Chinese

2004-05-17 Thread Michael McGrady
UTF-8 works fine with Chinese and everything else.  I am doing it.  It can 
be used, and I do use it, on each JSP page no matter what the language.  I 
am presently using 19 which all work fine with UTF-8.  I wondered about 
that.  And, I am not saying that UTF-8 is always the way to go.  But it 
does work.  The problem was not the UTF-8 but getting a physical Font 
address.  For Hebrew and other Arabic languages I had to reference 
LucidaSans which is with the jre and for the Eastern language I used Arial 
Unicode MS.  One can use the Netscape font too, which is Bitsteam 
Cyberbit.  Unfortunately, I had to work this out on my own.  Wish I had 
gotten more interest, but I have to admit I did not approach the list 
intelligently with this request.  I just assumed that people would figure 
out why I was on the list rather than the reverse.  Oh well, live and 
learn.  My mistake.

Thank you for this interest.  If you have any further interest, please feel 
free to contact me personally.  I have it all working acey duecy as of today.

Michael
At 01:42 AM 5/17/2004, Kransen, J. wrote:
Anyone tell me if I'm wrong, but I doubt if UTF-8 covers Chinese. As I see
it, it only contains 8 bits per character, instead of ASCII's 7 bits, and
for that reason I assume it only covers 2* the number of chars. Maybe you
can try UTF-16 instead?
Jeroen
 -Oorspronkelijk bericht-
 Van: Michael McGrady [mailto:[EMAIL PROTECTED]
 Verzonden: zondag 16 mei 2004 17:47
 Aan: Struts Users Mailing List
 Onderwerp: UTF8 and Chinese

 I am trying to use the image tags from Commons sandbox taglibs.  I am
 trying to use them with Chinese.  The Western European languages work fine
 with them, but the same thing does not work with Chinese.  I am doing the
 following, in essence:

 // Welcome in Chinese
 String original = new String(\u6b22\u8fce);

 and
 // Welcome in Chinese
 String original = new String(\u6b22\u8fce);
 byte[] utf8Bytes = original.getBytes(UTF8);
 original = new String(utf8Bytes,UTF8);

 Neither works.  I just get the proverbial square boxes on the resultant
 images.  Anyone have any ideas?

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


R: About multiple Resourcebundles

2004-05-17 Thread Andrea M.
Yes that's the way you access the bundles. 
Your web.xml has nothing to do with message resources 

However... instead of asking will it work? perhaps it would be a better
idea to try it out first, and eventually ask why didn't it work? then  :)

Andrea

-Messaggio originale-
Da: SMETS Thomas [mailto:[EMAIL PROTECTED] 
Inviato: lunedì 17 maggio 2004 11.33
A: Struts Users Mailing List
Oggetto: About multiple Resourcebundles


Dear,

I am struggling a bit with the usage of more than one Resourcebundle in
Struts-config.xml.
I have defined two property files in my classpath : 
_ ApplicationResources.properties
_ ApplicationResources2.properties


The bottom line is (I think) how do I access the messages when I have the
following in my struts-config :

  !-- Defines a Set of Message resources that would be located in
ResourceBundle-like files --
  message-resources
parameter=ApplicationResources
null=false /  

  !-- Defines a Set of Message resources that would be located in
ResourceBundle-like files --
  message-resources
parameter=ApplicationResources2
key=button
null=false /  


What do I write in my jsp's ?
 bean:message bundle=button key=myKey/

Do I need to add something in my web.xml ?

\T,





--
Thomas SMETS
Architect reengineering OEIL
T. : 44375 

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


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



Struts 1.1 XHTML [html:form]

2004-05-17 Thread Le Goff, Yoann
Hi,

My html:form render a form with a name=toto attribute corresponding to
my struts-config bean.
All is right,
But XHTML 1.1 do-not accept name attribute in a form tag ...

Is somebody got an idea ?

I've ever try html:xhtml in my jsp.
It works form img / tag but for form tag, it doesn't.

Thx !


Yoann 



Re: About multiple Resourcebundles

2004-05-17 Thread Harjot Narula
Hi

You dont need anything in web.xml except from config parameter name and
value
which I beleive you would have given.

Just let me know if you are using tiles by any chance.
We had some problems in the application we developed due to tiles.

Just make sure that name of the files in classpath matches the parameter in
message-resources tag

Harjot


- Original Message - 
From: SMETS Thomas [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, May 17, 2004 3:02 PM
Subject: About multiple Resourcebundles



 Dear,

 I am struggling a bit with the usage of more than one Resourcebundle in
Struts-config.xml.
 I have defined two property files in my classpath :
 _ ApplicationResources.properties
 _ ApplicationResources2.properties


 The bottom line is (I think) how do I access the messages when I have the
following in my struts-config :

   !-- Defines a Set of Message resources that would be located in
ResourceBundle-like files --
   message-resources
 parameter=ApplicationResources
 null=false /

   !-- Defines a Set of Message resources that would be located in
ResourceBundle-like files --
   message-resources
 parameter=ApplicationResources2
 key=button
 null=false /


 What do I write in my jsp's ?
 bean:message bundle=button key=myKey/

 Do I need to add something in my web.xml ?

 \T,





 --
 Thomas SMETS
 Architect reengineering OEIL
 T. : 44375

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



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



RE: Struts 1.1 XHTML [html:form]

2004-05-17 Thread Kransen, J.
That's a known issue and is solved in 1.2

 -Oorspronkelijk bericht-
 Van: Le Goff, Yoann [mailto:[EMAIL PROTECTED]
 Verzonden: maandag 17 mei 2004 11:55
 Aan: 'Struts Users Mailing List'
 Onderwerp: Struts 1.1  XHTML [html:form]
 
 Hi,
 
 My html:form render a form with a name=toto attribute corresponding to
 my struts-config bean.
 All is right,
 But XHTML 1.1 do-not accept name attribute in a form tag ...
 
 Is somebody got an idea ?
 
 I've ever try html:xhtml in my jsp.
 It works form img / tag but for form tag, it doesn't.
 
 Thx !
 
 
 Yoann



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



[very OT] 16 kb limit in XML from Tomcat?

2004-05-17 Thread Kransen, J.
Hello, I generate an XML file from within a JSP in Tomcat. Especially after
16384 bytes the contents are really interesting. Unfortunately, Tomcat
disagrees and truncates it. It can't be coincidence that this is 16k
precisely, so I hoped to find a configuration item set to 16k (in fact I
hoped not to have a limit at all), but I can't find one. There are also no
stack traces or any errors/warnings, it just gets truncated and that's it.
It can't be the browser, because it happens with IE6 and Opera 7.23.

By the way, do I have to (can I) set a content type text/xml in JSP? 

Regards, Jeroen


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



R: Struts 1.1 XHTML [html:form]

2004-05-17 Thread Andrea M.
Hi Yoann
Why do you need a name on your form?
In Struts it usually identifies the name of the actionForm it uses, but that
is usually set in struts-config.
If a unique identifier of the form then 'styleId' attribute might be what
you want, since it renders an 'id' attribute (ibid
http://jakarta.apache.org/struts/userGuide/struts-html.html)


-Messaggio originale-
Da: Le Goff, Yoann [mailto:[EMAIL PROTECTED] 
Inviato: lunedì 17 maggio 2004 11.55
A: 'Struts Users Mailing List'
Oggetto: Struts 1.1  XHTML [html:form]

Hi,

My html:form render a form with a name=toto attribute corresponding to
my struts-config bean.
All is right,
But XHTML 1.1 do-not accept name attribute in a form tag ...

Is somebody got an idea ?

I've ever try html:xhtml in my jsp.
It works form img / tag but for form tag, it doesn't.

Thx !


Yoann 



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



RE: [very OT] 16 kb limit in XML from Tomcat?

2004-05-17 Thread Adolfo Miguelez
I did have similar experiences parsing files by myself using SAX parsing. 
Xerces and other parsers chop files in blocks. 16k is the default size for 
xerces, or at least it was.

Hander code must be aware of that, in the events handling, and hold strings 
from one block to the other if one tag is broken in between two blocks.

Otherwise, results can be unpredictable.
I guess, just a guess, could happen something similar in Tomcat parsing but 
a deeper investigation must be developed. Anyway, that you say could have 
meaning.

Regards,
Adolfo.
From: Kransen, J. [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: [very OT] 16 kb limit in XML from Tomcat?
Date: Mon, 17 May 2004 12:31:44 +0200
Hello, I generate an XML file from within a JSP in Tomcat. Especially after
16384 bytes the contents are really interesting. Unfortunately, Tomcat
disagrees and truncates it. It can't be coincidence that this is 16k
precisely, so I hoped to find a configuration item set to 16k (in fact I
hoped not to have a limit at all), but I can't find one. There are also no
stack traces or any errors/warnings, it just gets truncated and that's it.
It can't be the browser, because it happens with IE6 and Opera 7.23.
By the way, do I have to (can I) set a content type text/xml in JSP?
Regards, Jeroen
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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


R: [very OT] 16 kb limit in XML from Tomcat?

2004-05-17 Thread Andrea M.
Hmm
I don't know about this 16k limit, but AFAIK you can set any kind of content
type in your jsp.
JSPs are ultimately servlets (once translated), so  you have no limit in
content types

e.g. I used to set text/xml for creating dynamic JNLP files with jsps


-Messaggio originale-
Da: Kransen, J. [mailto:[EMAIL PROTECTED] 
Inviato: lunedì 17 maggio 2004 12.32
A: 'Struts Users Mailing List'
Oggetto: [very OT] 16 kb limit in XML from Tomcat?

Hello, I generate an XML file from within a JSP in Tomcat. Especially after
16384 bytes the contents are really interesting. Unfortunately, Tomcat
disagrees and truncates it. It can't be coincidence that this is 16k
precisely, so I hoped to find a configuration item set to 16k (in fact I
hoped not to have a limit at all), but I can't find one. There are also no
stack traces or any errors/warnings, it just gets truncated and that's it.
It can't be the browser, because it happens with IE6 and Opera 7.23.

By the way, do I have to (can I) set a content type text/xml in JSP? 

Regards, Jeroen


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



Linking DispatchActions

2004-05-17 Thread Guillermo Meyer
Hi:
I have 2 Action classes (ActionA, ActionB) that extends DispatchAction
class. Each Action has 3 methods: method1, method2 and method3.

This is the executing scenario:
1) a post is made to ActionA.do with parameter set to method3.
2) DispatchAction execute method3 according to parameter value (a
request.getParameter())
3) ActionA.method3() returns a forward that is declared as follows:
forward name=fwdMethod3 path=/ActionB.do/

This forward must execute ActionB.method2() when being executed from the
previous forward.

But as ActionB is also a DispatchAction, method3() will be executed
instead of the method I want (method2) because request.getParameter()
from mapping parameter is still method3 and request parameters cannot be
changed during request lifetime.

Possible solution: add a ?method=method2 to the forward path and set
redirect=true

But i wouldn't like to perform a redirect. 
I could overrite DispatchAction.dispatchMethod to rectify method name
according to some request attribute, but is there any other way to do
it?

Thanks in advance.

Guillermo Meyer
System Engineer
EDS Argentina - Proyecto X71 Interbanking.
54.11.4322-1307

NOTA DE CONFIDENCIALIDAD
Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las 
personas direccionadas en el mail y puede contener informacion (i)de propiedad 
exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier 
opinion en el contenido, es exclusiva de su autor y no representa necesariamente la 
opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion 
esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna 
por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha 
recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo 
inmediatamente junto con todas las copias del mismo, notificando al remitente. No 
debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus 
partes si usted no es el destinatario. Muchas gracias.



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



DynaActionForm/DynaValidatorForm 'losing' state

2004-05-17 Thread Daniel Haynes
**
Your attention is drawn to the warning notice at the end of this message.
**

An intermittent bug is occurring on a live struts based application. A
value is being set on a DynaActionForm variable (userId ) when a user
navigates to the screen. However when the user submits the resultant
form the value is lost (its becomes null). The bug appears on the live
system and then disappears with no apparent consistency. The
DynaActionForm is configured with session scope. The form has been
extended with an implemention of the reset method (as below) which seems
to continually set this form attribute with a value. My guess then is
that the only way this value can be null is when the form bean is first
created (it is not configured with an 'initial' value). Although using
ValidatorForm, validation is done manually rather than through the
validation configuration.

public class UserDynaValidatorForm extends DynaValidatorForm
{
public void reset(ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
{
HttpSession session = request.getSession();
DynaActionForm dynaForm =
(DynaActionForm)session.getAttribute(userInputNav);
String userId = 0;
if(dynaForm.get(userId)!=null) {
  userId=(String)dynaForm.get(userId);
}
super.getMap().clear();
dynaForm.set(userId,userId);
session.setAttribute(userInputNav,dynaForm);
}
}

The application is running on Oracle9iAS Release 2 on one machine using
a two node cluster with Web Cache enabled and configured for 'sticky'
sessions.

Does anyone have any ideas about what might be happening here, and why
it might be happening, or has had experience of something similar ?

Many thanks





***
We would ask you to treat any communication from us as confidentially as you would 
want us to treat communication from you.  If you are not an intended recipient, please 
notify [EMAIL PROTECTED] immediately. You should know that some of our communications 
may contain confidential information which it could be a criminal offence for you to 
disclose or use without authority. This e-mail is not intended nor should it be taken 
to create any legal relations, contractual or otherwise.
The Financial Services Authority 
25 The North Colonnade, Canary Wharf, London E14 5HS United Kingdom
Registered as a Limited Company in England and Wales No.1920623. Registered Office as 
above 
Switchboard: 020 7066 1000
Web Site:   http://www.fsa.gov.uk
***



RE: DynaActionForm/DynaValidatorForm 'losing' state

2004-05-17 Thread Mainguy, Mike
The first things I would investigate would be
#1 Do you REALLY have sticky sessions (could be misconfigured)
#2 Are ALL the session timeouts set properly?  Is the sticky session is set
to timeout after 5 minutes but the app server session times out after 10
minutes or visa versa.
#3 Is the user id in the correct case everywhere?  That is, is the perhaps 1
code path that it is used in a different manner (ideally the variable name
is a Global Constant right?)
#4 Are you navigating from a jsp (or whatever) html form that has the userid
set to  or it isn't present?
#5 Are you inadvertently, unknowingly creating new sessions?

An Obstacle is something you see when you take your eyes off the goal

-Original Message-
From: Daniel Haynes [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 17, 2004 7:32 AM
To: [EMAIL PROTECTED]
Subject: DynaActionForm/DynaValidatorForm 'losing' state



**
Your attention is drawn to the warning notice at the end of this message.

**

An intermittent bug is occurring on a live struts based application. A value
is being set on a DynaActionForm variable (userId ) when a user navigates to
the screen. However when the user submits the resultant form the value is
lost (its becomes null). The bug appears on the live system and then
disappears with no apparent consistency. The DynaActionForm is configured
with session scope. The form has been extended with an implemention of the
reset method (as below) which seems to continually set this form attribute
with a value. My guess then is that the only way this value can be null is
when the form bean is first created (it is not configured with an 'initial'
value). Although using ValidatorForm, validation is done manually rather
than through the validation configuration.

public class UserDynaValidatorForm extends DynaValidatorForm
{
public void reset(ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
{
HttpSession session = request.getSession();
DynaActionForm dynaForm =
(DynaActionForm)session.getAttribute(userInputNav);
String userId = 0;
if(dynaForm.get(userId)!=null) {
  userId=(String)dynaForm.get(userId);
}
super.getMap().clear();
dynaForm.set(userId,userId);
session.setAttribute(userInputNav,dynaForm);
}
}

The application is running on Oracle9iAS Release 2 on one machine using a
two node cluster with Web Cache enabled and configured for 'sticky'
sessions.

Does anyone have any ideas about what might be happening here, and why it
might be happening, or has had experience of something similar ?

Many thanks






***
We would ask you to treat any communication from us as confidentially as you
would want us to treat communication from you.  If you are not an intended
recipient, please notify [EMAIL PROTECTED] immediately. You should know
that some of our communications may contain confidential information which
it could be a criminal offence for you to disclose or use without authority.
This e-mail is not intended nor should it be taken to create any legal
relations, contractual or otherwise. The Financial Services Authority 
25 The North Colonnade, Canary Wharf, London E14 5HS United Kingdom
Registered as a Limited Company in England and Wales No.1920623. Registered
Office as above 
Switchboard: 020 7066 1000
Web Site:   http://www.fsa.gov.uk

***


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


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



RE: Problem with utf-8 encoding with struts

2004-05-17 Thread Paul McCulloch
This can happen if you use JSTL tags which overwrite whatever response
encoding you set.

This can be fixed by using a filter to force the encoding

http://www.anassina.com/struts/i18n/SetCharacterEncodingFilter.java

Paul

 -Original Message-
 From: Ronald van den Heuvel [mailto:[EMAIL PROTECTED]
 Sent: Monday, May 17, 2004 12:28 PM
 To: [EMAIL PROTECTED]
 Subject: Problem with utf-8 encoding with struts
 
 
  Hello all,
 
  
 
 I am using Struts for a web-application and the web-page should be in
 UTF-8 encoding, but the application keeps sending the 
 following header:
 Content-Type: text/html;charset=ISO-8859-1. I take the 
 following action
 to get the page into UTF-8. 
 
  - in the struts config file: 
 
   controller contentType=text/html;charset=UTF-8
 nocache=true /
 
 - in the main tiles layout:
 
 %@ page language=java contentType=text/xml;
 charset=UTF-8 % (at the top)
 
 meta http-equiv=content-type content=text/html;
 charset=UTF-8( in the head part of the document)
 
  
 
 The page is valid xhtml 1.0 transitional and I get no errors what so
 ever. I tested it in mozilla and IE and both say it is the ISO-8859-1
 content type. 
 
  
 
 Does anybody know the solution to this problem?
 
  
 
 Thanks
 
  
 
 Ronald
 
  
 
  
 
 


**
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: Problem with utf-8 encoding with struts

2004-05-17 Thread Paul McCulloch
That's an old version I gave the URL for. A better place to look would be in
the Tomcat source.

Paul

 -Original Message-
 From: Paul McCulloch [mailto:[EMAIL PROTECTED]
 Sent: Monday, May 17, 2004 12:47 PM
 To: 'Struts Users Mailing List'
 Subject: RE: Problem with utf-8 encoding with struts
 
 
 This can happen if you use JSTL tags which overwrite whatever response
 encoding you set.
 
 This can be fixed by using a filter to force the encoding
 
 http://www.anassina.com/struts/i18n/SetCharacterEncodingFilter.java
 
 Paul
 
  -Original Message-
  From: Ronald van den Heuvel 
 [mailto:[EMAIL PROTECTED]
  Sent: Monday, May 17, 2004 12:28 PM
  To: [EMAIL PROTECTED]
  Subject: Problem with utf-8 encoding with struts
  
  
   Hello all,
  
   
  
  I am using Struts for a web-application and the web-page 
 should be in
  UTF-8 encoding, but the application keeps sending the 
  following header:
  Content-Type: text/html;charset=ISO-8859-1. I take the 
  following action
  to get the page into UTF-8. 
  
   - in the struts config file: 
  
controller contentType=text/html;charset=UTF-8
  nocache=true /
  
  - in the main tiles layout:
  
  %@ page language=java contentType=text/xml;
  charset=UTF-8 % (at the top)
  
  meta http-equiv=content-type content=text/html;
  charset=UTF-8( in the head part of the document)
  
   
  
  The page is valid xhtml 1.0 transitional and I get no errors what so
  ever. I tested it in mozilla and IE and both say it is the 
 ISO-8859-1
  content type. 
  
   
  
  Does anybody know the solution to this problem?
  
   
  
  Thanks
  
   
  
  Ronald
  
   
  
   
  
  
 
 
 **
 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]
 

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



RE: Problem with utf-8 encoding with struts

2004-05-17 Thread Ronald van den Heuvel
Hm ok I will try the filter but this is not the real solution because I
am not using any other taglibs. Only the standard Struts taglibs. 



-Original Message-
From: Paul McCulloch [mailto:[EMAIL PROTECTED] 
Sent: maandag 17 mei 2004 13:50
To: 'Struts Users Mailing List'
Subject: RE: Problem with utf-8 encoding with struts

That's an old version I gave the URL for. A better place to look would
be in
the Tomcat source.

Paul

 -Original Message-
 From: Paul McCulloch [mailto:[EMAIL PROTECTED]
 Sent: Monday, May 17, 2004 12:47 PM
 To: 'Struts Users Mailing List'
 Subject: RE: Problem with utf-8 encoding with struts
 
 
 This can happen if you use JSTL tags which overwrite whatever response
 encoding you set.
 
 This can be fixed by using a filter to force the encoding
 
 http://www.anassina.com/struts/i18n/SetCharacterEncodingFilter.java
 
 Paul
 
  -Original Message-
  From: Ronald van den Heuvel 
 [mailto:[EMAIL PROTECTED]
  Sent: Monday, May 17, 2004 12:28 PM
  To: [EMAIL PROTECTED]
  Subject: Problem with utf-8 encoding with struts
  
  
   Hello all,
  
   
  
  I am using Struts for a web-application and the web-page 
 should be in
  UTF-8 encoding, but the application keeps sending the 
  following header:
  Content-Type: text/html;charset=ISO-8859-1. I take the 
  following action
  to get the page into UTF-8. 
  
   - in the struts config file: 
  
controller contentType=text/html;charset=UTF-8
  nocache=true /
  
  - in the main tiles layout:
  
  %@ page language=java contentType=text/xml;
  charset=UTF-8 % (at the top)
  
  meta http-equiv=content-type content=text/html;
  charset=UTF-8( in the head part of the document)
  
   
  
  The page is valid xhtml 1.0 transitional and I get no errors what so
  ever. I tested it in mozilla and IE and both say it is the 
 ISO-8859-1
  content type. 
  
   
  
  Does anybody know the solution to this problem?
  
   
  
  Thanks
  
   
  
  Ronald
  
   
  
   
  
  
 
 
 **
 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]
 

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



Unsubscribe Me !!

2004-05-17 Thread Rohit A Nair
  


On Mon, 17 May 2004 Ronald van den Heuvel wrote :
Hm ok I will try the filter but this is not the real solution because I
am not using any other taglibs. Only the standard Struts taglibs.



-Original Message-
 From: Paul McCulloch [mailto:[EMAIL PROTECTED]
Sent: maandag 17 mei 2004 13:50
To: 'Struts Users Mailing List'
Subject: RE: Problem with utf-8 encoding with struts

That's an old version I gave the URL for. A better place to look would
be in
the Tomcat source.

Paul

  -Original Message-
  From: Paul McCulloch [mailto:[EMAIL PROTECTED]
  Sent: Monday, May 17, 2004 12:47 PM
  To: 'Struts Users Mailing List'
  Subject: RE: Problem with utf-8 encoding with struts
 
 
  This can happen if you use JSTL tags which overwrite whatever response
  encoding you set.
 
  This can be fixed by using a filter to force the encoding
 
  http://www.anassina.com/struts/i18n/SetCharacterEncodingFilter.java
 
  Paul
 
   -Original Message-
   From: Ronald van den Heuvel
  [mailto:[EMAIL PROTECTED]
   Sent: Monday, May 17, 2004 12:28 PM
   To: [EMAIL PROTECTED]
   Subject: Problem with utf-8 encoding with struts
  
  
Hello all,
  
  
  
   I am using Struts for a web-application and the web-page
  should be in
   UTF-8 encoding, but the application keeps sending the
   following header:
   Content-Type: text/html;charset=ISO-8859-1. I take the
   following action
   to get the page into UTF-8.
  
- in the struts config file:
  
 controller contentType=text/html;charset=UTF-8
   nocache=true /
  
   - in the main tiles layout:
  
   %@ page language=java contentType=text/xml;
   charset=UTF-8 % (at the top)
  
   meta http-equiv=content-type content=text/html;
   charset=UTF-8( in the head part of the document)
  
  
  
   The page is valid xhtml 1.0 transitional and I get no errors what so
   ever. I tested it in mozilla and IE and both say it is the
  ISO-8859-1
   content type.
  
  
  
   Does anybody know the solution to this problem?
  
  
  
   Thanks
  
  
  
   Ronald
  
  
  
  
  
  
 
 
  **
  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]
 

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



Responding to Your Newsletter Request

2004-05-17 Thread requests
Your request was not completed because the newsletter Me could not be found.



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



RE: R: Sharing what I've learned: locale switching

2004-05-17 Thread Kransen, J.
If I understand you right, you want data (in this case the locale) to be
stored at a scope higher than session, because it involves more webapps, but
less than application, because it is user (session) specific. Far as I
know, there is no such scope defined. Maybe you can simulate this behaviour
by adding the webapps together as modules of one encapsulating webapp, and
store the locale in the session scope for the encapsulating webapp? Just an
idea.

Jeroen

 -Oorspronkelijk bericht-
 Van: Jan Normann Nielsen [mailto:[EMAIL PROTECTED]
 Verzonden: maandag 17 mei 2004 14:31
 Aan: Struts Users Mailing List
 Onderwerp: Re: R: Sharing what I've learned: locale switching
 
 Andrea M. wrote:
 
 Hi Jan
 What do you mean with sharing user chosen locale?
 Does your user access thru a common login application?
 If it's something like that, then you might share your Locale putting it
 in
 session
 Session.setAttribute(myLocale, myLocale);
 
 Then retrieving it in the other applications with
 (Locale)request.getSession().getAttribute(myLocale);
 
 This usually works pretty well since Session is a serializable object.
 Not sure it would work in a clustered environment though
 
 
 I have no problem putting the locale in the session if it wasn't for the
 fact that each deployed web application has its own session handler, so
 the locale is not shared between web applications. It this possible?
 
 Best regards,
 Jan Nielsen
 
 -
 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 Time field validation

2004-05-17 Thread Dean A. Hoover
I'm not sure if this will help but how about escaping the forward
slashes;
^\d{2}\/\d{2}\/\d{4} \d{2}:\d{2}$
you may have to escape the backslashes as well (you have to
do this when constructing a RE in C:
^\\d{2}\\/\\d{2}\\/\\d{4} \\d{2}:\\d{2}$
don't know about javascript... just a thought.
Dean Hoover
Ivan wrote:
Hi, 

I have a form field representing a date in the format dd/MM/ HH:mm (14/05/2004 
13:03)
My problem is that validator cannot handle time in its date validations rutines.
Neither using mask validation with the regular expression ^\d{2}/\d{2}/\d{4} 
\d{2}:\d{2}$ works, because it throw a javascript error (!)
date doens t work
mask doesn t work
any viable solution?
regards,
ivan
 


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


Re: Linking DispatchActions

2004-05-17 Thread Nicholas L Mohler





Hi Guillermo,

You should be able to add ?method=method2 to your path statement (forward
name=fwdMethod3 path=/ActionB.do?method=method2/.  We use something
very similar for the input tag.  The only thing we do differently is that
we use a different parameter name.  Whereas our base action mappings use
dispatchAction as the parameter, we use validationFailure as the
parameter.  If you use a different parameter, you would just need to
replicate the ActionB mapping.

Nick




|-+
| |   Guillermo Meyer|
| |   [EMAIL PROTECTED]|
| |   ing.com.ar  |
| ||
| |   05/17/2004 09:00 |
| |   AM   |
| |   Please respond to|
| |   Struts Users|
| |   Mailing List|
| ||
|-+
  
--|
  |
  |
  |   To:   'Struts Users Mailing List' [EMAIL PROTECTED]  
 |
  |   cc:  
  |
  |   Subject:  Linking DispatchActions
  |
  
--|




Hi:
I have 2 Action classes (ActionA, ActionB) that extends DispatchAction
class. Each Action has 3 methods: method1, method2 and method3.

This is the executing scenario:
1) a post is made to ActionA.do with parameter set to method3.
2) DispatchAction execute method3 according to parameter value (a
request.getParameter())
3) ActionA.method3() returns a forward that is declared as follows:
 forward name=fwdMethod3 path=/ActionB.do/

This forward must execute ActionB.method2() when being executed from the
previous forward.

But as ActionB is also a DispatchAction, method3() will be executed
instead of the method I want (method2) because request.getParameter()
from mapping parameter is still method3 and request parameters cannot be
changed during request lifetime.

Possible solution: add a ?method=method2 to the forward path and set
redirect=true

But i wouldn't like to perform a redirect.
I could overrite DispatchAction.dispatchMethod to rectify method name
according to some request attribute, but is there any other way to do
it?

Thanks in advance.

Guillermo Meyer
System Engineer
EDS Argentina - Proyecto X71 Interbanking.
54.11.4322-1307

NOTA DE CONFIDENCIALIDAD
Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a
las personas direccionadas en el mail y puede contener informacion (i)de
propiedad exclusiva de Interbanking S.A. o (ii) amparada por el secreto
profesional. Cualquier opinion en el contenido, es exclusiva de su autor y
no representa necesariamente la opinion de Interbanking S.A. El acceso no
autorizado, uso, reproduccion, o divulgacion esta prohibido. Interbanking
S.A no asumira responsabilidad ni obligacion legal alguna por cualquier
informacion incorrecta o alterada contenida en este mensaje. Si usted ha
recibido este mensaje por error, le rogamos tenga la amabilidad de
destruirlo inmediatamente junto con todas las copias del mismo, notificando
al remitente. No debera utilizar, revelar, distribuir, imprimir o copiar
este mensaje ni ninguna de sus partes si usted no es el destinatario.
Muchas gracias.



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



Slightly off topic- Ant build script with array

2004-05-17 Thread as as
HI all,
Sightly off topic I guess but I felt I could post here coz sometimes I saw discussions 
about Apache ANT.
Wnated to know how we can pass array values in a target for ant script (.xml file)
I have an array - colorCodes declared as string in my array-red blue green yellow etc
my ANT script currently is:

project name= default=fork basedir=..

property name=version location=0.1/

path id=rt.class.path

 

target name=build

book ISBN=1234 author=james yearOfPublication=1994 
colorCodes=red,green,blue,yellow

 

/target

/project

 

is this correct or a better way to do things

thanks!



-
Do you Yahoo!?
SBC Yahoo! - Internet access at a great low price.

Re: Using DispatchActions with validation

2004-05-17 Thread Nicholas L Mohler





Hi Jacob,

I asked almost the same question when we were implementing validation.  We
had the same issue with preparing things before creating the user page.  We
ended up creating an input that forwarded to a mapping that was basically a
duplicate of the one with the validation failure.  The only differences
were (1) There was no validation in the second mapping and (2) the second
mapping used a different parameter so that we could return to the exact
page (edit/create) that created the validation failure.

You are on the same path that we used.  It isn't as elegant as it could be,
but it is less code than if we did it all by hand.

I don't know if I have the right class name, but I would think that you
could extend the RequestProcessor and have it behave a little differently
when the validation fails...
Nick




|-+
| |   Jacob Weber  |
| |   [EMAIL PROTECTED]|
| |   .com|
| |   Sent by: news|
| |   [EMAIL PROTECTED]|
| |   rg  |
| ||
| ||
| |   05/16/2004 12:31 |
| |   PM   |
| |   Please respond to|
| |   Struts Users|
| |   Mailing List|
| ||
|-+
  
--|
  |
  |
  |   To:   [EMAIL PROTECTED]  
 |
  |   cc:  
  |
  |   Subject:  Re: Using DispatchActions with validation  
  |
  
--|





Right, the flow returns to the input page, which can be another action
call. So I'm making my input point to /myAction.do?method=myMethod,
which calls a particular method of a DispatchAction.

It seems to work, but this kind of points to a larger question. Say I
have some steps that need to be taken before displaying a form. For
example, I might need to prepare the values in a drop-down menu.

If the user submits the form and the Struts validation fails, it will
re-display the form, so I'll need to run this prep method again. This
means I'll need to point the input parameter to an action (or a method
of a DispatchAction).

As a result, for every form, I'm going to need two action-mappings
defined in the struts-config file. One has validate=true, and its
input points to the other action. That one has validate=false, and
it simply prepares the form for display.

Is this right? I would expect Struts to handle this a little more
elegantly.

Jacob



In article
[EMAIL PROTECTED],
 Wang, Yuanbo [EMAIL PROTECTED] wrote:

 Correct me if I am wrong, I don't know if this is ever possible. If the
 validation method in ActionForm class returns a not null ActionErrors
 obj, the flow will direct to input page, so if you really want to
 invoke something in this case, my bet is that you have to put that logic
 inside your ActionForm.validate method?

 Any idea?

 Thanks,
 Yuanbo


 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of GMaine
 Sent: Friday, May 14, 2004 12:31 PM
 To: [EMAIL PROTECTED]
 Subject: Using DispatchActions with validation


 I have a DispatchAction with two methods. I pass a hidden field method
 in my form, to determine which method should be called. But I want to
 override this and call a specific method if the form's validation fails.

 Is it legitimate to put this in the action mapping?
 input=/myAction.do?method=myMethod

 Or could this conflict with the method hidden field?

 Jacob


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



support for non-default resource bundles in validation

2004-05-17 Thread Marcus Vinicius W. Ferreira
Hello,

The Struts supports different resource bundle in the validation.xml?

The dtd http://jakarta.apache.org/commons/dtds/validator_1_1.dtd allows
the bundle attribute to the msg and arg tags, but the validator ignore this
attribute.


Marcus

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



JSTL 1.1 EL not working :(

2004-05-17 Thread Daniel Perry
I've tried to use JSTL with my web app, and it's not working!
I downloaded jstl 1.1, and copied jstl.jar, and standard.jar to WEB-INF/lib.
I put the f.tld, fmt.tld, fn.tld in WEB-INF/.

In my web.xml i've got:
  taglib
taglib-uri/WEB-INF/c.tld/taglib-uri
taglib-location/WEB-INF/c.tld/taglib-location
  /taglib

  taglib
taglib-uri/WEB-INF/fn.tld/taglib-uri
taglib-location/WEB-INF/fn.tld/taglib-location
  /taglib

  taglib
taglib-uri/WEB-INF/fmt.tld/taglib-uri
taglib-location/WEB-INF/fmt.tld/taglib-location
  /taglib

If i try and use c:out, it doesnt work!

%@ page contentType=text/html;charset=UTF-8 language=java %
%@ taglib uri=http://java.sun.com/jsp/jstl/core;  prefix=c %
c:out value=${1+1}/

gives:
${1+1}

Any idea what's going on?
It looks like the taglib is working fine, but not using el!

Any ideas?

Daniel.


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



Re: JSTL 1.1 EL not working :(

2004-05-17 Thread Kris Schneider
Remove the TLD files from WEB-INF, remove the taglib elements from web.xml,
make sure you're using a JSP 2.0 container (like Tomcat 5), and make sure
you're using a Servlet 2.4 web.xml.

Quoting Daniel Perry [EMAIL PROTECTED]:

 I've tried to use JSTL with my web app, and it's not working!
 I downloaded jstl 1.1, and copied jstl.jar, and standard.jar to WEB-INF/lib.
 I put the f.tld, fmt.tld, fn.tld in WEB-INF/.
 
 In my web.xml i've got:
   taglib
 taglib-uri/WEB-INF/c.tld/taglib-uri
 taglib-location/WEB-INF/c.tld/taglib-location
   /taglib
 
   taglib
 taglib-uri/WEB-INF/fn.tld/taglib-uri
 taglib-location/WEB-INF/fn.tld/taglib-location
   /taglib
 
   taglib
 taglib-uri/WEB-INF/fmt.tld/taglib-uri
 taglib-location/WEB-INF/fmt.tld/taglib-location
   /taglib
 
 If i try and use c:out, it doesnt work!
 
 %@ page contentType=text/html;charset=UTF-8 language=java %
 %@ taglib uri=http://java.sun.com/jsp/jstl/core;  prefix=c %
 c:out value=${1+1}/
 
 gives:
 ${1+1}
 
 Any idea what's going on?
 It looks like the taglib is working fine, but not using el!
 
 Any ideas?
 
 Daniel.

-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

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



Error while creating form bean

2004-05-17 Thread Sameer Gijare
Hi ,
   I am getting following error when constructing a action form.Can anyone 
point out the mistake.Thanks in advance...

May 17, 2004 6:49:29 PM org.apache.struts.util.RequestUtils createActionForm
SEVERE: Error creating form bean of class org.apache.struts.action.ActionForm
java.lang.InstantiationException
at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance
(InstantiationExceptionConstructorAccessorImpl.java:30)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.
java:231)
at org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.jav
a:837)
at org.apache.struts.action.RequestProcessor.processActionForm(RequestPr
ocessor.java:364)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
va:253)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:148
2)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
2422)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
rValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:163)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:19
9)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:828)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:700)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:584)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:683)
at java.lang.Thread.run(Thread.java:534)
in AddATO execute:
Setting target to error


-Sameer Gijare



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



Re: Server side validation

2004-05-17 Thread Nicholas L Mohler





Samuel,

If you look in the struts-config.xml file, within the Controller/ tags,
there is a statement  - inputForward=true - that indicates the type of
value that will be specified in you input tags.  If true is specified,
then your input tags must refer to a forward name.  If false is specified
or if the statement is omitted, then the input value can refer to a page or
an action mapping.  In the example, true is specified and there is also a
global logon mapping.  When you specify a jsp page, there is no such
mapping, so you get the blank page.  Hopefully this helps you understand
why adding the global forward helped resolved the problem.

Our inputForward is set to false, so all of our input values refer to
ActionMappings (action/), but we could refer to global forwards.


Sorry I wasn't able to post to your thread last week.  I didn't have the
time.
Nick




|-+--
| |   Samuel Rochas  |
| |   [EMAIL PROTECTED]|
| |   nasoft.com|
| |  |
| |   05/14/2004 06:40 PM|
| |   Please respond to  |
| |   Struts Users  |
| |   Mailing List  |
| |  |
|-+--
  
--|
  |
  |
  |   To:   Struts Users Mailing List [EMAIL PROTECTED]  
 |
  |   cc:  
  |
  |   Subject:  Re: Server side validation 
  |
  
--|




Hello Geeta,

I've solved the problem, still don't really understand the reason.

I've defined a global forward for the input of my reluctant form, and
now, in case of validation error, I am forwarded to the desired page,
not to the blank one.

Thanks for you help.
Samuel

-
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: JSTL 1.1 EL not working :(

2004-05-17 Thread Daniel Perry
Well, that worked...
So why does having the taglib files cause it to screw up?

Daniel.

-Original Message-
From: Kris Schneider [mailto:[EMAIL PROTECTED]
Sent: 17 May 2004 14:55
To: Struts Users Mailing List
Subject: Re: JSTL 1.1 EL not working :(


Remove the TLD files from WEB-INF, remove the taglib elements from
web.xml,
make sure you're using a JSP 2.0 container (like Tomcat 5), and make sure
you're using a Servlet 2.4 web.xml.

Quoting Daniel Perry [EMAIL PROTECTED]:

 I've tried to use JSTL with my web app, and it's not working!
 I downloaded jstl 1.1, and copied jstl.jar, and standard.jar to
WEB-INF/lib.
 I put the f.tld, fmt.tld, fn.tld in WEB-INF/.

 In my web.xml i've got:
   taglib
 taglib-uri/WEB-INF/c.tld/taglib-uri
 taglib-location/WEB-INF/c.tld/taglib-location
   /taglib

   taglib
 taglib-uri/WEB-INF/fn.tld/taglib-uri
 taglib-location/WEB-INF/fn.tld/taglib-location
   /taglib

   taglib
 taglib-uri/WEB-INF/fmt.tld/taglib-uri
 taglib-location/WEB-INF/fmt.tld/taglib-location
   /taglib

 If i try and use c:out, it doesnt work!

 %@ page contentType=text/html;charset=UTF-8 language=java %
 %@ taglib uri=http://java.sun.com/jsp/jstl/core;  prefix=c %
 c:out value=${1+1}/

 gives:
 ${1+1}

 Any idea what's going on?
 It looks like the taglib is working fine, but not using el!

 Any ideas?

 Daniel.

--
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

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



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



Re: Date Time field validation

2004-05-17 Thread Ivan
Ok thanks, we can see there is a problem with date and mask validation
-There is no date(time) validators
-Java regular expressions are not escaped for javascript logic.



- Original Message - 
From: Dean A. Hoover [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, May 17, 2004 2:52 PM
Subject: Re: Date Time field validation


 I'm not sure if this will help but how about escaping the forward
 slashes;

 ^\d{2}\/\d{2}\/\d{4} \d{2}:\d{2}$

 you may have to escape the backslashes as well (you have to
 do this when constructing a RE in C:

 ^\\d{2}\\/\\d{2}\\/\\d{4} \\d{2}:\\d{2}$

 don't know about javascript... just a thought.

 Dean Hoover


 Ivan wrote:

 Hi,
 
 I have a form field representing a date in the format dd/MM/ HH:mm
(14/05/2004 13:03)
 My problem is that validator cannot handle time in its date validations
rutines.
 
 Neither using mask validation with the regular expression
^\d{2}/\d{2}/\d{4} \d{2}:\d{2}$ works, because it throw a javascript error
(!)
 
 date doens t work
 mask doesn t work
 
 any viable solution?
 
 
 regards,
 ivan
 
 



 -
 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: getting non-struts form elements

2004-05-17 Thread Matt Bathje
There are 2 problems with this -

First (and biggest) it doesn't seem to work for me. I setup a test page, and
am attempting to print out the form element names using
request.getParameterNames(). This is the code I have:

System.out.println(before);
for(Enumeration e = request.getParameterNames(); e.hasMoreElements(); ) {
String curr = (String) e.nextElement();
System.out.println(curr:  + curr);
}
System.out.println(after);

And the only output I get is:

before
after

None of the fields in my form are being displayed. Any idea what I'm doing
wrong? Perhaps does the form have to GET instead of POST? (In which case
that won't work, because it would involve changing the form...

The second problem is - even if I could get this to work, how do I read in
FILE parameters - that was one of the specifications of my original
problem - I had to be able to read both string and file form field types.

Thanks,
Matt


- Original Message - 
From: Avinash Gangadharan [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Friday, May 14, 2004 5:08 PM
Subject: RE: getting non-struts form elements


 Matt,
 In your action class, you have the request and the response object which
 will get you all your form elements

 public ActionForward execute(ActionMapping mapping, ActionForm form,
 HttpServletRequest request, HttpServletResponse response)
 throws java.lang.Exception {
 String xxx = ( String ) request.getParameter(xxx);
 // now do anything with xxx
 }

 As far as configuring your action in the struts-config, you can associate
an
 empty form to your action :
 form-beans
 form-bean
 name=emptyForm
 type=org.apache.struts.action.DynaActionForm/
 /form-beans

 and then add 'name=emptyForm' in your action mapping:

  action path=/yourAction
 type=your.action.type
 name=emptyForm
 scope=request
 
   forward
 name=...
 path=.../
   /action


 I hope this is what you are looking for.

 Avinash




 -Original Message-
 From: Matt Bathje [mailto:[EMAIL PROTECTED]
 Sent: Friday, May 14, 2004 2:45 PM
 To: Struts Users Mailing List
 Subject: getting non-struts form elements


 Hi all.

 I have a form that is not a struts form bean (no actionform, no dynaform,
 nothing...)

 Is it possible to have this submit to a struts action, and read the form
 elements somehow? I need to be able to read simple (String) elements as
well
 as multi-part (formfile) elements from the form.

 Any way to do it in struts, or do I just need to give up and make
something
 non-struts to do it?



 Thanks,
 Matt Bathje


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



struts is giving error on weblogic81

2004-05-17 Thread Jignesh Patel
We are trying to deploy struts1.1 based application on weblogic8.1 which is 
already working fine on tomcat5.19.
But it is giving problem because of following datasource code, if we remove it 
then we are not able to get the oracle database connection and if keep it, 
the code is not deploying ActionServlet.

Does any body is having same kind of problem?

Data source code in struts-config.xml

data-sources
   data-source type=org.apache.commons.dbcp.BasicDataSource
   set-property property =driverClassName   
value=oracle.jdbc.driver.OracleDriver/   
  set-property property=url 
value=jdbc:oracle:thin:@192.168.0.2:1521:db1/
!--   set-property property=url 
value=jdbc:oracle:thin:@192.168.1.20:1521:orcl/--

 set-property property=username value=jpatel /
 set-property property=password value=jpatel / 
 /data-source
  /data-sources  



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



RE: struts is giving error on weblogic81

2004-05-17 Thread Brian Lee
What exception do you see in the myserver.log or in the console out?
Do you have the dbcp and oracle classes jar in your weblogic classpath?
BAL
From: Jignesh Patel [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: struts is giving error on weblogic81
Date: Mon, 17 May 2004 20:18:33 +0530
We are trying to deploy struts1.1 based application on weblogic8.1 which is
already working fine on tomcat5.19.
But it is giving problem because of following datasource code, if we remove 
it
then we are not able to get the oracle database connection and if keep it,
the code is not deploying ActionServlet.

Does any body is having same kind of problem?
Data source code in struts-config.xml
data-sources
   data-source type=org.apache.commons.dbcp.BasicDataSource
   set-property property =driverClassName
value=oracle.jdbc.driver.OracleDriver/
  set-property property=url
value=jdbc:oracle:thin:@192.168.0.2:1521:db1/
!--   set-property property=url
value=jdbc:oracle:thin:@192.168.1.20:1521:orcl/--
 set-property property=username value=jpatel /
 set-property property=password value=jpatel /
 /data-source
  /data-sources

-
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: JSTL 1.1 EL not working :(

2004-05-17 Thread Daniel Perry
Am using tomcat 5.

If i declare the uri in web.xml and include the .tld files, then the taglibs
work, but el doesnt seem to work.

Anyway, got rid of them and it's working fine now.

Daniel.

-Original Message-
From: Andrea M. [mailto:[EMAIL PROTECTED]
Sent: 17 May 2004 15:17
To: 'Struts Users Mailing List'
Subject: R: JSTL 1.1 EL not working :(


Hi Daniel
Please tell us which container you are using
JSTL 1.1 require JSP 2.0 + servlet 2.4

AFAIK the only ones that actually implement those specs are:
Tomcat 5
SunOne 8
Jboss 4

If you are using other containers (e.g. Tomcat 4x) you need to use JSTL 1.0,
that only require JSP 1.2 + servlet 2.3

PS: anyways ensure that the URI you use in web.xml is the same you declare
in your page

Andrea

-Messaggio originale-
Da: Daniel Perry [mailto:[EMAIL PROTECTED]
Inviato: lunedì 17 maggio 2004 15.50
A: Struts User List
Oggetto: JSTL 1.1 EL not working :(

I've tried to use JSTL with my web app, and it's not working!
I downloaded jstl 1.1, and copied jstl.jar, and standard.jar to WEB-INF/lib.
I put the f.tld, fmt.tld, fn.tld in WEB-INF/.

In my web.xml i've got:
  taglib
taglib-uri/WEB-INF/c.tld/taglib-uri
taglib-location/WEB-INF/c.tld/taglib-location
  /taglib

  taglib
taglib-uri/WEB-INF/fn.tld/taglib-uri
taglib-location/WEB-INF/fn.tld/taglib-location
  /taglib

  taglib
taglib-uri/WEB-INF/fmt.tld/taglib-uri
taglib-location/WEB-INF/fmt.tld/taglib-location
  /taglib

If i try and use c:out, it doesnt work!

%@ page contentType=text/html;charset=UTF-8 language=java %
%@ taglib uri=http://java.sun.com/jsp/jstl/core;  prefix=c %
c:out value=${1+1}/

gives:
${1+1}

Any idea what's going on?
It looks like the taglib is working fine, but not using el!

Any ideas?

Daniel.


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


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



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



Re: html:options

2004-05-17 Thread Domingo A. Rodriguez S.

Use html:options collection=dummyList labelName=key
labelProperty=value 

Implement this javabean..

public class Row implements java.io.Serializable{ 
  Row(String key, String value){this.key=key;this.value=value;};
  private String key=;
  private String value=;
  public String getKey(){return key;};
  public String getValue(){return value;};
  public void setKey(String key){this.key= key;};
  public void setValue(String value){this.value= value;};
}

 private ArrayList dummyList() {
   ArrayList data = new ArrayList();
   for(int jk=0; jk5; jk++){
   data.add( new Row(jk+, TEXT+jk) );
   }
   return data;
 }


 --- [EMAIL PROTECTED] escribió:   
 What I have:
 
 My DB class returns me following arraylist that I store in request, Pls
 see the code below for the Structure
 
 private ArrayList dummyList() {
   ArrayList row = new ArrayList();
   ArrayList data = new ArrayList();
 
   for(int jk=0; jk5;jk++){
   row = new ArrayList();
   row.add(new Integer(jk)); 
   row.add(TEXT+jk);
   data.add(row);
   }
   return data;
 }
 Here I have an arrayList which itself has an arraylist with two elements
 
 My Problem:
 How can I iterate it to show the it in html:options ??? What name I
 will provide to iterate it to 
 Give Integer element as value field and String field as shown value
 
 Pls provide some example
 
 
 Thanks for your time..
 
 raman
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
  

_
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com

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



Error from javax.servlet.ServletException: No getter method for property...

2004-05-17 Thread Daynell Trent
I'm running struts 1.1 with weblogic 7.04.  I'm keep getting No getter method for 
property aEndNpaNumber but I've checked my ActionForm and it does has the getter and 
setter methods.  Does anyone know what I'm doing wrong.

This is my custom form:

package com.struts.RequestCriteriaForm;

public class RequestCriteriaForm extends ActionForm {

private String aEndNpaNumber;

public String getAEndNpaNumber() {

return aEndNpaNumber;

}

public void setAEndNpaNumber(String endNpaNumber) {

aEndNpaNumber = endNpaNumber;

}

}

Here is my jsp:

%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %

html

body

html:form action=/myAction.do method=post 
type=com..aca.struts.RequestCriteriaForm

A End NPA No.: html:text property=aEndNpaNumber/

html:submit/

/html:form

/body

/html


Re: Error from javax.servlet.ServletException: No getter method for property...

2004-05-17 Thread Daynell Trent
sorry...mis type, here is the correct snippet of the code:

- Original Message - 
From: Daynell Trent [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, May 17, 2004 10:28 AM
Subject: Error from javax.servlet.ServletException: No getter method for
property...


I'm running struts 1.1 with weblogic 7.04.  I'm keep getting No getter
method for property aEndNpaNumber but I've checked my ActionForm and it
does has the getter and setter methods.  Does anyone know what I'm doing
wrong.

This is my custom form:

package com.struts.RequestCriteriaForm;

public class RequestCriteriaForm extends ActionForm {

private String aEndNpaNumber;

public String getAEndNpaNumber() {

return aEndNpaNumber;

}

public void setAEndNpaNumber(String endNpaNumber) {

aEndNpaNumber = endNpaNumber;

}

}

Here is my jsp:

%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %

html

body

html:form action=/myAction.do method=post
type=com.struts.RequestCriteriaForm

A End NPA No.: html:text property=aEndNpaNumber/

html:submit/

/html:form

/body

/html


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



Re: Error from javax.servlet.ServletException: No getter method for property...

2004-05-17 Thread dennis . graham
Have you tried public String getaEndNpaNumber()





Daynell Trent [EMAIL PROTECTED]
05/17/2004 11:37 AM
Please respond to Struts Users Mailing List
 
To: Struts Users Mailing List [EMAIL PROTECTED]
cc: 
Subject:Re: Error from javax.servlet.ServletException: No 
getter method forproperty...


sorry...mis type, here is the correct snippet of the code:

- Original Message - 
From: Daynell Trent [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, May 17, 2004 10:28 AM
Subject: Error from javax.servlet.ServletException: No getter method for
property...


I'm running struts 1.1 with weblogic 7.04.  I'm keep getting No getter
method for property aEndNpaNumber but I've checked my ActionForm and it
does has the getter and setter methods.  Does anyone know what I'm doing
wrong.

This is my custom form:

package com.struts.RequestCriteriaForm;

public class RequestCriteriaForm extends ActionForm {

private String aEndNpaNumber;

public String getAEndNpaNumber() {

return aEndNpaNumber;

}

public void setAEndNpaNumber(String endNpaNumber) {

aEndNpaNumber = endNpaNumber;

}

}

Here is my jsp:

%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %

html

body

html:form action=/myAction.do method=post
type=com.struts.RequestCriteriaForm

A End NPA No.: html:text property=aEndNpaNumber/

html:submit/

/html:form

/body

/html


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




Re: struts is giving error on weblogic81

2004-05-17 Thread Joe Germuska
Could this be related to Bug #26322, which indicates that Weblogic 
8.1 expects just about everything to be serializeable?
http://issues.apache.org/bugzilla/show_bug.cgi?id=26322

It doesn't appear that BasicDataSource implements Serializeable:
http://cvs.apache.org/viewcvs/jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/BasicDataSource.java
Speaking of which, we need testers who use WL8.1 to test the patches 
in Bug #26322 -- right now, that would require applying the patches 
yourself, but after we cut Struts 1.2.1, I think the plan is to apply 
those patches so that they start getting tested.

Joe

At 8:18 PM +0530 5/17/04, Jignesh Patel wrote:
We are trying to deploy struts1.1 based application on weblogic8.1 which is
already working fine on tomcat5.19.
But it is giving problem because of following datasource code, if we remove it
then we are not able to get the oracle database connection and if keep it,
the code is not deploying ActionServlet.
Does any body is having same kind of problem?
Data source code in struts-config.xml
data-sources
   data-source type=org.apache.commons.dbcp.BasicDataSource
   set-property property =driverClassName  
value=oracle.jdbc.driver.OracleDriver/  
  set-property property=url
value=jdbc:oracle:thin:@192.168.0.2:1521:db1/
!--   set-property property=url
value=jdbc:oracle:thin:@192.168.1.20:1521:orcl/--
   
 set-property property=username value=jpatel /
 set-property property=password value=jpatel /
 /data-source
  /data-sources 


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

--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
  Imagine if every Thursday your shoes exploded if you tied them 
the usual way.  This happens to us all the time with computers, and 
nobody thinks of complaining.
-- Jef Raskin

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


App-level globals

2004-05-17 Thread None None
Hello again everyone... I am starting conversion of a none-Struts app to 
Struts, and mostly it's straight-forward, but two things I have questions 
about...

The home-grown framework this app was written with has the notion of an App 
Loader.  Basically, this is a class that runs at startup and reads in some 
config information and stores it in a static config object.  The properties 
of this object are referenced throughout the app.

The other concern is that this same process spawns a couple of low-priority 
background threads to do some various things throughout the lifetime of the 
app.

My question, which I have been unable to find an answer to on my own, is if 
Struts has a similar startup initialization mechanism?  If not, do I 
simply create my own servlet to do all this work and set it to run on 
startup in web.xml?  I have no problem with the later approach, but I'm 
wondering if Struts has a mechanism for this, like our custom framework 
does?

Thanks all!
_
Express yourself with the new version of MSN Messenger! Download today - 
it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

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


Re: Error from javax.servlet.ServletException: No getter method for property...

2004-05-17 Thread Daynell Trent
 Thanks Naveen for quick response.
It works after changing the property and its setter and getter methods from
aEndNpaNumber - aendNpaNumber
getAEndNpaNumber - getAendNpaNumber
setAEndNpaNumber - setAendNpaNumber

but I still don't know why?



 - Original Message - 
 From: Joshi, Naveen [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, May 17, 2004 10:36 AM
 Subject: RE: Error from javax.servlet.ServletException: No getter method
for
 property...


 TRY changing the method name!!! this has worked for me... If it works then
 we can dig further on where the problem is? I had gone through this
before.
 Naveen

 -Original Message-
 From: Daynell Trent [mailto:[EMAIL PROTECTED]
 Sent: Monday, May 17, 2004 11:28 AM
 To: Struts Users Mailing List
 Subject: Error from javax.servlet.ServletException: No getter method for
 property...


 I'm running struts 1.1 with weblogic 7.04.  I'm keep getting No getter
 method for property aEndNpaNumber but I've checked my ActionForm and it
 does has the getter and setter methods.  Does anyone know what I'm doing
 wrong.

 This is my custom form:

 package com.struts.RequestCriteriaForm;

 public class RequestCriteriaForm extends ActionForm {

 private String aEndNpaNumber;

 public String getAEndNpaNumber() {

 return aEndNpaNumber;

 }

 public void setAEndNpaNumber(String endNpaNumber) {

 aEndNpaNumber = endNpaNumber;

 }

 }

 Here is my jsp:

 %@ taglib uri=/WEB-INF/struts-html.tld prefix=html %

 html

 body

 html:form action=/myAction.do method=post
 type=com..aca.struts.RequestCriteriaForm

 A End NPA No.: html:text property=aEndNpaNumber/

 html:submit/

 /html:form

 /body

 /html



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



RE: App-level globals

2004-05-17 Thread Paul McCulloch
Struts has plugins which, I think do the kind of thing you are after.
Personally I've never used them  - I just implement a ServletContextListener
to do that sort of thing.

Paul

 -Original Message-
 From: None None [mailto:[EMAIL PROTECTED]
 Sent: Monday, May 17, 2004 5:17 PM
 To: [EMAIL PROTECTED]
 Subject: App-level globals
 
 
 Hello again everyone... I am starting conversion of a 
 none-Struts app to 
 Struts, and mostly it's straight-forward, but two things I 
 have questions 
 about...
 
 The home-grown framework this app was written with has the 
 notion of an App 
 Loader.  Basically, this is a class that runs at startup and 
 reads in some 
 config information and stores it in a static config object.  
 The properties 
 of this object are referenced throughout the app.
 
 The other concern is that this same process spawns a couple 
 of low-priority 
 background threads to do some various things throughout the 
 lifetime of the 
 app.
 
 My question, which I have been unable to find an answer to on 
 my own, is if 
 Struts has a similar startup initialization mechanism?  If 
 not, do I 
 simply create my own servlet to do all this work and set it to run on 
 startup in web.xml?  I have no problem with the later 
 approach, but I'm 
 wondering if Struts has a mechanism for this, like our custom 
 framework 
 does?
 
 Thanks all!
 
 _
 Express yourself with the new version of MSN Messenger! 
 Download today - 
 it's FREE! 
 http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
 
 
 -
 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]



Tiles - retrofit existing struts based wars

2004-05-17 Thread Kravchenko, Vyacheslav
We have multiple wars deployed on WebSpehere server. All of our applications are using 
on Struts 1.1. 
I was hoping to find a way and retrofit tiles framework in our existing environment. 
Can we develop a separate tiles application that can integrate with existing apps in 
following ways:
Use tiles framework to display jsp files from other wars?
Use ActionMappings in my existing wars to point to templates defined in tiles 
application.

Thanks in advance, 
Steve


RE: App-level globals

2004-05-17 Thread Joe Germuska
At 5:33 PM +0100 5/17/04, Paul McCulloch wrote:
Struts has plugins which, I think do the kind of thing you are after.
Personally I've never used them  - I just implement a ServletContextListener
to do that sort of thing.
This is exactly right:  if you're using Servlet 2.2 (which doesn't 
have ServletContextListener), you can use PlugIn.  If you're using 
Servlet 2.3 or newer, about the only other thing that PlugIn gets you 
which an SCL doesn't is that its init() method receives a reference 
to the Struts ModuleConfig for which the plugin is being initialized 
-- so if you need a handle on that object, using a PlugIn is probably 
the most straightforward way to get one.

Joe

Paul
 -Original Message-
 From: None None [mailto:[EMAIL PROTECTED]
 Sent: Monday, May 17, 2004 5:17 PM
 To: [EMAIL PROTECTED]
 Subject: App-level globals
 Hello again everyone... I am starting conversion of a
 none-Struts app to
 Struts, and mostly it's straight-forward, but two things I
 have questions
 about...
 The home-grown framework this app was written with has the
 notion of an App
 Loader.  Basically, this is a class that runs at startup and
 reads in some
 config information and stores it in a static config object. 
 The properties
 of this object are referenced throughout the app.

 The other concern is that this same process spawns a couple
 of low-priority
 background threads to do some various things throughout the
 lifetime of the
 app.
 My question, which I have been unable to find an answer to on
 my own, is if
 Struts has a similar startup initialization mechanism?  If
 not, do I
 simply create my own servlet to do all this work and set it to run on
 startup in web.xml?  I have no problem with the later
 approach, but I'm
 wondering if Struts has a mechanism for this, like our custom
 framework
 does?
 Thanks all!
 _
 Express yourself with the new version of MSN Messenger!
 Download today -
 it's FREE!
 http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
 -
 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]

--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
  Imagine if every Thursday your shoes exploded if you tied them 
the usual way.  This happens to us all the time with computers, and 
nobody thinks of complaining.
-- Jef Raskin

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


Re: Tiles - retrofit existing struts based wars

2004-05-17 Thread Joe Germuska
At 11:36 AM -0500 5/17/04, Kravchenko, Vyacheslav wrote:
We have multiple wars deployed on WebSpehere server. All of our 
applications are using on Struts 1.1.
I was hoping to find a way and retrofit tiles framework in our 
existing environment.
Can we develop a separate tiles application that can integrate with 
existing apps in following ways:
	Use tiles framework to display jsp files from other wars?
	Use ActionMappings in my existing wars to point to templates 
defined in tiles application.
I haven't heard of anything which lets Tiles choreograph between 
multiple webapps.  That's not to say that its impossible, but just 
that you might have to write it yourself.

If you're using Servlet 2.3 or newer, you may want to have a look at 
Sitemesh.  I haven't used it, but my understanding is that it uses 
Servlet Filters to decorate pages so that you can apply a consistent 
look.
http://www.opensymphony.com/sitemesh/  I'm not 100% certain that it 
can deal with content from across multiple applications, but i think 
it can because I think I've even read about it being used to decorate 
static content.

Joe
--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
  Imagine if every Thursday your shoes exploded if you tied them 
the usual way.  This happens to us all the time with computers, and 
nobody thinks of complaining.
-- Jef Raskin

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


Indexed property throws exception - HELP!

2004-05-17 Thread Phan, Hienthuc T (Rosetta)
Hi,

I encountered an index out of bound exception when using the indexed
property.  The problem I'm facing is that I can't debug this.  The exception
is not thrown either in the the form or the action.  Do you know what cause
this?


May 17, 2004 9:50:02 AM PDT Error HTTP 101017
[ServletContext(id=4601745,name=scheduler,context-path=/scheduler)] Root
cause of ServletException
java.lang.IndexOutOfBoundsException: Index: 1, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:486)
at java.util.ArrayList.get(ArrayList.java:302)
at
org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.
java:521)
at
org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.
java:428)
at
org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.j
ava:770)
at
org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:80
1)
at
org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:881)
at
org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
at
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1096)
at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j
ava:816)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
tStubImpl.java:1058)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:401)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:306)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
ebAppServletContext.java:5445)
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:780)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:3105)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2588)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)



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

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



Re: Using DispatchActions with validation

2004-05-17 Thread Ron Grabowski
 From: Nicholas L Mohler
 [EMAIL PROTECTED]
 Date: Mon, 17 May 2004 09:27:11 -0400
 
 Hi Jacob,
 
 I asked almost the same question when we were
 implementing validation.  We
 had the same issue with preparing things before
 creating the user page.  We
 ended up creating an input that forwarded to a
 mapping that was basically a
 duplicate of the one with the validation failure. 
 The only differences
 were (1) There was no validation in the second
 mapping and (2) the second
 mapping used a different parameter so that we could
 return to the exact
 page (edit/create) that created the validation
 failure.
 
 You are on the same path that we used.  It isn't as
 elegant as it could be,
 but it is less code than if we did it all by hand.
 
 I don't know if I have the right class name, but I
 would think that you
 could extend the RequestProcessor and have it behave
 a little differently
 when the validation fails...
 Nick

Are you duplicating pages and/or entries in the
structs-config.xml?

I implemented this for my project:

 http://tinyurl.com/33cbw

Example:

action
path=/FooCRUDOperation
type=com.myco.editors.FooAction
name=FooForm
scope=request
input=/FooCRUDInput.do
parameter=dispatchAction
forward name=edit path=.editor.foo.Update/
forward name=edit   path=.editor.fooCreate/
forward name=view   path=.editor.fooView/
forward name=top   path=.editor.fooTop/
/action

The pages are pre-populated correctly and errors are
shown on the appropriate page (i.e. when you're on the
Edit page and an error occurs, the user is taken back
to the Edit page with their previously entered data
along with the error messages on top).

I extended LookUpDispatchAction to DoTheRightThing
when dispatchAction was missing from the request:

LIST MODE: /FooCRUDOperation
EDIT MODE: /FooCRUDOperation?id=4

Is there a better way to do things?

- Ron




__
Do you Yahoo!?
SBC Yahoo! - Internet access at a great low price.
http://promo.yahoo.com/sbc/

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



RE: struts is giving error on weblogic81

2004-05-17 Thread Mick . Knutson
We might be interested in this. We are creating a new app on WLS 8.1
currently.
Are there a list of specific items that are being fixed associated with
WLS8.1?


-Original Message-
From: Joe Germuska [mailto:[EMAIL PROTECTED]
Sent: Monday, May 17, 2004 8:30 AM
To: Struts Users Mailing List
Subject: Re: struts is giving error on weblogic81


Could this be related to Bug #26322, which indicates that Weblogic 
8.1 expects just about everything to be serializeable?
http://issues.apache.org/bugzilla/show_bug.cgi?id=26322

It doesn't appear that BasicDataSource implements Serializeable:
http://cvs.apache.org/viewcvs/jakarta-commons/dbcp/src/java/org/apache/commo
ns/dbcp/BasicDataSource.java

Speaking of which, we need testers who use WL8.1 to test the patches 
in Bug #26322 -- right now, that would require applying the patches 
yourself, but after we cut Struts 1.2.1, I think the plan is to apply 
those patches so that they start getting tested.

Joe



At 8:18 PM +0530 5/17/04, Jignesh Patel wrote:
We are trying to deploy struts1.1 based application on weblogic8.1 which is
already working fine on tomcat5.19.
But it is giving problem because of following datasource code, if we remove
it
then we are not able to get the oracle database connection and if keep it,
the code is not deploying ActionServlet.

Does any body is having same kind of problem?

Data source code in struts-config.xml

data-sources
data-source type=org.apache.commons.dbcp.BasicDataSource
set-property property =driverClassName  
value=oracle.jdbc.driver.OracleDriver/  
   set-property property=url
value=jdbc:oracle:thin:@192.168.0.2:1521:db1/
!--   set-property property=url
value=jdbc:oracle:thin:@192.168.1.20:1521:orcl/--

  set-property property=username value=jpatel /
  set-property property=password value=jpatel /
  /data-source
   /data-sources 



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


-- 
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
   Imagine if every Thursday your shoes exploded if you tied them 
the usual way.  This happens to us all the time with computers, and 
nobody thinks of complaining.
 -- Jef Raskin

-
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: JSTL 1.1 EL not working :(

2004-05-17 Thread Johannes Wolfgang Woger

Daniel Perry wrote:
Am using tomcat 5.
If i declare the uri in web.xml and include the .tld files, then the taglibs
work, but el doesnt seem to work.
I have never got problems with Tomcat5 and tlds declared in web.xml.
Wolfgang
Anyway, got rid of them and it's working fine now.
Daniel.
-Original Message-
From: Andrea M. [mailto:[EMAIL PROTECTED]
Sent: 17 May 2004 15:17
To: 'Struts Users Mailing List'
Subject: R: JSTL 1.1 EL not working :(
Hi Daniel
Please tell us which container you are using
JSTL 1.1 require JSP 2.0 + servlet 2.4
AFAIK the only ones that actually implement those specs are:
Tomcat 5
SunOne 8
Jboss 4
If you are using other containers (e.g. Tomcat 4x) you need to use JSTL 1.0,
that only require JSP 1.2 + servlet 2.3
PS: anyways ensure that the URI you use in web.xml is the same you declare
in your page
Andrea
-Messaggio originale-
Da: Daniel Perry [mailto:[EMAIL PROTECTED]
Inviato: lunedì 17 maggio 2004 15.50
A: Struts User List
Oggetto: JSTL 1.1 EL not working :(
I've tried to use JSTL with my web app, and it's not working!
I downloaded jstl 1.1, and copied jstl.jar, and standard.jar to WEB-INF/lib.
I put the f.tld, fmt.tld, fn.tld in WEB-INF/.
In my web.xml i've got:
 taglib
   taglib-uri/WEB-INF/c.tld/taglib-uri
   taglib-location/WEB-INF/c.tld/taglib-location
 /taglib
 taglib
   taglib-uri/WEB-INF/fn.tld/taglib-uri
   taglib-location/WEB-INF/fn.tld/taglib-location
 /taglib
 taglib
   taglib-uri/WEB-INF/fmt.tld/taglib-uri
   taglib-location/WEB-INF/fmt.tld/taglib-location
 /taglib
If i try and use c:out, it doesnt work!
%@ page contentType=text/html;charset=UTF-8 language=java %
%@ taglib uri=http://java.sun.com/jsp/jstl/core;  prefix=c %
c:out value=${1+1}/
gives:
${1+1}
Any idea what's going on?
It looks like the taglib is working fine, but not using el!
Any ideas?
Daniel.
-
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]


R: R: Sharing what I've learned: locale switching

2004-05-17 Thread Andrea M
Hi again
I'm afraid I was kind of inaccurate in my previous answer
you can retrieve session from the request, but that's only with forwards of
course, and forwards work only in the same application.

What you can do  is to share your objects putting them in JNDI. JNDI tree is
shared between all of your contexts, and it's replicated, so it's
cluster-safe.

Of course you should make sure to have set your object before accessing it
from another app, but that's obvious.

Hope that helps



-Messaggio originale-
Da: Jan Normann Nielsen [mailto:[EMAIL PROTECTED] 
Inviato: lunedì 17 maggio 2004 14.31
A: Struts Users Mailing List
Oggetto: Re: R: Sharing what I've learned: locale switching

Andrea M. wrote:

Hi Jan
What do you mean with sharing user chosen locale?
Does your user access thru a common login application?
If it's something like that, then you might share your Locale putting it in
session
Session.setAttribute(myLocale, myLocale);

Then retrieving it in the other applications with
(Locale)request.getSession().getAttribute(myLocale);

This usually works pretty well since Session is a serializable object.
Not sure it would work in a clustered environment though
  

I have no problem putting the locale in the session if it wasn't for the 
fact that each deployed web application has its own session handler, so 
the locale is not shared between web applications. It this possible?

Best regards,
Jan Nielsen

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



R: App-level globals

2004-05-17 Thread Andrea M
Yeah
Probably Struts' plugins are the most straightforward thing for you.
Plugins are components that Struts loads once at startup, and they are often
used (I use them in that way too) to load shared resources (like
datasources) in servletcontext before every other component is load.



-Messaggio originale-
Da: Joe Germuska [mailto:[EMAIL PROTECTED] 
Inviato: lunedì 17 maggio 2004 18.47
A: Struts Users Mailing List
Oggetto: RE: App-level globals

At 5:33 PM +0100 5/17/04, Paul McCulloch wrote:
Struts has plugins which, I think do the kind of thing you are after.
Personally I've never used them  - I just implement a
ServletContextListener
to do that sort of thing.

This is exactly right:  if you're using Servlet 2.2 (which doesn't 
have ServletContextListener), you can use PlugIn.  If you're using 
Servlet 2.3 or newer, about the only other thing that PlugIn gets you 
which an SCL doesn't is that its init() method receives a reference 
to the Struts ModuleConfig for which the plugin is being initialized 
-- so if you need a handle on that object, using a PlugIn is probably 
the most straightforward way to get one.

Joe


Paul

  -Original Message-
  From: None None [mailto:[EMAIL PROTECTED]
  Sent: Monday, May 17, 2004 5:17 PM
  To: [EMAIL PROTECTED]
  Subject: App-level globals


  Hello again everyone... I am starting conversion of a
  none-Struts app to
  Struts, and mostly it's straight-forward, but two things I
  have questions
  about...

  The home-grown framework this app was written with has the
  notion of an App
  Loader.  Basically, this is a class that runs at startup and
  reads in some
  config information and stores it in a static config object. 
  The properties
  of this object are referenced throughout the app.

  The other concern is that this same process spawns a couple
  of low-priority
  background threads to do some various things throughout the
  lifetime of the
  app.

  My question, which I have been unable to find an answer to on
  my own, is if
  Struts has a similar startup initialization mechanism?  If
  not, do I
  simply create my own servlet to do all this work and set it to run on
  startup in web.xml?  I have no problem with the later
  approach, but I'm
  wondering if Struts has a mechanism for this, like our custom
  framework
  does?

  Thanks all!

  _
  Express yourself with the new version of MSN Messenger!
  Download today -
  it's FREE!
  http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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


-- 
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
   Imagine if every Thursday your shoes exploded if you tied them 
the usual way.  This happens to us all the time with computers, and 
nobody thinks of complaining.
 -- Jef Raskin

-
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: Server side validation

2004-05-17 Thread Samuel Rochas
Hello Nicholas,
Ok, thank you very much for the explanation, it makes the things a bit 
clearer and less magical to me.

I have two questions:
-Why making that difference once for all? I mean, why not just accept 
everything here (page, action, forward)?
-Where is a good and complete documentation with examples about 
config-struts.xml to find (except struts-config_1_1.dtd)?

Sincerly
Samuel
---  andinasoft SA - Software y Consulting  ---
Mariano Aguilera 276 y Almagro - Quito, Ecuador
Tel. +593 2 290 55 18  Cel. +593 9 946 4046
-  http://www.andinasoft.com  -
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Using DispatchActions with validation

2004-05-17 Thread Nicholas L Mohler





Ron,

We did something similar to the page that you have posted.  We only clone
the struts-config mappings.  So for example, we have a SelectionPage (top)
and a Detail Page.  Validations are different for the selection and detail
pages, but the action and form classes are the same.  Lastly, our editor
action classes all extend from a base editor class where we implement the
common things.

The important common function to this tast is the method for handling
validation failures.  The method (1) invokes a commonly named method that
is present in each editor action class to prepare for a return to the
detail page and (2) determines the correct forward based on the submitted
dispatch action.

All of our editor mappings take the following form:
(Note: we use multiple mappings for Selection vs Detail mappings so that we
can have simpler control in applying the validations - there might be a
better way.)

 For the accessing and submitting from the Selection Page   
  action   
path=/FooTop  
type=com.myco.editors.FooAction   
name=FooTopForm   
scope=request 
input=/FooTop.do?dispatchAction=top   
validate=true 
parameter=dispatchAction 
forward name=edit   path=.editor.fooUpdate/   
forward name=create   path=.editor.fooCreate/ 
forward name=view   path=.editor.fooView/ 
forward name=top   path=.editor. fooTop/  
  /action 
  For Detail Page Submissions:  
  action   
path=/FooActionEdit   
type=com.myco.editors.FooAction   
name=FooDetailForm
scope=request 
input   
 =/FooValidationFailure.do?failureAction=handleValidationFailure  
validate=true 
parameter=dispatchAction 
forward name=edit   path=.editor.fooUpdate/   
forward name=create   path=.editor.fooCreate/ 
forward name=view   path=.editor.fooView/ 
forward name=top   path=.editor. fooTop/  
  /action 
  For Handling Validation Failures: 
  action   
path=/FooValidationFailure
type=com.myco.editors.FooAction   
name=FooDetailForm
scope=request 
validate=false
parameter=failureAction  
forward name=edit   path=.editor.fooUpdate/   
forward name=create   path=.editor.fooCreate/ 
forward name=view   path=.editor.fooView/ 
forward name=top   path=.editor. fooTop/  
  /action 










|-+
| |   Ron Grabowski|
| |   [EMAIL PROTECTED]|
| |   oo.com  |
| ||
| |   05/17/2004 02:00 |
| |   PM   |
| |   Please respond to|
| |   Struts Users|
| |   Mailing List|
| ||
|-+
  
--|
  |
   

R: Indexed property throws exception - HELP!

2004-05-17 Thread Andrea M
I've seen in another list someone resolving a problem like this using
ArrayList instead of the interface List
It's odd but the guy claims it worked. Maybe a bug in PropertyUtils.. don't
honestly know.
This is the link if you are interested
http://www.junlu.com/msg/45025.html


-Messaggio originale-
Da: Phan, Hienthuc T (Rosetta) [mailto:[EMAIL PROTECTED] 
Inviato: lunedì 17 maggio 2004 18.59
A: [EMAIL PROTECTED]
Oggetto: Indexed property throws exception - HELP!
Priorità: Alta

Hi,

I encountered an index out of bound exception when using the indexed
property.  The problem I'm facing is that I can't debug this.  The exception
is not thrown either in the the form or the action.  Do you know what cause
this?


May 17, 2004 9:50:02 AM PDT Error HTTP 101017
[ServletContext(id=4601745,name=scheduler,context-path=/scheduler)] Root
cause of ServletException
java.lang.IndexOutOfBoundsException: Index: 1, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:486)
at java.util.ArrayList.get(ArrayList.java:302)
at
org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.
java:521)
at
org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.
java:428)
at
org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.j
ava:770)
at
org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:80
1)
at
org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:881)
at
org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
at
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1096)
at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j
ava:816)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
tStubImpl.java:1058)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:401)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:306)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
ebAppServletContext.java:5445)
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:780)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:3105)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2588)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)




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

--

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


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



R: use of session object in Action Form?

2004-05-17 Thread Andrea M
Correct
Whatever the reason you need to access the session, you can do that using
the request passed to the two methods Atta mentions.
Getting a reference to the session from the request is trivial:
HttpSession session = request.getSession();


-Messaggio originale-
Da: atta-ur rehman [mailto:[EMAIL PROTECTED] 
Inviato: lunedì 17 maggio 2004 20.57
A: Struts Users Mailing List
Oggetto: Re: use of session object in Action Form?

Hi,

As far as I know, both the reset() and validate() method are passed the
request object. You could get the session from this request object.

HTH,

ATTA

- Original Message - 
From: Shyamal Shah [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, May 17, 2004 12:13 AM
Subject: use of session object in Action Form?


I need to use session object in my Action Form class. Can I use either
session or request object in my form class? If yes can someone please
suggest how can I do that?

Thanks,



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


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



Naveation pages.

2004-05-17 Thread Teixeira, Jorge (Informaker)
Help me pleash.

I tray developer one page but it show me this error, I can´t understand,
plash tell me what I need alter.



HTTP Status 500 - No input attribute for mapping path /tb_alarmeDataAction

type Status report

message No input attribute for mapping path /tb_alarmeDataAction

description The server encountered an internal error (No input attribute for
mapping path /tb_alarmeDataAction) that prevented it from fulfilling this
request.
Apache Tomcat/5.0






Tanks




-Original Message-
From: Andrea M [mailto:[EMAIL PROTECTED] 
Sent: segunda-feira, 17 de maio de 2004 17:08
To: 'Struts Users Mailing List'
Subject: R: Indexed property throws exception - HELP!


I've seen in another list someone resolving a problem like this using
ArrayList instead of the interface List It's odd but the guy claims it
worked. Maybe a bug in PropertyUtils.. don't honestly know. This is the link
if you are interested http://www.junlu.com/msg/45025.html


-Messaggio originale-
Da: Phan, Hienthuc T (Rosetta) [mailto:[EMAIL PROTECTED] 
Inviato: lunedì 17 maggio 2004 18.59
A: [EMAIL PROTECTED]
Oggetto: Indexed property throws exception - HELP!
Priorità: Alta

Hi,

I encountered an index out of bound exception when using the indexed
property.  The problem I'm facing is that I can't debug this.  The exception
is not thrown either in the the form or the action.  Do you know what cause
this?


May 17, 2004 9:50:02 AM PDT Error HTTP 101017
[ServletContext(id=4601745,name=scheduler,context-path=/scheduler)] Root
cause of ServletException
java.lang.IndexOutOfBoundsException: Index: 1, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:486)
at java.util.ArrayList.get(ArrayList.java:302)
at
org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.
java:521)
at
org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.
java:428)
at
org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.j
ava:770)
at
org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:80
1)
at
org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:881)
at
org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
at
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1096)
at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j
ava:816)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
tStubImpl.java:1058)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:401)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:306)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
ebAppServletContext.java:5445)
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:780)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:3105)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2588)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)




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

--

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


-
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: Naveation pages.

2004-05-17 Thread Richard Yee
The error indicates that the input attribute for your
action whose path is /tb_alarmeDataAction is invalid.
This is most likely caused by specifying a
non-existent formBean as the action's input

Regards,

Richard

--- Teixeira, Jorge (Informaker)
[EMAIL PROTECTED] wrote:
 Help me pleash.
 
 I tray developer one page but it show me this error,
 I can´t understand,
 plash tell me what I need alter.
 
 
 
 HTTP Status 500 - No input attribute for mapping
 path /tb_alarmeDataAction
 
 type Status report
 
 message No input attribute for mapping path
 /tb_alarmeDataAction
 
 description The server encountered an internal error
 (No input attribute for
 mapping path /tb_alarmeDataAction) that prevented it
 from fulfilling this
 request.
 Apache Tomcat/5.0
 
 
 
 
 
 
 Tanks
 
 
 
 
 -Original Message-
 From: Andrea M
 [mailto:[EMAIL PROTECTED] 
 Sent: segunda-feira, 17 de maio de 2004 17:08
 To: 'Struts Users Mailing List'
 Subject: R: Indexed property throws exception -
 HELP!
 
 
 I've seen in another list someone resolving a
 problem like this using
 ArrayList instead of the interface List It's odd but
 the guy claims it
 worked. Maybe a bug in PropertyUtils.. don't
 honestly know. This is the link
 if you are interested
 http://www.junlu.com/msg/45025.html
 
 
 -Messaggio originale-
 Da: Phan, Hienthuc T (Rosetta)
 [mailto:[EMAIL PROTECTED] 
 Inviato: lunedì 17 maggio 2004 18.59
 A: [EMAIL PROTECTED]
 Oggetto: Indexed property throws exception - HELP!
 Priorità: Alta
 
 Hi,
 
 I encountered an index out of bound exception when
 using the indexed
 property.  The problem I'm facing is that I can't
 debug this.  The exception
 is not thrown either in the the form or the action. 
 Do you know what cause
 this?
 
 
 May 17, 2004 9:50:02 AM PDT Error HTTP
 101017

[ServletContext(id=4601745,name=scheduler,context-path=/scheduler)]
 Root
 cause of ServletException
 java.lang.IndexOutOfBoundsException: Index: 1, Size:
 0
 at
 java.util.ArrayList.RangeCheck(ArrayList.java:486)
 at
 java.util.ArrayList.get(ArrayList.java:302)
 at

org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.
 java:521)
 at

org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.
 java:428)
 at

org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.j
 ava:770)
 at

org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:80
 1)
 at

org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:881)
 at

org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
 at

org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1096)
 at

org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j
 ava:816)
 at

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
 at

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
 at

org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520)
 at

javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at

javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at

weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
 tStubImpl.java:1058)
 at

weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
 :401)
 at

weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
 :306)
 at

weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
 ebAppServletContext.java:5445)
 at

weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
 r.java:780)
 at

weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
 ntext.java:3105)
 at

weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
 :2588)
 at

weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
 at

weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
 
 
 


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


 --
 


Re: Help with using declarative error handling

2004-05-17 Thread Frank Burns
Thanks for your reply, Bill.

I already appreciate the point you are making,

However, the problem I am trying to solve is that my AuthenticateAction
class can throw the TRCDatabaseException in SEVERAL places.

The example you provide will display the same error message for ALL
TRCDatabaseExceptions that occur in my Action class.

I want to be able to display a DIFFERENT error message for each place in the
code where the exception can occur.

Hence my attempted solution -- which doesn't work.

Any ideas?

Thanks,

Frank.

- Original Message - 
From: Bill Schneider [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 17, 2004 1:18 PM
Subject: Re: Help with using declarative error handling


 Hi,

 try changing the exception handler in struts-config.xml to

 exception
key=errors.database.noconnection
type=mydomain.exception.TrcDatabaseException
path=/common/exceptionTrcDatabase.jsp
/

 You can get rid of the whole catch block in your action--the
 ActionServlet takes care of it.  That's the beauty of declarative
 exceptions.

 -- Bill


Wherever an exception is thrown in AuthenticateAction, I add some
 code in
the catch block, before rethrowing it, for example like this:
   
  } catch(TrcDatabaseException ex){
   /* add relevant action errors */
   ActionErrors errors = new ActionErrors();
   errors.add(ActionErors.GLOBAL_ERROR, new
ActionError(errors.database.noconnection));
   saveErrors(request, errors);
   /* rethrow the exception to be caught by Struts declarative
 exception
handling mechanism */
   throw ex;
  }
   
I have also placed an errors.database.noconnection in the resource
 file.
   
In the struts-config file, for the AuthenticateAction, I have
 defined an
exception element:
   
exception
key=errors.generalmessage
type=mydomain.exception.TrcDatabaseException
path=/common/exceptionTrcDatabase.jsp
/
   
I have created a JSP, exceptionTrcDatabase.jsp, that contains this
 element:
   
html:errors/
   
However, whenever I test this code (by deliberately creating the
 relevant
error conditions), only the errors.generalmessage is displayed.
   
Why isn't the errors.database.noconnection being displayed as well?

 -- Bill Schneider Chief Architect Vecna Technologies, Inc. 5004 Lehigh
 Road, Suite B College Park, MD 20740 [EMAIL PROTECTED] t:
 301-864-7594 f: 301-699-3180
 -- 
 Bill Schneider
 Chief Architect

 Vecna Technologies, Inc.
 5004 Lehigh Road, Suite B
 College Park, MD 20740
 [EMAIL PROTECTED]
 t: 301-864-7594
 f: 301-699-3180


 -
 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: Help with using declarative error handling

2004-05-17 Thread Frank Burns
Hi Wendy,

Thanks for your reply. I know that what you suggest is a solution.

But I don't understand why what I originally tried doesn't work, which is to
add some code in the catch block, before rethrowing it, for example like
this:

  } catch(TrcDatabaseException ex){
   /* add relevant action errors */
   ActionErrors errors = new ActionErrors();
   errors.add(ActionErors.GLOBAL_ERROR, new
ActionError(errors.database.noconnection));
   saveErrors(request, errors);
   /* rethrow the exception to be caught by Struts declarative exception
handling mechanism */
   throw ex;
  }

and have html:errors/ display it in the JSP that is forwarded to.

This seems simple enough. So why doesn't it work?

Any ideas why it doesn't?

Cheers,

Frank

- Original Message - 
From: Wendy Smoak [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, May 18, 2004 12:01 AM
Subject: RE: Help with using declarative error handling


 From: Frank Burns [mailto:[EMAIL PROTECTED]
 However, the problem I am trying to solve is that my
 AuthenticateAction
 class can throw the TRCDatabaseException in SEVERAL places.

 I want to be able to display a DIFFERENT error message for
 each place in the
 code where the exception can occur.

What about subclassing TRCDatabaseException and making different
exceptions for the different bad things that can happen?

For example, I have a generic DAOException, and beneath that,
RecordNotFoundException, RecordLockedException, etc.

Then throw the exception that describes what really happened, and let
Struts do its thing.

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

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

Hi,

I can't get the relevant error message from the resources file to display
when an exception is thrown.

Can you please help? Here is the scenario:

One of my Action classes, AuthenticateAction, can generate the same type of
application-specific exception (TrcDatabaseException) at various points in
its code.

I want to display error-specific information for each place where the
TrcDatabaseException can be thrown in the AuthenticateAction.

Wherever an exception is thrown in AuthenticateAction, I add some code in
the catch block, before rethrowing it, for example like this:

  } catch(TrcDatabaseException ex){
   /* add relevant action errors */
   ActionErrors errors = new ActionErrors();
   errors.add(ActionErors.GLOBAL_ERROR, new
ActionError(errors.database.noconnection));
   saveErrors(request, errors);
   /* rethrow the exception to be caught by Struts declarative exception
handling mechanism */
   throw ex;
  }

I have also placed an errors.database.noconnection in the resource file.

In the struts-config file, for the AuthenticateAction, I have defined an
exception element:

exception
key=errors.generalmessage
type=mydomain.exception.TrcDatabaseException
path=/common/exceptionTrcDatabase.jsp
/

I have created a JSP, exceptionTrcDatabase.jsp, that contains this element:

html:errors/

However, whenever I test this code (by deliberately creating the relevant
error conditions), only the errors.generalmessage is displayed.

Why isn't the errors.database.noconnection being displayed as well?

Thanks,

Frank.


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



Re: java.lang.IllegalArgumentException: No bean specified

2004-05-17 Thread Paraman
Richard,
Firstly I should apologize for disturbing you. I have solved this problem by setting 
the 'redirect' attribute of the forward element which invoked the executeEvaluation 
action to 'true'. This forward is nested in another action called 
'selectProcessAreas', thus, without setting the  'redirect' attribute, Struts will try 
to mapping the request parameters of this action to the form properties of the 
'executeEvaluation' action and therefore caused the exception.

By the way, I can not understand your meaning well. According to the struts 
documentation, the 'input' attribute of an action mapping is described as 
Context-relative path of the input form to which control should be returned if a 
validation error is encountered. Required if name is specified and the input bean 
returns validation errors. Is it necessary to set it every time I submit a form to an 
action, in addition to the 'name' attribute?

Regards,

Paraman
  
- Original Message - 
From: Richard Yee [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, May 18, 2004 6:03 AM
Subject: Re: java.lang.IllegalArgumentException: No bean specified


 Paraman,
 Are you submitting a form to the action? If so, you
 don't have the name of the form-bean as the 'input'
 argument to your executeEvaluation action.
 
 Regards,
 
 Richard
 


RE: Help with using declarative error handling

2004-05-17 Thread Patrick Cheng
Hi,
What we do in our project is, we have a top level exception class, say,
RootException(), which does nothing.
Then you keep all your try catch, if you do whatever you want in the
catch block, but at the end, you re 

 ' throw new RootException(with your description in it) '
Now your global exception handler will handle the RootException with
details in it. 
Don't know if it helps, but that's what we do.

Rgds.
Pat

-Original Message-
From: Frank Burns [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 18, 2004 5:29 AM
To: [EMAIL PROTECTED]
Subject: Re: Help with using declarative error handling


Thanks for your reply, Bill.

I already appreciate the point you are making,

However, the problem I am trying to solve is that my AuthenticateAction
class can throw the TRCDatabaseException in SEVERAL places.

The example you provide will display the same error message for ALL
TRCDatabaseExceptions that occur in my Action class.

I want to be able to display a DIFFERENT error message for each place in
the code where the exception can occur.

Hence my attempted solution -- which doesn't work.

Any ideas?

Thanks,

Frank.

- Original Message - 
From: Bill Schneider [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 17, 2004 1:18 PM
Subject: Re: Help with using declarative error handling


 Hi,

 try changing the exception handler in struts-config.xml to

 exception
key=errors.database.noconnection
type=mydomain.exception.TrcDatabaseException
path=/common/exceptionTrcDatabase.jsp
/

 You can get rid of the whole catch block in your action--the 
 ActionServlet takes care of it.  That's the beauty of declarative 
 exceptions.

 -- Bill


Wherever an exception is thrown in AuthenticateAction, I add some

 code in
the catch block, before rethrowing it, for example like this:
   
  } catch(TrcDatabaseException ex){
   /* add relevant action errors */
   ActionErrors errors = new ActionErrors();
   errors.add(ActionErors.GLOBAL_ERROR, new
ActionError(errors.database.noconnection));
   saveErrors(request, errors);
   /* rethrow the exception to be caught by Struts declarative
 exception
handling mechanism */
   throw ex;
  }
   
I have also placed an errors.database.noconnection in the 
 resource file.
   
In the struts-config file, for the AuthenticateAction, I have 
 defined an
exception element:
   
exception
key=errors.generalmessage
type=mydomain.exception.TrcDatabaseException
path=/common/exceptionTrcDatabase.jsp
/
   
I have created a JSP, exceptionTrcDatabase.jsp, that contains 
 this
 element:
   
html:errors/
   
However, whenever I test this code (by deliberately creating the
 relevant
error conditions), only the errors.generalmessage is displayed.
   
Why isn't the errors.database.noconnection being displayed as
well?

 -- Bill Schneider Chief Architect Vecna Technologies, Inc. 5004 Lehigh

 Road, Suite B College Park, MD 20740 [EMAIL PROTECTED] t: 
 301-864-7594 f: 301-699-3180
 --
 Bill Schneider
 Chief Architect

 Vecna Technologies, Inc.
 5004 Lehigh Road, Suite B
 College Park, MD 20740
 [EMAIL PROTECTED]
 t: 301-864-7594
 f: 301-699-3180


 -
 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: Problem with utf-8 encoding with struts

2004-05-17 Thread John Cavacas
This is not just a problem with JSTL, it's a problem with JSPs in general.
A JSP page will default to the system encoding, and not what you may specify
on the response somewhere up the chain. 

I'm aware of 3 options. 

1) Use a Servlet filter as suggested. This only works on Servlet 2.3 and
higher containers. 

2) add this to the top of your JSPs maybe in an include:
%@ page contentType = text/html; charset=UTF-8 %

3) Use another view technology like Velocity

And that's half the battle. The other half is making sure that you can
accept input as UTF-8. But that's a story for another day.

john

 -Original Message-
 From: Ronald van den Heuvel [mailto:[EMAIL PROTECTED]
 Sent: May 17, 2004 7:50 AM
 To: Struts Users Mailing List
 Subject: RE: Problem with utf-8 encoding with struts
 
 Hm ok I will try the filter but this is not the real solution because I
 am not using any other taglibs. Only the standard Struts taglibs.
 
 
 
 -Original Message-
 From: Paul McCulloch [mailto:[EMAIL PROTECTED]
 Sent: maandag 17 mei 2004 13:50
 To: 'Struts Users Mailing List'
 Subject: RE: Problem with utf-8 encoding with struts
 
 That's an old version I gave the URL for. A better place to look would
 be in
 the Tomcat source.
 
 Paul
 
  -Original Message-
  From: Paul McCulloch [mailto:[EMAIL PROTECTED]
  Sent: Monday, May 17, 2004 12:47 PM
  To: 'Struts Users Mailing List'
  Subject: RE: Problem with utf-8 encoding with struts
 
 
  This can happen if you use JSTL tags which overwrite whatever response
  encoding you set.
 
  This can be fixed by using a filter to force the encoding
 
  http://www.anassina.com/struts/i18n/SetCharacterEncodingFilter.java
 
  Paul
 
   -Original Message-
   From: Ronald van den Heuvel
  [mailto:[EMAIL PROTECTED]
   Sent: Monday, May 17, 2004 12:28 PM
   To: [EMAIL PROTECTED]
   Subject: Problem with utf-8 encoding with struts
  
  
Hello all,
  
  
  
   I am using Struts for a web-application and the web-page
  should be in
   UTF-8 encoding, but the application keeps sending the
   following header:
   Content-Type: text/html;charset=ISO-8859-1. I take the
   following action
   to get the page into UTF-8.
  
- in the struts config file:
  
 controller contentType=text/html;charset=UTF-8
   nocache=true /
  
   - in the main tiles layout:
  
   %@ page language=java contentType=text/xml;
   charset=UTF-8 % (at the top)
  
   meta http-equiv=content-type content=text/html;
   charset=UTF-8( in the head part of the document)
  
  
  
   The page is valid xhtml 1.0 transitional and I get no errors what so
   ever. I tested it in mozilla and IE and both say it is the
  ISO-8859-1
   content type.
  
  
  
   Does anybody know the solution to this problem?
  
  
  
   Thanks
  
  
  
   Ronald
  
  
  
  
  
  
 
 
  **
  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]
 
 
 -
 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: JSTL 1.1 EL not working :(

2004-05-17 Thread Nicolas De Loof

First, you don't need to set taglibs in your web.xml.
Check that your web.xml declares 2.3 servlet api (in DOCTYPE)

It should work

Nico.



 I've tried to use JSTL with my web app, and it's not working!
 I downloaded jstl 1.1, and copied jstl.jar, and standard.jar to WEB-INF/lib.
 I put the f.tld, fmt.tld, fn.tld in WEB-INF/.
 
 In my web.xml i've got:
   taglib
 taglib-uri/WEB-INF/c.tld/taglib-uri
 taglib-location/WEB-INF/c.tld/taglib-location
   /taglib
 
   taglib
 taglib-uri/WEB-INF/fn.tld/taglib-uri
 taglib-location/WEB-INF/fn.tld/taglib-location
   /taglib
 
   taglib
 taglib-uri/WEB-INF/fmt.tld/taglib-uri
 taglib-location/WEB-INF/fmt.tld/taglib-location
   /taglib
 
 If i try and use c:out, it doesnt work!
 
 %@ page contentType=text/html;charset=UTF-8 language=java %
 %@ taglib uri=http://java.sun.com/jsp/jstl/core;  prefix=c %
 c:out value=${1+1}/
 
 gives:
 ${1+1}
 
 Any idea what's going on?
 It looks like the taglib is working fine, but not using el!
 
 Any ideas?
 
 Daniel.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


Our name has changed.  Please update your address book to the following format: 
[EMAIL PROTECTED].

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


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



Re: App-level globals

2004-05-17 Thread Jacob Weber
You can make a ContextListener class like this:

public final class MyContextListener
   implements ServletContextListener {
   private ServletContext context = null;
   public BaseServletContextListener() {}
   public void contextInitialized(ServletContextEvent event) {
  this.context = event.getServletContext();
  // run your initialization routine here
   }
   public void contextDestroyed(ServletContextEvent event) {
  this.context = null;
   }
}

and put this in your web.xml:
listener
   listener-classpath.to.MyContextListener/listener-class
/listener

Jacob

- Original Message - 
From: None None [EMAIL PROTECTED]
Newsgroups: gmane.comp.jakarta.struts.user
Sent: Monday, May 17, 2004 12:17 PM
Subject: App-level globals


 Hello again everyone... I am starting conversion of a none-Struts app to
 Struts, and mostly it's straight-forward, but two things I have questions
 about...

 The home-grown framework this app was written with has the notion of an
App
 Loader.  Basically, this is a class that runs at startup and reads in some
 config information and stores it in a static config object.  The
properties
 of this object are referenced throughout the app.

 The other concern is that this same process spawns a couple of
low-priority
 background threads to do some various things throughout the lifetime of
the
 app.

 My question, which I have been unable to find an answer to on my own, is
if
 Struts has a similar startup initialization mechanism?  If not, do I
 simply create my own servlet to do all this work and set it to run on
 startup in web.xml?  I have no problem with the later approach, but I'm
 wondering if Struts has a mechanism for this, like our custom framework
 does?

 Thanks all!

 _
 Express yourself with the new version of MSN Messenger! Download today -
 it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



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



R: java.lang.IllegalArgumentException: No bean specified

2004-05-17 Thread Andrea M
Hi Paraman
These are the two actions you're talkin' about:

action path=/selectProcessAreas name=processAreasForm scope=session
type=cmmieval.web.struts.actions.SelectProcessAreasAction
input=/prepareEvaluation.do
  forward name=success path=/executeEvaluation.do/
/action
action path=/executeEvaluation
type=cmmieval.web.struts.actions.ExecuteEvaluationAction
name=evaluationForm scope=request validate=false
 forward name=success path=/evaluation.jsp/   
/action

Now I see that the first one forwards a processAreasForm to the second,
which in turn accepts evaluationForm

That's very likely to be your problem
So.. you have three options I guess
- The one you found: setting the redirect attribute to true you will not
forward the request so there will be no processAreasForm
- You make sure the actionforms for the two actions match (either changing
one of the two, or implementing another action that takes processAreasForm)
- You don't specify any bean in the first action


-Messaggio originale-
Da: Paraman [mailto:[EMAIL PROTECTED] 
Inviato: martedì 18 maggio 2004 3.15
A: Struts Users Mailing List
Oggetto: Re: java.lang.IllegalArgumentException: No bean specified

Richard,
Firstly I should apologize for disturbing you. I have solved this problem by
setting the 'redirect' attribute of the forward element which invoked the
executeEvaluation action to 'true'. This forward is nested in another action
called 'selectProcessAreas', thus, without setting the  'redirect'
attribute, Struts will try to mapping the request parameters of this action
to the form properties of the 'executeEvaluation' action and therefore
caused the exception.

By the way, I can not understand your meaning well. According to the struts
documentation, the 'input' attribute of an action mapping is described as
Context-relative path of the input form to which control should be returned
if a validation error is encountered. Required if name is specified and
the input bean returns validation errors. Is it necessary to set it every
time I submit a form to an action, in addition to the 'name' attribute?

Regards,

Paraman
  
- Original Message - 
From: Richard Yee [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, May 18, 2004 6:03 AM
Subject: Re: java.lang.IllegalArgumentException: No bean specified


 Paraman,
 Are you submitting a form to the action? If so, you
 don't have the name of the form-bean as the 'input'
 argument to your executeEvaluation action.
 
 Regards,
 
 Richard
 


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



code too large for try statement

2004-05-17 Thread Rahul Mohan

Hi,

I have a JSP page with Struts and JSTL tags. It is 
pretty big with about
15 conrols and a *LOT* of JSTL tags. When I try host the page in Weblogic8.1
i get the following compile error:

window.java:12652:code too large for try statement
 try { // _c_set1 popBody() try/finally.. ...

 in other words the try {} block in _jspservice is so huge, it exceeded the
64K limit imposed by jvms.

The root problem I found out to be in the jsp traslation mechanism of
weblogic8.1 container. It translates the entire page into a single
_jspservice method. Is this a known problem with weblogic and jstl tags (i
think its the code for tag thats making the servlet huge) ?

I tried the same page on tomcat. Tomcat does not give any problem as it
handles each tag as a seperate method which is being called from
_jspService. we have to agree that tomcat uses a much better way of doing
it!

  has anybody else faced this problem before? do we have any workarounds,
other than using jsp:include?

 awaiting ur comments

 rahul


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