Solved

Pop up window on login with values coming from Database

Posted on 2004-04-20
5
303 Views
Last Modified: 2012-06-27
I have a JSP application deployed on tomcat  with oracle 8i database. When ever the user logs in, a particular table in the database is checked, if it does not contain any records then everything proceeds normally. But if there are any rows in the table  then a window is poped containing the rows in the table.
How can I achieve this?
Thanks
0
Comment
Question by:rhea234543
  • 3
5 Comments
 
LVL 6

Expert Comment

by:jarasa
ID: 10867458
Would you please post the code?
Javier
0
 
LVL 6

Accepted Solution

by:
jkna_gunn earned 200 total points
ID: 10867688
to check if there are any records
you would get back a resultset object when you execute the query from a statement object.

a call to rs.next() will return false if no records or true if there are records.

so if true you can then use jsp to write a script comment e.g.

...
if (rs.next()) {
   out.println("<script language=\"JavaScript\">");
   out.println("openPopUp()");
   out.println("</script>");
}
where openPopUp() is defined in the header. you could pass arguments to the popup if you wanted as well.
0
 
LVL 6

Expert Comment

by:jarasa
ID: 10867742
Maybe I missunderstood the question but:

>I have a JSP application deployed on tomcat  with oracle 8i database.

This make me think that he already has that done, but does not know how is made, is that the problem?

Javier
0
 

Author Comment

by:rhea234543
ID: 10868580
>>This make me think that he already has that done, but does not know how is made, is that the problem

1.No. Actually this wasn't a part of the actual application that is deployed and has to be added now.

>> he already has that done
2. Its she not he  
;)
0
 
LVL 6

Assisted Solution

by:jarasa
jarasa earned 50 total points
ID: 10868883
Sorry Rhea,

Normally the name doesn't say much about that point, so I dind't notice it with all those numbers. but is a beautiful one to be honest.

After this..... then the way that jkna_gunn said should be the way to do it, if you need further help just Ask.

There is just one thing that you may consider, and is that to be able to open a new window it should be done on the client not ion the server. That means that you should check wether or not you have records and then make the open window calling again to the server.

:c)

Javier
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
getting param value 7 58
error when compiling my project in eclipse luna 30 453
JSONSerializer.toJSON in JSP generating error 8 81
main method of string class 3 117
Read about why it is more lucrative for an IT company to participate in government projects.
A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question