Quiestion about servlet class

hi,
Is any know what happen broswer run a servlet class? it keep in cache some where?
I run tomcat-4.1.27 on Linux box, I just find out. After I modified the java code and recomplier (no error), re-run on broswer. It still show my old java class result.
Did I miss something?
Thanks

the browser itself has absolutely nothing to do with the html generation inside a servlet. servlets are serverside-only "applications".
after changing your servlet code make sure todo the following:
- compile the source file(s)
- make sure the servlet engine (in your case tomcat) is reloading your webapp
(if the webapp admin is available you might restart your webapp by using this admin tool)
if after all the browser is still showing the old servlet result code you should also check the browser caching settings and maybe clear the cache.

Similar Messages

  • Failed to load servlet Class: org.apache.jasper.servlet.JspServlet

    I am evaluating Weblogic 12c and is stuck in deployment of an application.
    My application is locally developed and is working fine in Oracle Glassfish. I have install glassfish and deploy application multiple time.
    In weblogic I can deploy the application successfully and the state= Prepared while Health=OK.
    When I access applicaiton from web browser, it says:
    Error 503--Service Unavailable
    From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
    10.5.4 503 Service Unavailable
    The server.log is having messages similar to following:
    When processing WebService module 'SHMA'. Failed to load servlet Class: org.apache.jasper.servlet.JspServlet
    Ignoring: unable to load class:java.lang.ClassNotFoundException: org.apache.jasper.servlet.JspServlet at: weblogic.xml.schema.binding.util.ClassUtil.loadClass(ClassUtil.java:76)
    Jun 4, 2013 5:59:36 PM com.sun.xml.ws.model.JavaMethodImpl freeze
    WARNING: Input Action on WSDL operation RegisterOperation and @Action on its associated Web Method registerOperation did not match and will cause problems in dispatching the requests
    Any idea about how to fix this??
    Application is working fine in Glassfish 3.2
    I am having RHEL6-3 x86 with JDK 1.6u45 for Bea Weblogic 12c.
    Thanks

    Probably not the right forum. But you have the honour of being the first person to ask a specific WebLogic Server question here.
    The BEA dev-2-dev site still seems to be active. Try here hunting for a category here: http://forums.bea.com/index.jspa
    -steve-

  • Clarification needed on servlet class reloading

              I have a question about servlet reloading in WLS6.0
              Let's assume i have version 1.0 of a SomeServlet.class loaded in WLS.
              Client are accessing it currently.
              Now let's say i create version 1.1 of SomeServlet.class and i want to deploy it in WLS.
              I have the "servlet reloading" turned ON.
              So that means that version 1.1 will be immediately loaded by WLS right?
              Question: Will WLS first unload version1.0? If so, what happens to the clients who are using version 1.0?
              Will they get a ClassCastException? Or will they be abruptly switched from 1.0 to 1.1? Will they see any any error at all?
              Thanks.
              PS: If i had deployed the servlet in a WAR file, will the same rules apply? In other words, if i replace the WAR file will a newer version, what will happen to the classes from the previous WAR file that are being used by clients.
              Is there a document explaining "how WLS reloads/hot-deploys servlets/ejb"? I understand that WLS6.0 uses a new "classloader architecture" that is different from WLS5.1.0. Some document to explain the differences would be helpful. Thanks.
              

    The new version will be loaded immediately into a new classloader.
              The old version will remain (in its old classloader) until there are no
              longer any references to it (which will happen when clients that were
              using the old version have completed their operations).
              mark
              Jeff Mathers wrote:
              > Did you ever get clarification on this point?
              >
              > I am trying to figure out how to force WLS 6 to reload servlets following a
              > re-compile. Your message hinted at a way to do this. Can you fill me in?
              >
              > Jeff Mathers
              > IT R&D
              > RWJPRI - Johnson & Johnson
              >
              > "R" <[email protected]> wrote in message
              > news:[email protected]...
              > >
              > > I have a question about servlet reloading in WLS6.0
              > >
              > > Let's assume i have version 1.0 of a SomeServlet.class loaded in WLS.
              > > Client are accessing it currently.
              > > Now let's say i create version 1.1 of SomeServlet.class and i want to
              > deploy it in WLS.
              > > I have the "servlet reloading" turned ON.
              > > So that means that version 1.1 will be immediately loaded by WLS right?
              > >
              > > Question: Will WLS first unload version1.0? If so, what happens to the
              > clients who are using version 1.0?
              > > Will they get a ClassCastException? Or will they be abruptly switched from
              > 1.0 to 1.1? Will they see any any error at all?
              > >
              > > Thanks.
              > >
              > > PS: If i had deployed the servlet in a WAR file, will the same rules
              > apply? In other words, if i replace the WAR file will a newer version, what
              > will happen to the classes from the previous WAR file that are being used by
              > clients.
              > >
              > > Is there a document explaining "how WLS reloads/hot-deploys servlets/ejb"?
              > I understand that WLS6.0 uses a new "classloader architecture" that is
              > different from WLS5.1.0. Some document to explain the differences would be
              > helpful. Thanks.
              

  • Non-servlet class in servlet program

    hi,
    I declare a non-servlet class which is defined by myself in a servlet class. I passed the complie but got an runtime error said NoClassDefFoundError. Does anyone can help me? Thanks.
    The following is my code.
    //get the search string from web form
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.net.*;
    import java.util.*;
    public class SearchEngines extends HttpServlet {
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {   
    String searchString = (String) request.getParameter("searchString");
         String searchType = (String) request.getParameter("searchType");
         Date date = new java.util.Date();
         response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    Vector doc_retrieved = new Vector();
    BooleanSearch bs = new BooleanSearch();
    doc_retrieved=bs.beginSearch(searchString, searchType);
    out.println("<HTML><HEAD><TITLE>Hello Client!</TITLE>" +
                   "</HEAD><BODY>Hello Client! " + doc_retrieved.size() + " documents have been found.</BODY></HTML>");
    out.close();
    response.sendError(response.SC_NOT_FOUND,
    "No recognized search engine specified.");
    public void doPost(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    doGet(request, response);
    // a search engine implements the boolean search
    import java.io.*;
    import java.util.*;
    import au.com.pharos.gdbm.GdbmFile;
    import au.com.pharos.gdbm.GdbmException;
    import au.com.pharos.packing.StringPacking;
    import IRUtilities.Porter;
    public class BooleanSearch{
         BooleanSearch(){;}
         public Vector beginSearch(String searchString, String searchType){
              Vector query_vector = queryVector(searchString);
              Vector doc_retrieved = new Vector();
              if (searchType.equals("AND"))
                   doc_retrieved = andSearch(query_vector);
              else
                   doc_retrieved = orSearch(query_vector);
              return doc_retrieved;
         private Vector queryVector(String query){
         Vector query_vector = new Vector();
              try{
                   GdbmFile dbTerm = new GdbmFile("Term.gdbm", GdbmFile.READER);
              dbTerm.setKeyPacking(new StringPacking());
              dbTerm.setValuePacking(new StringPacking());
              query = query.toLowerCase();
              StringTokenizer st = new StringTokenizer(query);
              String word = "";
              String term_id = "";
              while (st.hasMoreTokens()){
                   word = st.nextToken();
                   if (!search(word)){
                        word = Stemming(word);
                        if (dbTerm.exists(word)){
                   //          System.out.println(word);
                             term_id = (String) dbTerm.fetch(word);
                             query_vector.add(term_id);
              catch(GdbmException e){
                   System.out.println(e.getMessage());
              return query_vector;
         private Vector orSearch(Vector query_vector){
              Vector doc_retrieved = new Vector();
              try{
                   GdbmFile dbVector = new GdbmFile("Vector.gdbm", GdbmFile.READER);
                   dbVector.setKeyPacking(new StringPacking());
                   dbVector.setValuePacking(new StringPacking());
                   int doc_num = dbVector.size();
                   String doc_id = "";
                   String temp = "";
                   for (int i = 1; i <= doc_num; i++){
                        boolean found = false;
                        doc_id = String.valueOf(i);
                        temp = (String) dbVector.fetch(doc_id);
                        StringTokenizer st = new StringTokenizer(temp);
                        while (st.hasMoreTokens() && !found){
                             temp = st.nextToken();
                             StringTokenizer st1 = new StringTokenizer(temp, ",");
                             String term = st1.nextToken();
                             if (query_vector.contains(term)){
                                  doc_retrieved.add(doc_id);
                                  found = true;
              catch(GdbmException e){
                   System.out.println(e.getMessage());
              return doc_retrieved;
         private Vector andSearch(Vector query_vector){
              Vector doc_retrieved = new Vector();
              try{
                   GdbmFile dbVector = new GdbmFile("Vector.gdbm", GdbmFile.READER);
                   dbVector.setKeyPacking(new StringPacking());
                   dbVector.setValuePacking(new StringPacking());
                   int doc_num = dbVector.size();
                   String doc_id = "";
                   String temp = "";
                   for (int i = 1; i <= doc_num; i++){
                        Vector doc_vector = new Vector();
                        boolean found = true;
                        doc_id = String.valueOf(i);
                        temp = (String) dbVector.fetch(doc_id);
                        StringTokenizer st = new StringTokenizer(temp);
                        while (st.hasMoreTokens()){
                             temp = st.nextToken();
                             StringTokenizer st1 = new StringTokenizer(temp, ",");
                             String term = st1.nextToken();
                             doc_vector.add(term);
                        for (int j = 0; j < query_vector.size(); j++){
                             temp = (String) query_vector.get(j);
                             if (doc_vector.contains(temp))
                                  found = found & true;
                             else
                                  found = false;
                        if (found)
                             doc_retrieved.add(doc_id);
              catch(GdbmException e){
                   System.out.println(e.getMessage());
              return doc_retrieved;
         private String Stemming(String str){
              Porter st = new Porter ();
              str = st.stripAffixes(str);
              return str;          
         private boolean search(String str){
              //stop word list
              String [] stoplist ={"a","about","above","according","across","actually","adj","after","afterwards","again",
                                       "against","all","almost","alone","along","already","also","although","always","am","among",
                                       "amongst","an","and","another","any","anyhow","anyone","anything","anywhere","are",
                                       "aren't","around","as","at","away","be","became","because","become","becomes","becoming",
                                       "been","before","beforehand","begin","beginning","behind","being","below","beside",
                                       "besides","between","beyond","billion","both","but","by","can","cannot","can't",
                                       "caption","co","co.","could","couldn't","did","didn't","do","does","doesn't","don't",
                                       "down","during","each","eg","eight","eighty","either","else","elsewhere","end","ending",
                                       "enough","etc","even","ever","every","everyone","everything","everywhere","except",
                                       "few","fifty","first","five","for","former","formerly","forty","found","four","from",
                                       "further","had","has","hasn't","have","haven't","he","he'd","he'll","hence","her","here",
                                       "hereafter","hereby","herein","here's","hereupon","hers","he's","him","himself","his",
                                       "how","however","hundred","i'd","ie","if","i'll","i'm","in","inc.","indeed","instead",
                                       "into","is","isn't","it","its","it's","itself","i've","last","later","latter","latterly",
                                       "least","less","let","let's","like","likely","ltd","made","make","makes","many","maybe",
                                       "me","meantime","meanwhile","might","million","miss","more","moreover","most","mostly",
                                       "mr","mrs","much","must","my","myself","namely","neither","never","nevertheless","next",
                                       "nine","ninety","no","nobody","none","nonetheless","noone","nor","not","nothing","now",
                                       "nowhere","of","off","often","on","once","one","one's","only","onto","or","other","others",
                                       "otherwise","our","ours","ourselves","out","over","overall","own","per","perhaps","pm",
                                       "rather","recent","recently","same","seem","seemed","seeming","seems","seven","seventy",
                                       "several","she","she'd","she'll","she's","should","shouldn't","since","six","sixty",
                                       "so","some","somehow","someone","sometime","sometimes","somewhere","still","stop",
                                       "such","taking","ten","than","that","that'll","that's","that've","the","their","them",
                                       "themselves","then","thence","there","thereafter","thereby","there'd","therefore",
                                       "therein","there'll","there're","there's","thereupon","there've","these","they","they'd",
                                       "they'll","they're","they've","thirty","this","those","though","thousand","three","through",
                                       "throughout","thru","thus","to","together","too","toward","towards","trillion","twenty",
                                       "two","under","unless","unlike","unlikely","until","up","upon","us","used","using",
                                       "very","via","was","wasn't","we","we'd","well","we'll","were","we're","weren't","we've",
                                       "what","whatever","what'll","what's","what've","when","whence","whenever","where",
                                       "whereafter","whereas","whereby","wherein","where's","whereupon","wherever","whether",
                                       "which","while","whither","who","who'd","whoever","whole","who'll","whom","whomever",
                                       "who's","whose","why","will","with","within","without","won't","would","wouldn't",
                                       "yes","yet","you","you'd","you'll","your","you're","yours","yourself","you've"};
              int i = 0;
              int j = stoplist.length;
              int mid = 0;
              boolean found = false;
              while (i < j && !found){
                   mid = (i + j)/2;
                   if (str.compareTo(stoplist[mid]) == 0)
                        found = true;
                   else
                        if (str.compareTo(stoplist[mid]) < 0)
                             j = mid;
                        else
                             i = mid + 1;
              return found;
         }

    please show us the full error message.
    it sounds like a classpath problem...

  • Problems importing servlet classes

    When I try to compile a bean which has import statements for importing servlet classes, I get the message that the class is not found in import when I compile the code. I have all these class files and I'm not sure whether I've placed them aptly. Please give me the details about placing the servlet classes and configuring my javac to import these classes.
    Thanks!

    If you place your classes in the %JAVA_HOME%/jre/lib/ext, they will be automatically accepted by the javac and the java. But, depending on the classes you use, it would be better to include them in %application path%/WEB-INF/lib, so they will only be used by that application.

  • Servlet Class dependency is not found at weblogic startup.

    I have the following ear file which includes:
    web-inf\lib (contains all the needed utilities jar)
    *ejb.jar
    *webapp.war (The WEB-INF\lib dir inside war file contains all the needed utilities
    jars.
    I get the following BEA-101250 error saying that a servlet could not be loaded
    because a class that it depends on is not in the classpath. But I think I place
    all the needed jars in the startWebLogic.cmd file as well as in the WEB-INF\lib
    of the ear and war files. However, if a classs that a servlet depends on is not
    found, why doesn't weblogic simply tells us what that class is (instead of guessing
    to death)? How can I find which class that the servlet depends on is not found?
    Thanks.
    BEA-101250
    Error: [context]: Servlet class className for servlet svltName could not be loaded
    because a class on which it depends was not found in the classpath classPath.\nt.
    Description
    [context]: Servlet class className for servlet svltName could not be loaded because
    a class on which it depends was not found in the classpath classPath.\nt.
    Cause
    One of the classes the servlet class uses was not recognized by the Web application
    classloader.
    Action
    Make sure the class is available either in WEB-INF/classes or WEB-INF/lib or
    system classpath.

    Hmm, do you perhaps have the prefer web-inf-classes set in weblogic.xml?
    -- Rob
    rock wrote:
    I place all the utilties class in the top level APP-INF/lib. Same error. I installed
    this application on JBoss and everything runs fine. I really don't know what
    classes or jar that weblogic says that a servlet depends on.
    There are only a finite number of places where you can put all the needed jars
    in which that servlet depends:
    1. myapp.ear/APP-INF/lib
    2. myapp.ear/WEB-INF/lib
    3. or put it to a directory in the ear and refer to each jars in the CLASS-PATH
    line of the MANIFEST.MF file.
    4. myweb.war/WEB-INF/lib
    5. EJBs are in myapp.ear top directory
    6. Refer to all the jars in startWebLogic.cmd script as it starts.
    I still don't know what jars I am missing.
    Thanks.
    Rob Woollen <[email protected]> wrote:
    rock wrote:
    Rob,
    I remove all the classpath, but when I deploy the ejb complains thatit missed
    all the needed utilities class. Ok, stop there. If the utilities classes need to be seen by both the
    EJBs and webapp, then placing them in WEB-INF/lib is not enough. That
    makes them available only to the webapp.
    If you're using 8.1, then the solution is pretty simple. Move your
    utility classes into a top-level directory named APP-INF/lib
    ie
    ear/APP-INF/lib/utils.jar
    ear/fooejb.jar
    ear/fooweb.war
    If you're using < 8.1, then you can still move the jars to APP-INF/lib,
    but you'll need to add manifest class-path entries to the EJB and webapp.
    -- Rob
    I again place it on - the ear deploys fine (ejbs
    and war). But the starting servlet could not loaded because it cannotfinds a
    class that it depends on. I think I reference all the classes or jarsthat it
    needs - so I need it to tell me which one. I don't know why weblogicmakes it
    so difficult. It took me a month already and all I need to do is findthe class
    that it complains about.
    Rob Woollen <[email protected]> wrote:
    Yes, it would be nicer if that exception had more information.
    You told the web container the servlet-class in your web.xml. THe
    web
    container tried to load it and got a NoClassDefFoundError.
    Unfortuantely that exception doesn't include much information.
    NoClassDefFoundErrors are caused by something in a parent loader
    depending on something in a child classloader.
    Step #1 is for you to remove everything you've added to the $CLASSPATH.
    If that doesn't solve your problem, post again.
    -- Rob
    rock wrote:
    I have the following ear file which includes:
    web-inf\lib (contains all the needed utilities jar)
    *ejb.jar
    *webapp.war (The WEB-INF\lib dir inside war file contains all the
    needed
    utilities
    jars.
    I get the following BEA-101250 error saying that a servlet could notbe loaded
    because a class that it depends on is not in the classpath. But Ithink I place
    all the needed jars in the startWebLogic.cmd file as well as in theWEB-INF\lib
    of the ear and war files. However, if a classs that a servlet dependson is not
    found, why doesn't weblogic simply tells us what that class is (insteadof guessing
    to death)? How can I find which class that the servlet depends onis not found?
    Thanks.
    BEA-101250
    Error: [context]: Servlet class className for servlet svltName couldnot be loaded
    because a class on which it depends was not found in the classpathclassPath.\nt.
    Description
    [context]: Servlet class className for servlet svltName could notbe loaded because
    a class on which it depends was not found in the classpath classPath.\nt.
    Cause
    One of the classes the servlet class uses was not recognized by theWeb application
    classloader.
    Action
    Make sure the class is available either in WEB-INF/classes or WEB-INF/libor
    system classpath.

  • 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
              

  • Where to store the servlet classes

    can anyone tell me where to store the servlet classes(inside a package)in oracle9iAS used with oracle8i database ?
    Also how to deploy an ejb in oracle9iAS. should we have to use oracle8i deployment guide or any other procedure??
    thanks in advance

    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
              

  • Why need to restart server while modifying the servlet class

    Hi,
    i have some doubt, i hope any one can clear my doubt about servlet
    why we need to restart the web container while every time we modify the servlet class code
    Thanks & Regards
    vijay

    When you deploy a web application to a web container, you are deploying the
    .class files of your servlet not your source code. There is no servlet source code on the container (shouldn't be).
    So if you change your source code, the container knows nothing about it until you compile the code
    to create new .class files and then replace the container's class files with the new ones.
    You can configure most servers for hot deployment and/or start them in debug mode to ease the cycle during development.

  • JDBC Connection Driver Problem for Oracle in a J2EE servlet/class

    Hi,
    I am having a big problem with setting up a JDBC connection with my oracle database, I have been trying to fix it for about 6 hours now with no joy, I have read that many threads about JDBC, class paths etc.. that i dont know which way is up any more!!
    Here is the issue:
    (Please bare in mind that I am new to this when posting replies)
    I have a Web Application set up as a project in the netbeans IDE. I have a servlet which creates a new object call dbaseFunc which is a public class I have wrote and within this class is a function called getAppConfigCon(). The code for this function is below:
    public Connection getAppConfigCon()
    Connection con = null;
    try
    Class.forName("oracle.jdbc.driver.OracleDriver");
    con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","cavdev", "password");
    catch (SQLException e)
    e.printStackTrace();
    catch (ClassNotFoundException e)
    e.printStackTrace(System.out);
    return con;
    The database is Oracle XE and is installed on the same machine I am developing on, the database is up and I can connect to it via the netbeans IDE database interface after telling it where the driver is (C:\oracle\product\10.2.0\client_1\jdbc\lib\ojdbc14.zip). Obviously this is just IDE functionality and allows you to browse the database objects from netbeans however I now need to know how to tell the jre where the drivers are, right??
    Well like I said multiple forums led me down the classpath route and I have a system environment variable called CLASSPATH set up with the oracle jdbc driver specified as its value, when i run the set command from the command line ( I am running Windows XP Pro) I can see the class path entry in the output as follows:
    CLASSPATH=C:\oracle\product\10.2.0\client_1\jdbc\lib\ojdbc14.zip
    When I try to run my web app it doesnt assign the connection object with a value, i.e. when i was debugging my con object was null after calling the method mentioned above. After some time debugging i found a ClassNotFoundException was being thrown when the following command was executed:
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Which I understand is because their is a problem with the class path but what is the problem??? The IDE likes the driver so why doesnt the jre.
    I am runnin jdk and jre 1.5, an Oracle XE Database using the netbeans environment.
    Some one please help me, I have spent far to much time on this rather than actually working on my project!!!!
    Thanks
    Keith

    Well After 10.5 hrs I actually sorted this myself, the two problems that were throwing me were this:
    1. Netbeans does not stop the tomcat server when it finishes running the app, you either have to stop the server from the menu or exit netbeans, until the server restarts it will not pick up on any driver files you add to common/lib
    2. You are very right Kiros tomcat does not do .zip files!!!!~~~###
    In order to sort this I had to add the oracle driver as a package to my project using the netbeans ide Project > Libraries > New Jar file, this allowed me to access the oracle classes. Then I had to set the server up to deal with the drivers as well, this meant adding the .jar file (not the latest .zip as it wont work) to the bundled tomcat common lib directory and restart the server via the ide (using the start/stop bat files in the tomcat conf directory doesnt work for some reason when its bundled with netbeans!)
    Thanks for the help guys but in the end it took 10 hrs a lot of reading and 2 bottles of lucozade to keep the brain goin.
    Keith

  • Wrapper cannot find servlet class

    Hi all
    Can anyone please help me to resolve this error. It come about since I've provided the package (pa_sodev.pr_add_user_diary_event). My Java file is in Java Resources:src folder .
    I don't have a folder called classes in my WEB_INF directory.
    Many thanks
    Zed
    exception
    javax.servlet.ServletException: Wrapper cannot find servlet class addEveProcess or a class it depends on
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
         org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
         org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
         java.lang.Thread.run(Unknown Source)
    root cause
    java.lang.ClassNotFoundException: addEveProcess
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1484)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1329)
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
         org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
         org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
         java.lang.Thread.run(Unknown Source)Edited by: Zed420 on Jan 31, 2010 6:09 PM

    Thanks for your reply, can I ask if my setup is correct ?
    I'm using Eclipse, on my left in Dynamic Web Perspective I have Servers and myProject.
    In myProject ->Java Resources:src (this is where all my java files are with package) and WebContent.
    In WebContent ->META-INF and WEB-INF
    In WEB-INF ->(this is where I have lib folder and my xml & jsp files)
    In lib I have Oracle connector .jar
    Can someone confirm if this is the right setup please.
    thanks
    Zed

  • Irregular delay while running a dos batch file using a servlet class

    i used RunTime( ) class to execute a dos-batch file containing some commands like changing the directory, running an exe(executable.exe) file...etc in a servlet class. while this servlet class is invoked, the exe file(executable.exe) is run after irregular delay at different trials.
    Note: When this batch file is run in a stand alone java class, it is working fine.
    what can be the possible cause of this prob? Help me in this.

    It's ok - I've found the answer.
    I'll post it here for anyone else who is interested.
    The problem stemmed from the fact that I had to put the path to javaw.exe in quotes, as the batch file is dynamically generated from the user's environment, and then run. The user's system properties gives a path to java home using a full path name, which WinNT/Win2K doesn't like.
    The following batch file content solves it, closing the DOS box after starting javaw.exe. Before this part of my batch file, there is just some file copying that goes on for the autoupdate process.
    set PATH=%PATH%;"D:\Program Files\JavaSoft\JRE\1.3.1\bin"
    start /B javaw.exe -Dmyapp.home=C:\myapp myapp.client.MyAppClient subSys
    exit
    The parameter subSys is just a command line parameter that MyApp.java looks for, so not relevant for everyone.
    /B prevents a second DOS box from opening.
    exit simply closes the DOS box once the javaw.exe process has started.
    Too easy! Although I can't believe how difficult it was to find information about this. Hopefully it will be of benefit to others.

  • How can I find the real path to servlet class

    Hi,
    I am facing an issue. Am in the process of creating a filter which would send a Last-modified along with the header. For this I will be checking the is-modified-since
    header and lastModified date of the file.
    The problem I am facing is that after taking the file part from the request and checking
    the lastmodified date, it gives error. This is because i use,
    String real_path = getServletContext().getRealPath(request.getServletPath());
    and it would return the path to servlet-name and not to servlet-class, since servlet-name
    is not physically present. It would return an error value.
    Is there any way which I could find the real path to my servlet class file ?

    Remember you should not take the last mnodified date
    of the class file or the jar file that contain the
    class as the value for the getLastModified method
    becouse the last modified date that should be used in
    the caching is the last modified date of the dynamic
    content that the servlet is about to prodice.
    The same class file will produce different content
    for different requests if not why do you use
    servlets you can directly use the static contentThanks for a valuable remark.
    Hence our getLastModified() often returns System.currentTimeMillis() result.

  • How can i make a servlet (class) temporarily unavailable, except for ADMIN

    Hello All!
    I am rather new to the programming field and have already completed a web-project in Java only with Servlets. (no jsp). I have a login procedure, means I have a user management for users and admins. If an admin is logged in, he/she should be able to deactivate the servlet with a mouse-click as long he activates it again with the same. if the servlet is deactivated, other users/admins trying to access the servlet should get a "servlet is currently unavailable" message. but the admin, who is logged in, still should be able to work with the servlet! how can i realise that?
    in other words, by clicking that particular button, the servlet should be made "non-multi-thread" and other way round by activating it.
    any ideas??? how can the standard "servlet currently unavailable" page be displayed? I have tomcat 4 on a linux machine! i'd be really grateful if someone oculd help me.
    another question i have is, how to define a "pseudo" link address to the servlet. now, the servlet can only be accessed by typing like this: http://servername.xy.com:8080/ProjectName/servlet/ServletName (because I have activated the servlet mapping in the server.xml/web.xml with /servlet/*)
    but I want a link like this: http://servername.xy.com:8080/shortname
    How can I do this in an easy way?? I have treid to create a web.xml in der WEB-INF folder of the servlet with following content, but it is not working:
    <?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>
    <servlet>
    <servlet-name>
    shortname
    </servlet-name>
    <servlet-class>
    ClassName
    </servlet-class>
    </servlet>
    </web-app>
    Thanks a lot in advance for your kind help,
    lisa

    Ok,
    You'll need to find a tutorial on servlet filters. Its not that hard a concept.
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/Servlets8.html#wp64572
    Filters need to be configured in the web.xml.
    Basically they are a buffer between a request and your servlet.
    Any requests for the servlet, go through the filter first. It lets you do some processing before/after the servlet gets called. Its a good way of putting in some generic code that need to be run for many servlets - security checks are often implemented in this fashion.
    This should give you an idea of the sort of thing you need. I haven't really written one before, so I copied this out of the tutorial and did some basic framework for it....
    public final class TestFilter implements Filter {
       private FilterConfig filterConfig = null;
       public void init(FilterConfig filterConfig) throws ServletException {
          this.filterConfig = filterConfig;
       public void destroy() {
          this.filterConfig = null;
       public void doFilter(ServletRequest request,  ServletResponse response, FilterChain chain) throws IOException, ServletException {
            // if you want to get the session will need to cast request to an HttpServletRequest
            Session session = request.getSession();
            String requestURL = request.getRequestURL();
            // check if this URL is for a servlet that is disabled for this user
           // somehow you have to keep track of this ... maybe in the servletContext ?
        User user = (User) session.getAttribute("user")     
          boolean disabled = checkDisabled(requestURL, user);
          // if its not disabled, go ahead
          if (!disabled)
            chain.doFilter(request, response);
        else{
            // send the servlet off somewhere else - requestDispatcher maybe?
    }

  • Unable to load servlet  class specified in the module.

    Hi,
    Hope that I am in the right Forum to ask this question.
    I tried to develop basic servlet example as specified in http://java.sun.com/developer/onlineTraining/J2EE/Intro2/servlet/servlet.html.
    When I create WAR file in Deployment tool I get the following error. How can I rectify this?
    Thank you very much for any help.
    Regards,
    Indika
    Error :
    Unable to load servlet class specified in the module.
    Please contact online help for assistance.
    java.lang.UnsupportedClassVersionError : bonus/controller/BonusCalculationServlet (Unsupported major.minor version 49.0)

    Hi Yohan_co,
    I haven't used Application Server 8.2, but I think the problem is because the jdk that AS is using is previous to the jdk that your are using to compile your source files.
    I hope that it helps you.
    Regards

Maybe you are looking for

  • APPLE = Fix iCal in Leopard!!!!!

    Hi, What did Apple do to iCal in Leopard? They broke it somehow. I had hard drive failure in powerbook. Replaced Hard drive, did new install of Leopard. Then installed Palm desktop 4.2 (newest from site). Setup Palm Treo 650 conduit in isync. It will

  • Database Access VS DataStructure in Memory

    Hi Everyone, I'm very new to this forum. Just started working in JSP. I'm working on a small internal project at my work, I'm presently working in the user management part of it. Basically a mysql table containing username,password etc... Now I have

  • Transfering elements to new array and doubling values.

    Hi my problem is that I need to ask a user to enter 5 integers that stores them in an array. Transfer them to a new array by doubling the values when trasferred. Please help I have 3 errors. class arrays      public static void main (String[] args)  

  • Gateway for Sybase or MS SQL - support for Timestamp

    Hi All, Is there any way to get Timestamp data out of Sybase or MS SQL Server? I thought this would be pretty straightforward, but after a short investigation I'm no longer that optimistic... The "Database Gateway for Sybase User's Guide" says in App

  • Solaris 10 on Dell hardware - To RAID or not....

    Hi Guys, Looking for a bit of help. In my current role I administer solaris 7-10 on sparc but am soon to be involved in some installs of 10 in a PowerEdge 850. My concern is mirroring. I'm quite capable of using ODS/SDS to do this at the software lev