Greetings all,
I folowed Paul's advice about the checking the webserver.  That was running.
The directory structure that the jswdk2.1 creates does not have a directory
called "servlet".  They are all called "servlets".  I extracted the
servlet.jar and it created a directory structure javax/servelt/all classes.
I moved my class file to this directory and I still get the same message.
> IOException: java.io.FileNotFoundException:
http://localhost:8080/javax/servlet/CPP?inFile=inputFile
Here is the change in the code:
URL url = new URL("http://sparc20:8080/javax/servlet/CPP?inFile=inputFile");
Thanks
syed
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 27, 2000 12:01 PM
To: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology.; Syed Mahmoods
Cc: [EMAIL PROTECTED]
Subject: Re: servlet-servlet call -SOS


Greetings all,

Make sure the instance of the webserver is started and the servlet is in the
correct directory for servlet and the path sould be qualified with a
"servlet"
and not "servlets"
like http://localhost:8080/servlet/Myservlet
Hope this helps
Paul



Quoting Syed Mahmoods <[EMAIL PROTECTED]>:

> I need to post some data that one servlet that reads the
> data(PostToCallParser), to another sevltet(CPP) that processes that
> data.
> Both of my servlets are in the same directory
> "/home/mahmoods/jsdk2.1/examples/WEB-INF/servlets".  When I run the
> PostToCallParser, I get a FileNotFoundException.
> I have added the class name in the servlets.properties file, and I have
> restarted the server.
> I would appreciate any help.
> Thanks
>
> Here is the entire code of the servlet that reads the data and calls the
> second servelet.
>
> import java.io.*;
> import java.net.*;
> import java.text.*;
> import java.util.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
> public class PostToCallParser extends HttpServlet {
>
>
>     String email="[EMAIL PROTECTED]";
>     String inputFile;
>     String newLine = System.getProperty("line.separator");
>     int x = 1;
>     public void doGet(HttpServletRequest request,
>                       HttpServletResponse response)
>         throws IOException, ServletException
>     {
>         response.setContentType("text/html");
>         PrintWriter out = response.getWriter();
>         try
>         {
>            URL source = new
> URL("http://localhost:8080/examples/servlets/sh-versio
> n");
>            DataInputStream in = new
> DataInputStream(source.openStream());
>            String aLine;
>            inputFile="";
>            while ((aLine = in.readLine()) != null)
>            {
>              inputFile=inputFile+newLine+aLine;
>            }
>            String inFile;
>            URL url = new
>
URL("http://localhost:8080/examples/WEB-INF/servlets/CPP?inFile=inputFile");
>            BufferedReader inStream = new BufferedReader(
>                 new InputStreamReader(url.openStream()));
>            String inputLine;
>            while ((inputLine = inStream.readLine()) != null)
>            {
>              out.println(inputLine);
>            }
>            inStream.close();
>            System.err.println("inStream closed ...");
>         }
>         catch (MalformedURLException me)
>         {
>           System.err.println("MalformedURLException: " + me);
>         }
>         catch (IOException ioe)
>         {
>           System.err.println("IOException: " + ioe);
>         }
>
>     }
> }
>
> Here is the IOException that I get.
> > IOException: java.io.FileNotFoundException:
> http://sparc20:8080/examples/WEB-INF/servlets/CPP?inFile=inputFile
> Please send some help my way.
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>


------------------------------------------------------------
This mail sent through WebMail: http://webmail.netexpress.net

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to