jsp in the config object

sponsored links
Implicit object in jsp config object in which a relatively less used, this object is used to configure the general parameters of the specified jsp, servlet as the parameter configuration. After all, the essence jsp servlet, their configuration is similar. Here is the configuration of their own study notes;

<servlet-name> test </ servlet-name>
<jsp-file> / test.jsp </ jsp-file> <! - Note that either the jsp-file is either servelt-class tag ->
<param-name> username </ param-name>
<param-value> zhang </ param-value>
</ Init-param>
</ Servlet>
<servlet-name> test </ servlet-name>
<url-pattern> / test </ url-pattern>
</ Servlet-mapping>

These are the configuration parameters of the test.jsp username, the corresponding value of zhang; when running test (note that not test.jsp), in fact running test.jsp file, test the path for the mapping,

Here in the address bar if we visit through the test we can use <% = config.getInitParameter ("username")%> get parameter values: zhang.

If you use test.jsp access the page, but also access, but can not obtain configuration parameters. So if you want to use test.jsp run, modify the mapping path <url-pattern> / test.jsp </ url-pattern>

In short: By refusing to explain, I can understand, like jsp and servlet mapping configuration can be arbitrary, but the difference between jsp and servlet, in particular, jsp mapping can be used to access the original path can also use the map to access
  • del.icio.us
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

Related Posts of jsp in the config object

  • Build flex + spring + blazeds + hibernate application

    Build flex + spring + blazeds + hibernate application First, set up the project blazeds 1, will blazeds.war extract to a directory, such as: myflex /; 2, set up java works were such as: MyFlex, in the orientation of selection create project from exis ...

  • Application of spring struts2.0 hibernate HQL

    Therefore, in the development of statistical inquiry system, as far as possible through the use of select statement to write the required query property way back relational data, and avoid using the first query return persistent object (in this way are in

  • Hibernate connection pool configuration

    Hibernate connection pool configuration <! - Jdbc -> <property name="connection.driver_class"> oracle.jdbc.driver.OracleDriver </ property> <property name="connection.url"> jdbc: oracle: thin: @

  • In the servlet use Bean

    According to Sun's definition, JavaBean is a reusable software components. In fact JavaBean is a Java class, through the package into a property and methods of treatment of a function or a business object, referred to as bean. Because JavaBean is ...

  • hibernate generic generic DAO

    package org.lzpeng.dao; import java.io.Serializable; import java.util.List; import org.hibernate.Criteria; import org.hibernate.Query; import org.hibernate.criterion.Criterion; import org.springside.modules.orm.hibernate.Page; /** * * @version 2009-1-10 *

  • Struts2 + hibernate + spring problem user log in

    dao layer services layer action jsp <tr> <td align="center"> <b> user name: </ b> </ td> <td> <s: textfield name = "czyNumber" cssClass = "textstyle" theme = "simple" size = &q

  • Hibernate secondary cache

    Hibernate cache: 2-bit cache, also known as process-level cache or SessionFactory level cache, secondary cache can be shared by all of the session Cache configuration and the use of: Will echcache.xml (the document code in hibernate package directory ...

  • Hibernate's lazy strategy

    hibernate Lazy strategy can be used in: <class> tag, it can be true / false Tags can <PROPERTY> values true / false type of necessary tools to enhance <set> <list> can tag values true / false / extra <many-to-one> <on ...

blog comments powered by Disqus
Recent Entries
Tag Cloud
Random Entries