Network Deployment (Distributed operating systems), v8.0 > Reference > Developer detailed usage information
tsx:userid and tsx:passwd tag JSP syntax (deprecated)
With the <tsx:userid> and <tsx:passwd> tags, you do not have to hard code a user ID and password in the <tsx:dbconnect> tag.
Deprecated feature: Support for tsx tags in the JSP engine are deprecated in WAS Version 6.0. Instead of using the tsx tags, you should use equivalent tags from the JSP Standard Tag Library (JSTL).depfeat
Use the <tsx:userid> and <tsx:passwd> tags to accept user input for the values and then add that data to the request object. We can access the request object with a JSP file, such as the JSPEmployee.jsp example that requests the database connection.
We must use <tsx:userid> and <tsx:passwd> tags within a <tsx:dbconnect> tag.
This section describes the syntax of the <tsx:userid> and <tsx:passwd> tags.
<tsx:dbconnect id="connection_id" <font color="red"> <userid> </font> <tsx:getProperty name="request" property=request.getParameter("userid") /> <font color="red"> </userid> </font> <font color="red"> <passwd> </font> <tsx:getProperty name="request" property=request.getParameter("passwd") /> <font color="red"> </passwd> </font> url="protocol:database_name:database_table" driver="JDBC_driver_name"> </tsx:dbconnect>where:
- <tsx:getProperty>
Represents the syntax as a mechanism for embedding variable data.
- userid
Represents a reference to the request parameter that contains the user ID. We must add the parameter to the request object that passes to this JSP file. We can set the attribute and its value in the request object, using an HTML form or a URL query string to pass the user-specified request parameters.
- passwd
Represents a reference to the request parameter that contains the password. Add the parameter to the request object that passes to this JSP file. We can set the attribute and its value in the request object, using an HTML form or a URL query string, to pass user-specified values.
JSP
Use installed optional packages
Manage shared libraries
Related
Web applications: Resources for learning