Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Web.xml.

 
Pulkit Malhotra
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I using resin-pro-3.0.14 web server. In Web.xml following has written.
<servlet>
<servlet-name>LoginServlet</servlet-name>
<servlet-class>sap.LoginServlet</servlet-class>
</servlet>

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



I'm getting following error please help i'm very new to servlets.

[15:22:28.587] WebApp[http://localhost:8080] starting
[15:22:29.696] In-place class redefinition (HotSwap) is not available. In-place class reloading during development
requires a compatible JDK and -Xdebug.

[15:26:30.692] com.caucho.config.LineConfigException: WEB-INF/web.xml:22: `sap.LoginServlet' is not a known servlet
. Servlets belong in the classpath, often in WEB-INF/classes.


Thanks in advance.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Pulkit Malhotra:

[15:26:30.692] com.caucho.config.LineConfigException: WEB-INF/web.xml:22: `sap.LoginServlet' is not a known servlet
. Servlets belong in the classpath, often in WEB-INF/classes.


Did you compile a servlet named sap.LoginServlet?
If so, did you put the servlet's class file in /WEB-INF/classes/sap?
 
Pulkit Malhotra
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes , i did the compilation(with java 1.5) and put the class files inside the /WEB-INF/classes/sap directory.

Application has written by someone else.

Does following error means that issue is related to java version ?.

[15:22:29.696] In-place class redefinition (HotSwap) is not available. In-place class reloading during development requires a compatible JDK and -Xdebug.

Can you tell me any possible way to resolve the problem.

Thanks for replying.
 
Pulkit Malhotra
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Solution :-

Resin-pro automaticaaly creates the class files so just need to put java files inside the WEB-INF/Classes directory.
 
Don't sweat petty things, or pet sweaty things. But cuddle this tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!