File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
How to resolve this error
Joined: Jun 25, 2011
Aug 02, 2011 01:13:35
<%@ page language="java" contentType="text/html; charset=windows-1256" pageEncoding="windows-1256" import="ExamplePackage.UserBean" %> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1256"> <title> User Logged Successfully </title> </head> <body> <center> <% UserBean currentUser = (UserBean (session.getAttribute("currentSessionUser")))%> Welcome <%= currentUser.getFirstName() + " " + currentUser.getLastName() %> </center> </body> </html>
the error is "; missing"
Joined: Jul 07, 2011
Aug 02, 2011 01:30:56
Check line 14.
Any Java statement in <% ... %> must end with semi-colon (;). Except
expression tag <%= .. %> you don't need to end any method calls in this tag with semi-colon.
Thanks and Regards,
Nilesh Sahni |
Author and ninkuma
Joined: Jan 10, 2002
Aug 02, 2011 06:28:13
Putting Java code into JSPs is a poor practice that has been discredited for almost 10 years now. It's time to stop writing JSP as if it were 2001.
The real fix is not be putting Java code into JSOs in the first place.
Asking smart questions
Books by Bear
I agree. Here's the link:
subject: How to resolve this error
Login servlet not redirecting to JSP
My login application accepts any and all username/passwords.
Always responding invalidLogin.jsp
arabic text from linux to windows oc4j servers
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014