Class Call Failure

My call to a class does nothing!  (I'm trying to write rows to a table.)  My environment is...

- Start Tomcat
- Start browser and invoke index.jsp
- Click on link taking me to Application_EnterEdit.html
- Call to java class populates table (what doesn't work)

Here's the top of Application_EnterEdit.html...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page import="gov.vha.hvm.deliveryservice.scs.jsp.Subscriptioncalls" %>
<%@ page import="java.io.Writer" %>
<html>
<head>
<title></title>


In Application_EnterEdit.html, here's my call to the java class...

<table id="appList" class="sortable" cellspacing="10">
<thead>
<tr>
     <th>Name</th>
     <th>Description</th>
</tr>
</thead>
<tbody>
<% Subscriptioncalls.tblLoadApps(out); %>            <--- right here
</tbody>
</table>

Here's my class...

package gov.vha.hvm.deliveryservice.scs.jsp;

import java.io.IOException;
import java.io.Writer;

public class Subscriptioncalls {
 
  public static void tblLoadApps(Writer out){
         try {
            out.write("<tr><td>abc</td><td>def</td></tr>\n");
        } catch (IOException e) {
            e.printStackTrace();
        }
  }
}

What am I doing wrong?  Why aren't rows added to table?
LVL 1
LarryAndroAsked:
Who is Participating?
 
CEHJCommented:
It should be a jsp file. Is it html?
0
 
LarryAndroAuthor Commented:
I'll change from html to jsp.  

Whether that fixes the problem or not, that makes sense... I take it you can't shell out to a java class from a html.  Right?

Thx, LJA
0
 
CEHJCommented:
>>I take it you can't shell out to a java class from a html.  Right?

Right. html files are not compiled into servlets. jsp files are
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
LarryAndroAuthor Commented:
Now, I'm getting the following error message?  Any ideas?
Thx...

HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: org/apache/jsp/Index_jsp (wrong name: org/apache/jsp/index_jsp)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:256)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:856)


root cause

java.lang.NoClassDefFoundError: org/apache/jsp/Index_jsp (wrong name: org/apache/jsp/index_jsp)
      java.lang.ClassLoader.defineClass0(Native Method)
      java.lang.ClassLoader.defineClass(ClassLoader.java:539)
      java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
      java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
      java.net.URLClassLoader.access$100(URLClassLoader.java:55)
      java.net.URLClassLoader$1.run(URLClassLoader.java:194)
      java.security.AccessController.doPrivileged(Native Method)
      java.net.URLClassLoader.findClass(URLClassLoader.java:187)
      org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:192)
      org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:110)
      org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:585)
      org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:177)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:856)


note The full stack trace of the root cause is available in the Tomcat logs.

0
 
LarryAndroAuthor Commented:
Figured it out.  Here's the error...

javax.servlet.ServletException: org/apache/jsp/Index_jsp (wrong name: org/apache/jsp/index_jsp)
 
I noticed the different case of the name... Index vs index.  So, I stopped server, browser, and deleted all files in C:\Tomcat\work\Catalina\localhost\SCS\org\apache\jsp.  When I restarted, everything worked.
0
 
LarryAndroAuthor Commented:
CEHJ, thanks for the html should be jsp help!
0
 
CEHJCommented:
:-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.