This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes JSP is not compiling showing Syntax error near 'import' Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP is not compiling showing Syntax error near Watch "JSP is not compiling showing Syntax error near New topic
Author

JSP is not compiling showing Syntax error near 'import'

Barnabas Jeremiah
Greenhorn

Joined: Jul 05, 2012
Posts: 26

I am upgrading my jdk from 1.4 to 1.5 and weblogic 8.0 to 10.0... when I am trying to load some jsp file it is not compiling... please help me...


atDeliveryModeDetails.jsp:7:18: Syntax error near 'import'
<%@ page import='java.util.*'%>
^---------^
atDeliveryModeDetails.jsp:8:18: Syntax error near 'import'
<%@ page import="cwh.messageretriever.*"%>
^--------------------^
atDeliveryModeDetails.jsp:9:18: Syntax error near 'import'
<%@ page import="com.polaris.orbionecore.common.log.CoreLogger;"%>
^--------------------------------------------^

My JSP is :


<%@ page import="java.util.*"%>
<%@ page import="cwh.messageretriever.*"%>
<%@ page import="com.polaris.orbionecore.common.log.CoreLogger"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">



Thanks with warm regards,
Barnabas Jeremiah
Barnabas Jeremiah
Greenhorn

Joined: Jul 05, 2012
Posts: 26

I myself found the error... that my jdk is 1.5 so it is not allowing semi colon in the import... after removing that it is work fine
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP is not compiling showing Syntax error near 'import'
 
Similar Threads
jsp postgress connection
Could not find action or result
JSP Documents, EL and CDATA construct
Keep getting NullPointerException
How to show loading indicator image with <ajax:area> tag