I am not sure if I understand but it sounds like something we are doing. I
am displaying a list of unique users on our site that shows their "last"
activity (not all of it). I am having some problems with the SQL. Do you
mean new activity should show up in your Admin applet or something? Who sees
this new activity that turns bold? I assume when a user logs in, if they do
some activity..its new, however, why would they see something saying they
have new activity if they are the ones doing it?
Or do you mean they have some sort of activity like email waiting for
them..so when they log in you query their special table that lists any new
activity for them? If thats the case, you can easily use a javabean in a JSP
page that is checked, which does the logic. Or..if you are using the Model 2
approach, before the JSP page is displayed, have a servlet (controller
servlet presumably) do the work. It should probably call a helper class (so
if you want to move to EJB later on..its not as much work) like a javabean
that does the logic. The logic would then set a value in the bean used on
the jsp page that signal that there is something waiting (such as email). If
that value is set (use true/false if you like, or an int value to indicate
the number of items waiting), the code might be someting like:
<jsp:useBean id="activityBean" scope="session"
class="com.company.package.ClassName" />
<html><head></head>
<body>
<%
if( activityBean.isActivity() )
{
$>
<font face="arial" size="5"><b>Activity awaits</b></font><br>
<%
}
%>
</body>
</html>
Something like this would display the Activity awaits text only if the bean
used has been set. This assumes that you are using JSP for a VIEW only..and
not using it to include logic scriplet code to call upon a bean the first
time the page is rendered.
Feel free to ask questions..I hope that helps.
>Hi all,
>
>I am required to write a page using JSP that will show the activities of a
>>website happened since the user's last login. Ok, no problem with that, we
>can extract these activities from the database. However, during the course
>of the user's login if a new activity occurs a link named "new activity"
>should automatically get bold. Now if there is anything in JSP that can
help
>us in this functionality OR is there any javascript solution for that?
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets