Seeing as I am not getting any further with this problem, I am attaching a server-side plugin which loads a servlet. If you compile this (in the default package) and place it on your plugin classpath, it should load.
If you are testing locally, URL is:
http://localhost:8080/servoy-service/AServlet
If anyone can actually see the stack dump on any method other than init(), please post back. Otherwise, I can only assume this is a Servoy or servoy-tomcat issue.
thanks
julian
here is plugin source:
import java.io.IOException;
import java.rmi.Remote;
import java.util.Hashtable;
import java.util.Map;
import java.util.Properties;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.servoy.j2db.plugins.IServerAccess;
import com.servoy.j2db.plugins.IServerPlugin;
import com.servoy.j2db.plugins.PluginException;
import com.servoy.j2db.preference.PreferencePanel;
import com.servoy.j2db.util.Debug;
public class ServletPlugin
implements IServerPlugin, Remote
{
public ServletPlugin()
{
super();
}
public void initialize(final IServerAccess iServerAccess) throws PluginException
{
try
{
iServerAccess.registerWebService(“AServlet”, new HttpServlet()
{
/** {@inheritDoc} */
public void init() throws ServletException
{
Thread.dumpStack();
super.init();
}
/** {@inheritDoc} */
protected void doGet(HttpServletRequest arg0, HttpServletResponse arg1) throws ServletException, IOException
{
Thread.dumpStack();
super.doGet(arg0, arg1);
}
/** {@inheritDoc} */
protected void doPost(HttpServletRequest arg0, HttpServletResponse arg1) throws ServletException, IOException
{
Thread.dumpStack();
super.doPost(arg0, arg1);
}
/** {@inheritDoc} */
protected void service(HttpServletRequest arg0, HttpServletResponse arg1) throws ServletException, IOException
{
Thread.dumpStack();
super.service(arg0, arg1);
}
/** {@inheritDoc} */
public void service(ServletRequest arg0, ServletResponse arg1) throws ServletException, IOException
{
Thread.dumpStack();
super.service(arg0, arg1);
}
});
System.out.println(“Service Registered”);
}
catch (Exception e)
{
Debug.error(e);
e.printStackTrace();
}
}
public void load() throws PluginException
{
System.out.println(“ServletPlugin.load() invoked”);
}
public void unload() throws PluginException
{
System.out.println(“ServletPlugin.unload() invoked”);
}
public PreferencePanel getPreferencePanels()
{
return null;
}
public Map getRequiredPropertyNames()
{
return new Hashtable();
}
public Properties getProperties()
{
return new Properties();
}
}