• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 506
  • Last Modified:

JSP Beginner

Thank you for taking the time to read my post.

I would like to get into developing Java Server Pages.  I have been working with Java applications for over ten years now but I have never done anything with JSP.  Can somebody tell me what would be the best way for me to cut my teeth on this technology?  If possible, I would like to set everything up on a single PC running Windows XP.  Do I need to download and install something like the Apache Tomcat or Oracle’s JSP Translator, on my PC?  Do recent versions of JDK provide the classes needed for developing JSPs or do I need to download a different type of development Kit?  A good reference book for beginners would also be very helpful.  

I have been doing some research on this topic but I feel like the most basic components and concepts needed for developing JSPs are still a mystery.

Thanks.


0
srulison
Asked:
srulison
  • 5
  • 3
2 Solutions
 
mrcoffee365Commented:
Tomcat is enough, assuming you already have Java installed.   Look in the Tomcat JSP examples to get started (installed with Tomcat, if you choose).

The initial setup is the most annoying part.  After that, JSP pages are easy (at least at the beginning).

After installing Tomcat, and starting it (or have it run as a service, in which case it's running once it's installed), you have to create a webapp, which is the file structure in Tomcat for JSP pages.

The easiest setup is
[tomcat home]/webapp/ROOT/WEB-INF
You can put your .jsp files in the ROOT directory.  You'll need a minimal web.xml file in the WEB-INF directory -- get one from the simplest Tomcat examples directory.

A simple html page can be a .jsp page just by changing the extension.  Try putting a JSP code fragment in your html page to see what it looks like, like this:
<br/>getServerName = <%=request.getServerName()%>

0
 
srulisonAuthor Commented:
And this can all be installed on a Windows XP PC?
0
 
srulisonAuthor Commented:
Oh and also, when you say, assuming I have already installed Java, do you mean the latest version of JDK, i.e. 1.6.0_11?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
rrzCommented:
Yes, to both questions.
You need to set the environment variable  JAVA_HOME (see the file called RUNNING.txt in Tomcat's root folder)
When you have Tomcat running (by using yourTomcatHome\bin\startup.bat),  you should be able to  browse to  Tomcat's home page using  
http://localhost:8080/   
Try the examples on that page, that mrcoffee mentioned.
0
 
mrcoffee365Commented:
On EE, you can award points to more than one expert.  rrz and I both helped on this one.
0
 
srulisonAuthor Commented:
I thought that both comments were from the same expert.  Is there a way that I can reassign points?  I apologies for the confusion.
0
 
mrcoffee365Commented:
Try clicking on the Request Attention link in the top of the page (where your original question is).  Tell the moderator that you meant to assign points differently.  The moderator can reopen the question for you.
0
 
srulisonAuthor Commented:
Thanks.
0
 
srulisonAuthor Commented:
This solution was very helpful
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now