• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Mitesh Soni
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic