This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Portals and Portlets and the fly likes Struts Portlet in Weblogic Portal...Anybody who can help?? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Portals and Portlets
Reply Bookmark "Struts Portlet in Weblogic Portal...Anybody who can help??" Watch "Struts Portlet in Weblogic Portal...Anybody who can help??" New topic
Author

Struts Portlet in Weblogic Portal...Anybody who can help??

Mitesh Soni
Greenhorn

Joined: Aug 17, 2007
Posts: 18
Hello All,

I am trying to make a struts portlet in the weblogic portal and i am having lots of difficulties eventhough i have been

following the steps given in the bea docs for struts integration.

I am first giving here the directory structure off struts application which i deployed on weblogic server and then i am

trying to integrate in weblogic portal 10 where i am getting problems.

strutsApp(Main folder)
C:\struts-training\strutsApp\index.jsp
C:\struts-training\strutsApp\success.jsp
C:\struts-training\strutsApp\customerform.jsp
C:\struts-training\strutsApp\WEB-INF
C:\struts-training\strutsApp\WEB-INF\classes
C:\struts-training\strutsApp\WEB-INF\classes\struts
C:\struts-training\strutsApp\WEB-INF\classes\struts\example
C:\struts-training\strutsApp\WEB-INF\classes\struts\example\*.class
C:\struts-training\strutsApp\WEB-INF\lib
C:\struts-training\strutsApp\WEB-INF\*.tld
C:\struts-training\strutsApp\WEB-INF\*.xml

this is perfactly working structure in weblogic and i have tested it.

Now I am giving the structure i used for weblogic portal 10 according to the integration steps of bea docs.

C:\bea\user_projects\w4WP_workspaces\struts1

in struts1 folder
MyEAR(Ear project)
MyWEb(web project)folders are there.

C:\bea\user_projects\w4WP_workspaces\struts1\MyWeb\src\struts\example\*.class
(Action and Form class)

C:\bea\user_projects\w4WP_workspaces\struts1\MyWeb\WebContent\index.jsp
C:\bea\user_projects\w4WP_workspaces\struts1\MyWeb\WebContent\jsp\customerform.jsp

C:\bea\user_projects\w4WP_workspaces\struts1\MyWeb\WebContent\strutsApp\strutsApp.portlet
C:\bea\user_projects\w4WP_workspaces\struts1\MyWeb\WebContent\strutsApp\Success.jsp
C:\bea\user_projects\w4WP_workspaces\struts1\MyWeb\WebContent\MyPortal.portal

C:\bea\user_projects\w4WP_workspaces\struts1\MyWeb\WebContent\WEB-INF\classes\struts\example\*.class
(Action and Form class)

C:\bea\user_projects\w4WP_workspaces\struts1\MyWeb\WebContent\WEB-INF\lib\*.jar
C:\bea\user_projects\w4WP_workspaces\struts1\MyWeb\WebContent\WEB-INF\*.tld
C:\bea\user_projects\w4WP_workspaces\struts1\MyWeb\WebContent\WEB-INF\*.xml
C:\bea\user_projects\w4WP_workspaces\struts1\MyWeb\WebContent\WEB-INF\src\struts\example\*.java

My web.xml has this extra entry bcoz weblogic portal supports the struts bydedefauld and so there is one entry for config

already.

<init-param>
<param-name>config/strutsApp</param-name>
<param-value>/WEB-INF/struts-auto-config-strutsApp.xml</param-value>
</init-param>

My struts-auto-config-strutsApp.xml

<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"

"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>
<form-beans>
<form-bean name="CustomerForm" type="struts.example.CustomerForm" />
</form-beans>
<global-forwards>
<forward name="mainpage" path="/index.jsp" />
</global-forwards>
<action-mappings>
<action path="/showCustomerForm"
parameter="/jsp/CustomerForm.jsp"
type="org.apache.struts.actions.ForwardAction" />

<action path="/submitCustomerForm"
type="struts.example.CustomerAction"
name="CustomerForm"
scope="request"
validate="true"
input="/jsp/CustomerForm.jsp">
<forward name="success" path="/Success.jsp" />
</action>
</action-mappings>
<controller processorClass="com.bea.struts.adapter.action.AdapterRequestProcessor"/>
<message-resources parameter="struts.example.MessageResources" null="false"/>
</struts-config>

Now the problem is when i make portlet and run it the the first page customerform.jsp comes in portlet window and asks for

Firstname and Lastname and when i submit the action class is also called and i can say that bcoz i have put print statement

in that class and it is printed on console but when it forwards....ther the problem lies....it results in full-screen, stand

-alone Struts pages...

Solution according to docs is to make sure that struts-adapter JSP tag libraries are in the project's WEB-INF/lib directory

and that they are registered in web.xml.

I cannot find that...

Is there any problem in my directory structure?? any entries remaining anywhere?? kindly help me...I m working on this issue

since 10 days without success.
Jangala Ramesh
Greenhorn

Joined: Sep 03, 2004
Posts: 1
Hi, Your prob get resolved i believe.

Me also facing the same problem, can you send me how you resolved it to rjangala02@gmail.com
Roaa Mostafa
Greenhorn

Joined: Feb 22, 2010
Posts: 1
Dear All,

Try to add struts tagfiles to your web.xml :
<jsp-config>
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>
/WEB-INF/lib/struts-html.tld
</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-adapter-html.tld</taglib-uri>
<taglib-location>
/WEB-INF/lib/struts-adapter-html.tld
</taglib-location>
</taglib>

<taglib>
<taglib-uri>/WEB-INF/struts-adapter-naming.tld</taglib-uri>
<taglib-location>
/WEB-INF/lib/struts-adapter-naming.tld
</taglib-location>
</taglib>

<taglib>
<taglib-uri>/WEB-INF/struts-adapter-nested.tld</taglib-uri>
<taglib-location>
/WEB-INF/lib/struts-adapter-nested.tld
</taglib-location>
</taglib>

<taglib>
<taglib-uri>/WEB-INF/struts-adapter-tiles.tld</taglib-uri>
<taglib-location>
/WEB-INF/lib/struts-adapter-tiles.tld
</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>
/WEB-INF/lib/struts-bean.tld
</taglib-location>
</taglib>
</jsp-config>


Don't forget to add the filess under web-inf/lib
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Struts Portlet in Weblogic Portal...Anybody who can help??
 
Similar Threads
multiple portlet config in WSAD
weblogic jsp/servlet deployment
problem in jsp only with bea weblogic
Struts module problem
Problem with webapplication during deploying