网事如风,好风长吟…
My Blog 暂不交换新的友情连接了!^_^
2008/06/18 14:18
Tags: ,
//显示属性
display
list-style
position
float
clear

//自身属性
width
height
margin
padding
border
background

//文本属性
color
font
text-decoration
text-align
vertical-align
white-space
other text
content
2008/05/16 17:55
Tags: , ,
在Servlet只能显示一个图片,并且用图层定位时写代码很是麻烦,并且如果是从流中读数据,就只能显示一个图片,同时,还不能解决图片和文字信息的同时输出和位置叠加
 在JSP中,我们可以用以下办法来解决
 首先,写一个Servlet负责从数据文件或数据库等数据来源中得到数据流并输出
 然后在JSP文件中多次调用此Servlet来请求并取的图片数据流并显示
 我的Servlet代码入下
package zy.ser;

 import java.io.File;

 import java.io.FileInputStream;

 import java.io.OutputStream;

 import java.io.IOException;

 import java.io.PrintWriter;

 import javax.servlet.ServletException;

 import javax.servlet.http.HttpServlet;

 import javax.servlet.http.HttpServletRequest;

 import javax.servlet.http.HttpServletResponse;

 /**

 *@authorAdministrator

 *

 *TODO要更改此生成的类型注释的模板,请转至窗口-首选项-Java-代码样式-代码模板

 */

 public class InitializeMap extends HttpServlet
 {

   String imgName;

   public InitializeMap(){

   super();

 }

 /**

 *Destructionoftheservlet.


 */

 public void destroy(){

 super.destroy();//Justputs"destroy"stringinlog

 //Putyourcodehere

 }

 /**

 *ThedoDeletemethodoftheservlet.


 *

 *ThismethodiscalledwhenaHTTPdeleterequestisreceived.

 *

 *@paramrequest

 *therequestsendbytheclienttotheserver

 *@paramresponse

 *theresponsesendbytheservertotheclient

 *@throwsServletException

 *ifanerroroccurred

 *@throwsIOException

 *ifanerroroccurred

 */

 public void doDelete(HttpServletRequest request,

 HttpServletResponse response) throws ServletException,IOException
 {

 //Putyourcodehere

 }

 /**

 *ThedoGetmethodoftheservlet.


 *

 *Thismethodiscalledwhenaformhasitstagvaluemethodequalstoget.

 *

 *@paramrequest

 *therequestsendbytheclienttotheserver

 *@paramresponse

 *theresponsesendbytheservertotheclient

 *@throwsServletException

 *ifanerroroccurred

 *@throwsIOException

 *ifanerroroccurred

 */

 public void doGet(HttpServletRequest request,HttpServletResponse response)

 throws ServletException,IOException{

 this.initURI(request);

 File file=new File(this.getServletContext().getRealPath("img\\map1\\"+this.imgName+".jpg"));

 System.out.println(file);

 FileInputStream fis=new FileInputStream(file);

 System.out.println(fis);

 int length=fis.available();

 System.out.println(length);

 byte[]data=new byte[length];

 //readthestreamdataintothestream

 fis.read(data);

 fis.close();

 OutputStream sos=response.getOutputStream();

 //readthestreamdataintotheoutputstream

 response.setContentType("image/*");

 sos.write(data);

 sos.flush();

 sos.close();

 }

 /**

 *ThedoPostmethodoftheservlet.


 *

 *Thismethodiscalledwhenaformhasitstagvaluemethodequalsto

 *post.

 *

 *@paramrequest

 *therequestsendbytheclienttotheserver

 *@paramresponse

 *theresponsesendbytheservertotheclient

 *@throwsServletException

 *ifanerroroccurred

 *@throwsIOException

 *ifanerroroccurred

 */

 public void doPost(HttpServletRequest request,HttpServletResponse response)

 throws ServletException,IOException{

 response.setContentType("text/html");

 PrintWriter out=response.getWriter();

 out.println("");

 out.println("");

 out.println("");

 out.println("");

 out.print("Thisis");

 out.print(this.getClass());

 out.println(",usingthePOSTmethod");

 out.println("");

 out.println("");

 out.flush();

 out.close();

 }

 /**

 *ThedoPutmethodoftheservlet.


 *

 *ThismethodiscalledwhenaHTTPputrequestisreceived.

 *

 *@paramrequest

 *therequestsendbytheclienttotheserver

 *@paramresponse

 *theresponsesendbytheservertotheclient

 *@throwsServletException

 *ifanerroroccurred

 *@throwsIOException

 *ifanerroroccurred

 */

 public void doPut(HttpServletRequest request,HttpServletResponse response)

 throws ServletException,IOException{

 //Putyourcodehere

 }

 /**

 *Returnsinformationabouttheservlet,suchasauthor,version,and

 *copyright.

 *

 *@returnStringinformationaboutthisservlet

 */

 public String getServletInfo(){

 return "ThisismydefaultservletcreatedbyEclipse";

 }

 /**

 *Initializationoftheservlet.


 *

 *@throwsServletException

 *ifanerroroccure

 */

 public void init() throws ServletException{

 //Putyourcodehere

 }

 public void initURI(HttpServletRequest request){

 this.imgName=request.getParameter("imgName");

 }

 }
2008/01/14 11:57
primabackup.sh 说明文档
版本:2.0.2

工具下载地址:http://swsoft.com.cn/downloads/Prima/Tools/primabackup-2.0.2...
本地下载:
下载文件 (已下载 223 次)


0. 版本更新
* 2006-11-23 SWsoft.com.cn v2.0.2
- [fix] 修复resin路径

* 2005-03-28 ValueOf.com v2.0.1
- [fix] 备份resin和tomcat的配置
- [fix] 修复配置备份子目录的位置

1. 概述
primabackup.sh脚本可用来备份数据。
2008/01/09 14:00
虚拟主机服务商在运营过程中可能会受到黑客攻击,常见的攻击方式有SYN,DDOS等。
通过更换IP,查找被攻击的站点可能避开攻击,但是中断服务的时间比较长。比较彻底的解决方法是添置硬件防火墙。不过,硬件防火墙价格比较昂贵。可以考虑利用Linux系统本身提供的防火墙功能来防御。

1. 抵御SYN
SYN攻击是利用TCP/IP协议3次握手的原理,发送大量的建立连接的网络包,但不实际建立连接,最终导致被攻击服务器的网络队列被占满,无法被正常用户访问。
Linux内核提供了若干SYN相关的配置,用命令:sysctl -a | grep syn
看到:
net.ipv4.tcp_max_syn_backlog = 1024
net.ipv4.tcp_syncookies = 0
net.ipv4.tcp_synack_retries = 5
net.ipv4.tcp_syn_retries = 5                              
2007/11/04 22:27
Tags: ,
  The web application you are attempting to access on this web server is currently unavailable.  Please hit the "Refresh" button in your web browser to retry your request.

  Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.
分页: 1/14 第一页 1 2 3 4 5 6 7 8 9 10 下页 最后页 [ 显示模式: 摘要 | 列表 ]