Women in Technology

Hear us Roar



Article:
  Java Web Applications
Subject:   HTTP Status 404 - /onjava/servlet/com.onjava.login
Date:   2007-09-25 04:14:45
From:   vikaschablani
Response to: HTTP Status 404 - /onjava/servlet/com.onjava.login

One correction. In url patern there is a forward slash prefixed before the string. So if in jsp string was: action="servlet/com.onjava.login", in xml it will be
<url-pattern>/servlet/com.onjava.login</url-pattern>


web.xml->
-----------------------------------
<web-app>
<servlet>



<servlet-name>login</servlet-name>
<servlet-class>com.onjava.login</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>login</servlet-name>
<url-pattern>/servlet/com.onjava.login</url-pattern>
</servlet-mapping>


</web-app>
-------------------------------------

Main Topics Oldest First

Showing messages 1 through 1 of 1.

  • HTTP Status 404 - /onjava/servlet/com.onjava.login
    2009-12-09 06:12:59  BriGuyHcri [View]

    I just became a member today. And the truth is, it's because of you.

    I felt it was necessary so I could post a thank you for the post you made way back in 2007-09-25 at 4:14:45.

    You answered a question I had been grappling with regarding the O'Reilly OnJava Login example.

    You gave a FULL explanation and a SIMPLE way to remember the rule.

    Part of the problem with learning web programming is there is a lot of false starts, blind alleys and misdirections given because of out-dated examples and it's hard for newbies to wade through this muck. It's easy to get discouraged.

    JDK's change, as do 3rd party plugins with their unending versions, which makes some of the examples no longer applicable or unable to function without some modifications.

    Such is the case with the 2001 version of the O'Reilly's OnJava Login example, but you answered my question, and it now works. I can now continue my learning because of you.

    So thanks again.

    It matches the way I like to look at things using the KISS rule, so even 2 years later, you receive this Thanks.