hand79 / Hadoop

Hadoop 開發實作&筆記
0 stars 0 forks source link

Is there a way to create tableFacade without a request. #308

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello,

I am trying to get Jmesa to do a manual export on server startup.
Therefore I do not have a request and response obj.

Is it possible to still create the tableFacade without the request obj.
It is currently failing at 
this.webContext = new HttpServletRequestWebContext(request);

Please help.

Thanks.

Original issue reported on code.google.com by vidhya.a...@gmail.com on 15 Mar 2011 at 6:54

GoogleCodeExporter commented 9 years ago
You do need a WebContext. You can set null on the TableFacade constructor, but 
then you need to set an implementation of the WebContext interface on the 
TableFacade.setWebContext() method.

Original comment by jeff.johnston.mn@gmail.com on 15 Mar 2011 at 9:27

GoogleCodeExporter commented 9 years ago
I am trying to set ServletContext into the setWebContext method.
It wont allow me to.

The method setWebContext(WebContext) in the type TableFacade is not applicable 
for the arguments (ServletContext)

Any class/method that I can override?

Original comment by vidhya.a...@gmail.com on 16 Mar 2011 at 1:22

GoogleCodeExporter commented 9 years ago
You need to implement the WebContext interface to work with the ServletContext.

Original comment by jeff.johnston.mn@gmail.com on 16 Mar 2011 at 3:00

GoogleCodeExporter commented 9 years ago
Thank You. I did just that and was able to work it through.
Its nice that all the classes in Jmesa are very customizable!

Thanks again!

Original comment by vidhya.a...@gmail.com on 16 Mar 2011 at 6:19

GoogleCodeExporter commented 9 years ago
No problem! Glad to hear that it worked out.

Original comment by jeff.johnston.mn@gmail.com on 17 Mar 2011 at 2:58

GoogleCodeExporter commented 9 years ago

Original comment by jeff.johnston.mn@gmail.com on 17 Mar 2011 at 2:58