Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7929113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T19:58:04+00:00 2026-06-03T19:58:04+00:00

i have the following problem: I’ve got a JSP file with the following Code:

  • 0

i have the following problem:

I’ve got a JSP file with the following Code:

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"     "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Mehr Tutorials gibt es auf: http://www.itblogging.de</title>
</head>
<body>

Um eine Lieferung aufzugeben bitte die folgenden Daten ausfüllen:<br />
<hr />
<form method="GET" name="Lieferung" action="LoginCheck">
Kennzeichnung<br />
<input type="text" name="ID" /><br />
Abholpunkt<br />
<input type="text" name="Start" /><br />
Lieferpunkt<br />
<input type="text" name="End" /><br />
Kontaktmail<br />
<input type="text" name="Mail" /><br />
Link<br />
<input type="text" name="Link" /><br />
<input type="submit" value="Lieferung aufgeben" />
<input type="reset" value="reset" />
</form>

</body>
</html>

When i click the submit Button a servlet creates an Object of the following class:

package servlet;

public class Lieferinhalt {

    String link = "";
    String ID ="";
    String von ="";
    String nach ="";
    String mail ="";

    void setLink(String a) {
        this.link = a;
    }

    void setID(String a) {
        this.ID= a;
    }

    void setVon(String a) {
        this.von = a;
    }

    void setNach(String a) {
        this.nach = a;
    }

void setMail(String a) {
    this.mail = a;
}
}

The servlet then puts the information from the JSP file into the object of this class and, just for testing, it creates a HTML code which says the values of the object. It looks like this:

package servlet;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;



public class LoginCheck extends HttpServlet {
    private static final long serialVersionUID = 1L;

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    {
         response.setContentType("text/html");
        PrintWriter out = response.getWriter();

        String id = request.getParameter("ID");
        String start = request.getParameter("Start");
        String end = request.getParameter("End");
        String mail = request.getParameter("Mail");
        String link = request.getParameter("Link");     

        Lieferinhalt a = new Lieferinhalt();
        String docType =
                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 "+
                "Transitional//EN\">\n";

        a.setID(id);
        a.setVon(start);
        a.setNach(end);
        a.setMail(mail);
        a.setLink(link);



        out.println(docType + "<HTML>\n"+
                "<HEAD><TITLE>HalloWelt</TITLE></HEAD>\n"+
                "<BODY BGCOLOR=\"#FDF5E6\""+
                "<H1>Servlet funktioniert!</H1>"+ "<br />" +
                "Die ID war: " + a.ID + "<br />" +
                "Der Startpunkt war: " + a.von + "<br />" +
                "Der Endpunkt war: " + a.nach + "<br />" + 
                "Die Mail war: " + a.mail + "<br />" + 
                "Der Link war: " + a.link + "<br />" +
                "</BODY></HTML>");

    }
}

What i want to do is to save this object in something like a database. We are not allowed to use SQL and other database languages.
I thought of something like a permanent ArrayList or something like that. Is that possible? Or are there other/better ways? How do they work?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T19:58:06+00:00Added an answer on June 3, 2026 at 7:58 pm

    You can serialize that Java object to the file system. Try that.

    There are a lot of choices for formats: Java serialization, XML, JSON, protobuf, etc. I’d recommend using XML, because parsers are easily available and the data is in plain text.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following problem: I have an HTML textbox ( <input type=text> )
I have following problem. I have a team page like this example: http://www.social-markets.de/social-commerce-team.html small
I have following problem: I display an HTML-Document with an JTextPane. In my HTML-Text
I have following problem, Code: String a=Yeahh, I have no a idea what's happening
I have the following problem using template instantiation [*]. file foo.h class Foo {
I have the following problem in Java: I have a base class and a
i have following problem To decode the Biquinary code use the number 5043210. At
I have following problem. I want to create a file system based session storage
I have following problem. I use this tutorial to creating a multiple file uploader:
I have following problem to be solved in java: Implement class Alkio. Test with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.