Jsp First program

Advertisements

Directory Structure of JSP JSP Scripting Element

Jsp First program

Here i will give you a simple jsp example. First you write your first jsp code on any editor and save with .jsp extension like below;

Save and Compile jsp program

JSP program must be save with the .jsp extension. And for compile jsp code simply follow step of compilation servlet code.

Example

<html>  
<body>  
<% out.print("Hello word"); %>  
</body>  
</html>  

Result

Hello word

How to run jsp program

After write your jsp code, deploy jsp program in your root directory and start server. Follow below steps to run jsp code.

  • Deploy jsp code in root directory
  • Start Server
  • Visit on browser or give request with url like below

Syntax

 http://localhost:portnumber/RootDirectory/jspfile
 

Example

http://localhost:2015/jspapplication/index.jsp
 

Directory Structure of JSP JSP Scripting Element

Google Advertisment

Buy This Ad Space @$20 per Month, Ad Size 600X200 Contact on: hitesh.xc@gmail.com or 9999595223

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

For Projects 9999595223

Google Advertisements


Buy Websites 9999595223

Buy College Projects with Documentation Contact on whatsapp 9999595223. Contact on: hitesh.xc@gmail.com or 9999595223 Try this Keyword C++ Programs

Advertisements