HttpConnection error (-7334) - Simple Servlet program

hi .. iam having this problem on my p990i . .. cannot resolve it "By adding these headers "
My code is simple .. Its takes the server ip address and server returns a string(variable s) to the client
Midlet :
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
import javax.microedition.io.*;
import java.io.*;
import java.util.Vector;
public class MidletServlet extends MIDlet implements CommandListener {
Display display = null;
Form form = null;
destroyApp(true);
notifyDestroyed();
} else if (c == backCommand) {
display.setCurrent(form);
} else if (c == submitCommand) {
str = tb.getString();
test = new Test(this,str);
test.start();
//test.getServlet(str);
class Test implements Runnable {
MidletServlet midlet;
private Display display;
String addr;
public Test(MidletServlet midlet,String addr) {
this.addr = addr;
this.midlet = midlet;
display = Display.getDisplay(midlet);
public void start() {
Thread t = new Thread(this);
t.start();
public void run() {
// String Buffer
StringBuffer sb ;
try {
String url = "http://"addr"/Servlets/servlet/getText";
System.out.println(url);
HttpConnection c = (HttpConnection) Connector.open(url,Connector.READ_WRITE);
c.setRequestProperty("User-Agent","Profile/MIDP-2.0, Configuration/CLDC-1.1");
c.setRequestProperty("Content-Language","en-US");
c.setRequestMethod(HttpConnection.POST);
// Get the response from the servlet page.
DataInputStream is =(DataInputStream)c.openDataInputStream();
//is = c.openInputStream();
int ch;
sb = new StringBuffer();
while ((ch = is.read()) != -1) {
sb.append((char)ch);
showAlert(sb.toString());
is.close();
c.close();
} catch (Exception e) {
showAlert(e.getMessage());
/* Display Error On screen*/
private void showAlert(String err) {
Alert a = new Alert("");
a.setString("Error Occured :"+ err);
a.setTimeout(Alert.FOREVER);
display.setCurrent(a);
Servlet
import java.io.*;
import java.text.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class getText extends HttpServlet {
public void init() {
public void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
System.out.println("Connected with client: " + request.getRemoteAddr());
String s = " This is gonna be legendary";
response.setHeader("Content-Type", "text/plain");
response.setHeader("Cache-Control","no-store");
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Pragma","no-cache");
response.setHeader("Cache-Control", "no-transform");
response.setHeader("Connection", "Keep-Alive");
response.setHeader("Proxy-Connection", "Keep-Alive");
response.setContentType("text/plain");
response.setContentLength(s.length());
PrintWriter out = response.getWriter();
out.println(s);
System.out.println("Sent String : " +s);
//in.close();
out.close();
out.flush();
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
doPost(request,response);
i always get exception -7334 {Symbain OS error : contains header but no body in p990i}
iam testing this on my personal Wifi network
my server is :192.168.1.100
my phone ip is : 192.168.1.105
Iam trying to run this frompast 2 days .. no success .. :( PLzzzz help ..

Hi,
The J2EE Error code siply suggest that there is something wrong in your Deployment Descriptors...
Can u please post the XML files available inside your "WEB-INF" directory?
Thanks
Jay SenSharma
http://jaysensharma.wordpress.com (WebLogic Wonders Are Here)

Similar Messages

  • Weblogic error while deplying a simple servlet program

    Hi This is a very simple servlet program.
    I am trying to deploy it on the weblogic server but i get this error as follow
    Unable to access the selected application.
    *javax.enterprise.deploy.spi.exceptions.InvalidModuleException: [J2EE Deployment SPI:260105]Failed to create*
    DDBeanRoot for application, 'E:\AqanTech\WebApp1\myApp.war'.
    I have checked everything, right from my code to my web.xml file. I have used a build.bat file to build my war file.
    PLEASE HELP ME TO SOLVE THIS HUGE PROBLEM OF MINE ?
    Thanks,
    Shoeb

    Hi,
    The J2EE Error code siply suggest that there is something wrong in your Deployment Descriptors...
    Can u please post the XML files available inside your "WEB-INF" directory?
    Thanks
    Jay SenSharma
    http://jaysensharma.wordpress.com (WebLogic Wonders Are Here)

  • Error in simple oops program

    Hi experts,
    When executing a simple oops program ..i got the following error. Please correct the code.
    "VAR" is not type-compatible with formal parameter "I_DATA".          
          CLASS main DEFINITION
    CLASS main DEFINITION.
      PUBLIC SECTION.
        "// Instance Methods ( Note we use the statement 'METHODS'
        "// to define an instance method )
        METHODS set_data IMPORTING i_data TYPE string.
        METHODS get_data RETURNING value(r_data) TYPE string.
        METHODS print_attribute IMPORTING i_data TYPE string.
        "// Instance Methods ( Note we use the statement 'CLASS-METHODS'
        "// to define a static method )
        CLASS-METHODS set_classdata IMPORTING i_data TYPE string.
        CLASS-METHODS get_classdata RETURNING value(r_data) TYPE string.
        CLASS-METHODS print_classattribute IMPORTING i_data TYPE string.
      PROTECTED SECTION.
        "// Instance Attribute ( Note we use the statement 'DATA'
        "// to define an instance attribute )
        DATA attribute TYPE string.
        "// Static Attribute ( Note we use the statement 'CLASS-DATA'
        "// to define a static attribute )
        CLASS-DATA classattribute TYPE string.
      PRIVATE SECTION.
        "// Instace event ( Note we use the statement 'EVENTS'
        "// to define aN instance event )
        EVENTS event EXPORTING value(e_data) TYPE string.
        "// Instace event ( Note we use the statement 'CLASS-EVENTS'
        "// to define a static event )
        CLASS-EVENTS classevent EXPORTING value(e_data) TYPE string.
        "// For more informations about events see the following example:
        "// ABAP Objects - Creating your First Local Class - Using Events
    ENDCLASS.                    "main DEFINITION
          CLASS main IMPLEMENTATION
    CLASS main IMPLEMENTATION.
      METHOD set_data.
        CONCATENATE 'Instance Attribute value' i_data
                                   INTO attribute SEPARATED BY space.
      ENDMETHOD.                    "set_data
      METHOD get_data.
        MOVE attribute TO r_data.
      ENDMETHOD.                    "get_data
      METHOD set_classdata.
        CONCATENATE 'Static Attribute value' i_data
                                   INTO classattribute SEPARATED BY space.
      ENDMETHOD.                    "set_classdata
      METHOD get_classdata.
        MOVE main=>classattribute TO r_data.
      ENDMETHOD.                    "get_classdata
      METHOD print_attribute.
        WRITE: i_data, /.
      ENDMETHOD.                    "print_attribute
      METHOD print_classattribute.
        WRITE: i_data, /.
      ENDMETHOD.                    "print_classattribute
    ENDCLASS.                    "main IMPLEMENTATION
    DATA: var type char20.
    START-OF-SELECTION.
      "// Calling a Static method (note we don't have a object )
      "// instead we use the <class name>=><method name>.
      main=>set_classdata( 'SDN' ).
      var = main=>get_classdata( ).
      "// Print the var value
      main=>print_classattribute( var ).
      DATA: object_reference TYPE REF TO main.
      CREATE OBJECT object_reference.
      "// - Calling a Instance Method( Note we have to use a object to
      "// access the insntace components of class main )
      "// - Note we're using the statment "CALL METHOD", see looking for
      "// functional & General methods for more informations
      CALL METHOD object_reference->set_data( 'BPX' ).
      var = object_reference->get_data(  ).
      object_reference->print_attribute( var ).
    Thanks in Advance.
    Regards
    Nani

    Hi Nani,
    try changing your data definition for var from CHAR20 to STRING.
    regards,
    Peter

  • Compilation error for First Servlet program

    Hi,
    I have go the following program from a book bu is giving me a long list of errors maybe I have no imported the proper package.
    import java.servlet.*;
    import java.io.*;
    public class Brat extends GenericServlet
    public void init (ServletConfig sc)
    throws ServletException
    System.out.println("I don wana wake up");
    public void service (ServletRequest req, ServletResponse res)
    throws ServletException
    try{
    ServletOutputStream sos=res.getOutputStream();
    sos.println("I dont wanna do anyhing");
    sos.close();
    catch(IOException ioe) {ioe.printStackTrace();}
    public void destroy()
    System.out.println("I dont wana go to bed");
    Its giving me symbol not resolve errors for the
    following symbols
    ServletException, ServletConfig, ServletResponse etc.
    How can I get around with these errors?
    Zulfi.

    Sorry, but i handled with Servlets some time ago.
    Servlets are not contained in the standard SDK.
    There has been a servlet development kit, but it seems not to exist any more. (I cant't find it)
    But servlet technology is included in java server pages and other web applications, so you have to download i.g. J2EE SDK and to install it, to find the classes you need.
    (It's included in other packages too, i think.)
    http://java.sun.com/products/jsp/download.html
    If you've installed the used packages, then include only the packages you need. (Doc's should help)
    Make shure that the packages are included in your classpath.
    (Have been the files server.jar and servlet.jar in "former" times.)
    Sorry, but i can't give more advice, 'cause im not up to date with this subject.
    Maybe someone else can help?
    Good luck again.

  • Error in Simple Servlet Execution

    I am using Eclipse...
    I have changed the build path..source files to this folder
    WebContent/classes/ [class files]
    In this classes folder i am having hi servlet file
    hi.java [source code]
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class hi extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet
       static final long serialVersionUID = 1L;
            protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
            response.setContentType("text/html");
            PrintWriter pw=response.getWriter();
        pw.println("<html><body>hi</body></html>");
    }After Running server..
    http://localhost:8080/tested/hi
    It Displays this Error
    Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Wrapper cannot find servlet class hi or a class it depends on
    +     org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)+
    +     org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)+
    +     org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)+
    +     org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)+
    +     org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)+
    +     org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)+
    +     org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)+
    +     java.lang.Thread.run(Unknown Source)+
    root cause
    java.lang.ClassNotFoundException: hi
    +     org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1338)+
    +     org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1187)+
    +     org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)+
    +     org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)+
    +     org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)+
    +     org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)+
    +     org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)+
    +     org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)+
    +     org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)+
    +     java.lang.Thread.run(Unknown Source)+
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.12 logs.
    Please five any soln

    check your deployment directory and make sure the web application directory structure is ther.
    WebContent/classes/ class filesyou can give any name .. but you've to tell the myeclipse first so that when deploying the application it'll automatically create the required directories and place the files respectively.
    i think nothing is there in your Deploment directory ( webapps )

  • Applet - error in simple Ping program using Applet.Pls correct my error.

    Can anyone pls correct the error in the below code.
    Program : TestExec1
    Using : Applet
    Logic : Trying to display the continous pinging status in the textarea in applet, but it returns error...!
    CODING
    import java.awt.*;
    import java.lang.*;
    import java.io.*;
    import java.net.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.*;
    /*<applet code="TestExec1" width=380 height=150>
    </applet>
    public class TestExec1 extends Applet
    String line = null;
    TextArea outputArea;
    Process p;
    public void init()
    outputArea = new TextArea(20,20);
    public void start()
    try
    Process p= Runtime.getRuntime().exec("ping 192.168.100.192 -t");BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
    while ((line = in.readLine()) != null)
    outputArea.append("\n" + line);
    System.out.println(line);
    catch (IOException e)
    e.printStackTrace();
    Error : C:\Program Files\Java\jdk1.6.0_02\bin>appletviewer TestExec1.java
    java.security.AccessControlException: access denied (java.io.FilePermission <<AL
    L FILES>> execute)
    at java.security.AccessControlContext.checkPermission(AccessControlConte
    xt.java:323)
    at java.security.AccessController.checkPermission(AccessController.java:
    546)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
    at java.lang.SecurityManager.checkExec(SecurityManager.java:782)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:447)
    at java.lang.Runtime.exec(Runtime.java:593)
    at java.lang.Runtime.exec(Runtime.java:431)
    at java.lang.Runtime.exec(Runtime.java:328)
    at TestExec1.start(TestExec1.java:31)
    at sun.applet.AppletPanel.run(AppletPanel.java:458)
    at java.lang.Thread.run(Thread.java:619)
    Regards
    ESM

    Will you please tell the procedure of how to use jarsigner and make a sign in for my program.
    class Name : SamplePing.java
    Using : Applet
    Manifest file : manifest.txt
    Main Class : SamplePing
    I have created jar file using the following command -
    "jar cvfm Ping.jar manifest.txt Sa*.class "
    Let me know how can i proceed further to run exec command in applet.Pls give me series of steps.
    Thanks in advance.

  • Error in simple Generics program

    Why is this code not compiling? When I changed the <String> to <T> then it works.
    My question is why should the code listed below fail.
    Error: non-static class String cannot be referenced from a static context
    public class SimpleGenerics1<String> {
      String datum;
      void setdatum(String datum) {
        this.datum = datum;
      String getDatum() {
        return this.datum;
      public static void main(String[] args) {     //Error here
        SimpleGenerics1 sg = new SimpleGenerics1();
    }

    ---->Just try the following code,
    public class Example <String> {
         String datum;
         void setdatum(String datum) {
              this.datum = datum;
         String getDatum() {
              return this.datum;
         public static void main(String[] args) {   
    Example <String> sg = new Example();
    //while calling the class just try to add <String>     
         }

  • Error while compiling Servlet

    Hello everyone,
    I am quite new to the Java Technology.
    I have this simple servlet program which gives me an error when I try to compile it.
    The error is as follows:
    TestServlet.java:1: package javax.servlet does not exist
    import javax.servlet.*;
    ^
    TestServlet.java:2: package javax.servlet.http does not exist
    import javax.servlet.http.*;
    ^
    Is this anything to do with the classpath or path settings?
    Any help would be highly appreciated.
    Thanks in advance,

    I have this file called servlet.jar which has some
    .class files.And this file is in the classpath.Just open it with WInZip or some ZIP viewing utility and check if the required classes are present.

  • Problem with the servlet program

    I created a simple servlet program and tried to deploy the same through Sun Microsystem's J2EE Application Server 1.4. But after I included the servlet file to the deploytool and selected the servlet option, it gives an error msg. that says the file included is not a valid servlet file.
    However, all the other types like jsp, etc. is working fine.
    I am new to this servlet. I know it might be a small mistake that I may be making. Can anyone please help me to resolve the same.

    Have you looked up a servlet tutorial to see if your code maybe isn't missing something?
    There is little help anyone can give you at this point as you basically do not share anything that you can be helped with. Post the servlet code, judging by the error message the problem most likely lies there.

  • Error while running a Servlet program in Eclipse IDE

    Hi,
    I have tried running the following program in the Eclipse Editor. It doesnt compile. I have installed the Tomcat plugin too.
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class HTTPGetServlet extends HttpServlet {
         public void doGet(HttpServletRequest request,
                   HttpServletResponse response)
         throws ServletException, IOException
              PrintWriter output;
              response.setContentTe("text/html");
              output=response.getWriter();
              StringBufer buf=new StringBuffer();
              buf.append("<HTML><HEAD><TITLE>\n");
              buf.append("A simple servlet example\n");
              buf.append("</TITLE></HEAD><BODY>");
              buf.append("<H1>Welcome to the world</H1>\n");
              buf.append("</BODY></HTML>");
              out.println(buf.toString());
              output.close();
    On a closer look i realized that the IDE is showing as error any import statements i type in. Can anyone help me get over this problem? Thanks a lot in advance.
    bye
    V

    You need to add the JAR containing the servlet API in the external JARs for the project.
    Regards,
    Carol.

  • Error while running Java program which call a file upload servlet

    Hi all,
    I have a java program which calls a servlet and sends the file to be uploaded by the servlet. I used Jbuilder to create java program and servlet program. I compiled both the programs and compilation suceeded and my class files are avaialbe in
    WEB-INF/classes/content directory. But now I am trying to run the Java program(this contains main method) from the command prompt, which should inturn call my servlet.(I have web.xml file inside WEB-INF dir). But I receive the following error
    C:\tomcat5.5.15\apache-tomcat-5.5.16\webapps\content\WEB-INF\classes\content>java MultiContentSender
    Exception in thread "main" java.lang.NoClassDefFoundError: MultiContentSender (w
    rong name: content/MultiContentSender)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
    3)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    My dir strcture is as below
    TOMCAT_HOME/webapps/content/WEB-INF/classes/content/*.class
    I am not able to figure out the error, can anyone throw some light on this issue.

    You are trying to invoke the class from the command prompt. My guess is that MultiContentSender contains a package, which means that you'll need to add your WEB-INF\classes directory to the classpath before it will work. Classes stored in this directory are expected to be invoked through tomcat, which builds it's own classpath.

  • PARSE_APPLICATION_DATA Error during XML = ABAP conversion: Response Message; CX_ST_DESERIALIZATION_ERROR in /1SAI/SAS0446CC11CC6EC1AD4789 Line 24 An error occurred when deserializing in the simple transformation program /1SAI/SAS0446CC11CC6EC1AD4789

    Hi Experts ,
    i have a scenario proxy to soap  where i am getting error while getting the response .
    we are sending the request successfully and getting response .some times we are getting in proxy level error below
    PARSE_APPLICATION_DATA Error during XML => ABAP conversion: Response Message; CX_ST_DESERIALIZATION_ERROR in /1SAI/SAS0446CC11CC6EC1AD4789 Line 24 An error occurred when deserializing in the simple transformation program /1SAI/SAS0446CC11CC6EC1AD4789 (Cha
    Please help us to fix this bug in proxy response.
    Regards
    Ravi

    Hello Ravinder,
    Can you please post the complete stack trace, it seems to be some fields are getting truncated i,e data sent from the program to the proxy object might be violating some length restrictions.
    Please check your message interface field lengths and what is being passed to the proxy.
    Regards,
    Ravi.

  • Can't compile Servlet program(error in setting classpath in XP)

    I encountered a similar problem as 'hereispaddy'.
    "I have recently written a servlet program. When I compile the program (let's say "HelloWorld.java"), I've got the following error message:
    package javax.servlet does not exist
    I've download the class files and set the classpath already. Have I missed anything? "
    i would like to ask, how to set the following in Windows XP:
    set CATALINE_HOME=C:\PROGRA~1\APACHE~1.0
    set CLASSPATH=.;%CATALINE_HOME%\COMMON\LIB\SERVLET.JAR;C:\JDK1.4\BIN;
    *ive tried in control panel->system->advanced->environment variables->
    variable name:CATALINE_HOME
    variable value:C:\Program Files\Apache Tomcat4.0 (and)
    variable name:CLASSPATH
    variable value:.;%CATALINE_HOME%\common\lib\servlet.jar;C:\jdk1.4\bin
    but failed!
    Could anyone kindly tell me what's wrong with my setting?
    Thx a lot!!!

    Does Tomcat work? Can run the examples on the home page?
    The only suggestion I have at this point is to get rid of the spaces in
    C:\Program Files\Apache Tomcat4.0
    But I am still in Win98 , so I am just guessing.

  • "Assertion failed" error when executing a simple UCI program

    I am using a simple UCI program (tt1.c) with Xmath version 7.0.1 on Sloaris 2.8 that performs the followings:
    - Start Xmath701
    - Sleep 10 Seconds
    - Load a sysbuild model
    - Stop Xmath
    I am calling the uci executable using the following command:
    > /usr/local/apps/matrixx-7.0.1/bin/xmath -call tt1 &
    In this way everything works fine and the following printouts from the program are produced.
    --------- uci printout ----------
    ## Starting Xmath 701
    ## sleep 10 seconds
    ## load "case_h_cs_ds.xmd";
    ## Stopping Xmath 701
    All the processes (tt1, XMATH, xmath_mon, and sysbld) terminate correctly.
    The problem occurs if the 10 second wait after starting xmath is omitted:
    - Start Xmath701
    - Load a sysbuild model
    - Stop Xmath
    This results to the following printouts:
    --------- uci printout ----------
    ## Starting Xmath 701
    ## load "case_h_cs_ds.xmd";
    Assertion failed: file "/vob1/xm/ipc/ipc.cxx", line 420 errno 0.
    Note that the last line is not produced by the uci program and the tt1 did not
    finish (the printout before stopping xmath "## Stopping Xmath 701" was
    not produced).
    A call to the unix "ps -ef" utility shows that none of the related process has been terminated:
    fs085312 27631 20243 0 10:45:29 pts/27 0:00 tt1
    fs085312 27643 1 0 10:45:30 ? 0:00 /usr/local/apps/matrixx-7.0.1/solaris_mx_70.1/xmath/bin/xmath_mon /usr/local/app
    fs085312 27641 27631 0 10:45:30 ? 0:01 /usr/local/apps/matrixx-7.0.1/solaris_mx_70.1/xmath/bin/XMATH 142606339, 0x8800
    fs085312 25473 25446 0 10:45:33 ? 0:01 sysbld ++ 19 4 7 6 5 8 9 0 25446 ++
    The questions are as follows:
    1- What is "Assertion failed: file "/vob1/xm/ipc/ipc.cxx", line 420 errno 0" and why is that produced?
    2- Should the UCI program waits for end of sysbld initialization before issuing commands?
    3- If the answer to the above question is yes, is there a way to check the termination of sysbld initialization?
    Thanks in advance for you help.
    Attachments:
    tt1.c ‏1 KB

    I tracked down the problem and it is a race condition between the many processes being started up. A smaller delay should also solve the problem. Or, maybe do something else before the first 'load'. The 'load' command tries to launch systembuild and causes the race condition.

  • Problem compiling simple servlet

    I am trying to compile a very simple servlet.
    When I do, I get the following error message:
    Package javax.servlet does not exist
    I am using the Java 2 SDK, Standard Edition Version 1.3.1.
    I have downloaded the servlet api (zip file servletapi2_1_1win.zip)
    from Sun's site. I unzipped these files in my lib directory; there are two folders,
    one called api and the other called src. Api and Src directories have their own
    sub-folders, javax/servlet/http etc.
    I am using W2K ; I had to create a CLASSPATH system variable in the environment
    variables section of control panel since there was none defined.
    I added the following line:
    C:\jdk1.3.1_01\lib\api\javax\servlet;C:\jdk1.3.1_01\lib\api\javax\servlet\http;
    I also did this for the PATH statement..
    My servlet looks like this:
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class howdy extends HttpServlet {
    public void doGet(HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException {
    res.setContentType("text/html");
    PrintWriter out = res.getWriter();
    out.println("<HTML>");
    out.println("<HEAD><TITLE>Hello World </TITLE></HEAD>");
    out.println("<BODY>");
    out.println("<BIG>Hello World </BIG>");
    out.println("</BODY></HTML>");

    Thanks. I was able to figure it out by specifying the
    full classpath
    at the command line, like this:
    C:> javac -classpath
    C:\jdk1.3.1_01\lib\servletapi2_1_1-win.zip\MyServlet.ja
    a
    Apparantly the system doesn't acknowledge the
    environmental variable that
    I created in the control panel; also I have no
    autoexec.bat file...so it
    looks like I have to write out the full path whenever
    I need to compile
    something. Kind of bothersome, but at least it
    works.
    You shouldn't have to do this. What operating system are you using?
    If you are using win2000, winNT or winxp, you should set the classpath in your system environment varialbes. You can also make a config.bat file and put everything in there. Then just run this config.bat file to set up your environment once for every session.
    Here's a file that I have set up on one of our NT machines. I just double click the icon for this file on my shortcut, and it gives me the window where I can compile my java programs.
    Hope this helps.
    Kamran
    =========== File SetJava.bat ============
    set PATH=%PATH%;m:\jdk1.3\bin
    set CLASSPATH=m:\jdk1.3\jre\lib;m:\jdk1.3\jaxp-1.1\jaxp.jar;m:\jdk1.3\jaxp-1.1\crimson.jar;m:\jdk1.3\jaxp-1.1\xalan.jar;.
    cd cis235
    %SystemRoot%\system32\cmd.exe

Maybe you are looking for