A friendly place for programming greenhorns!
Problem in JSP syntax
Aug 19, 2010 02:58:19
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import="java.lang.String"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <% String message = "Hello!"; %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Welcome</title> </head> <body> <%= message %> </body> </html>
Its showing error in line 3 "The import java.lang.String cannot be resolved"
Other error is on line 5 "String cannot be resolved to a type"
Do we need to import java.lang or its default as in
Please tell me the possible cause for errors..
Thanks in advance.
Aug 19, 2010 07:22:31
code should no longer be placed inside a
Willie Smits can speak 40 languages. This tiny ad can speak only one:
Thread Boost - a very different sort of advertising
This thread has been viewed 682 times.
All times above are in ranch (not your local) time.
The current ranch time is
Apr 22, 2018 18:08:45
Copyright © 1998-2018