You may happen to have the wrong java engine - maybe you need to install e.g. explicitly Sun java?
Main Topics
Browse All TopicsIn a coldfusion example of imprting jsp is have the line
<%@page import = "java.util.*" %>
This throws an error.
Am I meant to have a file CALLED java.util?
If so where do I get it and which directory can I put it in?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Just so everyone's clear, the example kjuliff, refers to is in the documentation:
http://lived
kjulif
You should have the java.util package for that JSP page to work correctly.
> This throws an error.
What is the error? Perhaps you are not calling the code correctly.
> Where can I get it and where should I put it. i.e. what directory
Normally, you should not need to do anything. java.util.* is a package of java classes that resides in a .jar file. That jar file should be loaded automatically by the JVM running ColdFusion. IIRC, java.util.* is part of core java and is used by many things, including ColdFusion. If it did not exist, I suspect you would have other problems. So again, I suspect the problem is your code or maybe configuration.
The example you posted works correctly on ColdFusion 8. However, as duncancumming pointed out, it is an example of calling a ColdFusion page _from_ a JSP page. Not the other way around.
But to run that specific example, do the following:
1. Open the ColdFusion Administrator and go to Server Settings > Memory Variables. Make sure sure the "Use J2EE session variables" option is checked
2. In the same web directory, create two test pages. One CF page and the other a JSP page
File: test.jsp
===================
<%@page import = "java.util.*" %>
<% request.setAttribute("myva
<% application.setAttribute("
<% ((Map)session.getAttribute
<jsp:include page="hello.cfm">
<jsp:param name="name" value="Robert" />
</jsp:include>
File: hello.cfm
===================
<cfapplication name="myApp" sessionmanagement="yes">
<cfoutput>
<h2>Hello #URL.name#!</h2>
Request.myVariable: #Request.myVariable#<br>
Session.myVariable: #Session.myVariable#<br>
Application.myVariable: #Application.myVariable#<br
</cfoutput>
3. Then run the .JSP page in your browser.
Example:
http://127.0.0.1/yourfolde
I get
java.lang.NullPointerExcep
at jrun__test2ejsp9._jspServi
at jrun.jsp.runtime.HttpJSPSe
at jrun.jsp.JSPServlet.servic
at jrun.servlet.ServletInvoke
at jrun.servlet.JRunInvokerCh
at jrun.servlet.JRunRequestDi
at jrun.servlet.JRunRequestDi
at jrun.servlet.JRunNamedDisp
at coldfusion.license.JspLice
at coldfusion.bootstrap.Boots
at jrun.servlet.ServletInvoke
at jrun.servlet.JRunInvokerCh
at jrun.servlet.JRunRequestDi
at jrun.servlet.ServletEngine
at jrun.servlet.http.WebServi
at jrunx.scheduler.ThreadPool
at jrunx.scheduler.ThreadPool
at jrunx.scheduler.ThreadPool
at jrunx.scheduler.WorkerThre
Business Accounts
Answer for Membership
by: Jones911Posted on 2009-01-21 at 11:53:38ID: 23433220
Can you show us the source of the example?