Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Resource not found error.

 
Bob Hysell
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying the jsp/servlet login tutorial at http://www.roseindia.net/jsp/loginbean.shtml
I am using the Orion Application Server.
When I run the app I get the following error:
500 Internal Server Error
java.lang.IllegalArgumentException: Resource /PPR_TV/hello?username=&password= not found

I don't understand why it can't find 'hello' since web.xml has the following entry:
<servlet>
<servlet-name>hello</servlet-name>
<servlet-class>login</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>hello</servlet-name>
<url-pattern>/hello</url-pattern>
</servlet-mapping>

Finally, I have tried storing login.class in the WEB-INF\classes directory and the WEB-INF\classes\PPR_TV directory. Both locations yield the same error.
I just don't know what to try next so any help would be most welcome.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64182
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You servlet class looks suspect.

Firstly, class names should start with capitals. So Login, not login. (And either way, it's a poor name for a servlet).

Secondly, servlets must be in a package other than the default.

Fix these issues and let's see where we stand.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64182
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might also want to find better tutorials. The site you are using is widely known to be poor.
 
Bob Hysell
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the feedback. I capitalized the Login class and put it in the logbean package but still have the same error.
Perhaps you could recommend a better tutorial?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64182
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't tell us what you did -- show us. (be sure to UseCodeTags)
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13045
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Be sure to include the directory configuration in addition to the new web.xml entry.

Bill
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic