Re: How to send response without HTML code

2008-06-11 Thread Johan Compagner
See the request targets that set a http status code (cant remember the
exact name)

On 6/11/08, Milan Křápek [EMAIL PROTECTED] wrote:
  Hello, I have newbie question.
   I am working on application that must be able to process two type of
 request. The users requests (send them some html pages in response) and
 server requests that expect only HTTP/1.0 200 OK or something similar with
 different return code.
   In my application I translate the URL called by server to some WebPage
 class. This is wrong because WebPage needs some HTML code on the response.
 And I get this exception : WicketMessage: Markup of type 'html' for
 component 'eu.optimsys.plm.pages.recorder.CreateCallRecord' not found.
   At first I try to find some parent of WebPage that does not need any HTML
 code. But I was not successful. Please can you give me advice how to get
 access to HTTP response and request before it gets to objects from
 wicket.markup package. I need something like wicket.http.Request but I am
 not sure if something like this exists.

 Thanks for any advice

 Milan

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




Re: How to send response without HTML code

2008-06-11 Thread Milan Křápek
Thanks for response but this is not th exact thing I want. I need to know the 
name of wicket component, where can I get access to request from user and fill 
the response for him. All I need is some parent class of WebPage. But this 
object must return just http code without any HTML. (I was not able to send 
response from WebPage without having any addititonal HTML file ).

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



Re: How to send response without HTML code

2008-06-11 Thread Erik van Oosten

Hi Milan,

I think you should throw the exception AbortWithHttpStatusException.

If you change your mind and want to set the HTTP status code, but 
provide content as well, then call something like 
((WebResponse)getResponse).getHttpServletResponse().setStatus(HttpServletResponse.SC_...) 
in the constructor of your page.


Regards,
   Erik.


Milan Křápek schreef:

Thanks for response but this is not th exact thing I want. I need to know the 
name of wicket component, where can I get access to request from user and fill 
the response for him. All I need is some parent class of WebPage. But this 
object must return just http code without any HTML. (I was not able to send 
response from WebPage without having any addititonal HTML file ).

-
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: How to send response without HTML code

2008-06-11 Thread Peter Ertl

I think this is what AbortWithWebErrorCodeException is for

Am 11.06.2008 um 13:24 schrieb Erik van Oosten:


Hi Milan,

I think you should throw the exception AbortWithHttpStatusException.

If you change your mind and want to set the HTTP status code, but  
provide content as well, then call something like  
((WebResponse 
)getResponse 
).getHttpServletResponse().setStatus(HttpServletResponse.SC_...) in  
the constructor of your page.


Regards,
  Erik.


Milan Křápek schreef:
Thanks for response but this is not th exact thing I want. I need  
to know the name of wicket component, where can I get access to  
request from user and fill the response for him. All I need is some  
parent class of WebPage. But this object must return just http code  
without any HTML. (I was not able to send response from WebPage  
without having any addititonal HTML file ).


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