jsp database query and setup

Q

Quick Function

I am using jstl. I have a query.jsp page, which has something like:

<sql:setDataSource var="db" scope="application"
driver="oracle.jdbc.driver.OracleDriver"
url="jdbc:eek:racle:thin:mad:1.2.3.4:1521:db"
user="${param.username}"
password="${param.password}"
/>

<sql:query var="er" dataSource="${db}" sql="${param.sql}"
maxRows="20"/>

....
<a href="setup.jsp">Setup</a>

Query will be the first page my user sees. And there is a link to take
them to a "setup.jsp" page, in which user can input username and
password and them linked back to query page. How can I do this?

In the query page, if I find the username and password are null, I
want to take them to setup page automatically.

How can I implement this?

Thanks,

QQ
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top