Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

I feel stupid

1 view
Skip to first unread message

George Smith

unread,
Oct 14, 2000, 3:00:00 AM10/14/00
to
I've installed version 5.1 which came with WebGain Visual Cafe Enterprise
Edition. I made the connection to my IIS using the iisproxy.dll as described
in the installation help. I created an extremely simple JSP file which does
a for next loop 10 times printing "Hello World!".

It's obviously getting to the WebLogic server since the WebLogic http log
shows the error, but Here's what I get back from the server:

From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.5.1 500 Internal Server Error
The server encountered an unexpected condition which prevented it from
fulfilling the request.

What the heck am I doing wrong? It's generating the .java file as expected.
I can see that file. I think it's having a problem compiling and running the
class file.

George

George Smith

unread,
Oct 14, 2000, 3:00:00 AM10/14/00
to
Well, I still feel stupid, but I found that problem. Now I have a new one. I
create a Servlet named MovieTest.java. I compile it into the directory
D:\weblogic\myserver\servletclasses\test\.

I have this line in the weblogic.properties file:
weblogic.httpd.register.MovieTest=test.MovieTest

I then call http://localhost/servlets/test/MovieTest.svlt with svlt being
the extension that I registered with IIS for servlets. Other example
servlets like SnoopServlet work fine, so I know it isn't the connector. But
now I get:

From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.5.1 500 Internal Server Error
The server encountered an unexpected condition which prevented it from
fulfilling the request.

The log shows:

Sat Oct 14 14:29:03 CDT 2000:<I> <NT Performance Pack> Allocating: '2' NT
reader threads
Sat Oct 14 14:29:04 CDT 2000:<I> <ServletContext-General> servlets: init
Sat Oct 14 14:29:04 CDT 2000:<E> <ServletContext-General> Servlet failed
with Exception
java.lang.NoClassDefFoundError: test/MovieTest (wrong name: MovieTest)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java, Compiled Code)
at java.lang.ClassLoader.defineClass(ClassLoader.java, Compiled Code)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass

I know the servlet code itself is Ok. It's just a standard servlet template
created by Visual Cafe Enterprise Edition with no modifications made to it
at all. Here's the code:

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class MovieTest extends HttpServlet
{
public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException
{
doPost(req,resp);
}

public void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException
{
resp.setContentType("text/html");
PrintWriter out = new PrintWriter(resp.getOutputStream());

// to do: code goes here.

out.println("<HTML>");
out.println("<HEAD><TITLE>MovieTest Output</TITLE></HEAD>");
out.println("<BODY>");

// to do: your HTML goes here.

out.println("</BODY>");
out.println("</HTML>");
out.close();
}

}

I know I'm missing something simple.... Any help would be greatly
appreciated...

George

Evan Child

unread,
Oct 16, 2000, 3:00:00 AM10/16/00
to
George,
You have to have the package syntax at the top of your servlet.

package test;

import java.io.*;
import .........
//the rest of your code here.
That should fix your problem.

Hope this helps,
Evan

"George Smith" <george...@tksoftware.com> wrote in message
news:39e8b78b$1...@newsgroups.bea.com...

0 new messages