I'm working with Weblogic and I have the servlet PruebaServlet that is called from a form in a page html, and when I call it from the page occurs this:
<E> <ServletContext-General> Error loading servlet: shopSite.idGenerator.servlet.PruebaServlet
java.lang.NoClassDefFoundError: shopSite/idGenerator/servlet/PruebaServlet (wrong name)
<ServletContext-General> Servlet failed with Exception
javax.servlet.ServletException: Servlet class: shopSite.idGenerator.servlet.PruebaServlet could not be resolved - a class upon which this class depends wasn't found
And then it appears me a page that contents:
Error 500 – Internal Server Error
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.5.1 500 Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request.
In the Weblogic properties I’ve written:
weblogic.httpd.register.shopSite.idGenerator.PruebaServlet = shopSite.idGenerator.servlet.PruebaServlet
What's wrong? Can anybody help me with this? And how can I must call the servlet from the page html, what I must put in the action of the form, because I don't know if I am calling in a right way to the servlet.
Thanks in advance,
Where have you put the classes that constitute your servlet? WebLogic has a standard directory for them:
If the classes are not there, then WebLogic won't necessarily be able to find them.
Alternatively, you could add the path to them to the classpath for the weblogic server.
I've put the servlet in the standard directory \weblogic\myserver\servletclasses, and there I've created the directories shopSite\idGenerator\servlet and here I've put PruebaServlet.
I am new to the weblogic .
I would appreciate if some can help me out.
I was able to Run Servlet confiuring in property file.
But int this I have to config each servlet to run.
I did try also putting mu class file in this path
but not working.
Do I need some extra configuration for Run servelt from the servletclasses folder, wihtout configuring each one.
It seems you have used package.
Try putting all your related Servlets/pages in which package is declared in the same folder.
Also, try putting it in a folder below the current directory level.
May or May Not Work! But Worth trying!
It looks to me like WebLogic was able to load your servlet
class, but not one of the classes that it depends on. To verify this, register a simple servlet with no dependancies, and see if that works.
Make sure all the classes used by your servlet are in your servlet classpath or in the server classpath.
THE IS BECAUSE OF INCORRECT DEPLOYMENT
DEPLOY THE SERVLET CORRECTLY..../MYSERVER/SERVLETCLASSES.
THEN GIVE A ALIAS NAME IN THE PROPERTIES FILE.
AND USE THE SERVLET BY ITS ALIAS NAME.