JSP Helper Bean HTMLFilter : UseBean « JSP « Java Tutorial






Jsp code

<html>
<!--
 Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

<body bgcolor="white">
<h1> Request Information </h1>
<font size="4">
JSP Request Method: <% out.print(beans.HTMLFilter.filter(request.getMethod())); %>
<br>
Request URI: <%= request.getRequestURI() %>
<br>
Request Protocol: <%= request.getProtocol() %>
<br>
Servlet path: <%= request.getServletPath() %>
<br>
Path info: <% out.print(beans.HTMLFilter.filter(request.getPathInfo())); %>
<br>
Query string: <% out.print(beans.HTMLFilter.filter(request.getQueryString())); %>
<br>
Content length: <%= request.getContentLength() %>
<br>
Content type: <% out.print(beans.HTMLFilter.filter(request.getContentType())); %>
<br>
Server name: <%= request.getServerName() %>
<br>
Server port: <%= request.getServerPort() %>
<br>
Remote user: <%= request.getRemoteUser() %>
<br>
Remote address: <%= request.getRemoteAddr() %>
<br>
Remote host: <%= request.getRemoteHost() %>
<br>
Authorization scheme: <%= request.getAuthType() %> 
<br>
Locale: <%= request.getLocale() %>
<hr>
The browser you are using is <% out.print(beans.HTMLFilter.filter(request.getHeader("User-Agent"))); %>
<hr>
</font>
</body>
</html>
  Download:  JSPHelperBeanHTMLFilter.zip( 92 k)








23.43.UseBean
23.43.1.Import JavaBeans In JSP Page
23.43.2.Load JavaBeans In JSP Page
23.43.3.Using 'useBean' To Reference A Java Bean
23.43.4.Using initialized field in jsp page
23.43.5.Reference Package Name in JSP Page
23.43.6.Reference Calendar Bean
23.43.7.JSP Number Guess Bean
23.43.8.JSP Helper Bean HTMLFilter
23.43.9.Get/Set Value Using JSP Set Property
23.43.10.Call Setter In Java Bean To Change its Property Value
23.43.11.Call Bean Constructor To Pass In Message
23.43.12.Using the Date Class
23.43.13.Fields of the Calendar Class