You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Ender Hikmet KILIÇOÐLU <en...@kilicoglu.nom.tr> on 2003/04/30 09:47:31 UTC

struts integration method suggestion

Hi
Many day ago I tried to integrate struts with turbine. It was an assay not a
real project but using rawscreen and getRequestDispatcher its possible. I
thing using this method you can use jsp screens and implement jetspeed tld
files. But you must be carefull about using forwards. For example you can
implement it like

http://localhost:8080/jetspeed/portal/screen/struts/editRegistration.transfe
r?action=Create

and tranfer this call to

/editRegistration.transfer?action=Create

in screen so struts will not known anything (of course multiparts -you can
disable in turbine- wont work).

There is another alternative which I tried but bored me. You can code some
struts service which will replace ActionServlet and call made with struts
parameter maybe passed to this service like Action servlets process()
function. You had to wrap some servlet calls like content management and
maybe stream process to capture struts outputs. I think this is best method
but it will take more times.


Ender KILICOGLU

package org.openisp.jetspeed.modules.screens;


import org.apache.velocity.context.Context;

// Turbine Stuff
import org.apache.turbine.util.RunData;
import org.apache.turbine.modules.screens.BaseJspScreen;
import javax.servlet.*;
import javax.mail.internet.ContentType;
import org.apache.turbine.om.security.User;


public class struts extends BaseJspScreen {
  // Determine what file is requested.

  protected String getContentType(RunData rundata)
  {
  	return new String("text/html");
  }

  public void doOutput(RunData rundata) throws Exception
  {

rundata.getServletContext().getRequestDispatcher("/editRegistration.do?actio
n=Create").forward(rundata.getRequest(),rundata.getResponse());
  }

}


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org