后面三个没有看到呢,关注ing!
解决方案 »
- The server encountered an internal error () that prevented it from fulfilling th
- js,css缓存问题,悬赏!!
- 怎么用jsp实现SQLServe数据库的备份和恢复呢。最好给代码看看,谢谢!
- HTTP请求/响应的消息头可以分批发送吗?
- 简单的传参数,a页面传参数到b页面,b页面得到参数并传到c页面,c页面取不到值?解决马上给分!
- servlet文件的file问题!!
- 求tomcat下web应用程序的部署。比如:server.xml各个标签的含义和设置方法。
- JSP,applet,servlet还有JavaScript可以一起工作吗???
- 怎么将tomcat的虚拟路径设置在tomcat目录外
- 我的问题怎么没人解决呢?
- 一个菜鸟的问题
- 我很想问大家, 程序员的路在哪里?
答:request----客户端请求,包括从GET/POST请求传递过来的参数
response----服务器端对用户请求的反应
session----与请求相关的会话
application----记录应用的环境信息
page----JSP页面本身
out----传递响应的输出流
exception----处理异常错误2 forward和redirect的区别
答:在struts in action一书中(6.2.1节)有如下解释:
Forward----Retains everything in the HTTP request and request context. Can be used only within the same application.
Redirect---- Instructs the web client to make a new HTTP request. The resource may be in the same application or elsewhere.3 JSP的常用指令
答:<%@ page ... %>:Defines page-dependent attributes, such as session tracking, error page, and buffering requirements
<%@ include ... %>:Includes a file during the translation phase
<%@ taglib ... %>:Declares a tag library, containing custom actions, that is used in the page
以下是一些JSP动作:
<jsp:useBean>:Makes a JavaBeans component available in a page
<jsp:getProperty>:Gets a property value from a JavaBeans component and adds it to the response
<jsp:setProperty>:Sets a JavaBeans component property value
<jsp:include>:Includes the response from a servlet or JSP page during the request processing phase
<jsp:forward>:Forwards the processing of a request to a servlet or JSP page
<jsp:param>:Adds a parameter value to a request handed off to another servlet or JSP page using <jsp:include> or <jsp:forward>
<jsp:plugin>:Generates HTML that contains the appropriate browser-dependent elements (OBJECT or EMBED)
needed to execute an applet with the Java Plugin software
SERVLET部分1 什么情况下调用doGet()和doPost()?
答:我的理解,doGet():为了获取服务器的某一资源
doPost():获取的同时还为sever提供了必要的信息,同时可能会改变server的状态2 servlet的init()方法和service()方法的区别?
答:init()方法用于启动servlet。service()方法根据请求,调用其他具体的方法处理,返回结果。3 servlet的生命周期
答:通过init()方法启动,Destroy()方法销毁4 如何实现servlet的单线程模式
答:不会5 servlet的配置
答:不清楚题意6 四种会话跟踪技术
答:是不是指用session,cookie,url重写之类的,不太清楚EJB1 EJB容器提供的服务
答:好像是什么永久性数据存储、分布式对象、并发性、安全性、事务管理2 EJB的角色和三个对象
答:角色:应用组合者、部署者、EJB服务器提供者、EJB 容器提供者、EJB组件开发者、系统管理员
对象:不知道,是不是指远程接口、本地接口、Bean类3 EJB的几种类型
答:会话Bean:分有状态会话Bean和无状态会话Bean
实体Bean:分BMP实体Bean(Bean管理)和CMP实体Bean(容器管理)
消息Bean4 BEAN实例的生命周期
答:想不起来了,好像是由本地接口创建、销毁5 激活机制
答:不会6 remote接口和home接口的主要作用
答:远程接口:向用户展示业务逻辑方法
本地接口:使用本地接口创建、找出和删除EJB实例7 客服端调用EJB对象的几个基本步骤!
答:见Mastering Enterprise JavaBean Second Edition一书72页
1:通过JNDI查找Home对象引用
2:返回Home对象引用
3:连接Home接口
4:通过Home接口创建EJB对象
5:通过Home对象返回EJB对象的引用
6:通过Remote接口调用EJB对象
7:EJB对象委托Enterprise BeanORACLE1 存储过程的编写,写个简单的存储过程的例子
答:
格式:
CREATE [OR REPLACE] PROCEDURE procedure_name
[(parameter_name1 parameter_mode datatype,
... ...
parameter_nameN parameter_mode datatype)]
[AUTHID {DEFINER | CURRENT_USER}]
{IS | AS}
[PRAGMA AUTONOMOUS_TRANSACTION;]
[local declaration section]
BEGIN
executable section
[EXCEPTION
exception handling section]
END [procedure_name];例如:CREATE OR REPLACE PROCEDURE show_line
(ip_line_length IN NUMBER,
ip_separator IN VARCHAR2)
IS
actual_line VARCHAR2(150);
BEGIN
FOR idx in 1..ip_line_length LOOP
actual_line := actual_line || ip_separator;
END LOOP;
DBMS_OUTPUT.PUT_LINE(actual_line);
EXCEPTION WHEN OTHERS THEN
dbms_output.put_line(SQLERRM);
END;
我们不能回答者要一顶再顶~!
V_HELLO :="HELLO WORLD";
P_OUT := V_HELLO;
EXCEPTION
WHEN OTHERS THEN
NULL;
END ;