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 8383331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:08:18+00:00 2026-06-09T17:08:18+00:00

I am new to web development with java in general, but I have some

  • 0

I am new to web development with java in general, but I have some background in Java programming so I chose the Java-version of App Engine. Before that I only had web projects involving PHP.

Is there any elegant way in App Engine to handle HTML forms that are sent to my servlet and escape them properly? The examples in the App Engine docs only refer to escaping XML in the jsp that displays the info to the user, but I would like to have clean text without XML in my DataStore to minimize accidental errors.

I am currently using the StringEscapeUtils from the Apache Commons package, but I would prefer a solution included in App Engine since I have to deploy the commons-jars with my app. Is the only other way to go, to parse the strings myself with regex?

  • 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-09T17:08:19+00:00Added an answer on June 9, 2026 at 5:08 pm

    You should not escape what is sent by the user. Leave it as it is, and store it as it is in the database. This data might be XML for a good reason, and the data might be used by something else than a webapp, which doesn’t care about HTML-escaping. And even in the webapp, it could be sent as part of a JSON object, where HTML-escaping is not needed.

    When generating an HTML page containing this data, then you must escape the HTML-special characters to make sure everything is displayed correctly. StringEscapeUtils is just fine, and bundling jars with your app is perfectly normal. If you’re using JSPs to generate the HTML markup, use the JSTL <c:out> tag, or the JSTL fn:escapeXml() function.

    If you want to make it in Java without embedding the commons-lang library, implement the filtering yourself. You just need to replace <, >, ', " and & with their corresponding HTML entities. Shouldn’t be too hard.

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

Sidebar

Related Questions

I’m new to web development but have coding experience (Java) and I’m trying to
I'm new to JBoss Seam and Java web app development in general. One thing
I am new in web development but I have worked with html and php
I'm new to Java development. I have a web site and it builds very
Please forgive if i use terminology wrong, but i'm new to java-web development and
I am new to web programming, coming from a video game development background (c++),
I am new to Java web development (but not new to Java/OOPs). I am
I'm completely new to the Spring framework (and most web development in general), but
I'm fairly new to Android, but have done lots of Java/JSP development and HTML
I am new in java web development. I have a dynamic jsp page(Loan Application

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.