similar problem was posted i the forum sometime back. That time the solution suggested
is as folows.
The order of the import statement should be as following.
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
What does it mean is the last 2 import statements coresponding to servlet classes
should be at the end of the set of import statements.
---
Veena T
Assistant Profesor,
Manipal Center for Information Science,
Manipal.
576 119
Email: [EMAIL PROTECTED]
Telephone: 91+08252-71915/71914
On Tue, 23 May 2000 10:59:15
abhishek shodhan wrote:
>hi all.
>I really need help on this:
>I get an error that says java.lang.ClassFormatException
>
>I read through the documentation and what i get is that there is a problem in
>my .class file(bytecode).
>the file compiles perfectly.
>
>i tried it with both the doGet and doPost methods, but I still get the same
>error.
>
>The code is below:
>
>import javax.servlet.*;
>import javax.servlet.http.*;
>import java.io.*;
>import java.util.*;
>
>public class tem1 extends HttpServlet
>{
>public void init(ServletConfig config) throws ServletException
>{
> try{
> super.init(config);
> }
> catch(Exception ex){}
>}
>
>public void doGet(HttpServletRequest req, HttpServletResponse res) throws
>ServletException,IOException
>{
> try
> {
> PrintWriter out= res.getWriter();
> res.setContentType("text/html");
> out.println("<html><body>whatever</body></html>");
> out.close();
> }
> catch(Exception ex)
> {
> // System.out.println("exc :"+ ex);
> }
>}
>
>public void destroy()
>{
>}
>}
>
>-------------------------------------------------------------------------
>Love Always,
>Abhishek Shodhan.
>
>____________________________________________________________________
>Get free email and a permanent address at http://www.amexmail.com/?A=1
>
>___________________________________________________________________________
>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
>
Send FREE Greetings for Father's Day--or any day!
Click here: http://www.whowhere.lycos.com/redirects/fathers_day.rdct
___________________________________________________________________________
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