jsp嵌入flex
我们使用Google提供的iframe让jsp页面嵌入到flex中
首先,请到http://code.google.com/p/flex-iframe/下载iframe 的swc包
第二步,把swc包放入flex_libs中,如果不是web项目就放入lib下
第三步,创建一个mxml文件
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:code="http://code.google.com/p/flex-iframe/" width="100%" height="100%">
<mx:HDividedBox x="0" y="10" width="100%" height="100%">
<mx:Panel width="30%" height="100%" layout="absolute">
<code:IFrame id="frm2" source="/flexPage/import.jsp" height="100%" width="100%"/>
</mx:Panel>
<mx:Panel width="70%" height="100%" layout="absolute">
<code:IFrame id="frm" source="/flexPage/wnl.html" height="100%" width="100%"/>
</mx:Panel>
</mx:HDividedBox>
</mx:Application>
运行服务器,搞定。。。。
注意:jsp页面自己建立,请适当修改
相关文档:
在jsp中引用response.setContentType("application/msword");,打开的页面就是word样式。
1、实现word横打:
<style>
@page
{mso-page-border-surround-header:no;
mso-page-border-surround-footer:no;}
@page Section1
{size:841.9pt 595.3pt;//纸张的大小
mso-page-orientation:l ......
下面的jsp和数据库连接大全,请参考
一、jsp连接Oracle8/8i/9i数据库(用thin模式)
testoracle.jsp如下:
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.sql.*"%>
<html>
<body>
<%Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
Stri ......
index.jsp:
<html>
<head>
<title>The News</title>
</head>
<body>
<h1> Latest News</h1>
<table>
<tr>
<td><h3><%@include file="items/news1.jsp" %></h3></td>
</tr>
<tr>
<td> ......
1 )首先建立管理用户表,其中 UserPopedom 记录用户的权限字符,其实也就是一些 JSP 或者 ACTION 的文件名:
CREATE TABLE [dbo].[AdminUser] (
[UserID] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[UserName] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[UserPass] [varchar ......