自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(253)
  • 资源 (1)
  • 收藏
  • 关注

转载 JSP - Include Directive

The include directive is used to includes a file during the translation phase. This directive tells the container to merge the content of other external files with the current JSP during the translatio

2015-09-01 14:46:29 508

转载 JSP Custom tags with example – JSP Tutorial

User-defined tags are known as custom tags. In this tutorial we will see how to create a custom tag and use it in JSP.To create a custom tag we need three things: 1) Tag handler class: In this class w

2015-09-01 13:39:22 412

转载 JSP Custom Tags Example

<%@ include file=”relativeURI”%> 可以叫作静态include(静态包含),是jsp指令中的一种,(JSP指令控制JSP编译器如何去生成servlet。 <jsp:include page=”relativeURI” flush=”true” />叫作动态include(动态包含),是jsp动作的一种,(JSP动作是一系列可以调用内建于网络服务器中的功能的XML标签)

2015-09-01 10:49:42 628

转载 Designing JSP Custom Tag Libraries

What a Custom Tag Library IsIf you’ve ever had the opportunity to build a web application using Java technology, chances are you have used Java Server Pages (JSP) for content display. JSP is the techno

2015-09-01 10:39:31 499

转载 JSP - Custom Tags

A custom tag is a user-defined JSP language element. When a JSP page containing a custom tag is translated into a servlet, the tag is converted to operations on an object called a tag handler. The Web

2015-09-01 08:20:10 483

转载 Looking for an example for inserting content into the response using a servlet filter

I’ve been searching the net and stackoverflow for an example of somebody inserting content into the response using a servlet filter, but can only find examples of people capturing/compressing the outpu

2015-09-01 05:42:14 842

转载 Modify html response using filter

There may be instances where you want to modify the response before it is written to the client. In this tutorial we will show how to write a regex to append to a html element.I was working on a projec

2015-09-01 05:28:46 538

转载 Filter that uses a response wrapper to convert all output to uppercase

import java.io.CharArrayWriter;import java.io.IOException;import java.io.PrintWriter;import javax.servlet.Filter;import javax.servlet.FilterChain;import javax.servlet.FilterConfig;import javax.ser

2015-09-01 05:14:20 407

转载 Spring 4 MVC HelloWorld Tutorial – Full XML Example

Following technologies being used:Spring 4.0.6.RELEASEMaven 3JDK 1.6Eclipse JUNO Service Release 2M2Eclipse plugin (Optional)Let’s begin.Step 1 : Create a new Maven webapp project in EclipseGoto

2015-09-01 04:49:29 846

转载 java 四舍五入保留小数

// 方式一:double f = 3.1516;BigDecimal b = new BigDecimal(f);double f1 = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();// 方式二:new java.text.DecimalFormat("#.00").format(3.1415926);// #.00 表示两位小数 #

2015-08-31 17:30:21 455

转载 How to write RESTful web services using spring 3 mvc

Step 1) Update pom.xml to add support of JAXB and Jackson (for xml and json formats).<dependency> <groupid>org.codehaus.jackson</groupid> <artifactid>jackson-mapper-asl</artifactid> <version>${ja

2015-08-31 17:27:23 434

转载 Spring RESTFul Client – RestTemplate Example

After learning to build Spring REST based RESTFul APIs for XML representation and JSON representation, let’s build a RESTFul client to consume APIs which we have written. Accessing a third-party REST s

2015-08-31 16:14:46 989 1

转载 Spring Bean Validation Example with JSR-303 Annotations

JSR-303 bean validation is a specification whose objective is to standardize the validation of Java beans through annotations. The objective of the JSR-303 standard is to use annotations directly in a

2015-08-31 16:01:44 1111

转载 Spring MVC Display, Validate and Submit Form Example

In any web application, you often have to deal with forms. Application first displays a form and after user filled this form, he submits it to server. At server, application needs to capture input and

2015-08-31 15:49:40 743

转载 Spring MVC Custom Validator Example

In spring mvc form submit tutorial, we learned about displaying a form and submitting form data, including validating inputs using BindingResult.rejectValue(). In this example, we will learn to build a

2015-08-31 15:21:35 683

转载 Spring MVC Internationalization (i18n) and Localization (i10n) Example

Internationalization is the process of designing a software application so that it can potentially be adapted to various languages and regions without engineering changes. Localization is the process o

2015-08-31 15:13:19 1169

转载 Spring 3 mvc hello world application with maven and jstl

In this article, I am building hello world application using spring 3 (mvc) framework. Follow the given steps and learn the basics. I have used JSTL for writing the view. Setup requirementsMavenEcli

2015-08-31 14:28:41 335

转载 Hello World Spring MVC Hello World

In this example, we will build a hello world web application using the Spring MVC framework. Spring MVC is one of the most important modules of the Spring framework. It builds on the powerful Spring Io

2015-08-31 14:03:50 457

转载 Building a RESTful Web Service

This guide walks you through the process of creating a “hello world” RESTful web service with Spring.What you’ll buildYou’ll build a service that will accept HTTP GET requests at:http://localhost:8080/

2015-08-31 11:15:01 858

转载 Spring REST Hello World XML Example

In this tutorial, I am writing hello world example for RESTful APIs using Spring REST features. In this example, I will be creating two APIs which will return XML representation of resources.Maven Depe

2015-08-31 10:15:16 710

转载 Spring REST Hello World JSON Example

1) Using @ResponseBody AnnotationThis technique is simple and easy. You have to include only jackson dependencies into classpath of your application and spring will register Jackson2JsonMessageConverte

2015-08-31 09:28:08 673

转载 Tomcat's Java Servlet Examples Explained

Tomcat provides a number of excellent servlet examples in “<CATALINA_HOME>\webapps\examples“. The servlet source files are kept under “<CATALINA_HOME>\webapps\examples\WEB-INF\classes“, together with t

2015-08-31 05:45:00 689

转载 Java Servlet完全教程

Servlet是一些遵从Java Servlet API的Java类,这些Java类可以响应请求。尽管Servlet可以响应任意类型的请求,但是它们使用最广泛的是响应web方面的请求。 Servlet必须部署在Java servlet容器才能使用。虽然很多开发者都使用Java Server Pages(JSP)和Java Server Faces(JSF)等Servlet框架,但是这些技术都要在幕后

2015-08-31 03:52:09 349

转载 Java EE 6: How to implement “Stay Logged In” when user login in to the web application

I am using Form-based authentication provided by GlassFish v3 btw. Most of the website, when the user about to provide the username and password to log into the system, it has a checkbox “Stay logged

2015-08-31 03:34:22 739

转载 What is the difference between GenericServlet, HttpServlet and a Servlet?

Servlet is an interface defining what a servlet must implement. GenericServlet is just that, a generic, protocol-independent servlet. HttpServlet is a servlet tied specifically to the HTTP protocol.I

2015-08-31 03:26:25 590

转载 Where is JSESSIONID stored? (JavaEE)

I have two applications - A Java EE web application and a Java SE applet. I want to authenticate a user in the applet by means of a JSESSIONID (which is created by the web application). So there is a

2015-08-31 03:17:54 505

转载 How to properly logout of a Java EE 6 Web Application after logging in

You should have logout servlet/jsp which invalidates the session using the following ways:- Before Servlet 3.0, using `session.invalidate()` method which invalidates the session also.- Servlet 3.0 pro

2015-08-31 03:10:24 363

转载 Session or cookie confusion

I’ve seen in some websites that user signed in into their accounts and then closed the browser. After closed and re-opened the browser and their accounts are still signed in. But some websites, canno

2015-08-31 02:47:44 469

转载 Cookies and Servlets

HTTP Cookies are little pieces of data that a web application can store on the client machine of users visiting the web application. Typically up to 4 kilo bytes of data. This text will explain how to

2015-08-30 18:23:00 300

转载 web.xml Servlet Configuration

For a Java servlet to be accessible from a browser, you must tell the servlet container what servlets to deploy, and what URL’s to map the servlets to. This is done in the web.xml file of your Java web

2015-08-30 17:59:28 467

转载 RequestDispatcher

The RequestDispatcher class enables your servlet to “call” another servlet from inside another servlet. The other servlet is called as if an HTTP request was sent to it by a browser.You can obtain a Re

2015-08-30 17:08:15 430

转载 HttpSession

The HttpSession object represents a user session. A user session contains information about the user across multiple HTTP requests.When a user enters your site for the first time, the user is given a u

2015-08-30 17:04:47 307

转载 HttpRequest

The HttpServlet class request processing methods take two parameters. javax.servlet.http.HttpRequest javax.servlet.http.HttpResponseFor instance, here is the signature of the HttpServlet.doGet()

2015-08-30 16:32:07 429

转载 HttpServlet

The javax.servlet.http.HttpServlet class is a slightly more advanced base class than the GenericServlet shown in the Simple Servlet example.The HttpServlet class reads the HTTP request, and determines

2015-08-30 16:26:02 297

转载 Java Servlet Example

A Java Servlet is just an ordinary Java class which implements the interfacejavax.servlet.Servlet;The easiest way to implement this interface is to extend either the class GenericServlet or HttpServlet

2015-08-30 16:21:40 488

转载 Servlet Life Cycle

A servlet follows a certain life cycle. The servlet life cycle is managed by the servlet container. The life cycle contains the following steps:Load Servlet Class.Create Instance of Servlet.Call the

2015-08-30 16:20:10 489

转载 Servlet Overview

What is a Servlet?A Java Servlet is a Java object that responds to HTTP requests. It runs inside a Servlet container. Here is an illustration of that: A Servlet is part of a Java web application. A

2015-08-30 16:15:30 372

转载 The Java EE 6 Tutorial The mood Example Application

The mood example application, located in the tut-install/examples/web/mood/ directory, is a simple example that displays Duke’s moods at different times during the day. The example shows how to develop

2015-08-30 15:53:18 429

转载 The Java EE 6 Tutorial Finalizing a Servlet

The web container may determine that a servlet should be removed from service (for example, when a container wants to reclaim memory resources or when it is being shut down). In such a case, the contai

2015-08-30 15:49:36 334

转载 The Java EE 6 Tutorial Maintaining Client State

Many applications require that a series of requests from a client be associated with one another. For example, a web application can save the state of a user’s shopping cart across requests. Web-based

2015-08-30 14:51:34 388

javascript入门教程

javascript入门教程 一般不怎么样

2011-08-29

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除