RE: Struts error handling

2006-03-17 Thread Slattery, Tim - BLS
> Change the DTD declaration at the top of your 
> struts-config.xml to the 1.2 version. Sorry got to run.

Argghh!! I didn't see the parsing error message that landed on the app
log, not the server console. I had put in:



Putting an underscore between "message" and "resources" instead of a
hyphen. Put the hyphen in, redeployed (no parsing error messages this
time).

Presto! The error messages appear on the error page, where they're
supposed to.

Many thanks for the time you spent on this, Niall. 

--
Tim Slattery
[EMAIL PROTECTED]


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



RE: Struts error handling

2006-03-17 Thread Slattery, Tim - BLS
> Change the DTD declaration at the top of your 
> struts-config.xml to the 1.2 version. Sorry got to run.

Did that. Got the same error message. Nothing makes the slightest
difference.

--
Tim Slattery
[EMAIL PROTECTED]


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



Re: Struts error handling

2006-03-17 Thread Niall Pemberton
Change the DTD declaration at the top of your struts-config.xml to the 1.2
version. Sorry got to run.

Niall
- Original Message - 
From: "Slattery, Tim - BLS" <[EMAIL PROTECTED]>
Sent: Friday, March 17, 2006 5:30 PM

> -Original Message-
> From: Niall Pemberton [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 17, 2006 11:34 AM
> To: Struts Users Mailing List
> Subject: Re: Struts error handling
>
>
> On 3/17/06, Slattery, Tim - BLS <[EMAIL PROTECTED]> wrote:
> > > Do you have message resources configured in your
> struts-config.xml?
> > >
> > > 
> >
> > Never used that tag before. I put it in, no difference.
>
> Well you need to use it - looks like thats where your problem
> is - can't find the message resources. In Struts 1.1 messages
> resources defined in the web.xml under "application" was
> deprecated and removed in Struts 1.2.x (see the 
> section in the upgrade notes:
>
> http://wiki.apache.org/struts/StrutsUpgradeNotes11to124
>
> If it didn't make a difference check your logs - maybe you
> didn't configure it correctly.
>
> Can you post your srtuts-config showing this entry? Also have
> you deployed the message resources to the correct place?

@[EMAIL PROTECTED]&(*!!! I read the release notes on the web site - didn't say 
a word
about that. I'm not getting any error messages when I deploy the app.

freqs.properties is in /WEB-INF/classes. Here's struts-config.xml:



http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>





  




 
















  






  



  



  



  


  

  




--
Tim Slattery
[EMAIL PROTECTED]


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





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



RE: Struts error handling

2006-03-17 Thread Slattery, Tim - BLS


> -Original Message-
> From: Niall Pemberton [mailto:[EMAIL PROTECTED] 
> Sent: Friday, March 17, 2006 11:34 AM
> To: Struts Users Mailing List
> Subject: Re: Struts error handling
> 
> 
> On 3/17/06, Slattery, Tim - BLS <[EMAIL PROTECTED]> wrote:
> > > Do you have message resources configured in your 
> struts-config.xml?
> > >
> > > 
> >
> > Never used that tag before. I put it in, no difference.
> 
> Well you need to use it - looks like thats where your problem 
> is - can't find the message resources. In Struts 1.1 messages 
> resources defined in the web.xml under "application" was 
> deprecated and removed in Struts 1.2.x (see the  
> section in the upgrade notes:
> 
> http://wiki.apache.org/struts/StrutsUpgradeNotes11to124
> 
> If it didn't make a difference check your logs - maybe you 
> didn't configure it correctly.
> 
> Can you post your srtuts-config showing this entry? Also have 
> you deployed the message resources to the correct place?

@[EMAIL PROTECTED]&(*!!! I read the release notes on the web site - didn't say 
a word
about that. I'm not getting any error messages when I deploy the app.

freqs.properties is in /WEB-INF/classes. Here's struts-config.xml:



http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>





  




 
















  
  





  



  
   


  
   


  

   
  
  
  
 



--
Tim Slattery
[EMAIL PROTECTED]


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



Re: Struts error handling

2006-03-17 Thread Niall Pemberton
On 3/17/06, Slattery, Tim - BLS <[EMAIL PROTECTED]> wrote:
> > Do you have message resources configured in your struts-config.xml?
> >
> > 
>
> Never used that tag before. I put it in, no difference.

Well you need to use it - looks like thats where your problem is -
can't find the message resources. In Struts 1.1 messages resources
defined in the web.xml under "application" was deprecated and removed
in Struts 1.2.x (see the  section in the upgrade notes:

http://wiki.apache.org/struts/StrutsUpgradeNotes11to124

If it didn't make a difference check your logs - maybe you didn't
configure it correctly.

Can you post your srtuts-config showing this entry? Also have you
deployed the message resources to the correct place?

Niall

> --
> Tim Slattery
> [EMAIL PROTECTED]

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



RE: Struts error handling

2006-03-17 Thread Slattery, Tim - BLS
> Do you have message resources configured in your struts-config.xml?
> 
> 

Never used that tag before. I put it in, no difference.

--
Tim Slattery
[EMAIL PROTECTED]


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



Re: Struts error handling

2006-03-17 Thread Niall Pemberton
On 3/17/06, Slattery, Tim - BLS <[EMAIL PROTECTED]> wrote:
> > > The "errors" tag doesn't have a "message" attribute. I tried this:
> >
> > Sorry yes, getting mixed up with .
> >
> > So are you using name="org.apache.struts.action.MESSAGE" on
> > your  tag then? That would cause the same.
>
> No "name" attribute on the "errors" tag or the "messages" tag.
>
> > Otherwise are you sure that you're not forwarding to a jsp
> > thats different to the one you think?
>
> Just put some extra stuff in the error reporting page, so that I could
> be sure that the right one is being used. It is the right one.

Do you have message resources configured in your struts-config.xml?



Niall

> --
> Tim Slattery
> [EMAIL PROTECTED]

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



RE: Struts error handling

2006-03-17 Thread Slattery, Tim - BLS
> So are you using name="org.apache.struts.action.MESSAGE" on 
> your  tag then? That would cause the same.

Just tried it with the "messages" loop using 

name="org.apache.struts.action.ERROR"

SAME MESSAGE

--
Tim Slattery
[EMAIL PROTECTED]


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



RE: Struts error handling

2006-03-17 Thread Slattery, Tim - BLS
> > The "errors" tag doesn't have a "message" attribute. I tried this:
> 
> Sorry yes, getting mixed up with .
> 
> So are you using name="org.apache.struts.action.MESSAGE" on 
> your  tag then? That would cause the same.

No "name" attribute on the "errors" tag or the "messages" tag.

> Otherwise are you sure that you're not forwarding to a jsp 
> thats different to the one you think?

Just put some extra stuff in the error reporting page, so that I could
be sure that the right one is being used. It is the right one.

--
Tim Slattery
[EMAIL PROTECTED]


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



Re: Struts error handling

2006-03-17 Thread Niall Pemberton
On 3/17/06, Slattery, Tim - BLS <[EMAIL PROTECTED]> wrote:
> > Thats very strange because the error your getting is when it
> > looks for errors under the "message" key - which happens when
> > message="true" is set - otherwise it should look under the
> > "error" key. What happens if you set  > message="false"/>?
> >
> > Also are you sure there are no other  or
> >  tags on yor page that could be causing this?
>
> The "errors" tag doesn't have a "message" attribute. I tried this:

Sorry yes, getting mixed up with .

So are you using name="org.apache.struts.action.MESSAGE" on your
 tag then? That would cause the same.

Otherwise are you sure that you're not forwarding to a jsp thats
different to the one you think?

Niall

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



RE: Struts error handling

2006-03-17 Thread Slattery, Tim - BLS
> Thats very strange because the error your getting is when it 
> looks for errors under the "message" key - which happens when 
> message="true" is set - otherwise it should look under the 
> "error" key. What happens if you set  message="false"/>?
> 
> Also are you sure there are no other  or 
>  tags on yor page that could be causing this?

The "errors" tag doesn't have a "message" attribute. I tried this:





And got the same message, regarless of whether the "message" attribute
was set to  "false" or omitted.

There's no other "errors" or "messages" tag in the page. It's an error
reporting page, very short.

--
Tim Slattery
[EMAIL PROTECTED]


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



Re: Struts error handling

2006-03-17 Thread Niall Pemberton
Thats very strange because the error your getting is when it looks for
errors under the "message" key - which happens when message="true" is
set - otherwise it should look under the "error" key. What happens if
you set ?

Also are you sure there are no other  or
 tags on yor page that could be causing this?

Niall

On 3/17/06, Slattery, Tim - BLS <[EMAIL PROTECTED]> wrote:
> > Do you have  on your jsp? If
> > so remove the message="true" and it should work.
>
> Nope, just "".

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



RE: Struts error handling

2006-03-17 Thread Slattery, Tim - BLS
> Do you have  on your jsp? If 
> so remove the message="true" and it should work.

Nope, just "". 

--
Tim Slattery
[EMAIL PROTECTED]


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



Re: Struts error handling

2006-03-17 Thread Niall Pemberton
Do you have  on your jsp? If so remove
the message="true" and it should work.

Niall

On 3/17/06, Slattery, Tim - BLS <[EMAIL PROTECTED]> wrote:
> I'm trying to convert a Struts app from version 1.1 to the latest
> production version, 1.2.8. The sticking point is reporting errors.
>
> ActionErrors is now deprecated, soon to disappear, so I've converted
> instances of ActionErrors to ActionMessages. The exception handling
> code looks like this (ex is the exception, request is the
> HttpServletRequest object):
>
>ActionMessages errors = new ActionMessages();
>String msg = ex.getMessage();
>ActionMessage newError = new
> ActionMessage("error.generic.placeholder", ex.getMessage());
>errors.add( ActionMessages.GLOBAL_MESSAGE, newError );
>saveErrors( request, errors );
>return mapping.findForward("SystemFailure");
>
> "SystemFailure" is a page with an " tag in it.
>
> My web.xml includes a  tag defining the Struts ActionServlet
> and having this  tag:
>
>
>  application
>  freqs
>
>
> In the WEB-INF/classes is a file named freqs.properties. Its contents
> are:
>
> errors.header=
> errors.footer=
> error.generic.placeholder={0}
>
>
> When I run this, I get this error:
>
> javax.servlet.jsp.JspException: Cannot find message resources under
> key org.apache.struts.action.MESSAGE
>
> It happens during processing of the  tag. What did I
> do wrong?
>
>
> --
> Tim Slattery
> [EMAIL PROTECTED]
>
>
>

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



Struts error handling

2006-03-17 Thread Slattery, Tim - BLS
I'm trying to convert a Struts app from version 1.1 to the latest
production version, 1.2.8. The sticking point is reporting errors.

ActionErrors is now deprecated, soon to disappear, so I've converted
instances of ActionErrors to ActionMessages. The exception handling
code looks like this (ex is the exception, request is the
HttpServletRequest object):

ActionMessages errors = new ActionMessages();
String msg = ex.getMessage();
ActionMessage newError = new
ActionMessage("error.generic.placeholder", ex.getMessage());
errors.add( ActionMessages.GLOBAL_MESSAGE, newError );
saveErrors( request, errors );
return mapping.findForward("SystemFailure");

"SystemFailure" is a page with an " tag in it.

My web.xml includes a  tag defining the Struts ActionServlet
and having this  tag:


  application
  freqs


In the WEB-INF/classes is a file named freqs.properties. Its contents
are:

errors.header=
errors.footer=
error.generic.placeholder={0}


When I run this, I get this error:

javax.servlet.jsp.JspException: Cannot find message resources under
key org.apache.struts.action.MESSAGE

It happens during processing of the  tag. What did I
do wrong?


--
Tim Slattery
[EMAIL PROTECTED]