Hi guys need big help here please. Please take note, I am new to java Ok i have 3 jsp one is called homePage.jsp
This is also in the homePage.jsp
Second jsp is clientExtra.jsp
Here I get data on the HTML page and send them to the addExtraItem() in the homePage.jsp
The third jsp is addExtras.jsp
Now all I want to know is, how do I display or send the String result from addExtras.jsp back to the homePage.jsp? or the clientExtra.jsp? The string will contain id it was successful or what field was incorrectly entered.
I want to show the client what was wrong.
In a servlet (you never use a JSP for anything other than to produce HTML) you could use any JSON library (such as Google's Gson library) to produce the JSON equivalent of your data and simply write that as the response.