Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

I am trying to run a simple program of JSP but I wasn't able to compile by apache?

my program is:- <html> <head><title>First JSP</title></head> <body> <% double num = Math.random(); if (num > 0.95) { %> <h2>You'll have a luck day!</h2><p>(<%= num %>)</p> <% } else { %> <h2>Well, life goes on ... </h2><p>(<%= num %>)</p> <% } %> <a href="<%= request.getRequestURI() %>"><h3>Try Again</h3></a> </body> </html>

user-image
Question added by Mayank Gaur , Senior Software Engineer , Azilen Technology Pvt Ltd
Date Posted: 2013/05/07

All what you need is here http://www.ntu.edu.sg/home/ehchua/programming/java/JSPByExample.html Step by step...
good Luck dude.

AbdelMalek AIT AMOKHTAR
by AbdelMalek AIT AMOKHTAR , SharePoint Freelancer , DotNet Partners

Do you use Apache HTTP server or Apache Tomcat ? Tomcat is necessary to execute jsp

Muhammad Anzar
by Muhammad Anzar , DevOps/DevSecOps Architect , Confidential

JSP will support on Tomcat. Apache requires mod_jk module to support JSP

 

Mayank Gaur
by Mayank Gaur , Senior Software Engineer , Azilen Technology Pvt Ltd

Thank you very much to Ali sir and Abdel Sir.Sir I sorted out my error.Again thanks.

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.