jsp page is not loaded from html page - html

jsp page is not loaded instead the browser shows "com.mysql.jdbc.Driver". Database is connected to MySQL query browser from Netbeans 8.1. Why the page is not loaded? What is the remedy?

Some of the possible Issues :-
JDBC Driver i.e thin driver seems to be missing or not getting loaded while establishing the connection using JDBC Code in your JSP File.
Try to do the following as mentioned below:-
1.Add your mysql-connector-java-5.1.13-bin.jar in the LIB folder of your Java Project .
2.Right click in you project; click on "Clean and Build";
After that go to the netbeans project folder;
3.Try executing a Your Project and your JSP page should be able to connect to the DB using JDBC API Code.

Related

Multiple error for creating html, JSP page and run server

I try to build a web application using java. The software that I have used Eclipse, mysql workbench, mysql connector/J, jdk-17.0.1. The environment variable that I have set are like
After that I followed How to Connect a MySQL Database to a Tomcat Server in Eclipse video tutorial upto 12:39 min to create a html and jsp page and run the server.
HTML page:
JSP page:
The error in the JSP page is Multiple annotations found at this line:
- The superclass "jakarta.servlet.http.HttpServlet" was not found on the Java
Build Path
- Line breakpoint:P_reg.jsp [line: 1]
Also if I start the server as directed in the video lecture I got the error
I tried to solve this error seeing How do I import the javax.servlet / jakarta.servlet API in my Eclipse project? link.
I went through this link as well. But nothing worked.
How can I fix this problem?

Configuring JSP with J2EE server in eclipse

I'm having a specific configuration here. Trying to run JSP on J2EE preview server in a Dynamic Web Project in Eclipse. I'm aware through other answers that it can be made to work by changing to a Maven project, adding dependencies and/or by using a Tomcat server. But I want to know if there's anything to be re-configured to make it work with my configuration or is it simply that a J2EE preview server cannot handle .jsp ?
The error I get on console is:
No JSP support. Check that JSP jars are in lib/jsp and that JSP option has been specified to start.jar
And the error on browser is: `
HTTP ERROR 500 JSP support not configured
The Preview server doesn't support JSPs. You will have to use a full Servlet container like Apache Tomcat.

How to deploy service based web apps on apache in linux?

So i have a Linux based Server having webmin
And i made an web application having some css/js and a html and i put that folder in var/www/html/TestAPI
installed Apache Web server and every other module recommended
My question is ,how do i make this run as a service,like when i ping the HTML inside this folder it opens up but doesnt load any js/css
How do i execute this when i just open TestAPI
eg:- http://11.11.11.11/TestAPI
(Tried using index.html)
I dont want to use php
Any Help would be deeply appreciated

How to execute aspx file within html using iframe

i am having a contact.html page which is hosted in IIS .Now i need to refer aspx page using iframe which performs some process.is there any possibility to call aspx page if so how can i link in IIS ?
How to build aspx page to link with html page?
if i link using iframe the error displays as below:
Server Error in '/' Application.
Runtime Error
An application error occurred on the server. The current custom error
settings for this application prevent the details of the application
error from being viewed remotely (for security reasons). It could,
however, be viewed by browsers running on the local server machine.

Java Applet needs to read MySQL

I have a Java Applet hosted online which is merrily reading data from CSV files.
However my host has MySQL and I'd like to start read/writing a database instead.
I'm happily accessing MySQL on my home PC with Java (NOT an Applet) via JConnector.
For starters the jar file mysql-connector-java-5.1.18-bin.jar needs uploading to my web server right?
When running my own database-accessing programs from NetBeans I added this jar file to the Netbeans project "Libraries". When compiling/running from command prompt I used "-classpath".
However, an Applet runs on an html page not Netbeans nor DOS! Therefore: by what mechanism do we convey the location of the Driver .jar file to the Applet?
Many thanks, Robin.
An applet should not be directly accessing the DB. Instead it should be forced to go through server-side functionality (JSP, servlet, ASP etc.) that mediates what it can & cannot do.
For either the applet or the server-side mediated solution, the mysql-connector-java-5.1.18-bin.jar will need to be on the run-time class-path. For a servlet/JSP, that would be by putting it into (from memory) WEB-INF/lib. For an applet, added to the archive attribute of the applet element.