Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 28th, 2003, 05:03 PM
Registered User
 
Join Date: Jul 2003
Location: Bracknell, Berkshire, United Kingdom.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kizmit
Default Need help getting started

Hi,

I am completely new to Java, and have got as far as writting the "hello world" jasp page. When I open the index.jsp file, the "Hello world" is displayed, but the JAVA part is not calculated.

The page displays:

Hello World
2 + 2 is ${2+2}

When I want it to display:

Hello World
2 + 2 is 4

Can anyone help? Do I have the path file wrong? I am using j2sdk-1_4_1_05, but I do not know which file within the main folder I need to include on the path directory.


Please help this newbie!

Thanks

Kizmit
Reply With Quote
  #2 (permalink)  
Old September 28th, 2003, 11:43 PM
Authorized User
 
Join Date: Aug 2003
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Make sure you're using Tomcat 5.0 or greater, as Tomcat 5 is JSP2.0 complient, while older 4.x versions are not, and don't support the Expression Language as the book shows. Tomcat 5.0.9 is in beta right now (I believe), working well for me. Good luck, and have fun with JSP2.0!!

Reply With Quote
  #3 (permalink)  
Old September 29th, 2003, 04:32 PM
Registered User
 
Join Date: Sep 2003
Location: Lutz, FL, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I also am new to JSP, and am having exactly the same problem. I am using Tomcat 5.0. Also, when I tried to find the title "Beginning JSP 2.0" in the Book List, so I could download examples and errata, I did not find the title in the list. Am I overlooking it, or does it show up under a different name?
Reply With Quote
  #4 (permalink)  
Old October 1st, 2003, 12:12 PM
Registered User
 
Join Date: Jul 2003
Location: Bracknell, Berkshire, United Kingdom.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kizmit
Default

I'm all up and running now (Using Tomcat 5.0.12).

Thanks very much for your help.
:D

Reply With Quote
  #5 (permalink)  
Old October 1st, 2003, 07:35 PM
Registered User
 
Join Date: Sep 2003
Location: Lutz, FL, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Kizmit -
Did simply upgrading to Tomcat 5.0.12 fix your problem? I am on 5.0.12, and I cant get the $(2 + 2) to work for me. If I use the <% ~~~%> notation it works fine, but not the $(~~) notation.

Reply With Quote
  #6 (permalink)  
Old October 5th, 2003, 11:02 AM
Authorized User
 
Join Date: Aug 2003
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

av8rtrb - Think I see your problem....the syntax is "${" <--curly brace, not parenthesis.....as in <DollarSign><LeftBrace>2+2<RightBrace>. This should work.

Reply With Quote
  #7 (permalink)  
Old October 5th, 2003, 04:39 PM
Registered User
 
Join Date: Jul 2003
Location: Bracknell, Berkshire, United Kingdom.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kizmit
Default

Hi Av8rtrb,

Yes the updated version completely solved my problem (although i can't start tomcat from the short cut - have to go through c:\programs etc)

If you are using these brackets ( ) instead of these brackets { } then it will not work - see hatleyt's post.



Reply With Quote
  #8 (permalink)  
Old October 5th, 2003, 06:11 PM
Registered User
 
Join Date: Sep 2003
Location: Lutz, FL, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That was indeed the problem. Sorry for not paying attention!

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting Started ColinWatt BOOK: Professional Microsoft Robotics Studio ISBN: 978-0-470-14107-6 1 November 7th, 2008 02:08 AM
Getting Started? seananderson Reporting Services 0 August 3rd, 2007 07:45 AM
Getting Started st3ve Javascript How-To 1 February 3rd, 2005 08:49 PM



All times are GMT -4. The time now is 03:10 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.