Class mypackage.TripsServletTable is not a Servlet

I've seen several postings similar to this, but still haven't been able to solve my problem. Maybe another set of eyes would help.
I have an html file in webapps/Trips, with the line:
<form action = "http://localhost:8080/Trips/servlet/TripsServletTable" method = "post">
I've also tried:
<form action = "/servlet/tripsTable" method = "post">
and
<form action = "/Trips/tripsTable" method = "post">
my web.xml file contains
<servlet>
     <servlet-name>tripsTable</servlet-name>
     <servlet-class>mypackage.TripsServletTable</servlet-class>
</servlet>
<servlet-mapping>
     <servlet-name>tripsTable</servlet-name>
     <url-pattern>servlet/tripsTable</url-pattern>
</servlet-mapping>
My class file is in the classes/mypackage directory under WEB-INF and is name TripsServletTable.
I either get the message :
Class mypackage.TripsServletTable is not a Servlet
or that the servlet is not available (depending on which of the above options is in place). FYI, This directory was running with tomcat 3.2.3. Any suggestions would be appreciated.

Thanks for the quick reply. Yes, my class does extend HttpServlet. Also, I had previously tried (and have since tried again) having the url pattern start with a / character. With these changes the error message is now:
The requested resource (/Trips/servlet/TripsServletTable) is not available.
By the way, I am running Tomcat 5.5.9. Any other suggestions would be appreciated. I admit I am pretty confused about what to put in the <form action = "..."> portion of my html file, as I've seen different recommendations from various sources.

Similar Messages

  • Intermittent "VerifyError: Error #1014: Class MyPackage::MyClass could not be found." at runtime.

    VerifyError: Error #1014: Class MyPackage::MyClass could not be found.
    [SWF] DesktopSwf.swf - 3,226,951 bytes after decompression
    My team and I are seeing a high frequency of these errors when running our ActionScript Project.  The package and class referenced in the error switches between roughly a dozen different classes.  At times, I'll go a whole day without running into this.  Other times, I'll lose much of the day to it.  Sometimes a full clean/build causes the error to appear/disappear.  Sometimes restarting FlashBuilder appears to help.  Sometimes deleting and re-importing all project helps.  Sometimes nothing helps but the passage of time.  We've basically resorted to superstition in our attempts to work around this.
    The project is pure ActionScript (no Flex), using Flash Builder 4.7 and AIR SDK 3.7.0 build 1760.  The error occurs on Mac and PC.  The application project depends on a hierarchy of ActionScript Library Projects.  The class being referenced in the error lives in one of these library projects, but not always the same one.  I've tried a couple of different linkage paradigms with the library projects, but it hasn't made a difference.  The error does not occur in builds created by our Ant script.  Our library projects used to be Flex Projects, and we never saw this error.  We believe our problems started after switching to using ActionScript Projects for everything.  We'd prefer not to go back to relying on Flex.
    Has anyone else run into something like this?  Any ideas on what I could try?

    I figured out a solution. It had to do with conflicting or out of order library paths, I think. There were several paths to other projects in the project and Flash Pro global paths. I think some of them are automatically added by either the FP or the FB IDEs. When I removed all of the unnecessary paths, then it compiled just fine.

  • Accessing the ServletContext from a class that is not a Servlet?

    Is there any way of accessing the ServletContext from a class that is not a
              Servlet? The class is being used as part of a Web Application.
              Thanks.
              

    http://www.mozilla.org/mirrors.html
    Mozilla has download mirrors around the globe. If it is on the list, it is trustworthy.

  • Why does my web service web.xml reference a class that is not a servlet?

    In jDeveloper 10.1.3, I created the simplest web service I could think of. I created a HelloWorld class that has one method that accepts a name as a parameter and returns "Hello " + name. Using the wizards, I was able to get it to run just fine in my development environment. However, if I generate a WAR file and deploy it to Tomcat 5.5, it chokes on the web.xml. Here it is...
    <pre>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">
    <servlet>
    <description>Web Service MyHelloWorldServiceSoapHttpPort</description>
    <display-name>Web Service MyHelloWorldServiceSoapHttpPort</display-name>
    <servlet-name>MyHelloWorldServiceSoapHttpPort</servlet-name>
    <servlet-class>com.dex.b2b.HelloWorld</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>MyHelloWorldServiceSoapHttpPort</servlet-name>
    <url-pattern>MyHelloWorldServiceSoapHttpPort</url-pattern>
    </servlet-mapping>
    </web-app>
    </pre>
    The servlet-class value is my simple HelloWorld class, not a servlet. How is this suppose to run, if the servlet-class value is not a servlet? It certainly did not run in Tomcat 5.5. I can't get it to run on Oracle App Server 10.1.2 either.
    Thanks

    Hi fellrunningpictures-
    Picasa web albums shows you that message because they are not fully compatible with the latest version of Firefox. I would recommend contacting Picasa to encourage them to become fully compatible. I found a link for contacting them here:
    * [http://support.google.com/picasa/?hl=en http://support.google.com/picasa/?hl=en]
    Hope that helps.

  • File does not exist: /servlet/f60servlet

    Hi,
    We have a Developer 2000 application which is running on 9ias.
    Till last week the UAT system was working ok. Since i re-started, it stopped working. The apache error log displays the following error messages:
    [Tue Jan 25 15:53:08 2005] [error] [client 3.248.176.44] File does not exist: e:/uat/oracle/806/forms60/java/sun/applet/AppletViewer.class
    [Tue Jan 25 15:53:08 2005] [error] [client 3.248.176.44] Filename is not valid: e:/uat/apps/forms_icons/http:
    [Tue Jan 25 15:53:08 2005] [error] OPM:Can not find one alive process
    [Tue Jan 25 15:53:08 2005] [error] [client 3.248.176.44] File does not exist: /servlet/oracle.forms.servlet.ListenerServlet
    [Tue Jan 25 15:53:26 2005] [error] OPM:Can not find one alive process
    [Tue Jan 25 15:53:26 2005] [error] [client 3.248.176.44] File does not exist: /servlet/f60servlet
    Please help!
    Note: Developemtn and Productions systems with the same setting are working ok.
    Thanks,
    Naveen

    I am currently using OracleAS 10g and is using mod_oc4j to mount the Forms Servlet.
    It seems that you use JServ for mounting the Forms Servlet, (maybe default in 9i R2?) from the error log entry /servlet/f60servlet...
    Maybe Jserv is not up and running on your host? It looks like Jserv hasn't mounted /servlet/ or aliased /servlet/f60servlet as the error log indicates that Apache is looking in the filesystem for these paths which is wrong.
    But what do I know... :)
    Regards
    /Stefan

  • How to invoke a jsp page from java which does not use Servlets?

    Hello,
    I am working in Documentum. I am trying to invoke a jsp page from another java page which does not use Servlets.
    I tried doing this by just instantiating the java class related to the jsp page from my present java class.In my java class related to the jsp page, I have defined onInit() and onRender() methods.
    Now, I am trying to call the jsp page from my present java class by just instantiating the java class related to the jsp page. This throws a java.lang.NullPointerException.
    Any comments or suggestions on this.Any help would be appreciated.
    Thanks,
    Ranjith M.V

    RanjithM.V wrote:
    Hello,
    Thanks for the reply. One important thing I forgot to mention. I am also using xml component.And?
    As this is the standard way used for coding in Documentum, I do not want to use Beans.Well, JSP's should, in and of themselves, contain no functional code. It should all be only display.
    Without that is it not possible?What did I say? I said,
    masijade wrote:
    It is possible, but I very, very, very, much doubt, that it would be worth the effort.And, if you don't know how, a forum is not truely going to be able to help you implement it (at least not in less than a few years time, at which point it would be outdated).
    >
    Appreciate your understanding and help.
    Thanks,
    Ranjith M.V

  • Error:Class java.util.date not found

    i have installed 9iAS on my computer.And i want to develop program on JSP.i tried the url below
    http://eyuksel/servlet/IsItWorking
    and i got "it is working" message.when i try to execute my first jsp file i get the error:
    Errors compiling:d:\ias\apache\apache\htdocs\_pages\\_first.java
    d:\ias\apache\apache\htdocs\_pages\_first.java:55: Class java.util.date not found.
    out.print( new java.util.date() );
    ^
    1 error
    what must i do or how can i install the java classes.
    kind regards...
    null

    Thank you very much.It worked:)
    Java is case-sensitive.
    try
    java.util.Date
    instead of
    java.util.date
    null

  • Requested resource not available - can not find servlet

    I have an application in tomcat that uses jsp and servlets. The JSP works fine, but I keep getting a "requested resource not available" erroe when i try to access a servlet. My jsp is in a directory called ProjectManager, and my servlet classes are in WEB-INF/classes inside ProjectManager and are in a package called pmt.
    I can access my jsp using localhost:8080/ProjectManager/index.jsp, but I cannot seem to access the servlets, regardless of the URL I try. I've tried adding a servlet-name and a servlet-mapping in the web.xml file but I'm still stuck.
    Does anybody have any ideas?
    Thanks in advance.

    What jar files should be in the library? I have the following:
    commons-lang-2.4(2).jar
    mysqlconnector-java-5.1.6.bin.jar
    webserviceutils.jar
    Here is my web.xml as I too am getting "the request resource....cannot be found:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
         <display-name>
         classBlog</display-name>
         <servlet>
              <description>
              </description>
              <display-name>
              DriverServlet</display-name>
              <servlet-name>DriverServlet</servlet-name>
              <servlet-class>
              edu.ec.web.classBlog.DriverServlet</servlet-class>
         </servlet>
         <servlet>
              <description>
              </description>
              <display-name>
              AddEntityServlet</display-name>
              <servlet-name>AddEntityServlet</servlet-name>
              <servlet-class>
              com.ec.blog.web.AddEntityServlet</servlet-class>
         </servlet>
         <servlet>
              <description>
              </description>
              <display-name>
              DeleteEntityServlet</display-name>
              <servlet-name>DeleteEntityServlet</servlet-name>
              <servlet-class>
              com.ec.blog.web.DeleteEntityServlet</servlet-class>
         </servlet>
         <servlet>
              <description>
              </description>
              <display-name>
              EditEntityServlet</display-name>
              <servlet-name>EditEntityServlet</servlet-name>
              <servlet-class>
              com.ec.blog.web.EditEntityServlet</servlet-class>
         </servlet>
         <servlet>
              <description>
              </description>
              <display-name>
              ViewBlogServlet</display-name>
              <servlet-name>ViewBlogServlet</servlet-name>
              <servlet-class>
              com.ec.blog.web.ViewBlogServlet</servlet-class>
         </servlet>
         <servlet>
              <description>
              </description>
              <display-name>
              ViewEntityServlet</display-name>
              <servlet-name>ViewEntityServlet</servlet-name>
              <servlet-class>
              com.ec.blog.web.ViewEntityServlet</servlet-class>
         </servlet>
         <servlet>
              <description>
              </description>
              <display-name>
              AddEntryServlet</display-name>
              <servlet-name>AddEntryServlet</servlet-name>
              <servlet-class>
              com.ec.blog.web.AddEntryServlet</servlet-class>
         </servlet>
         <servlet>
              <description>
              </description>
              <display-name>
              DeleteEntryServlet</display-name>
              <servlet-name>DeleteEntryServlet</servlet-name>
              <servlet-class>
              com.ec.blog.web.DeleteEntryServlet</servlet-class>
         </servlet>
         <servlet>
              <description>
              </description>
              <display-name>
              EditEntryServlet</display-name>
              <servlet-name>EditEntryServlet</servlet-name>
              <servlet-class>
              com.ec.blog.web.EditEntryServlet</servlet-class>
         </servlet>
         <servlet>
              <description>
              </description>
              <display-name>
              ViewEntryServlet</display-name>
              <servlet-name>ViewEntryServlet</servlet-name>
              <servlet-class>
              com.ec.blog.web.ViewEntryServlet</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>DriverServlet</servlet-name>
              <url-pattern>/DriverServlet</url-pattern>
         </servlet-mapping>
         <servlet-mapping>
              <servlet-name>AddEntityServlet</servlet-name>
              <url-pattern>/AddEntityServlet</url-pattern>
         </servlet-mapping>
         <servlet-mapping>
              <servlet-name>DeleteEntityServlet</servlet-name>
              <url-pattern>/DeleteEntityServlet</url-pattern>
         </servlet-mapping>
         <servlet-mapping>
              <servlet-name>EditEntityServlet</servlet-name>
              <url-pattern>/EditEntityServlet</url-pattern>
         </servlet-mapping>
         <servlet-mapping>
              <servlet-name>ViewBlogServlet</servlet-name>
              <url-pattern>/ViewBlogServlet</url-pattern>
         </servlet-mapping>
         <servlet-mapping>
              <servlet-name>ViewEntityServlet</servlet-name>
              <url-pattern>/ViewEntityServlet</url-pattern>
         </servlet-mapping>
         <servlet-mapping>
              <servlet-name>AddEntryServlet</servlet-name>
              <url-pattern>/AddEntryServlet</url-pattern>
         </servlet-mapping>
         <servlet-mapping>
              <servlet-name>DeleteEntryServlet</servlet-name>
              <url-pattern>/DeleteEntryServlet</url-pattern>
         </servlet-mapping>
         <servlet-mapping>
              <servlet-name>EditEntryServlet</servlet-name>
              <url-pattern>/EditEntryServlet</url-pattern>
         </servlet-mapping>
         <servlet-mapping>
              <servlet-name>ViewEntryServlet</servlet-name>
              <url-pattern>/ViewEntryServlet</url-pattern>
         </servlet-mapping>
         <welcome-file-list>
              <welcome-file>index.html</welcome-file>
              <welcome-file>index.htm</welcome-file>
              <welcome-file>index.jsp</welcome-file>
              <welcome-file>default.html</welcome-file>
              <welcome-file>default.htm</welcome-file>
              <welcome-file>default.jsp</welcome-file>
         </welcome-file-list>
    </web-app>

  • Is not a Servlet Exception

    I am new to Servlets and am trying to add a sample Servlet to Tomcat 4.0.4. Whenever I try to run it, it gives me one of two errors.
    1)The requested service (Servlet RequestDetails is currently unavailable) is not currently available.
    2)javax.servlet.ServletException: Class org.stevengould.javaworld.RequestDetails is not a Servlet
    I am getting my code from an article I was reading in JavaWorld:
    http://www.javaworld.com/javaworld/jw-02-2001/jw-0223-servletweblogic.html
    Any help would be great.
    Thanks!
    Jeremy

    I call the Servlet like this: http://localhost:8080/SampleServlet/
    Below is the error it gives me:
    EXCEPTION:
    javax.servlet.ServletException: Class org.stevengould.javaworld.RequestDetails is not a Servlet
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:890)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:655)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
    &#160;&#160;&#160;&#160;&#160;at java.lang.Thread.run(Thread.java:536)
    ROOT CAUSE:
    java.lang.ClassCastException: org.stevengould.javaworld.RequestDetails
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:886)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:655)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
    &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
    &#160;&#160;&#160;&#160;&#160;at java.lang.Thread.run(Thread.java:536)

  • My Image CLASS MF4350d printer is not recognized by windows 8-64 bit

    My Image CLASS MF4350d printer is not recognized by windows 8-64 bit any help how can i fix the problem. I just bought new HP computer from Future shop and it came with Windows in it. but this windows8 doesnt have drivers for my printer Image Class MF 4350d. Now I hve no clue how can i fix this isue. Because I checked on Canon website for drivers and downloaded and run the drivers, but no solution for my printer at all.

    Yes. I have the latest version intalled but this hasnt helped.
    I thought it could be to do with the Shuffle not having enough of a battery charge.
    So i plugged it into the wall charger and then tried this didnt work either.
    It wont even play music for some reason. The only information I get in the earpiece when I turn it on is what the battery level is at.

  • When compiling I get msg: Class java.io.* not found in import.

    import java.io.InputStreamReader;
    import java.io.BufferedReader;
    import java.io.IOException;
    public class CheckNumber {
    //program that checks the input buffer has valid integer value
         public static void main(String[] args) {
              String inLine = null;
              int checkInteger = 0;
              try {
              BufferedReader inStream = new BufferedReader (new InputStreamReader(System.in) );
              System.out.print("Enter a valid Integer and hit <ENTER>: ");
              inLine = inStream.readLine();
              checkInteger = Integer.parseInt(inLine);
              } catch (NumberFormatException nfe) {
              System.out.println("You did not enter a valid Integer: " + nfe);
              return;
              } catch (IOException e) {
              System.out.println("IOException: " + e);
              return;
              System.out.println("You entered a valid Integer: " + checkInteger);
    Compiling produced the following output:
    C:\jdk\work1>javac CheckNumber.java
    CheckNumber.java:1: Class java.io.InputStreamReader not found in import.
    import java.io.InputStreamReader;
    ^
    CheckNumber.java:2: Class java.io.BufferedReader not found in import.
    import java.io.BufferedReader;
    ^
    CheckNumber.java:12: Class java.io.BufferedReader not found in type declaration.
    BufferedReader inStream = new BufferedReader (new InputStreamReader(System.in) );
    ^
    CheckNumber.java:12: Class java.io.InputStreamReader not found in new.
    BufferedReader inStream = new BufferedReader (new InputStreamReader(System.in) );
    ^
    CheckNumber.java:15: Class java.io.BufferedReader not found in void main(java.lang.String[]).
    inLine = inStream.readLine();
    ^
    CheckNumber.java:21: Exception java.io.IOException is never thrown in the body of the corresponding try statement.
    } catch (IOException e) {
    ^
    6 errors

    I recently did a standard installation of jdk 1.5.
    This is the first time I am trying import.
    I set the path:
    set path=c:\jdk\bin
    Hmm...
    C:\jdk\bin>java -version
    java version "1.5.0_15"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04)
    Java HotSpot(TM) Client VM (build 1.5.0_15-b04, mixed mode, sharing)
    C:\jdk\bin>javac -J-version
    'javac' is not recognized as an internal or external command,
    operable program or batch file.
    There's no javac.exe file.
    I have javaw.exe and java.exe.

  • Class javax.rmi.PortableRemoteObject not found in import

    I have successfully tested test1.jsp calling stateful ejb test1ejb under JDEV9032. On deploying to standalone OC4J903, the following error occurred on accessing the jsp:
    500 Internal Server Error
    OracleJSP: oracle.jsp.provider.JspCompileException:
    Errors compiling:D:\O9IAS\j2ee\home\application-deployments\test\testWEB\persistence\_pages\\_test1.java
    Line # Error 10
    Class javax.rmi.PortableRemoteObject not found in import. import javax.rmi.PortableRemoteObject;
    Appreciate some pointers on how to troubleshoot this problem. Thanks. William Chew.

    This error is due to the c:\windows\system32\java.exe being first on the path instead of the d:\jdev9i\jdk\bin\java.exe being picked up.

  • Class javax.crypto.SecretKey not found in import.

    While compilation i am getting this error.
    Class javax.crypto.SecretKey not found in import.
    I am not able to figure it out . Please help me for that.
    Is it related to some classpath setting.

    This error is due to the c:\windows\system32\java.exe being first on the path instead of the d:\jdev9i\jdk\bin\java.exe being picked up.

  • MyApplet.java:2: Class netscape.javascript.JSObject not found in import.

    Hi,
    Im getting: MyApplet.java:2: Class netscape.javascript.JSObject not found in import.
    import netscape.javascript.JSObject;
    Where can i get this package. Someone said jaws.jar, but its not to be found. Im new on this project and I dont know how the old people compiled this applet.
    JDK version is:
    Solaris VM (build Solaris_JDK_1.2.2_10, native threads, sunwjit)
    Thanks

    Thanks man!
    I installed the jdk1.4 on my workstation. I then compiled the program via JDeveloper and pumped the class over to my server.
    Thanks again.

  • Class oracle.sql.OPAQUE not found in class oracle.xdb.XMLType

    I have the following code written in java in a unix box and this is the error I get when compiling the code. I am not able to find which specific jar or class file I need, Kindly help.
    XMLHelper.java:0: Class oracle.sql.OPAQUE not found in class oracle.xdb.XMLType.
    ^
    1 error
    OracleResultSet orst = .... some code to get data
    orst.next();
    //either of the following 2 lines give the same error
    //XMLType dXml = XMLType.createXML(orst.getOPAQUE(1)) ;
    XMLType dXml = (XMLType)orst.getObject(i);
    xmlDoc = dXml.getDOM();
    Please help

    Hello,
    from the little information in your post i would say try to import oracle.sql.*, oracle.jdbc.* and oracle.xdb.*. Make sure your project can access the following libraries ojdbc14.jar and xdb.jar.
    Regards, Marc

Maybe you are looking for