`
遠大前程
  • 浏览: 7250 次
  • 性别: Icon_minigender_1
  • 来自: 广州
最近访客 更多访客>>
社区版块
存档分类
最新评论

implicit object

阅读更多
When a Container translates the JSP into a servlet,the beginning of the service method is a pile of implicit object declarations and assignments.

All of the implicit objects map to something from the Servlet/JSP API.The request implicit object ,for example ,is a reference to the HttpServletRequest object passed to the service method by the Container.

API             Implicit Object

     JspWriter           ------------           out
    HttpServletRequest   ------------         request
HttpServletResponse     ------------         response
      HttpSession        ------------         session
    ServletContext       ------------         application
      ServletConfig      ------------         config
     Throwable           ------------         exception  //it only available to designated "error pages"
    PageContext          ------------         pageContext // a PageContext encapsulates  other implicit objects ,so if you give some helper object a PageContext reference,the helper can use that reference to get references to the other implicit objects and attributes from all scopes.
       Object            ------------         page  
分享到:
评论

相关推荐

    jsp详细教程实例全集

    05文件夹:隐式对象(Implicit Object),包括95个实例。 06文件夹:核心标记库(Core Tag Library),包括38个实例。 07文件夹:国际化格式标记库,包括45个实例。 08文件夹:SQL标记库(SQL Tag Library),包括15...

    spray-json框架介绍.pdf

    implicit object MyIntFormat extends JsonFormat[MyInt] { def write(myInt: MyInt) = JsNumber(myInt.value) def read(value: JsValue) = value match { case JsNumber(num) => MyInt(num.toLong) case _ => ...

    jsp文本文档

    * 内置对象 implicit object:jsp文档的后台对象,用于提供常用的功能和变量。 jsp文档在实际应用中的一个常用场景是与Oracle数据库集成。jsp语言可以使用 JDBC(Java Database Connectivity)连接Oracle数据库,...

    JSP Simple Examples

    In this example we have used the html tag inside the println() method of the out implicit object which is used to write the content on the browser. Password Controls In this program we are going to ...

    JSP2.0技术手册pdf(带示例源码).zip

    第五章 隐含对象(Implicit Object) 5-1 属性( Attribute ) 与范围( Scope ) 5-2 与 Servlet 有关的隐含对象 5-3 与 Input / Output 有关的隐含对象 5-4 与 Context 有关的隐含对象 5-5 与 Error 有关的隐含对象 第...

    JSP/Servlet

    隱含物件(Implicit Object) JSP轉譯之後就是Servlet,各個隱含物件都對應於Servlet API中的某個物件,如果您對隱含物件的功能有什麼不瞭解的,查詢Servlet API文件中該物件的說明就可以瞭解了。 out request ...

    ValiData:用于创建 ScalaZ 验证的简单 Scala DSL

    Scala 中的简单数据验证框架 ...String ], val listAttribute : List [ Int ] = List .empty) implicit object testClassValidator extends TypeValidator [ TestClass ] with BaseValidations { override def validat

    Inside the C++ object model 高清英文版

    Explains the basic implementation of the object-oriented features and the trade offs implicit in those features. Examines the impact on performance in terms of program transformation. Provides ...

    typeclasses101

    implicit object IntEq extends Eq[Int] { def eqv(x: Int, y: Int): Boolean = x == y } implicit object StringEq extends Eq[String] { def eqv(x: String, y: String): Boolean = x == y } } ``` 这样,...

    template.scala:Scala中的C ++风味模板元编程

    implicit object StringTemplate extends MyTemplate[String] { override def apply(value: String): String = s"String: $value" } } ``` 这段代码定义了一个类型类`MyTemplate`,它有一个`apply`方法将值转换...

    Inside the C++ object model

    He covers the semantic implications of the C++ object model and how that model affects your programs.Highlights<ul><li>Explores the program behavior implicit in the C++ Object Model's support of ...

    Scala - Implicit Conversion.docx

    在Scala编程语言中,隐式转换(Implicit Conversion)是一种强大的特性,它允许我们不显式地将一个类型的值转换为另一个类型。隐式转换在某些特定情况下非常有用,例如当两个不兼容的类型需要一起工作时,或者为了...

    event-sourcing-using-scala-typeclasses:使用Scala类型类的事件源聚合

    在我的我描述了针对基于...name : String ) trait CustomerCommand case class CreateCustomerCommand ( name : String , creditLimit : Money ) extends CustomerCommand implicit object CustomerAggregate extends ...

    scala 隐式转换与隐式参数的使用方法

    隐式转换可以通过使用 `implicit` 关键字来定义,并且可以在任何地方使用。 例如,在 HBase 中,我们经常需要将字符串转换到字节数组,这可以使用隐式转换来实现: ```scala object HBasePref { implicit def Str2...

    A tiny JSON library for C++11.

    There are also implicit constructors that allow standard and user-defined types to be automatically converted to JSON. For example: class Point { public: int x; int y; Point (int x, int y) : x(x),...

    resharper-heapview:ReSharper堆分配查看器插件

    // implicit conversion Int32 ~> Object string path = a + '/' + obj ; // implicit conversion Char ~> Object int code = this . GetHashCode (); // non-overriden virtual method call on struct string ...

    Fast Track UML 2.0

    The title's not kidding, ... What's more there's an implicit assumption that the reader understands object oriented development (which goes without saying if the reader is already familiar with UML 1.x).

    Scala第十四章节1

    object ImplicitDemo { implicit def file2RichFile(file: File) = new RichFile(file) } ``` 在主程序中,我们需要导入这个隐式转换,这样当尝试调用`read`方法时,Scala会自动应用这个转换: ```scala import ...

Global site tag (gtag.js) - Google Analytics