Similar like doGet on Servlets

Hi,

finally I got my applet running within the Application Designer environment, but now I have to face the next problem. Originally the applet was talking to a specific servlet via the doGet-“channel”. But since I do not want to have any servlet running outside the Application Designer project (maintenance) I need something similar. E.g. is there any possibility to open up a “channel” to the Adapter which would fullfil the same functionality ?


The orig. code snipet within the applet:

        URL hostURL     = getCodeBase();
        String hostName = hostURL.getHost();
        int port        = hostURL.getPort();

        String getStr   = "http://" + hostName + ":" + port + "/webffc/WACOverviewSupport?nodetype=" + nodeType;

        // connect to the servlet
        URL wacOverviewSupportServlet = new URL(getStr);
        URLConnection servletConnection = wacOverviewSupportServlet.openConnection();

        servletConnection.setDoOutput (false);
        servletConnection.setDoInput (true);

        // Don't use a cached version of URL connection.
        servletConnection.setUseCaches (false);
        servletConnection.setDefaultUseCaches(false);

        servletConnection.connect();

        InputStream is = servletConnection.getInputStream();
        ...

The code snipet within the servlet (WACOverviewSupport):

protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
        ...
        OutputStream os = response.getOutputStream();
        ...

Any help is very appreciated,

Thanks,

Rob.

Hi,

I guess it is not really possible. So I changed the whole thing around and put the CIS into my existing web project and it works.

I am still curious if there would not be another possibility anyway. If anyone figures out, just let us know. Thanks.

Cheers,

Rob.