Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • 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:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

JSP Documents: how do you include java.util?  RSS feed

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

I am trying to figure out, say we have this in a jsp :

<%@ page import="java.util.*,java.text.*" %>

How do I say the same thing in a jsp document?

Will appreciate a reply,
Thank you.
 
Author and ninkuma
Marshal
Posts: 66783
168
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why would you be hand-writing JSP documents?

Why would you be importing Java classes into a JSP in the first place? Scriptlets and Java in a JSP have long been discredited.
 
Sherma Maraj
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey thanks for your reply,

well the thing is this is what we are learning in a course at university so that's why am trying to figure it out. I took a simple jsp:

<%@ page import="java.util.*,java.text.*" %>
<HTML>
<BODY>
....
</BODY>
</HTML>

and I am trying to convert it to a jsp document.Is there a way to do that? I havent seen anything on the web, thats why am here.

Thanks.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66783
168
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eeesh! That's what they're teaching you? Sigh.

Your best bet is to grab the JSP Specification and look it up. No one (that's sane) in the real world writes JSPs in XML document format. It's not meant for hand-coding.
 
Sherma Maraj
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok thanks a lot for your prompt response, I'll definitely do that

Regards
Sherma
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!