1

When I add this jsp page to or any jsp page for that matter to cpanel is shows only the html and not the results of the jsp page. I would really appreciate some help.

<%@page import="java.sql.PreparedStatement"%>
<%@page import="java.sql.DriverManager"%>
<%@page import="java.sql.Connection"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="com.mysql.cj.protocol.Resultset"%>
<%@page import="db.Database"%>
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <link rel="shortcut icon" type="image/png" href="assets/img/portfolio/virus.png" >
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
        <meta name="description" content="" />
        <meta name="author" content="" />
        <title>Eddie Muler</title>
        <!-- Font Awesome icons (free version)-->
        <script src="https://use.fontawesome.com/releases/v5.12.1/js/all.js" crossorigin="anonymous"></script>
        <!-- Google fonts-->
        <link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css" />
        <link href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic" rel="stylesheet" type="text/css" />
        <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
        <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %> 
Davidito
  • 21
  • 6
  • 1
    Is tomcat installed? – Taylor Apr 27 '20 at 22:18
  • No, Easy Apache 4 is installed. Is tomcat a must ? – Davidito Apr 27 '20 at 22:19
  • 1
    Easy Apache by itself does not appear to be a servlet container (at least from scanning the docs). JSPs require a servlet container to work. – Taylor Apr 27 '20 at 22:30
  • I just install tomcat, not working as of now but I will try restarting the server – Davidito Apr 27 '20 at 22:43
  • just installed tomcat and still not working....super strange because it works fine on my local machine with tomcat – Davidito Apr 27 '20 at 23:02
  • I'd recommend spending some time with the easyapache docs, it seems like the configuration is involved. Note that jsps are not entirely analogous to phps, they usually need to be part of a java application or webapp to function. – Taylor Apr 27 '20 at 23:06
  • I went over it the docs and no mention of jsp files. However if tomcat is install it hypothetically should work unless there is a problem in the Catalina file. – Davidito Apr 28 '20 at 00:07

0 Answers0