I have encountered a problem that I don't really understand. I'm using java code to access a database and then using the jsp part, display in html format the result.The code looks like this:
The problem is, that if I have only the delete button in the form, it works perfectly, but when I added the second button, the page didn't display anything at all.If anyone knows what's going on, please help.
Java+You, Download Today! Java Download » What is Java? » Do I have Java? » Uninstall About Java. This page includes java programs on various java topics such as control statements, loops, classes & objects, functions, arrays etc. All the programs are tested and provided with the output. If you new to java and want to learn java before trying out these program, then read my Core Java Tutorials. Java Programs.
SyySyy
5 Answers
If you get a blank page, then this is often caused because an exception is been thrown in midst of rendering the response and the servletcontainer is unable to display the standard error page with exception details, because the response is already committed.
The exception will be logged to server log file. Lookup it, read the stacktrace and fix the problem accordingly.
Unrelated to the actual problem, the code practice you're showing is actually a poor practice. Java code should go in a Java class (controlled by a servlet) and HTML code should go in JSP without utilizing
out.println()
. JSTL should be used to control the page flow. See also this answer for an example. This way exceptions will/can be caught timely and end up in an error page.Community♦
BalusCBalusC
First of all this is not how you should use jsp.On jsp use jstl on servlet use java code.
If you have registered between 13/10/17 and 22/10/17 you would need to register anew due to database repair. Please login below or register an account with Mods Garden. Download The Klub 17 game. The current version of Klub 17 is V7.5.1.5. In order to use all features and have the latest bugfixes, you should always update your game as soon as a new version is available. How to the install latest version: 1. Download and install V7.5. Download the V7.5 installer here. The klub 17 mods.
and about your issue try checking generated HTML. It should have
Or check for server's log,
See also
Community♦
Jigar JoshiJigar Joshi
Surround your :
with a try/catch block to see if there is an Exception.
LaGrandMereLaGrandMere
Don't use connection process and other updating process in jsp page, try to use servlets or other javabeans. tag to use that servlets.. if u want to update means simply cal that function, declared inside that servlet. servlet s act as a controller of ur jsp page.its more powerful.
fareefaree
Why dont you put the variables in request
then call it in your jsp
code511788465541441code511788465541441