This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to Start programming in JSP  RSS feed

 
ranjani krishnaswamy
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have installed the latest version of the SDK, and also Tom Cat. What next? I found some sample JSP code, but, it doesn't run. Each time I click on the JSP cat-like icon, all I get is the text/source code.
please help.
 
deepak adlakha
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Make sure u all the jar and path and classpath r set.Like JAVA_HOME and tomcat_home and necessary jar files like servlet.jar etc. r set.
 
Tim Duncan
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you start the server?
Assuming that you've set JAVA_HOME to the directory where you installed the JDK, and CATALINA_HOME to the directory where you installed Tomcat, then you can start Tomcat with startup.bat or startup.sh in CATALINA_HOME/bin, as appropriate.
Now you can access Tomcat's default page with http://localhost:8080 and the examples with http://localhost:8080/examples/jsp/
You should also close the server down when you've finished, with shutdown.bat (or .sh).
 
ranjani krishnaswamy
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, thanks alot for that. I have installed the tomcat, and jdk properly. I have intalled the environment variables as well. I tried this example in a book written by Marty Hall. It was a simple servlet with a println of Hello World.
My problem now is.... how do i see the output?
I managed to compile it properly..
but, i can't view it... what do i do? I tried putting the files in a number of localhost folders.. no use.
however, the existing examples work fine. I start up the tomcat, and the i am able to view the jsp files.
do i need to convert the servlets into jsp files to view them?
if i want to create a seperate folder for my work.. is that possible? right now, i seem to only view folders named jsp and servlets... it's real strange.
I know these questions may seem real silly, but just getting output for my code seems to be my biggest bottleneck now..
please help.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!