Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A JSR168-Struts working example?

 
Rohit Lal
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

It's been some time since I have progressed beyond displaying "Hello World" on a JSR-168 portlet and going on to navigation between JSPs and saving information through forms. At this stage I can think of using the data collected and sending it to the business layer.

Trouble is, I need to develop an example using Struts as most of the development in my firm is done using it. I myself am more comfortable with Struts and so am eager to build a portlet using it. I came across an example on IBM's site at this URL:
http://www-128.ibm.com/developerworks/websphere/library/techarticles/0601_patil/0601_patil.html

It requires you to download a zip file which contains several example wars for portlets using Struts. So far so good. But I go on to discover that after importing the wars as projects under RAD v.6, only the ones using the IBM portlet API work. The one sole example that uses the JSR-168 api doesn't show anything apart from the portlet description on the header. The page content is blank. I discovered an exception trace on the server console which goes something like:

[1/12/06 14:37:27:031 IST] 131f43e7 ServletInstan E SRVE0100E: Did not realize init() exception thrown by servlet Struts Standard Blank: javax.servlet.UnavailableException: Exception during portlet initialization: java.lang.NoClassDefFoundError: com/ibm/wps/struts/pluto/base/ErrorInfo
at com.ibm.wps.pe.pc.std.core.PortletServlet$PortletClone.<init>(PortletServlet.java:409)
....
..
.

This is when I did not even touch the code of that example app and just ran it as is. Don't know what this exception is about...tried looking for the unavailable class "com.ibm.wps.struts.pluto.base.ErrorInfo" in the library jars but couldn't find it.

I know there is nothing wrong with the IDE itself (RAD v.6) because I have developed some non-Struts examples which work..

Does anyone know whats up?

Rohit Lal
 
Reid M. Pinchback
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you go to the StringBeans site (www.nabh.com), one
of the developers wrote an article about using Struts
for portlet development, and they have code you can
download (it is also one of the portlets distributed
with StringBeans). Just look for anything about
MVCPortlet.
 
Vikrama Sanjeeva
Ranch Hand
Posts: 760
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Check IBM redbook: sg246681.pdf and see chapter 9. They have defined JSR 168 Portlet development with RAD V6.

Bye,
Viki.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic