This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes javax.servlet.ServletException: PWC1381: Error allocating a servlet instance Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "javax.servlet.ServletException: PWC1381: Error allocating a servlet instance" Watch "javax.servlet.ServletException: PWC1381: Error allocating a servlet instance" New topic
Author

javax.servlet.ServletException: PWC1381: Error allocating a servlet instance

Suvojit Chakraborty
Ranch Hand

Joined: Nov 10, 2009
Posts: 62
    
    1
Hi all,

I am trying to extract value from database in a filtered way. I am trying to get value as per emp_id.

Html Code

Servlet COde


Database connectivity code:



But executing it give following error;

HTTP Status 404 -

--------------------------------------------------------------------------------

type Status report

message

descriptionThe requested resource () is not available.


--------------------------------------------------------------------------------

Sun GlassFish Enterprise Server v2.1


Why so. Whats the error and how do I fix it??


thanks for help
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

*PLEASE* remove unnecessary comments/code/whitespace/etc. in the code.

You don't provide your web.xml, so it's impossible to help much. Is there anything in the logs? Are there startup errors?
Suvojit Chakraborty
Ranch Hand

Joined: Nov 10, 2009
Posts: 62
    
    1


->I dont know how to check logs.
-> What do you mean by startup errors, please clarify. There were no errors before this one. As soon as I click on the button this error pops up.
Suvojit Chakraborty
Ranch Hand

Joined: Nov 10, 2009
Posts: 62
    
    1
<servlet-mapping>
<servlet-name>getAll</servlet-name>
<url-pattern>/getAll</url-pattern>
</servlet-mapping>


Mr David, I think I spotted the error and fixed it. I found that in url-pattern I had /getAll instead of /getAll.view.
Perhaps it was causing the error.

Now at least the page is opening but it gives this exception : Error---Servlet Could not display records. which is actually the message I used in exception handler which mean it is throwing SQLException.
Please help me to spot.

Also can you tell me how did /getAll.view become /getAll? I dont create the web.xml it gets created automatically. I am using NetBean 6.5 iDE.

thank you
 
 
subject: javax.servlet.ServletException: PWC1381: Error allocating a servlet instance
 
Similar Threads
error to login page
error message
Login code problem
page refresh problem
Exception while EJB deployement