---
title: 'AJAX in 50 simple lines: Requesting HTML and Producing JSP'
url: 'https://tutego.de/blog/javainsel/2007/01/ajax-in-50-simple-lines-requesting-html-and-producing-jsp'
markdown: 'https://tutego.de/blog/javainsel/2007/01/ajax-in-50-simple-lines-requesting-html-and-producing-jsp.md'
date: '2007-01-24'
description: 'First we need a simple JSP as a service. http://localhost:8080/jsp/request.jsp?name=Chris The JSP simply returns the length of the string. The format is simple text, no XML. Then we need a HTML page. It shows two text fields. One with an attached onkeyup() listener and one which displays the resul…'
taxonomy:
  category:
    - Allgemein
---

# AJAX in 50 simple lines: Requesting HTML and Producing JSP

![Illustration einer tropischen Insel mit Palmen und einem hohen Berg](https://tutego.de/blog/javainsel/user/themes/tutego/images/insel-cover.jpg)# Java Blog für Programmierer

[Java Blog für Programmierer](https://tutego.de/blog/javainsel/)

## AJAX in 50 simple lines: Requesting HTML and Producing JSP

24.01.2007 · [Christian Ullenboom](https://tutego.de/blog/javainsel/author/admin/)

First we need a simple JSP as a service. <http://localhost:8080/jsp/request.jsp?name=Chris>

```text

```

The JSP simply returns the length of the string. The format is simple text, no XML. Then we need a HTML page. It shows two text fields. One with an attached `onkeyup()` listener and one which displays the result, the length of the string in the first text field. The AJAX-request is inside a function called `call()` by the listener.

```text
Der LängenmannNutzung online: http://localhost:8080/jsp/request.jsp?name=Chris.Name: Length: 
```

The best solution is to use an AJAX framework like prototype, but this is only a very simple example „how this stuff works“ (is there a copyright on the sentence?)

Kategorien: [Allgemein](https://tutego.de/blog/javainsel/category/allgemein/)

[← Alle Beiträge](https://tutego.de/blog/javainsel/)

---

## Navigation

- Previous: [Restart a died Thread](https://tutego.de/blog/javainsel/2007/01/restart-a-died-thread.md)
- Next: [SimpleJdbcTemplate aus Spring 2.0](https://tutego.de/blog/javainsel/2007/01/simplejdbctemplate-aus-spring-2-0.md)
