Home Answers Viewqa IDE-Questions Exception in runnning application

 
 


premika
Exception in runnning application
1 Answer(s)      2 years and 3 months ago
Posted in : IDE Questions

INFO: validateJarFile(C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\birt\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

How can we solve this issue?Actually what is the reason for this?Can u please help me. I'm Stuck up here.

Thanks in advance,

View Answers

February 21, 2011 at 11:59 AM


Have you put the servlet-api jat in Tomcat 6.0/lib? Anyways,

Follow these steps:

Put servlet-api.jar inside the lib folder of apache tomcat. 1)create a servlet.

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class HelloWorld extends HttpServlet{ 
  public void doGet(HttpServletRequest request, HttpServletResponse response)
                                   throws ServletException,IOException{
    response.setContentType("text/html");
    PrintWriter pw = response.getWriter();
    pw.println("<html>");
    pw.println("<head><title>Hello World</title></title>");
    pw.println("<body>");
    pw.println("<h1>Hello World</h1>");
    pw.println("</body></html>");
  }
}

2)Go to the webapps folder of your apache tomcat and create a web application folder but it should having an appropriate name like examples.

3)Create web.xml and classes folder inside the WEB_INF folder of web application folder.

4)Copy the servlet to the classes folder.

5)Edit the web.xml to include servlet?s name and url pattern.

 <servlet>
  <servlet-name>HelloWorld</servlet-name>
  <servlet-class>HelloWorld</servlet-class>
 </servlet>
 <servlet-mapping>
 <servlet-name>HelloWorld</servlet-name>
 <url-pattern>/HelloWorld</url-pattern>
 </servlet-mapping>

6)Compile your servlet.

7)Run Tomcat server by clicking the startup.bat file. This is located inside the bin folder of apache tomcat.

8)Open the browser and type the following url:

http://localhost:8080/webapplicationfolder_name/HelloWorld

For more information, visit the following link:

Servlet Tuorials









Related Pages:
Exception in runnning application
Exception in runnning application  INFO: validateJarFile(C:\Program... folder of your apache tomcat and create a web application folder but it should... the WEB_INF folder of web application folder. 4)Copy the servlet
Exception
Exception  public class FooException extends Exception { public..."); } public void calculate() throws FooException, Exception { try { int...(FooException ex) { // Print error and terminate application
Exception
of execution of the application. Following are the regions of NullPointerException
Exception in jsf application
Exception in jsf application  when i am running application i am... -The requested resource () is not available Exception so i want to know reason behind these exception please help me out to solve these Exception
ClassNotFound Exception:DispatcherServlet in spring application?
ClassNotFound Exception:DispatcherServlet in spring application?  **I have added all the jar files,even though classnotfound exception is coming...() exception java.lang.ClassNotFoundException
getting classnotfound exception while running login application
getting classnotfound exception while running login application  hi... [TypedStringValue: value [/login.html], target type [null]]; nested exception... in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]; nested exception
Exception in Thread
Exception in Thread    i am developing a rmi application in eclipse... client and generate connection with server i have following exception : Blockquote Exception in thread "RMI TCP Connection(idle
Exception Handling
. In the application, throw a Grade Exception if the user does not enter a valid letter...Exception Handling  Hi, I really appreciate the help I have gotten,I... to write an application that displays a series of at least 10 student ID numbers
Java Exception
this exception will be caught by a well-written application and will also prompt... to the constructor. Well in this case the exception could be caught by the application... the application to succeed. Hence this exception will be caught by a well-written
Exception Handling
. In the application, throw a Grade Exception if the user does not enter a valid letter...Exception Handling  Hi, I really appreciate the help I have gotten,I... to write an application that displays a series of at least 10 student ID numbers
exception - MobileApplications
"); } // System.out.println("hai"); catch (Exception e... Application", image, ImageItem.LAYOUT_DEFAULT, "image"); } public
Unhandled Exception
-The exception is thrown and not handled by any page flow and message is Application... Unhandled Exception       Unhandled Exception are the exception 
Exception - Java Beginners
What is Exception in Java  What is the Exception that occurs while running the application in Java
Httpservletresponse null pointer exception.
Httpservletresponse null pointer exception.  What is Httpservletresponse null pointer exception?   NullPointerException occurs when we try to implement an application without referencing the object and allocating
j2me exception - MobileApplications
an exception in the below line: public ImageItemMIDlet(){ try{ //for this line i got an exception image = Image.createImage("/Sunset.jpeg"); } catch (Exception e) { //getting IOException
Exception - Java Interview Questions
; While running java application JVM it self throws exception as you said...Exception in Java programming  What is Exception?  Chained Exception in JavaChained Exception in Java, this is a new in release 1.4
User Defined Exception
exception as per requirements of the application. On each application... the required constraint in application. For this, you create your own customized Exception... User Defined Exception     
User Defined Exception
exception as per requirements of the application. On each application... the required constraint in application. For this, you create your own customized Exception... User Defined Exception     
Null Pointer Exception
Null Pointer Exception  whis is the Null Pointer Exception in java? or define Null Pointer Exception with exp?   NullPointerException occurs, when you try to implement an application without referencing the object
throws Exception - RMI
properly. With that same program I replaced for my application. But if run the Server... an exception."RMI not bound Exception". What can I do for this? Whether I have to change the port id for the each seperate application?  Hi friend, I am
Difference between error and exception ????????
Difference between error and exception ?  Can we handle a error... and exception handling.......   Exceptions are things you can create/throw..., or repaired. They are usually beyond the scope of your application code
exception
exception  wHEN RUNTIME EXCEPTION CLASS IS SUB OF EXCEPTION CLASS HOW CAN'T HANDLE UNCHECKED EXCEPTION
List of Java Exception
List of Java Exception       Exception in Java are classified on the basis of  the exception handled by the java compiler. Java consists of the following type of built
List of Java Exception
These Exception occurs, when you try to implement an application without... List of Java Exception       Exception in Java  are classified on the basis of 
exception
exception  chek in and check out exception in java   Please visit the following link: Checked and Unchecked Exception
Exception - JSP-Servlet
Exception  Hi team, This is Ragavendran.R. I am getting java.lang.StringIndexOutOfBoundsException: String out of range : 6 error while compiling the following program in JSP charting application: Plz reply
exception
arguments are not equalto two,throw a user defined exception "invalid parameter exception" ,otherwise display the two parameters.   Here is an example... is not equal to two then invalid parameter exception is thrown ,otherwise display the two
exception
exception  what is the use of catch block even though we have predefined exception object
jdbc adapter exception - JDBC
in MySQL through my Java Application. For that I added "?sessionVariables..." It is working fine, but it is not working when I deployed my application. Please any
exception
exception  example for numberformat exception   Hi Friend, Try the following code: class NumberFormatExceptionEx{ public static void...); } catch(Exception e){ System.out.println(e
exception
defined checked exception ââ?¬Å?InvalidCharcterFoundExceptionââ?¬Â? and creater a block of codes that will handle the exception
Exception
Exception  whis is the Arithmetic Exception in java? or define Arithmetic Exception with exp?   Arithmetic Exception occurs, when you divide a number by zero. Example public class TryCatch { public static void main
Exception - JSP-Servlet
Exception  Hi, I am Ragavendran.R.. I am using swiftchart for my chart application.. For this purpose, I am using ServletOutputStream sos=response.getOutputStream(); in my JSP Page. But, I am getting
Exception
Exception   I was creating a table dynamically but it shows exception i.e shown down Suplier created0 Suplier created0 Suplier created0 Product created0 Product created0 Product created0 Product created0 could not fetch initial
exception
user defined unchecked exception  can we create user defined unchecked exceptions? if so what is the exact use of it in real time?   Please visit the following links: http://www.roseindia.net/java/java-exception/user
exception
exception  Identify the reason for SQLException exception, which is encountered when the developer tries to run the following code snippet to insert..."); ps.executeUpdate(); } catch(Exception e
What Is an Exception
the application to succeed. Hence this exception will be caught by a  well... the exception could be caught by the application but it would rather try... Exception in Java      
Exception Spring framework - java.io.FileNotFoundException - Spring
Exception Spring framework - java.io.FileNotFoundException  HI , while i am running spring application. I got following exception during...-INF folder. Exception is : [Servlet.LOG]: action: null
JDBC Exception
JDBC Exception       The Exception are the set of condition that occurred when an abnormal... the execution of program. Exception Occurred in JDBC Connectivity when a connection
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException  ... is clicking I getting the error : Exception in thread "AWT-EventQueue-0...) ON button is clicking the application is runing and click on OFF button
class cast Exception - Development process
with printer connection with java application. Every time am getting the class cast exception and iam sending the code please check this and correct me... (PrintException pe) {System.out.println("Exception "+pe
Text To speech exception - Java Beginners
Text To speech exception  Sir/Madam, I want to create a application for text to speech. I am using Sysnthesizer class of speech package...(); } catch (Exception e) { e.printStackTrace
Servlet.init() for servlet FacesServlet threw exception
Servlet.init() for servlet FacesServlet threw exception  javax.servlet.ServletException: Servlet.init() for servlet FacesServlet threw exception... tried running the application in tomcat
Java Illegal State Exception
Java Illegal State Exception   ... classes. This exceptional classes are the subclasses of run-time exception, that is used further in exception handling. There are list of classes
Enhanced SQL Exception Handling
the program recovers from the exception without altering the application... Application Specific Recovery. Non-Transient Exception: This exception... many times the application Program tries to recover the exception, it can never

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.