wood burning stoves 2.0*
The moose likes IDEs, Version Control and other tools and the fly likes SDK for Servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "SDK for Servlet" Watch "SDK for Servlet" New topic
Author

SDK for Servlet

Prasad prap
Greenhorn

Joined: Sep 26, 2008
Posts: 28
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

Joined: Jan 10, 2002
Posts: 61456
    
  67

Please be sure to ask IDE questions in the IDEs forum. I have moved this post there for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Sep 26, 2008
Posts: 28
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

Joined: Jan 10, 2002
Posts: 61456
    
  67

<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.
 
 
subject: SDK for Servlet