Win a copy of Learning Regular Expressions this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Doubt in jsp:scriptlet  RSS feed

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have added the above coding in my JSP.

<jsp:scriptlet>
int a= 3+4;
out.println("hello"+a);
</jsp:scriptlet>
but i got the output as int a= 3+4; out.println("hello"+a);

I have added both the jstl.jar and standard.jar in WEB-INF/lib.
I am using Websphere 5.1.1 and j2ee 1.3
Can anyone explain the above problem?

Thanks,
Prabu
 
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have added both the jstl.jar and standard.jar in WEB-INF/lib.


This is not related to JSTL.

What about a scriptlet using the <% %> syntax ? Does it work ?
Can you also tell us which version of web.xml you are using ?
 
Prabu Bala
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Satou kurinosuke,
Ya its not related to JSTL. Scriptlet using the <% %> is working i just used this one for testing somewhere in the HFSJ i read this concept.
I am using version 1.0 of web.xml.
Should i include any jar other than jstl.jar and standard.jar
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean you're using JSP 1.0 ???
I'm not sure there were JSP Documents back in the old days
Which means that jsp:scriptlet was not supported.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Searching a little bit, I found out that JSP documents are available from version 1.2
 
Prabu Bala
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using JSP 1.2 only. It supports Expression languagae, Standard action,JSTL nd Custom Tags.I am facing this problem only i mean <jsp:scriptlet>.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're using Websphere 5.1.1. Isn't that JSP1.1 ?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moreover, if you're studying for SCWCD, you need J2EE1.4, not 1.3.
I think that you should download Tomcat 5.X.
 
Prabu Bala
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ya its correct. Thank you very much.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!