tsx:userid and tsx:passwd tag JSP syntax

With the <tsx:userid> and <tsx:passwd> tags, you do not have to hard code a user ID and password in the <tsc:dbconnect> tag.

Use the <tsx:userid> and <tsx:passwd> tags to accept user input for the values and then add that data to the request object. You can access the request object with a JSP file, such as the JSPEmployee.jsp example that requests the database connection.

You must use <tsx:userid> and <tsx:passwd> tags within a <tsc:dbconnect> tag.

This section describes the syntax of the <tsx:userid> and <tsx:passwd> tags.

<tsc: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"> 
</tsc:dbconnect>

where...

 

See Also

JSP files
Webapplications: Resources for learning