# Similar like doGet on Servlets

**URL:** <https://techcommunity.softwareag.com/t/similar-like-doget-on-servlets/57431>\
**Category:** Forum\
**Tags:** Former-Crossvision-Products, Application-Composer\
**Created:** [July 26, 2006, 1:31pm UTC](https://techcommunity.softwareag.com/t/similar-like-doget-on-servlets/57431 "2006-07-26T13:31:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert1](https://avatars.discourse-cdn.com/v4/letter/r/48db29/32.png) [@Robert1](https://techcommunity.softwareag.com/u/Robert1)\
**Post date:** [July 26, 2006, 1:31pm UTC](https://techcommunity.softwareag.com/t/similar-like-doget-on-servlets/57431/1 "2006-07-26T13:31:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Robert1](https://avatars.discourse-cdn.com/v4/letter/r/48db29/32.png) [@Robert1](https://techcommunity.softwareag.com/u/Robert1)\
**Post date:** [August 1, 2006, 12:56pm UTC](https://techcommunity.softwareag.com/t/similar-like-doget-on-servlets/57431/2 "2006-08-01T12:56:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:38pm UTC](https://techcommunity.softwareag.com/t/similar-like-doget-on-servlets/57431/3 "2021-04-02T14:38:38Z")

</div>


