You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by Justin Grammens <ju...@yahoo.com> on 2006/02/25 02:15:21 UTC

Include data from a remote webservice on roller homepage

Hello,
I'm not sure if this is the best place to post this
question, but am not able to find a solution from the
FAQ on the roller site. I have a 1.2 installation of
roller and I would like to include some xhtml data on
my roller hompeage from a web service located on a
completely separate website. How might anyone suggest
I look at doing this? I'm downloading the roller
source code and am guessing I would create my own
velocity macro and associated java class to make the
request and pull back the data for the presentation,
but was wondering if I was on the right track and if
anyone has done this before. Is there an easier way
with any of the existing roller macros?
Thanks for any pointers. I might look at upgrading to
Roller 2.x if that version has any helpers in this
regard.
Thanks,
Justin

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Include data from a remote webservice on roller homepage

Posted by Lance Lavandowska <la...@gmail.com>.
The _decorator is a Velocity template, nothing JSP-related will work
there, and it is only used for individual website pages (not the
Roller admin/front pages).

If you want to edit the front page, look to main.jsp.

Lance

On 2/25/06, Justin Grammens <ju...@yahoo.com> wrote:
> Great ideas! Thank you both very for your replies. I'm
> using the:
>
> _decorator
>
> page template for my site and unfortunately it seems
> to not interpret any JSTL tags. It just outputs the
> <c:import> literally when I put it into my _decorator,
> that is why I was thinking I might have to create my
> own function.
>
> I had another thought and that maybe using AJAX and
> the HttpRequest object might do what I want so the
> client actually makes the request. I'll continue to
> investigate all of the options. Thanks again for your
> pointers. I really appreciate you taking the time to
> help out a "Roller newbie" like myself.
>
> Justin
>
> --- Hassan Schroeder <ha...@webtuitive.com> wrote:
>
> > Allen Gilliland wrote:
> >
> > > I think you have the right idea.  You would
> > certainly need to write
> > > your own code for talking to the web service and
> > getting any data
> > > that you wanted because Roller doesn't have any
> > built-in facility to
> > > do something like that.
> > >
> > > Currently the main page is just a jsp, so to add
> > in the data from
> > > your web service you would just hack the jsp and
> > make the calls to
> > > your code.
> >
> > Or if you're not hell-bent on reinventing the wheel,
> > use JSTL and a
> > simple <c:import
> > url="http://example.com/webservice.xml"/>  :-)
> >
> > FWIW!
> > --
> > Hassan Schroeder -----------------------------
> > hassan@webtuitive.com
> > Webtuitive Design ===  (+1) 408-938-0567   ===
> > http://webtuitive.com
> >                 opinion: webtuitive.blogspot.com
> >
> >                           dream.  code.
> >
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>

Re: Include data from a remote webservice on roller homepage

Posted by Justin Grammens <ju...@yahoo.com>.
Great ideas! Thank you both very for your replies. I'm
using the:

_decorator

page template for my site and unfortunately it seems
to not interpret any JSTL tags. It just outputs the
<c:import> literally when I put it into my _decorator,
that is why I was thinking I might have to create my
own function.

I had another thought and that maybe using AJAX and
the HttpRequest object might do what I want so the
client actually makes the request. I'll continue to
investigate all of the options. Thanks again for your
pointers. I really appreciate you taking the time to
help out a "Roller newbie" like myself.

Justin

--- Hassan Schroeder <ha...@webtuitive.com> wrote:

> Allen Gilliland wrote:
> 
> > I think you have the right idea.  You would
> certainly need to write 
> > your own code for talking to the web service and
> getting any data
> > that you wanted because Roller doesn't have any
> built-in facility to
> > do something like that.
> > 
> > Currently the main page is just a jsp, so to add
> in the data from 
> > your web service you would just hack the jsp and
> make the calls to
> > your code.
> 
> Or if you're not hell-bent on reinventing the wheel,
> use JSTL and a
> simple <c:import
> url="http://example.com/webservice.xml"/>  :-)
> 
> FWIW!
> -- 
> Hassan Schroeder -----------------------------
> hassan@webtuitive.com
> Webtuitive Design ===  (+1) 408-938-0567   ===
> http://webtuitive.com
>                 opinion: webtuitive.blogspot.com
> 				
>                           dream.  code.
> 
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Include data from a remote webservice on roller homepage

Posted by Hassan Schroeder <ha...@webtuitive.com>.
Allen Gilliland wrote:

> I think you have the right idea.  You would certainly need to write 
> your own code for talking to the web service and getting any data
> that you wanted because Roller doesn't have any built-in facility to
> do something like that.
> 
> Currently the main page is just a jsp, so to add in the data from 
> your web service you would just hack the jsp and make the calls to
> your code.

Or if you're not hell-bent on reinventing the wheel, use JSTL and a
simple <c:import url="http://example.com/webservice.xml"/>  :-)

FWIW!
-- 
Hassan Schroeder ----------------------------- hassan@webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
                opinion: webtuitive.blogspot.com
				
                          dream.  code.



Re: Include data from a remote webservice on roller homepage

Posted by Allen Gilliland <Al...@Sun.COM>.
Justin,

I think you have the right idea.  You would certainly need to write your own code for talking to the web service and getting any data that you wanted because Roller doesn't have any built-in facility to do something like that.

Currently the main page is just a jsp, so to add in the data from your web service you would just hack the jsp and make the calls to your code.

-- Allen


On Fri, 2006-02-24 at 17:15, Justin Grammens wrote:
> Hello,
> I'm not sure if this is the best place to post this
> question, but am not able to find a solution from the
> FAQ on the roller site. I have a 1.2 installation of
> roller and I would like to include some xhtml data on
> my roller hompeage from a web service located on a
> completely separate website. How might anyone suggest
> I look at doing this? I'm downloading the roller
> source code and am guessing I would create my own
> velocity macro and associated java class to make the
> request and pull back the data for the presentation,
> but was wondering if I was on the right track and if
> anyone has done this before. Is there an easier way
> with any of the existing roller macros?
> Thanks for any pointers. I might look at upgrading to
> Roller 2.x if that version has any helpers in this
> regard.
> Thanks,
> Justin
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com