Web page is probably use A form input user name password do POST to the web page B
But in addition to send a user name and password to send a current time to page B
I won't,,,
Web page I wrote A
<%
The Date uploadDate=new Date ();
SimpleDateFormat f=new SimpleDateFormat (" dd HH - MM yyyy - MM ");
F.f ormat (uploadDate);
Request. SetAttribute (" Date ", uploadDate);
% & gt;
Web B<%
String Date=request. GetAttribute (" Date ");
% & gt;
<% %=Date & gt;
Complains:
Type mismatch: always convert from Object to String
Then I look online to say coercion string
The converted output is null
How can I solve
CodePudding user response:
Request. The setAttribute method of uploadDate with f. format (uploadDate) tryCodePudding user response: