Google App Engine: RUN JSP ERROR
I used Eclipse to try the google app engine demo project: guestbook.
when i create a *.jsp file in the WAR directory,the error information appear:
"Your Web Application Project must be configured to use a JDK in order to use JSPs."
solution:
It is because Eclipse put the JRE to the JRE directory, but not the JDK directory.
under "windows - preference", expand "Java". click on "Installed JRE":
change the location to JDK directory.
refresh the project. Done!!!
相关文档:
package com.pan.encod;
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
public class EncodFilter impl ......
request对象是javax.servlet.HttpServletRequest类的一个子类对象,当客户端请求一个Jsp页面是,Jsp容器会将客户端的请求信息包装在这个对象中;该对象中的常用方法如下:
getParameter(String name):以字符串的形式返回客户端传来的某一个请求参数的值,参数名由name指定
getParameterNames() ......
一个站点服务器中所有的用户公用一个application对象,当站点服务器开启时,该对象就被创建,直到网站关闭;也就是说:该对象一旦被创建了,它将被保存在服务器上;它的生命周期与服务器的生命周期相同;常用方法如下
setAttribute(String name,Object o):将名字为name,值为o的数据存储到appli ......
Cookie对象是由Web服务器产生后保存在浏览器中的信息,它可以用来保存一些小量的信息在浏览器中;该对象不属于Jsp的内置对象,它需要构造才能使用
1. 构造:
Cookie cookie对象名=new Cookie(cookie变量名,cookie中所存储的对象)
2. cookie的写入与读取
&nbs ......