I have web application which contains a questionnaire which users fill in and submit.
The questionnaire is generated by a Java servlet using an XML File for the structure.
When the user clicks on 'edit questionnaire', the java servlet is called. The servlet retrieves the XML files and reads the file into a vector. It then manipulates the vector to produce the the HTML questionnaire in edit mode for the user to complete.
Now here is where I am having trouble. On the questionnaire in edit mode is a number of textarea fields. If the user places a character return in the field to created a new line and saves the form, I need to capture this and place '<br>' in it place otherwise my XML file becomes invaid and it places the node values over two line which knocks all my code out.
Should be: <node1>myvalue<br>myvalue2</node1>
Does anybody know how I can capture the character return in a textarea field and replace it with the '<br>' value?
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn one way to get user input in Java.
Introduce the Scanner object:
Declare the variable that stores the user input:
An example prompting the user for input:
Methods you need to invoke in order to properly get user input:
Viewers will learn about basic arrays, how to declare them, and how to use them.
Introduction and definition:
Declare an array and cover the syntax of declaring them:
Initialize every index in the created array:
Example/Features of a basic arr…