You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrp4j-user@portals.apache.org by Юдин Денис Игоревич <Di...@elbrus.ru> on 2005/01/17 14:57:27 UTC
Passing JS, JSP and images between consumer and producer
Hi, all!
I've splitted wsrp into two tomcats:
Tomcat-producer with WSRP and MyProject webapps and
Tomcat-consumer with Pluto and ProxyPortlet webapps.
I've got some troubles during this process.
First I made images get from Tomcat-producer to Tomcat-consumer using
src="<%=renderResponse.encodeURL(renderRequest.getContextPath() + "/images/cal.gif")%>"
So I did with *.js.
And the last problem is:
In my calendar.js there is a ref to "/MyProject/jsp/calendar.jsp". Tomcat-consumer trying to resolve this link but there are not such file! It is in Tomcat-producer!
I can't use something like
src="<%=renderResponse.encodeURL(renderRequest.getContextPath() + "/jsp/calendar.jsp")%>" in *.js
Of course, I can place this link into JSP that refers to calendar.js, but itsn't pretty good.
Can you offer me other way to get my calendar work?
Re: Passing JS, JSP and images between consumer and producer
Posted by Liang Chen <la...@gmail.com>.
*.js = javascript file ?
If it is, I am afraid that *.js can not contain <%%> code. *.js is
execuated in client's browser, not server side. The <%%> in *.js will
be omitted by browser or a javascript error.
On Mon, 17 Jan 2005 16:57:27 +0300, Юдин Денис Игоревич <Di...@elbrus.ru> wrote:
>
> Hi, all!
>
> I've splitted wsrp into two tomcats:
> Tomcat-producer with WSRP and MyProject webapps and
> Tomcat-consumer with Pluto and ProxyPortlet webapps.
>
> I've got some troubles during this process.
> First I made images get from Tomcat-producer to Tomcat-consumer using
> src="<%=renderResponse.encodeURL(renderRequest.getContextPath()
> + "/images/cal.gif")%>"
> So I did with *.js.
>
> And the last problem is:
> In my calendar.js there is a ref to "/MyProject/jsp/calendar.jsp".
> Tomcat-consumer trying to resolve this link but there are not such file! It
> is in Tomcat-producer!
> I can't use something like
> src="<%=renderResponse.encodeURL(renderRequest.getContextPath()
> + "/jsp/calendar.jsp")%>" in *.js
> Of course, I can place this link into JSP that refers to calendar.js,
> but itsn't pretty good.
>
> Can you offer me other way to get my calendar work?
--
Liang Chen
in Shanghai, China
Re: Passing JS, JSP and images between consumer and producer
Posted by Diego Louzán <di...@metalicana.org>.
I don't know why are you doing this through javascript. Your code isn't
executed in producer or consumer, but on end-user (browser). You can't use
those links in javascript files, so I think I'm not understanding you. Please
give more details for what you want to do.
Regards.
Diego.
Юдин Денис Игоревич wrote:
> Hi, all!
>
> I've splitted wsrp into two tomcats:
> Tomcat-producer with WSRP and MyProject webapps and
> Tomcat-consumer with Pluto and ProxyPortlet webapps.
>
> I've got some troubles during this process.
> First I made images get from Tomcat-producer to Tomcat-consumer using
> /
> src="<%=renderResponse.encodeURL(renderRequest.getContextPath() +
> "/images/cal.gif")%>"/
> / /So I did with *.js.
>
> And the last problem is:
> In my calendar.js there is a ref to "/MyProject/jsp/calendar.jsp".
> Tomcat-consumer trying to resolve this link but there are not such file!
> It is in Tomcat-producer!
> I can't use something like
>
> /src="<%=renderResponse.encodeURL(renderRequest.getContextPath() +
> "/jsp/calendar.jsp")%>" /in *.js
> Of course, I can place this link into JSP that refers to
> calendar.js, but itsn't pretty good.
>
> Can you offer me other way to get my calendar work?