user1665039
user1665039

Reputation: 17

javax.servlet.ServletException: missing jspFile

I use tomcat 7.0.29 and when I deploy my app(an applet) and start the tomcat from eclipse, I got this error.

SEVERE: Servlet /test threw load() exception javax.servlet.ServletException: missing jsp File

What could be the problem?

Upvotes: 0

Views: 5284

Answers (2)

Vikky
Vikky

Reputation: 1253

I had the same issue and I found that there was a mention of a JSP file in my web.xml. I placed this JSP file in some other directory but forgot to update the path in web.xml. As soon as I updated the path in web.xml. The error was resolved.

   <servlet>
    <servlet-name>TH</servlet-name>
    <jsp-file>/Representation/th.jsp</jsp-file>
  </servlet>

   <servlet-mapping>
     <servlet-name>TH</servlet-name>
     <url-pattern>/th.html</url-pattern>
  </servlet-mapping>

Upvotes: 2

user1820275
user1820275

Reputation:

Wikipedia told me

Java applets can run in a Web browser using a Java Virtual Machine (JVM), or in Sun's AppletViewer, a stand-alone tool for testing applets

And for this:

SEVERE: Servlet /test threw load() exception javax.servlet.ServletException: missing jspFile

Did Your Applet really Contain JSP files? If So then You can Run it on TOMCAT

To run an Java Applet embed <applet> tag as follows:

<!DOCTYPE HTML PUBLIC 
  "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
<HTML>
<HEAD>
<TITLE>HelloWorld_example.html</TITLE>
</HEAD>
<BODY>
<H1>A Java applet example</H1>
<P>Here it is: <APPLET code="HelloWorld.class" WIDTH="200" HEIGHT="40">
This is where HelloWorld.class runs.</APPLET></P>
</BODY>
</HTML>

Or You can Use appletviewer as shown here

Upvotes: 2

Related Questions