Has anyone transferred their Struts application to run as a JSR168 portet in
jBoss Portal??
I am using jBossAS 4.0.1sp1 and jBoss Portal v2.0.
Whats confusing me is this: In struts, every action defines the
html/jsp/freemarker etc page that should be displayed. on the user's screen.
However, to display something in a portlet, it should be called inside the
doView() function of the portlet,
This statement is in the doView() function of my portlet's class:
......
PortletRequestDispatcher rd =
getPortletContext().getRequestDispatcher("/main.do");
......
My struts-config:
....
.....
The above scenario displays the content of main.ftl in the portlet's window,
just like it should, i.e. the portlet called main.do, and whatever main.do
returns (main.ftl) is sent to the portlet to be displayed. But, when I put a
link in main.ftl which points to another action, (say, trial.do), the result of
those actions is not displayed in the portal.
My main.ftl:
<#assign html=JspTaglibs["/WEB-INF/struts-html.tld"]>
<#assign bean=JspTaglibs["/WEB-INF/struts-bean.tld"]>
This is main.ftl in stack2.war.
If you see this, it means basic Struts action-mapping is working.
<@html.link action="trial.do">Show Trial</@html.link>
When I click on the "Show Trial" link on main.ftl, the application leaves the
portal and shows the content of trial.ftl on the browser (no portal/portlets,
just trial.ftl).
How do I make sure that whatever I do in struts stays inside the portlet window?
Regards,
Karan
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3870392#3870392
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3870392
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-Development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-development