Problem for retriveing servlet class file (error in DD) I think so

hi to all ,
my deployment descriptor is here ....
I tried to access servlet ... I got the response is like that
The requested Resource is not available
why its happening ?
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<welcome-file-list>
     <welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<listener>
     <listener-class>CallMonitor.MyListener</listener-class>
</listener>
<servlet>
     <servlet-name>LoginAction</servlet-name>
     <servlet-class>LoginAction</servlet-class>
</servlet>
<servlet>
     <servlet-name>InsertData</servlet-name>
     <servlet-class>InsertData</servelt-class>
</servlet>
<servlet-mapping>
     <servlet-name>LoginAction</servlet-name>
     <url-pattern>/LoginAction</url-pattern>
</servlet-mapping>
<servlet-mapping>
     <servlet-name>InsertData</servlet-name>
     <url-pattern>/InsertData</url-pattern>
</servlet-mapping>
<context-param>
     <param-name>jdbcurl</param-name>
     <param-value>jdbc:mysql://localhost:3306/test</param-value>
</context-param>
</web-app>But i remove the code from it , i can access LoginAction Servlet..
<servlet>
     <servlet-name>InsertData</servlet-name>
     <servlet-class>InsertData</servelt-class>
</servlet>
<servlet-mapping>
     <servlet-name>InsertData</servlet-name>
     <url-pattern>/InsertData</url-pattern>
</servlet-mapping>
In Tomcat manager i found the applicaton is not running.
i started the application using start command...
But i got error message
FAIL - Application at context path /25.7 could not be started
Message was edited by:
kannankalli

<servlet-class>InsertData</servelt-class>Closing element for <servlet-class> is wrong.
Before posting for any help check following stuff
- Whether deployment descriptor is well-formed
- Whether it is valid i.e. all elements are properly placed

Similar Messages

  • Bad class file error

    Hi
    I set my java home to JDK 1.4 and execute my build.It is ok.
    Then i try the same by setting JDK 1.5 as java home. build is ok.
    But now i need to use only JDK 1.4.So i set my java home as jdk 1.4 and try to execute the build.xml
    Now i got the error of class file has wrong version 49.0, should be 48.0
    I understand that the class files(49.0) which are created by JDK 1.5 and i try to execute those by JDK 1.4.
    But i donot knwo how to solve this.
    Will anybody please help me to solve?
    Thank you

    Hi
    I didnot compile java files with JDK 1.4 and 1.5 both.
    First time i use JDk 1.4. for all java files
    Second time i use JDk 1.5 for all java files.
    Finally i should use JDK 1.4. So i come to jdk 1.4 and set java home jdk 1.4 and exucute my build.xml. Then i got the bad class file error.
    Can u help me at this point?
    Thank you

  • Newbie Question - Accessing Servlet Class file

    im trying to run my servlet class file but am not able to do so. I've compiled my servlet and the class file generated is under build...web-inf/classes as it should be. Now how i do access this through the browser , isnt it just not localhost:29080/MyWebApp/HelloServlet. Thanks
    -newbie

    Hi There,
    Are you using Java Studio Creator to develop your application? If so this tutorial will help you get started.
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/jscintro.html
    Please also visit the tutorials page at
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/index.jsp
    Thanks
    K

  • Javac probleme: bad class file error

    I'm new to java
    I have two classes myPoint.jav and TestPoint.java, when I compile them, I error:
    in the command line I type:
    C:\otman\java>javac -g geometry\src\myPoint.java TestPoint.java
    TestPoint.java:8: cannot access myPoint
    bad class file: c:\otman\java\geometry\src\myPoint.class
    class file contains wrong class: geometry.src.myPoint
    Please remove or make sure it appears in the correct subdirectory of the classpa
    th.
    myPoint p = new myPoint();
    ^
    1 error
    Can some one help me Thanks
    //Here is the class c:\otman\java\TestPoint.java
    import geometry.src.*;
         Testing my class Point
    public class TestPoint {
    public static void main(String[] args) {
              myPoint p = new myPoint();
              System.out.println("thank you very much");
              System.exit(0);
    // And here is the class c:\otman\java\geometry\src\myPoint.java
    package geometry.src;
         class myPoint members and methods of a 3D point
    public class myPoint {
         private double m_x,m_y,m_z;          // the coordinates
         public double getx() {return m_x;}
         public double gety() {return m_y;}
         public double getz() {return m_z;}
         public void setx(double x) {m_x=x;}
         public void sety(double y) {m_y=y;}
         public void setz(double z) {m_z=z;}
         public void translate(double dx,double dy, double dz) {
              m_x += dx;m_y += dy;m_z += dz;
         // Constructor ------------------------------------------------------------
         myPoint(double x,double y,double z) {
              m_x=x;m_y=y;m_z=z;
         myPoint() {
              m_x=0;m_y=0;m_z=0;
         myPoint(myPoint p) {
              m_x=p.getx();m_y=p.gety();m_z=p.getz();
    // ---------------------------------------------------------------------------------

    Thank you for the reply but still have problem.
    I created a directory classes and the directories look like:
    C:\otman\java\
    TestPoint.java
    classes\
    geometry\
    src\
    myPoint.java
    When I compile using the line command:
    C:\otman\java>javac -g -d classes geometry\src\myPoint.java TestPoint.java
    I get the error:
    TestPoint.java:8: cannot find symbol
    symbol : constructor myPoint()
    location: class geometry.src.myPoint
    myPoint p = new myPoint();
    ^
    1 error
    Now the directories look like:
    C:\otman\java\
    TestPoint.java
    classes\
    geometry\
    src\
    myPoint.class
    geometry\
    src\
    myPoint.java
    I think that myPoint was compiled without problem but TestPoint was not compiled and it gives 1 error.
    Can you help me? Thanks.<!--Session data-->

  • Custom Class file errors out on import javax.servlet.http.HttpSession

    I am trying to write a class file to handle events. This is a test class file copied from the UIX Docs. When I put this in JDeveloper 903 ,and build it the compiler gives the error:
    Error(2,27): cannot access class javax.servlet.http.HttpSession; file javax\servlet\http\HttpSession.class not found
    I am not sure what is the problem? Can anyone please help?
    Here is the code:--
    package mypackage1;
    import javax.servlet.http.HttpSession;
    import oracle.cabo.servlet.Page;
    import oracle.cabo.servlet.BajaContext;
    import oracle.cabo.servlet.event.PageEvent;
    import oracle.cabo.servlet.event.EventResult;
    public class MyClass
    /** This is handleStoreNameEvent version 1 */
    public static EventResult handleStoreNameEvent(BajaContext context,
    Page page,
    PageEvent event)
    String userName = event.getParameter("txt1");
    HttpSession session = context.getServletRequest().getSession(true);
    session.putValue("User Name", userName);
    Page nextPage = new Page("NextPage");
    return new EventResult(nextPage);
    }

    Hi, you are missing the servlet.jar file from your classpath.
    In JDeveloper, you can add this by opening up your project -> libraries and adding the servlet runtime library.

  • Problem in compiling servlet class - using Tomcat

    Hi,
    I have a servlet pgm that I'm trying to compile.I using Tomcat application server.I have my servlet class in D:\servlet_wrk\project1\src
    and my deployment descriptor in D:\servlet_wrk\project1\etc
    my CLASSPATH var is set to C:\Sun\AppServer\jdk\bin
    and
    my PATH var is set to C:\Sun\AppServer\bin.
    When I compile my servlet class Ch1Servlet.java in the command line from the directory
    D:\servlet_wrk\project1 using the command
    javac -classpath D:\applications\tomcat-5.5.12\common\lib\servlet-api.jar -d classes src/Ch1Servlet.java,
    it says error:cannot read: src/Ch1Servlet.java
    Can somebody help me to solve this problem and help me to compile my servlet class.
    Thanks.

    Thanks...as u said I tried putting dir & found that
    my file was saved as Ch1Servlet.java.txt instead for
    Ch1Servlet.java......So that was a problem.Now I'm
    able to compile.Oh, yeah. Notepad will do that to you. I think when you save in Notepad if you put quotes around the name "Whatever.java" then it won't add the .txt.
    But on compiling I'm getting the following error
    package java.servlet.* does not exist
    package java.servlet.http.* does not exist
    package java.io.* does not exist
    Do u the reason for this??? The servlet stuff is java[b]x.servlet. For the io stuff, I don't know, I'd have to see your code. Either you have a typo or a corrupt installation.

  • Problem in finding java class file

    I am writting an application using servlets , JSP and a simple java classfile. The simple java class file is for connection pool and the name of connection pool class is DBConnectionManager . I am using JavaWebserver2.0 and I have placed this class file in .\JavaWebserver2.0\classes
    I am placing my servlets in .\JavaWebserver2.0\servlets folder. Since I am using wfm package so my servlets are placed in .\JavaWebserver2.0\servlets\wfm .
    The problem is with compiling the servlet placed in wfm folder . I get the following error:-
    TestServlet.java:11:cannot resolve symbol
    symbol: class DBConnectionManager
    location: class wfm.TestServlet
    However when I try to compile this class in servlets folder and remove the package statement from the source file, it compiles and works very fine. I am having lot of confusion as the class DBConnectionManager is in classpath but even then compiler gives error. The same class when placed in servlets folder and package statement is removed works very fine.
    Kindly help.

    Hi,
    Is the DBConnectionManager class declared public?
    Does the TestServlet import the package that contains the DBConnectionManager?
    This is all I can come up with, with the current information.
    Cheers,
    --Arnout                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Class File Error 1046

    Hi all, I am trying to write my first class file, been away
    from flash for so long now and im just starting with as3, I have a
    problem with this class file
    I keep get an error
    here is my class // it is in the same directory as my fla,swf

    Hi ActionScripter1,
    If I am not wrong you are not using feature of a document
    class in Flash file.
    I have modified the class given by you to set it as a
    document class
    to run this code you have to do following things:
    1. Update the class with the class pasted below.
    2. Remove all the code about preloadManager from the first
    frame.
    3. set your 'Document Class' property to preloadManager
    As per my opinion this should be the way to implement a
    preloader.
    In this class you will have access to each and every object
    placed on stage. and here 'this' refers to 'stage' only.
    //Updated Class
    package {
    import flash.text.TextField;
    import flash.display.*;
    import flash.events.*;
    import flash.net.*;
    public class preloadManager extends MovieClip {
    public static var l:Loader = new Loader();
    //CONSTRUCTOR for preloadManager Class
    public function preloadManager()
    trace("This is the start point of your programme")
    startPreload('123.swf');
    public function startPreload(swfFile) {
    l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,
    preloadLoop);
    l.contentLoaderInfo.addEventListener(Event.COMPLETE,
    preloadComplete);
    l.load(new URLRequest(swfFile));
    }//end startPreload
    public function preloadLoop(e:ProgressEvent):void {
    var perc:Number=e.bytesLoaded/e.bytesTotal;
    //percent is on my stage as a dynamic textField
    //Error 1120: Access to undefined property percent
    //how would I access this or pass it as a display reference
    to my class?
    percent.text=Math.ceil(perc*100).toString();
    }//end preloadLoop
    public function preloadComplete(e:Event):void {
    removeChildAt(0);
    percent=null;
    addChild(l);
    }//end preloadComplete
    }//end class
    }//end package

  • Bad Class File error - Win2k & J2SDK1.4.0_01

    Hi,
    I am trying to run a 'Hello World' program which came with the FreeTTS package from links from the java.sun.com website, and am not able to compile the program. I get the error:
    FreeTTSHelloWorld.java:4: cannot access file
    cl.com.sun.speech.freetts.audio.Voice
    bad class file: .\cl\com\sun\speech\freetts\audio\Voice.class
    class file contains wrong class: com.sun.speech.freetts.Voice
    Please remove or make sure it appears in the correct subdirectory of the classpath.
    import cl.com.sun.speech.freetts.audio.Voice;
    _______________________________________^
    The FreeTTSHelloWorld.java File is printed below [its embarassingly simple..]
    * Copyright 2001 Sun Microsystems, Inc.
    import cl.com.sun.speech.freetts.audio.Voice;
    import cl.com.sun.speech.freetts.audio.JavaClipAudioPlayer;
    import cl.com.sun.speech.freetts.en.us.CMULexicon;
    public class FreeTTSHelloWorld {
    public static void main(String[] args) {
         try {
         String voiceClassName = (args.length > 0) ? args[0] :
              "com.sun.speech.freetts.en.us.CMUDiphoneVoice";
         Class voiceClass = Class.forName(voiceClassName);
         Voice helloVoice = (Voice) voiceClass.newInstance();
         helloVoice.setLexicon(new CMULexicon());
         helloVoice.setAudioPlayer(new JavaClipAudioPlayer());
         helloVoice.load();
         helloVoice.speak
              ("Thank you for giving me a voice. I'm so glad to say
    hello to this world.");
         System.exit(0);
    catch (Exception e) {
         e.printStackTrace();
    I've tried a billion things, including moving around the .class files [which, by the way, i extracted myself from the .jar files which came with the FreeTTS package - is that what i'm doing wrong? if so, please tell me - ] and still nothing happens - the same error results.
    I've tried reading other cases similar to mine in the forums, but most of the things i read didn't apply to my (quite simple) situation, such as the 'package' line needing to be removed or anything like that..
    I run Win2k and have j2sdk1.4.0_01 installed on my machine
    I beg for anyone's help. Thanks in advance
    -=-Miagi-=-

    Aha!
    Extracting from the jar file might be ok, as long as the directory it's extracted into reflects the class's package name. Open the jar file using WinZip and you'll see that the files it contains are in directories that exactly mirror (including case) the package names.
    The error you're getting tells you that java is looking in .\cl\com\sun\speech\freetts\audio\Voice.class (the '.\' means relative to your current working directory) and my bet would be that the file is not there!
    You shouldn't need to extract these files at all, actually: Try deleting the files you extracted from the jar then try running your program again.
    I hope this is helpful...
    Chris.

  • Where to store the servlet class files ?

    If, I store the class files for servlets under WEB-INF/classes folder,
              i get file not found exception while using WL 6.1 sp2. But, if i store
              the class file under DefaultWebApp folder, it works fine.
              Any help about where to store the class files for servlets would be
              great help.
              Thanks.
              hiren
              

    Copy Servlet in DefaultWebApp/Web-Inf/classes directory.
              Configure Servlet in web.xml deployment descriptor.
              <servlet>
              <servlet-name></servlet-name>
              <servlet-class></servlet-class>
              </servlet>
              <servlet>
              <servlet-name></servlet-name>
              <servlet-class></servlet-class>
              </servlet>
              <servlet-mapping>
              <servlet-name></servlet-name>
              <url-pattern></url-pattern>
              </servlet-mapping>
              hiren dossani wrote:
              > If, I store the class files for servlets under WEB-INF/classes folder,
              > i get file not found exception while using WL 6.1 sp2. But, if i store
              > the class file under DefaultWebApp folder, it works fine.
              > Any help about where to store the class files for servlets would be
              > great help.
              >
              > Thanks.
              >
              > --
              > hiren
              

  • BAD CLASS FILE ERROR WHEN TRYING TO CALL JAVA CLASS IN WEB-INF DIRECTORY

    I AM NEW TO THIS FORUM. PLEASE HELP ME IDENTIFY/RESOLVE THIS ERROR - bad class file: /java/tomcat/webapps/ChoiceTel/WEB-INF/classes/XYZ/SMUA.class. OTHER JSP SCRIPTS THAT CALL JAVA CLASSES DO WORK WELL.
    THE FUNNY THING ABOUT COMPILIING THIS JAVA CLASS WAS - I HAD TO A jar xvf OF activation.jar and mail.jar IN THE XYZ DIRECTORY BEFORE SUCCESSFULLY COMPILING SMUA.
    THE CALL BEING MADE FROM THE JSP SCRIPT IS AS FOLLOWS:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <HTML>
    <BODY>
    <%@ page import="XYZ.*" %>
    <%!
    %>
    <%
    SMUA sndmail = new SMUA();
    sndmail.postMail ("[email protected]","Test Subject","What Message","[email protected]");
    %>
    </BODY>
    </HTML>

    Dude. Please don't shout. If your keyboard is like mine, it can produce both upper and lower case letters. Please use them appropriately.
    Do you have the activation.jar/mail.jar available in the WEB-INF/lib directory for this application?

  • What is the size limit for a servlet .java file?

    I have been working on a jsp page with over 500 controls so I have getParameter() for those at least in my servlet. It is too big I think because the java file size is 40K but the class file is 25KB. Any sugguestion? Thanks,J

    Yes, there is a maximum length for the URL but if you use POST with a form the parameters do not appear in the URL... They would if you'd use GET however.
    Still, I guess it is just too much. And if that's a form a user would be supposed to fill out (usually they are supposed to do just that) they'd probably get tired and quit after the first 100 fields... 500 fields on one page is definately too much. I'd say try splitting it up to have about 10 fields on a page but then you'de have 50 pages to go through, which is less that good...
    May I ask what the 500 fields are for? What data is the form supposed to process? There might be a more practicable way to solve this.

  • Problem with variable in class file.

    Im working on a project from school where I read in a text file with numbers and print the max and the min. In my main file, I read in the text file and set the different numbers to variables a, b, and c. My question is, when Im writing my class file MaxMin, is there anyway to access those variables to compare them? Or will I have to do it some other way. Thanks for your help.

    Ok. Sorry
    Here is the main code
    import java.io.*;
    import java.util.StringTokenizer;
    public class LabAssign1
    public static void main(String[] args) throws IOException
    final int TOKENS_PER_LINE = 3;
    String fileName = "labassign1.txt";
    File theFile = new File(fileName);
    FileInputStream theStream = new FileInputStream(theFile);
    InputStreamReader theReader = new InputStreamReader(theStream);
    BufferedReader input = new BufferedReader(theReader);
    int numLines = 0;
    String line = input.readLine();
    while (line != null)
    StringTokenizer st = new StringTokenizer(line);
    if (line.length() == 3)
    int a = Integer.parseInt(st.nextToken());
    int b = Integer.parseInt(st.nextToken());
    int c = Integer.parseInt(st.nextToken());
    else
    line = input.readLine();
    input.close();
    Is there any way to call variables a,b,and c in a separate class file?

  • EJB deployment problem --New remote interface class files are not loaded

    Hi, I face a problem while deploying an ear file in oc4j. I basically get some problems like the method in the remote interface is not implemented in the EJB class. But the implementation is actually available in the EJB class.
    We get this problem when we actually change the signature of the EJB remote methods. The new methods are not referenced by oc4j. Only the old version of remote interface is referenced by oc4j. But the latest version of EJB class is taken. I am using 9.0.3 version of the oc4j. Could you pls help me regarding this problem ?
    Regards
    Solomon

    I have found the solution :-)
    You must add to the ejbCreate() method of the bean class throws javax.ejb.CreateException

  • Extra bytes at the end of class file error

    I have created an applet.
    it worked fine when i ran it with appletviewer.
    it ran fine when i opened it with a browser (when it still was on my computer and not on the net).
    now, when i uploaded all the files, when try to open the page where my applet should be, the applet doesn't start and the console writes:
    java.lang.ClassFormatError: Extra bytes at the end of class file ImageHolderNotifier
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.security.SecureClassLoader.defineClass(Unknown Source)
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.security.SecureClassLoader.defineClass(Unknown Source)
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    i tried rebuilding the project and uploading all the .class files from scratch... still, no change :-/
    i have compiled it using eclipse 3.1.0, JDK1.5.0_02.
    my JRE is 1.5.0_02
    i've tried running it both with Internet Explorer and FireFox...

    Works locally but not after uploading.
    Must be uploaded wrong then (ftp ascii??) or it's the web server.

Maybe you are looking for