Re: db woes big time...

From: Bryce (spamtrap_at_berzerker-soft.com)
Date: 02/15/05


Date: Tue, 15 Feb 2005 11:11:08 -0500

On Mon, 14 Feb 2005 17:39:32 -0500, Frances Del Rio <fdr58@yahoo.com>
wrote:

>>>now this is name of servlet, conn.java.. it web.xml I have:
>>>
>>> <servlet>
>>> <servlet-name>conn</servlet-name>
>>> <servlet-class>com.conn</servlet-class>
>>
>>
>> So you must have a class named "conn" in the package "com"... Do you?
>
>yes I do indeed, Bryce, this is why this is so weird..
>
>in package 'com' I have conn.java... (i.e., conn.class..)

is it conn or Conn (Java standard says that class names should start
with an uppercase letter, but its just a standard, nothing that would
keep it from compiling. But, the class name and file name have to be
the same, even by case.

Does it follow the following directory structure?

<webapp>/WEB-INF/classes/com/conn.class?

>> No, you don't need a "main" method in a servlet.
>
>oh?.... that's a surprise.. I've read again and again that all apps (I
>thought by that was meant stand-alone's and servlets..) HAVE to have a
>main method..

Nope. Don't need it. Unless you are running it as a standalone
application. Servlet definitely doesn't need it. Just need the doGet,
or doPost (depending on if you are handling a get or post method)

--
now with more cowbell


Relevant Pages

  • Re: Problem with if-else statement in for loop
    ... > I will always put my opening brace on its own line, ... The Java standard is well set and accepted. ... As for convention vs standard, ...
    (comp.lang.java.help)
  • Re: split() and String []
    ... >> Java standard requires that variable and function names start with lower ... Its a good habit to pick up. ... Nobody has to follow them, ...
    (comp.lang.java)
  • Re: Java vs C++
    ... good estimation. ... The main problem of your comparison is that the C++ standard refers a ... lot to the C standard. ... is a significant part of java standard. ...
    (comp.lang.java.programmer)