RE: Error : request.getReader()

2007-01-26 Thread Dave Newton
From: Marcello Savino
 Dave Newton wrote:
 [...] he just wants access to the request body *after* the parameters
 have been processed.
 That's the only reason that request.getReader would throw an
 exception.
 [...]
 
 [Marcello]
 You got it !

Actually it was Chris that got it, I was still stupid until he said that
:)

You may want to consider doing something in a custom request processor.

Dave


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



RE: Error : request.getReader()

2007-01-26 Thread Dave Newton
From: Marcello Savino
 Before you suggest me to re-write Struts ;-) ..
 The proccessing of the request i need must be implemented in a large
 struts existing application... Maybe the filter is a good idea,  i
 have to study how to implement it, where to put it.

The request processor is designed to be customized and has several hooks
ready-made for adding functionality and is pretty straight-forward.

Just an idea.

Dave

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



Re: Error : request.getReader()

2007-01-25 Thread Dave Newton
--- Marcello Savino wrote:
 In an Action subclass the execution of
 request.getReader() throw en
 IllegaStateException.

Why not just write a *really* simple custom tag that
does whatever it is you think you want to do with the
output?

Dave



 

Don't get soaked.  Take a quick peak at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather

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



Re: Error : request.getReader()

2007-01-25 Thread Dave Newton
Bollocks.

--- Marcello Savino wrote:
 In an Action subclass the execution of
 request.getReader() throw en
 IllegaStateException.

Why not just create a custom tag that does whatever it
is you think you need to do, wrap it around your
entire page contents, then getting the body becomes as
simple as getBodyContent() and you're done with it?

Dave



 

Now that's room service!  Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097

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



[OT] RE: Error : request.getReader()

2007-01-25 Thread Dave Newton
From: Marcello Savino
 I really don't undestand what you mean.
 Can you explain with a little example ?

http://www.phptr.com/articles/article.asp?p=26119seqNum=7rl=1

http://java.sun.com/developer/Books/javaserverpages/cservletsjsp/index.h
tml has a link (PDF) to the chapter about creating custom tags which
might also help.

In a nutshell, look at the tag's doAfterBody method (this is from the
first link):

public class FilterTag extends BodyTagSupport {
 public int doAfterBody() {
  BodyContent body = getBodyContent();
  String filteredBody =
   ServletUtilities.filter(body.getString());
//...etc.

body.getString() gives you the rendered contents of the tag's body.

Dave

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



R: [OT] RE: Error : request.getReader()

2007-01-25 Thread Marcello Savino
I've read what you suggested but the problem is that i need a submit tag in 
other words, i need to process the request content after the user press a 
specific button (the others are handled in a LookupDispatchAction subclass).
I think i need some more info to built this kind of tag. Do you know where i 
can get more information to obtain the result ?

Thanks


Marcello Savino
ALDEBRA S.p.A. 
tel.  0461302441

-Messaggio originale-
Da: Dave Newton [mailto:[EMAIL PROTECTED] 
Inviato: giovedì 25 gennaio 2007 15.49
A: Struts Users Mailing List
Oggetto: [OT] RE: Error : request.getReader()

From: Marcello Savino
 I really don't undestand what you mean.
 Can you explain with a little example ?

http://www.phptr.com/articles/article.asp?p=26119seqNum=7rl=1

http://java.sun.com/developer/Books/javaserverpages/cservletsjsp/index.h
tml has a link (PDF) to the chapter about creating custom tags which might also 
help.

In a nutshell, look at the tag's doAfterBody method (this is from the first 
link):

public class FilterTag extends BodyTagSupport {  public int doAfterBody() {
  BodyContent body = getBodyContent();
  String filteredBody =
   ServletUtilities.filter(body.getString());
//...etc.

body.getString() gives you the rendered contents of the tag's body.

Dave

-
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: [OT] RE: Error : request.getReader()

2007-01-25 Thread Marcello Savino
Very interesting approach, thanks  a lot


Marcello Savino
ALDEBRA S.p.A. 
tel.  0461302441

-Messaggio originale-
Da: Dave Newton [mailto:[EMAIL PROTECTED] 
Inviato: giovedì 25 gennaio 2007 15.49
A: Struts Users Mailing List
Oggetto: [OT] RE: Error : request.getReader()

From: Marcello Savino
 I really don't undestand what you mean.
 Can you explain with a little example ?

http://www.phptr.com/articles/article.asp?p=26119seqNum=7rl=1

http://java.sun.com/developer/Books/javaserverpages/cservletsjsp/index.h
tml has a link (PDF) to the chapter about creating custom tags which might also 
help.

In a nutshell, look at the tag's doAfterBody method (this is from the first 
link):

public class FilterTag extends BodyTagSupport {  public int doAfterBody() {
  BodyContent body = getBodyContent();
  String filteredBody =
   ServletUtilities.filter(body.getString());
//...etc.

body.getString() gives you the rendered contents of the tag's body.

Dave

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


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



RE: [OT] RE: Error : request.getReader()

2007-01-25 Thread Dave Newton
From: Marcello Savino
 I've read what you suggested but the problem is that i need a submit
 tag in other words, i need to process the request content after the
 user press a specific button (the others are handled in a
 LookupDispatchAction subclass).

...you want to submit a form and have access to the body of the page
you've submitted from?!

Maybe you could use JavaScript to get the innerHTML of a page-spanning
DIV or something, but... your requirements still puzzle me. I can't help
but think this is being approached in the wrong way.

Dave


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



RE: Error : request.getReader()

2007-01-25 Thread Dave Newton
From: Marcello Savino
 Up again with more details, please help!

Okay, what if you re-rendered the action you submitted from but gave it
a StringWriter? This is sick and wrong.

What *specifically* are you attempting to do?

Dave


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



Re: Error : request.getReader()

2007-01-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dave,

Dave Newton wrote:
 From: Marcello Savino
 Up again with more details, please help!
 
 Okay, what if you re-rendered the action you submitted from but gave it
 a StringWriter? This is sick and wrong.
 
 What *specifically* are you attempting to do?

I think you might be missing what he's trying to do. I think he just
wants access to the request body *after* the parameters have been
processed. That's the only reason that request.getReader would throw an
exception.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFuRas9CaO5/Lv0PARAhnIAKC8XGpYjFTXQNrQMJJpFQZpsp43dgCgqhLQ
kN7kygBS0I5Gagw4U/rfddk=
=VVpH
-END PGP SIGNATURE-

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



Re: Error : request.getReader()

2007-01-25 Thread Dave Newton
--- Christopher Schultz wrote:
 I think you might be missing what he's trying to do.

I'm pretty sure I am ;)

You mean the HTML body after Action execution?!

I'm still not sure how this can be done on the server
side without resorting to minor treachery; it seems
like driving the site w/ HttpUnit or HttpClient or...
etc. would be a better idea.

Dave



 

Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121

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



Re: Error : request.getReader()

2007-01-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dave,

Dave Newton wrote:
 --- Christopher Schultz wrote:
 I think you might be missing what he's trying to do.
 
 I'm pretty sure I am ;)
 
 You mean the HTML body after Action execution?!

No. The /request/ body after form processing (i.e. at the top of the
Action code, which gets executed /after/ the request body has been read
by struts to populate the form bean.

 I'm still not sure how this can be done on the server
 side without resorting to minor treachery; it seems
 like driving the site w/ HttpUnit or HttpClient or...
 etc. would be a better idea.

Yeah, I think you're thinking of capturing the page body. He originally
asked about the request body (which is the only reason to call
request.getReader in the first place).

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFuTmB9CaO5/Lv0PARAldCAJ0RmL4F5esJ1jXXODds5IKVCjx7LACfc68x
+IDLXwCfv8HdHudjhA2pdUk=
=Lxfb
-END PGP SIGNATURE-

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



Re: Error : request.getReader()

2007-01-25 Thread Dave Newton
--- Christopher Schultz wrote:
 No. The /request/ body after form processing (i.e.
 at the top of the Action code, which gets executed 
 /after/ the request body has been read
 by struts to populate the form bean.

Oo.

How is that going to help him see if it meets
accessibility requirements? (I don't know anything
about accessibility stuff, obviously :)

d.



 

Never Miss an Email
Stay connected with Yahoo! Mail on your mobile.  Get started!
http://mobile.yahoo.com/services?promote=mail

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