Hi;
I want to run a jsp page: Accordingly i map it in controller.xml <!-- View Mappings --> <view-map name="error" type="jsp" page="/error/error.jsp"/> <view-map name="main" type="screen" page="component://citizenship/widget/citizenship/GaugeCommonScreens.xml#main"/> <view-map name="login" type="screen" page="component://citizenship/widget/citizenship/GaugeCommonScreens.xml#login"/> <view-map name="requirePasswordChange" type="screen" page="component://citizenship/widget/citizenship/DialCommonScreens.xml#requirePasswordChange"/> <view-map name="seat" type="jsp" page="/int.jsp"/> Now how do i invoke this page ? Actually i wanted to use bsh for data preparation and then use this data, in the invoking jsp. But bsh scripts are called inside <screens > and i have a jsp here. Also can i invoke jsp inside <widgets> or <platform-specific> <html><html-template location="component://dial/webapp/dial/track.ftl"/></html> </platform-specific> Regards. |
Administrator
|
Why are you using jsp ? Its usage has been deprecated in OFBiz a long time ago ? Do you want to reuse existing jsp ?
Jacques De : "vijay Si" <[hidden email]> > Hi; > I want to run a jsp page: Accordingly i map it in controller.xml > > <!-- View Mappings --> > > <view-map name="error" type="jsp" page="/error/error.jsp"/> > > <view-map name="main" type="screen" > page="component://citizenship/widget/citizenship/GaugeCommonScreens.xml#main"/> > > <view-map name="login" type="screen" > page="component://citizenship/widget/citizenship/GaugeCommonScreens.xml#login"/> > <view-map name="requirePasswordChange" type="screen" > page="component://citizenship/widget/citizenship/DialCommonScreens.xml#requirePasswordChange"/> > > > <view-map name="seat" type="jsp" page="/int.jsp"/> > > Now how do i invoke this page ? > > Actually i wanted to use bsh for data preparation and then use this data, in > the invoking jsp. But bsh scripts are called inside <screens > and i have a > jsp here. > > Also can i invoke jsp inside <widgets> > or <platform-specific> > <html><html-template > location="component://dial/webapp/dial/track.ftl"/></html> > </platform-specific> > > Regards. > |
Hi Jacques,
I have a requirement wherein i need to load a page dynamically. <OBJECT> <PARAM name="lyrics" value="song?xml_source=<jsp:include page="data.jsp"/>"> </OBJECT> Now i can write my HTML Content in a calling jsp and call another jsp inside it(which provides data for lyrics). 1)Does ftl provide this facility of invoking another ftl page . 2) In the above called jsp page "data.jsp" i can do database queries using entity engine. My problem is that like jsp, ftl template is not pre-processed. With jsp i get all my contents in jsp-tags processed 1st , so now at the place of <jsp:include> i have my actual content (which would be static to xml_source, when it starts processing ) then the HTML processor is invoked. (xml_source needs to see static content it is not able to see ${highTune} variable that i write in a ftl . highTune variable was passed from bsh script) I am still searching of ways to integrate it with ofbiz application .............. Regards On 10/8/07, Jacques Le Roux <[hidden email]> wrote: > > Why are you using jsp ? Its usage has been deprecated in OFBiz a long time > ago ? Do you want to reuse existing jsp ? > > Jacques > > De : "vijay Si" <[hidden email]> > > Hi; > > I want to run a jsp page: Accordingly i map it in controller.xml > > > > <!-- View Mappings --> > > > > <view-map name="error" type="jsp" page="/error/error.jsp"/> > > > > <view-map name="main" type="screen" > > > page="component://citizenship/widget/citizenship/GaugeCommonScreens.xml#main"/> > > > > <view-map name="login" type="screen" > > > page="component://citizenship/widget/citizenship/GaugeCommonScreens.xml#login"/> > > <view-map name="requirePasswordChange" type="screen" > > > page="component://citizenship/widget/citizenship/DialCommonScreens.xml#requirePasswordChange"/> > > > > > > <view-map name="seat" type="jsp" page="/int.jsp"/> > > > > Now how do i invoke this page ? > > > > Actually i wanted to use bsh for data preparation and then use this > data, in > > the invoking jsp. But bsh scripts are called inside <screens > and i > have a > > jsp here. > > > > Also can i invoke jsp inside <widgets> > > or <platform-specific> > > <html><html-template > > location="component://dial/webapp/dial/track.ftl"/></html> > > </platform-specific> > > > > Regards. > > > |
In reply to this post by vijay Si
has this problem ever been resolved?
|
the handler for jsp is in the common_controller.xml
so you don't have to put that in. do make sure to include it in your controller.xml then look at an application controller for error.jsp then in the webapp folder find where that is. usually in the webapp/component/error. that should give you an idea where you init.jsp should be. remove the / madppiper sent the following on 11/4/2008 1:17 AM: > has this problem ever been resolved? > > > > vijay Si wrote: >> Hi; >> I want to run a jsp page: Accordingly i map it in controller.xml >> >> <!-- View Mappings --> >> >> <view-map name="error" type="jsp" page="/error/error.jsp"/> >> >> <view-map name="main" type="screen" >> page="component://citizenship/widget/citizenship/GaugeCommonScreens.xml#main"/> >> >> <view-map name="login" type="screen" >> page="component://citizenship/widget/citizenship/GaugeCommonScreens.xml#login"/> >> <view-map name="requirePasswordChange" type="screen" >> page="component://citizenship/widget/citizenship/DialCommonScreens.xml#requirePasswordChange"/> >> >> >> <view-map name="seat" type="jsp" page="/int.jsp"/> >> >> Now how do i invoke this page ? >> >> Actually i wanted to use bsh for data preparation and then use this data, >> in >> the invoking jsp. But bsh scripts are called inside <screens > and i have >> a >> jsp here. >> >> Also can i invoke jsp inside <widgets> >> or <platform-specific> >> <html><html-template >> location="component://dial/webapp/dial/track.ftl"/></html> >> </platform-specific> >> >> Regards. >> >> > |
take a look at the framework/webtools controller.
BJ Freeman sent the following on 11/4/2008 2:06 AM: > the handler for jsp is in the common_controller.xml > so you don't have to put that in. > do make sure to include it in your controller.xml > then look at an application controller for error.jsp > then in the webapp folder find where that is. > usually in the webapp/component/error. > that should give you an idea where you init.jsp should be. > remove the / > > madppiper sent the following on 11/4/2008 1:17 AM: >> has this problem ever been resolved? >> >> >> >> vijay Si wrote: >>> Hi; >>> I want to run a jsp page: Accordingly i map it in controller.xml >>> >>> <!-- View Mappings --> >>> >>> <view-map name="error" type="jsp" page="/error/error.jsp"/> >>> >>> <view-map name="main" type="screen" >>> page="component://citizenship/widget/citizenship/GaugeCommonScreens.xml#main"/> >>> >>> <view-map name="login" type="screen" >>> page="component://citizenship/widget/citizenship/GaugeCommonScreens.xml#login"/> >>> <view-map name="requirePasswordChange" type="screen" >>> page="component://citizenship/widget/citizenship/DialCommonScreens.xml#requirePasswordChange"/> >>> >>> >>> <view-map name="seat" type="jsp" page="/int.jsp"/> >>> >>> Now how do i invoke this page ? >>> >>> Actually i wanted to use bsh for data preparation and then use this data, >>> in >>> the invoking jsp. But bsh scripts are called inside <screens > and i have >>> a >>> jsp here. >>> >>> Also can i invoke jsp inside <widgets> >>> or <platform-specific> >>> <html><html-template >>> location="component://dial/webapp/dial/track.ftl"/></html> >>> </platform-specific> >>> >>> Regards. >>> >>> > > |
Dear Madppiper,
Yes the problem was solved and i could use JSP extensively in OFBiz. An application was built around it. However as other OFBiz members suggests, try to use FTL as it is a genric templating language. In our case we were left with no options but to use JSPs because of the kind of container support for it. Remember to mention the names of the JSP files as view files in your controller file. Hope that helps, Cheers, Vijay On Tue, Nov 4, 2008 at 10:25 AM, BJ Freeman <[hidden email]> wrote: > take a look at the framework/webtools controller. > > BJ Freeman sent the following on 11/4/2008 2:06 AM: > > the handler for jsp is in the common_controller.xml > > so you don't have to put that in. > > do make sure to include it in your controller.xml > > then look at an application controller for error.jsp > > then in the webapp folder find where that is. > > usually in the webapp/component/error. > > that should give you an idea where you init.jsp should be. > > remove the / > > > > madppiper sent the following on 11/4/2008 1:17 AM: > >> has this problem ever been resolved? > >> > >> > >> > >> vijay Si wrote: > >>> Hi; > >>> I want to run a jsp page: Accordingly i map it in controller.xml > >>> > >>> <!-- View Mappings --> > >>> > >>> <view-map name="error" type="jsp" page="/error/error.jsp"/> > >>> > >>> <view-map name="main" type="screen" > >>> > page="component://citizenship/widget/citizenship/GaugeCommonScreens.xml#main"/> > >>> > >>> <view-map name="login" type="screen" > >>> > page="component://citizenship/widget/citizenship/GaugeCommonScreens.xml#login"/> > >>> <view-map name="requirePasswordChange" type="screen" > >>> > page="component://citizenship/widget/citizenship/DialCommonScreens.xml#requirePasswordChange"/> > >>> > >>> > >>> <view-map name="seat" type="jsp" page="/int.jsp"/> > >>> > >>> Now how do i invoke this page ? > >>> > >>> Actually i wanted to use bsh for data preparation and then use this > data, > >>> in > >>> the invoking jsp. But bsh scripts are called inside <screens > and i > have > >>> a > >>> jsp here. > >>> > >>> Also can i invoke jsp inside <widgets> > >>> or <platform-specific> > >>> <html><html-template > >>> location="component://dial/webapp/dial/track.ftl"/></html> > >>> </platform-specific> > >>> > >>> Regards. > >>> > >>> > > > > > |
In reply to this post by BJ Freeman
great thx :)
But that would mean there would be a clear cut between those pages, correct? No mixing of Screens with those jsp sites... any chance of including jsp-generated content within my freemarker templates or screens?
|
what are you trying to accomplish?
madppiper sent the following on 11/4/2008 10:58 AM: > great thx :) > > But that would mean there would be a clear cut between those pages, correct? > No mixing of Screens with those jsp sites... > > > any chance of including jsp-generated content within my freemarker templates > or screens? > > > BJ Freeman wrote: >> take a look at the framework/webtools controller. >> >> BJ Freeman sent the following on 11/4/2008 2:06 AM: >>> the handler for jsp is in the common_controller.xml >>> so you don't have to put that in. >>> do make sure to include it in your controller.xml >>> then look at an application controller for error.jsp >>> then in the webapp folder find where that is. >>> usually in the webapp/component/error. >>> that should give you an idea where you init.jsp should be. >>> remove the / >>> >>> madppiper sent the following on 11/4/2008 1:17 AM: >>>> has this problem ever been resolved? >>>> >>>> >>>> >>>> vijay Si wrote: >>>>> Hi; >>>>> I want to run a jsp page: Accordingly i map it in controller.xml >>>>> >>>>> <!-- View Mappings --> >>>>> >>>>> <view-map name="error" type="jsp" page="/error/error.jsp"/> >>>>> >>>>> <view-map name="main" type="screen" >>>>> page="component://citizenship/widget/citizenship/GaugeCommonScreens.xml#main"/> >>>>> >>>>> <view-map name="login" type="screen" >>>>> page="component://citizenship/widget/citizenship/GaugeCommonScreens.xml#login"/> >>>>> <view-map name="requirePasswordChange" type="screen" >>>>> page="component://citizenship/widget/citizenship/DialCommonScreens.xml#requirePasswordChange"/> >>>>> >>>>> >>>>> <view-map name="seat" type="jsp" page="/int.jsp"/> >>>>> >>>>> Now how do i invoke this page ? >>>>> >>>>> Actually i wanted to use bsh for data preparation and then use this >>>>> data, >>>>> in >>>>> the invoking jsp. But bsh scripts are called inside <screens > and i >>>>> have >>>>> a >>>>> jsp here. >>>>> >>>>> Also can i invoke jsp inside <widgets> >>>>> or <platform-specific> >>>>> <html><html-template >>>>> location="component://dial/webapp/dial/track.ftl"/></html> >>>>> </platform-specific> >>>>> >>>>> Regards. >>>>> >>>>> >>> >> > |
Ultimately I want to integrate another CMS to the OFBiz framework. The content generated through the cms are generated through jsp files, so now I am trying to mix those together with the ofbiz screens....
|
Ok that is a little over my head.
Might suggest using widgets you put multiple jsp files in a widget screen. madppiper sent the following on 11/5/2008 12:39 AM: > Ultimately I want to integrate another CMS to the OFBiz framework. The > content generated through the cms are generated through jsp files, so now I > am trying to mix those together with the ofbiz screens.... > > > > BJ Freeman wrote: >> what are you trying to accomplish? >> >> madppiper sent the following on 11/4/2008 10:58 AM: >>> great thx :) >>> >>> But that would mean there would be a clear cut between those pages, >>> correct? >>> No mixing of Screens with those jsp sites... >>> >>> >>> any chance of including jsp-generated content within my freemarker >>> templates >>> or screens? >>> >>> >>> BJ Freeman wrote: >>>> take a look at the framework/webtools controller. >>>> >>>> BJ Freeman sent the following on 11/4/2008 2:06 AM: >>>>> the handler for jsp is in the common_controller.xml >>>>> so you don't have to put that in. >>>>> do make sure to include it in your controller.xml >>>>> then look at an application controller for error.jsp >>>>> then in the webapp folder find where that is. >>>>> usually in the webapp/component/error. >>>>> that should give you an idea where you init.jsp should be. >>>>> remove the / >>>>> >>>>> madppiper sent the following on 11/4/2008 1:17 AM: >>>>>> has this problem ever been resolved? >>>>>> >>>>>> >>>>>> >>>>>> vijay Si wrote: >>>>>>> Hi; >>>>>>> I want to run a jsp page: Accordingly i map it in controller.xml >>>>>>> >>>>>>> <!-- View Mappings --> >>>>>>> >>>>>>> <view-map name="error" type="jsp" page="/error/error.jsp"/> >>>>>>> >>>>>>> <view-map name="main" type="screen" >>>>>>> page="component://citizenship/widget/citizenship/GaugeCommonScreens.xml#main"/> >>>>>>> >>>>>>> <view-map name="login" type="screen" >>>>>>> page="component://citizenship/widget/citizenship/GaugeCommonScreens.xml#login"/> >>>>>>> <view-map name="requirePasswordChange" type="screen" >>>>>>> page="component://citizenship/widget/citizenship/DialCommonScreens.xml#requirePasswordChange"/> >>>>>>> >>>>>>> >>>>>>> <view-map name="seat" type="jsp" page="/int.jsp"/> >>>>>>> >>>>>>> Now how do i invoke this page ? >>>>>>> >>>>>>> Actually i wanted to use bsh for data preparation and then use this >>>>>>> data, >>>>>>> in >>>>>>> the invoking jsp. But bsh scripts are called inside <screens > and i >>>>>>> have >>>>>>> a >>>>>>> jsp here. >>>>>>> >>>>>>> Also can i invoke jsp inside <widgets> >>>>>>> or <platform-specific> >>>>>>> <html><html-template >>>>>>> location="component://dial/webapp/dial/track.ftl"/></html> >>>>>>> </platform-specific> >>>>>>> >>>>>>> Regards. >>>>>>> >>>>>>> >> > |
In reply to this post by madppiper-2
That's a tough one. If the content can only be exposed through a JSP then you have a problem because JSPs can ONLY send output to an HttpResponse object, unless you use a hack for the servlet container. In other words, you can't get a String or even a character stream of some sort from a JSP, so the Screen Widget can't do anything with it. It's possible with the above mentioned hacks, but this limitation is one of the big reasons why we don't use JSPs in OFBiz as a best practice any more (they are still supported on their own for pages, but not combined with screen widget, etc). Actually, you can include OFBiz screens from a JSP, but you can't include a JSP in a screen widget screen. -David On Nov 5, 2008, at 2:39 AM, madppiper wrote: > > Ultimately I want to integrate another CMS to the OFBiz framework. The > content generated through the cms are generated through jsp files, > so now I > am trying to mix those together with the ofbiz screens.... > > > > BJ Freeman wrote: >> >> what are you trying to accomplish? >> >> madppiper sent the following on 11/4/2008 10:58 AM: >>> great thx :) >>> >>> But that would mean there would be a clear cut between those pages, >>> correct? >>> No mixing of Screens with those jsp sites... >>> >>> >>> any chance of including jsp-generated content within my freemarker >>> templates >>> or screens? >>> >>> >>> BJ Freeman wrote: >>>> take a look at the framework/webtools controller. >>>> >>>> BJ Freeman sent the following on 11/4/2008 2:06 AM: >>>>> the handler for jsp is in the common_controller.xml >>>>> so you don't have to put that in. >>>>> do make sure to include it in your controller.xml >>>>> then look at an application controller for error.jsp >>>>> then in the webapp folder find where that is. >>>>> usually in the webapp/component/error. >>>>> that should give you an idea where you init.jsp should be. >>>>> remove the / >>>>> >>>>> madppiper sent the following on 11/4/2008 1:17 AM: >>>>>> has this problem ever been resolved? >>>>>> >>>>>> >>>>>> >>>>>> vijay Si wrote: >>>>>>> Hi; >>>>>>> I want to run a jsp page: Accordingly i map it in controller.xml >>>>>>> >>>>>>> <!-- View Mappings --> >>>>>>> >>>>>>> <view-map name="error" type="jsp" page="/error/error.jsp"/> >>>>>>> >>>>>>> <view-map name="main" type="screen" >>>>>>> page="component://citizenship/widget/citizenship/ >>>>>>> GaugeCommonScreens.xml#main"/> >>>>>>> >>>>>>> <view-map name="login" type="screen" >>>>>>> page="component://citizenship/widget/citizenship/ >>>>>>> GaugeCommonScreens.xml#login"/> >>>>>>> <view-map name="requirePasswordChange" type="screen" >>>>>>> page="component://citizenship/widget/citizenship/ >>>>>>> DialCommonScreens.xml#requirePasswordChange"/> >>>>>>> >>>>>>> >>>>>>> <view-map name="seat" type="jsp" page="/int.jsp"/> >>>>>>> >>>>>>> Now how do i invoke this page ? >>>>>>> >>>>>>> Actually i wanted to use bsh for data preparation and then use >>>>>>> this >>>>>>> data, >>>>>>> in >>>>>>> the invoking jsp. But bsh scripts are called inside <screens >>>>>>> > and i >>>>>>> have >>>>>>> a >>>>>>> jsp here. >>>>>>> >>>>>>> Also can i invoke jsp inside <widgets> >>>>>>> or <platform-specific> >>>>>>> <html><html-template >>>>>>> location="component://dial/webapp/dial/track.ftl"/></html> >>>>>>> </platform-specific> >>>>>>> >>>>>>> Regards. >>>>>>> >>>>>>> >>>>> >>>> >>> >> >> > > -- > View this message in context: http://www.nabble.com/Calling-a-jsp-page-from-inside-%3Cscreen%3E-tag-tp13074092p20337855.html > Sent from the OFBiz - User mailing list archive at Nabble.com. > |
Free forum by Nabble | Edit this page |