Simple issue with JSP and Date
I'm completely new to JSP but not Java
<div>
<%@ page import="java.util.*" %>
<%=
Date date = new Date();
out.println(date.getHours()+":"+date.getMinutes()+":"+date.getSeconds());
%>
</div>
All I need is
Hour:Minute:Second
. (Edit: stupid emoticons)
I'm getting this error on Date
Multiple annotations found at this line:
- Syntax error, insert ")" to complete
MethodInvocation
- Syntax error, insert ";" to complete Statement
- Syntax error, insert ";" to complete Statement
- Syntax error, insert ")" to complete
MethodInvocation
and this at the end on %>
Multiple annotations found at this line:
- Syntax error on token ")", delete this
token
- Syntax error on token ")", class
expected
- Syntax error on token ")", invalid
Expression
- Syntax error on token ")", delete this
token
Slyvr
Junior Poster in Training
74 posts since Dec 2010
Reputation Points: 10
Solved Threads: 3
Nevermind...found the issue was
<%=
Needs to be
<%
Slyvr
Junior Poster in Training
74 posts since Dec 2010
Reputation Points: 10
Solved Threads: 3