• Post Reply Bookmark Topic Watch Topic
  • New Topic

is out depricated in JSP 2 ?  RSS feed

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all.
I was using Servlet 2.4 lib to create a JSP page.
this page has the following line :
out.write("Hello");
I got an error that says there is no such object (out)
but it seems JSP 2.0 has deprecated out implicit object.
any ideas ?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66153
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not according to the specification; see section 1.8.3.

I never use it myself. Especially in a JSP 2.0 environment, give scriptless pages a try.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
its working for me. i'm using Tomcat 5.0.
As Tomcat version 5 implements the Servlet 2.4 and JavaServer Pages 2.0 specifications.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am betting that you are using out in the wrong place - can you find the Java code that the JSP was translated into?
Bill
 
Dale Seng
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is your out call surrounded by <%! ... %> by chance? It should be <% %>.

--Dale--
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
looking at the libs that come with tomcat 5.0 , I found servlet-api.jar and jsp-api.jar
it seems to me that JSP got its own jar, right ?
(Tomcat 4.1 has servlet.jar)
 
Mahesh Pinnamaneni
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
out works fine. instead of using out.write("hello"); try to use out.println("hello"); hope this works for u.
try to see JSP 2.0 Specification from the following link.
http://jcp.org/aboutJava/communityprocess/final/jsr152/
hope this is useful..
bye
Mahesh
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!