1.创建Cookie对象
Cookie cookie=new Cookie(Stringkey,Object value);
2.写入Cookie对象
response.addCookie(newCookie)
3.读取Cookie文件
Cookie [] cookies =request.getCookies();
Cookie cookie=new Cookie(Stringkey,Object value);
2.写入Cookie对象
response.addCookie(newCookie)
3.读取Cookie文件
Cookie [] cookies =request.getCookies();
2016-10-22
已采纳回答 / 凉风5
void println()void clear()void clearBuffer()void flush()int getBufferSize()int getRemaining()boolean isAutoFlush()void close()
2016-10-22
An error occurred at line: [14] in the generated java file: [D:\...\index_jsp.java]
Only a type can be imported. com.po.Users resolves to a package
An error occurred at line: 18 in the jsp file: /index.jsp
Users cannot be resolved to a type
15: </head>
16: <body>
17: <%
18: Users user=new Users();
Only a type can be imported. com.po.Users resolves to a package
An error occurred at line: 18 in the jsp file: /index.jsp
Users cannot be resolved to a type
15: </head>
16: <body>
17: <%
18: Users user=new Users();
2016-10-22
最新回答 / qq_KissTheRain_2
你这个也是声明,但是是在脚本段里的声明,这个s属于局部变量;而在声明语句中声明的变量属于全局变量。不同之处应该明白了吧,都可以声明,但是性质不同。且声明语句中的变量转换成servlet时,最终编译是放在类当中的,所以声明时要注意不能与类中已经定义的变量发生冲突,比如防止重复定义。脚本段中声明的变量编译是放在方法中的,局限性小一些。
2016-10-21