File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Resource not found error. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Resource not found error." Watch "Resource not found error." New topic
Author

Resource not found error.

Bob Hysell
Greenhorn

Joined: Apr 14, 2011
Posts: 7
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

Joined: Jan 10, 2002
Posts: 61201
    
  66

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61201
    
  66

You might also want to find better tutorials. The site you are using is widely known to be poor.
Bob Hysell
Greenhorn

Joined: Apr 14, 2011
Posts: 7
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

Joined: Jan 10, 2002
Posts: 61201
    
  66

Don't tell us what you did -- show us. (be sure to UseCodeTags)
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12781
    
    5
Be sure to include the directory configuration in addition to the new web.xml entry.

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Resource not found error.