• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SDK for Servlet

 
Prasad prap
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am new to servlets. I wasnt able to run a certain JSP page. I included a servlet in <jsp:include page="URL"> tag. however i jus got the text of the servlet as it is. The servlet i wrote was to calculate area however it didnt run. What could be the reason?
I am using Eclipse 3.5 Galileo as IDE. Do i need to install seperate SDk for running servlets?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to ask IDE questions in the IDEs forum. I have moved this post there for you.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean, you got the "text of the servlet as-is"? How about showing us what your configuration, the actual JSP, the servlet, and what exactly you got as the text?
 
Prasad prap
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Newton wrote:What do you mean, you got the "text of the servlet as-is"? How about showing us what your configuration, the actual JSP, the servlet, and what exactly you got as the text?


Servlet Code
servlet.java
JSP code
jsp_s.jsp


OUTPUT:On http://localhost/jsp_service.jsp





What could be the problem?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<jsp:include page="servlet.java" flush="true"></jsp:include>


You are including a text file -- what did you expect would happen?

If you want the servlet to be executed you need to compile it, put the class file in the right place, and map it in the deployment descriptor.

You really should grab a servlet tutorial and study it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic