Timer in JSP

Hello,
I am making an online chat application in JSP. How could I make client�s interface refresh regularly? Is it possible to add a timer to the JSP? Are there any examples, or suggestions?
Thanks,
Dan

Hello,
I have added a timer to a JSP page. But, the user interface could not be refreshed automatically.
The following is the code. Does any one know the reason?
Thanks,
Dan
<?xml version = "1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ page import = "java.sql.*" %>
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<title>Chat Application</title>
<script type="text/javascript">
<!--
var timer = null
<% String texts = ""; %>
<% String names = ""; %>
function stop()
clearTimeout(timer)
function start()
<%
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:gameDatabase", "", "");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM chatlog");
texts = "";
while (rs.next())
String muserName = rs.getString("muserName");
String when = rs.getString("when");
String message = rs.getString("message");
texts = texts + "\n" + muserName + "(" + when + ")" + ":" + message;
stmt.close();
con.close();
     catch(java.lang.ClassNotFoundException e) {
               System.err.print("ClassNotFoundException: ");
               System.err.println(e.getMessage());
          catch(SQLException ex) {
               System.err.println("SQLException: " + ex.getMessage());
%>
<%
try {
     Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:gameDatabase", "", "");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM onlineusers");
names = "";
while (rs.next())
String nameLogin = rs.getString("userOnline");
names = names + "\n" + nameLogin;
stmt.close();
con.close();
     catch(java.lang.ClassNotFoundException e) {
               System.err.print("ClassNotFoundException: ");
               System.err.println(e.getMessage());
          catch(SQLException ex) {
               System.err.println("SQLException: " + ex.getMessage());
%>
timer = setTimeout("start()",1000);
//-->
</script>
</head>
<body onload="start()" onunload="stop()">
<center>
<table border="0" cellspacing="1">
<tr>
<td>
<form name="sendtext" action = "sendText.jsp" method = "post">
<table border = "0">
<tr>
<th>Chat Log</th>
</tr>
<tr>
<td><textarea rows="20" cols="60" name = "messages" readonly = "readonly"><%= texts %></textarea></td>
</tr>
<tr>
<td><input type = "text" name = "message" maxlength = "50" size = "50"></td>
</tr>
<tr>
<td><input type = "submit" value = "Send this text" ></td>
</tr>
</table>
</form>
</td>
<td>
<form name="logout" action = "logout.jsp" method = "post">
<table border = "0">
<tr>
<th>Users now online</th>
</tr>
<tr>
<td><textarea rows="24" cols="20" name = "names" readonly = "readonly"><%= names %></textarea></td>
</tr>
<tr>
<td><input type="submit" value="Logout"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</center>
</body>
</html>

Similar Messages

  • Displaying Current Date and Time in JSP

    Hi,
    I need to insert the current date time in Ms SQL Server Database using jsp page. The format of the code willbe
    insert into table(update_date) values ('2007-01-01 10:02:21');
    But i am not getting how to display the current date and time ie. 2007-01-01 10:02:21 using jsp.
    I have tried using
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    GregorianCalendar cal = new GregorianCalendar();
    String dd = sdf.format(cal.getTime());
    insert into table(update_date) values (dd);
    But it didnot get inserted data.
    Can anybody figure out with simple ideas.
    Thank You

    Why then are you trying to insert the current date on a table?
    To show the current date on the JSP you might try
    <%=new Date()%>Or the way you had it on your first post with the date formatter and then use the <%=%> tags. Anyway, it seems to me I'm not really understanding what you actually want to do :-p
    P.S. NOW() is a MySQL function too, not only MSSQL server (didn't even know it had it too ;-))
    mysql> insert into a(up) values (now());
    Query OK, 1 row affected (0.00 sec)
    mysql> select * from a;
    +------------+
    | up         |
    +------------+
    | 2007-04-09 |
    +------------+Message was edited by:
    benubach
    Message was edited by:
    benubach

  • Can I write Design-time for JSP custom tag(not JSF components)

    I have some old JSP custom tags(not JSF components), and I want to use them in the IDE through the toolbox.
    Now I have already written the BeanInfos for these tags, and they can be drag from the toolbox; but it will throw a Exception when render the tags, and the properties in the Property Editor are not which I describe in the BeanInfos.
    How can I write Design-time for these tags? or whether it is possible to write the Design-time for these tags?
    the Exception is shown as follow:
    java.lang.ClassCastException
         at com.sun.rave.insync.faces.FacesPageUnit.renderNode(FacesPageUnit.java:1347)
    [catch] at com.sun.rave.insync.faces.FacesPageUnit.renderBean(FacesPageUnit.java:1086)
         at com.sun.rave.insync.faces.FacesPageUnit.getFacesRenderTree(FacesPageUnit.java:993)
         at com.sun.rave.css2.FacesSupport.getFacesHtml(FacesSupport.java:152)
         at com.sun.rave.css2.CssContainerBox.addNode(CssContainerBox.java:373)
         at com.sun.rave.css2.CssContainerBox.createChildren(CssContainerBox.java:354)
         at com.sun.rave.css2.DocumentBox.createChildren(DocumentBox.java:90)
         at com.sun.rave.css2.DocumentBox.relayout(DocumentBox.java:160)
         at com.sun.rave.css2.PageBox.layout(PageBox.java:392)
         at com.sun.rave.css2.PageBox.relayout(PageBox.java:454)
         at com.sun.rave.css2.DocumentBox.redoLayout(DocumentBox.java:313)
         at com.sun.rave.css2.PageBox.redoLayout(PageBox.java:460)
         at com.sun.rave.css2.DocumentBox.changed(DocumentBox.java:634)
         at com.sun.rave.designer.DesignerPaneUI$UpdateHandler.changedUpdate(DesignerPaneUI.java:1012)
         at com.sun.rave.text.Document.fireChangedUpdate(Document.java:851)
         at com.sun.rave.text.Document$5.run(Document.java:631)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

    I have some old JSP custom tags(not JSF components), and I want to use them in the IDE through the toolbox.
    Now I have already written the BeanInfos for these tags, and they can be drag from the toolbox; but it will throw a Exception when render the tags, and the properties in the Property Editor are not which I describe in the BeanInfos.
    How can I write Design-time for these tags? or whether it is possible to write the Design-time for these tags?
    the Exception is shown as follow:
    java.lang.ClassCastException
         at com.sun.rave.insync.faces.FacesPageUnit.renderNode(FacesPageUnit.java:1347)
    [catch] at com.sun.rave.insync.faces.FacesPageUnit.renderBean(FacesPageUnit.java:1086)
         at com.sun.rave.insync.faces.FacesPageUnit.getFacesRenderTree(FacesPageUnit.java:993)
         at com.sun.rave.css2.FacesSupport.getFacesHtml(FacesSupport.java:152)
         at com.sun.rave.css2.CssContainerBox.addNode(CssContainerBox.java:373)
         at com.sun.rave.css2.CssContainerBox.createChildren(CssContainerBox.java:354)
         at com.sun.rave.css2.DocumentBox.createChildren(DocumentBox.java:90)
         at com.sun.rave.css2.DocumentBox.relayout(DocumentBox.java:160)
         at com.sun.rave.css2.PageBox.layout(PageBox.java:392)
         at com.sun.rave.css2.PageBox.relayout(PageBox.java:454)
         at com.sun.rave.css2.DocumentBox.redoLayout(DocumentBox.java:313)
         at com.sun.rave.css2.PageBox.redoLayout(PageBox.java:460)
         at com.sun.rave.css2.DocumentBox.changed(DocumentBox.java:634)
         at com.sun.rave.designer.DesignerPaneUI$UpdateHandler.changedUpdate(DesignerPaneUI.java:1012)
         at com.sun.rave.text.Document.fireChangedUpdate(Document.java:851)
         at com.sun.rave.text.Document$5.run(Document.java:631)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

  • How to develop a countdown timer in jsp

    Hi all, please i have an online test application that works but i want to include a countdown timer that redirects to another page when the time runs out. please, how do i go about it. please help

    Thanks, but thats not the one i need. i want the one that will show the time in hh:mm:ss and then automatically take the user to the result page when the time i up. i have a javascript code i used but the problem is in the Result.jsp page, there are some parameters that are suppose to be passed but i dont know how to do it. this is the code:
    <form name="frm2" method="post">
    <script language="javascript">
    var sec = 10;   // set the seconds
    var min = 00;   // set the minutes
    var targetURL="result.jsp"; //the url
    var email=this.Field('email').value;
    function countDown() {
      sec--;
      if (sec == -01) {
        sec = 59;
        min = min - 1;
      } else {
       min = min;
    if (sec<=9) { sec = "0" + sec; }
      time = (min<=9 ? "0" + min : min) + " min and " + sec + " sec ";
    if (document.getElementById) { theTime.innerHTML = time; }
      SD=window.setTimeout("countDown();", 1000);
    if (min == '00' && sec == '00') { sec = "00"; window.clearTimeout(SD);
    window.location=targetURL;
    function addLoadEvent(func) {
      var oldonload = window.onload;
      if (typeof window.onload != 'function') {
        window.onload = func;
      } else {
        window.onload = function() {
          if (oldonload) {
            oldonload();
          func();
    addLoadEvent(function() {
      countDown();
    </script>
    <table width="100%">
    <tr><b><td width="100%" align="center"><span id="theTime" class="timeClass"></span></td></b></tr>
    </table>
    </form>and this is are the fields needed in the Result.jsp page..
    <input type="hidden" name="email" value=<%=exno%> />
    <input type="hidden" name="dbase" value=<%=names%> />
    <input type="hidden" name="tamt" value=<%=total%> />

  • Count down Timer in jsp

    We are developing an Online Examination System. We are using jsp and servlets.
    We need a count down timer which will start as user starts the test. When user refreshes the page during test, timer should continue counting and must not reset the counter. At the end of the test it will submit automatically.
    Does jsp provide built in facility to manage timer?

    Does jsp provide built in facility to manage timer?There is no build in facility to manage timer, but all you have to do is track it at the server end.
    ie - not in javascript.
    Store a timestamp for the user for when they started the test. Either in session, or in a database.
    Then whenever they refresh their page, you look at the current time, the time they started the test and display the appropriate value.
    By all means you can have a javascript countdown on the page, but the authorative time should be on the server.

  • Slow response time for JSP pages under iAS 6.0 SP4

    Hi,
    I got an application deployed on iplanet app server 6.0 SP4 on solaris
    2.8. Using a single kjs engine and lite sessions. kjs memory size is
    min 256 and max 256 megs. but verbose:gc shows memory is 98% free.
    when i restart the app server, all JSP pages are really rendered fast.
    After a while (1 or 2 days), the time to service the same request to
    JSP pages is getting much longer (even with JSP pages having only
    static content in them). CPU is idle ... It just takes time. KXS log
    shows requet is taking like 2-4 seconds instead of about 150 milli
    secs when the engine is just restarted.
    Now if i call a servlet (which do not dispath to a JSP), the response
    time is ok! Memory is ok. It looks like its related to JSP pages
    only.
    Anyone having an idea what the problem could be? One conig param is
    the JSP page cache in iASAT. Default value is 10. What is a correct
    setting for production? I have 4 different web app deployed in the
    same server instance.
    Tanks a lot for your input
    Andre Paradis

    Andre,
    I have found the answer to my problem and perhaps yours. It seems that I18N (internationalization) in SP4 may have a performance bug in it.
    My soak tests show that with i18N checked in the iAS Admin Tool, testing the fortune cookie sample application with light load (1 request / sec) resulted in a kxs response time initially of 15ms, however this response time increased by roughly 1% per request (i.e after 100 requests the response time had more than doubled).
    Switching I18N off yielded a steady 7ms kxs response time from the fortune cookie application.
    I would add that I turned I18N on AFTER the installation procedure.
    Is this a known issue in SP4? Is there a patch?
    regards,
    Owen

  • Report runs multiple times (from jsp) - on server

    Hi
    I have rdf reports deployed on the server and when i run them through the jsp, I see that it goes to rwservlet three times. Can anyone put a light into this as to what might be going on?
    Thx!

    what's your url?

  • Tracking Time in JSP

    In a Jsp Page when the user logins the current time has to be captured, and then for that 20 minutes has to be added. After 20 minutes the user must be logged out automatically saying that ur allowed to browse only for 20 min. How to do it ?

    I think the OP doesn't mean timeout after 20 minutes of inactivity, but only 20 minutes browsing time.
    If so, I think the easiest way might be to use frames and have a Javascript timer or META refresh tag in a small/hidden frame handle the log out. Otherwise, you can't be too sure from the server side what the user is doing. I mean, you could use a timer in the server to set a "must logout" flag in the session which can be checked on all pages, but if the user is sitting there reading something, this may not be invoked til after the time out time. Maybe some combination of a "time left" tracking in the session and using that with Javascript or META refresh to do the logout if they haven't moved on yet.

  • How to get current time in jsp page?

    my problem is :-
    i have a radio buttons with name as 9am, 11am ,1pm, 3pm , 5pm , 7pm , 9pm , 11pm , 1am , 3am ,5am 7am. what ever the current time may be the radio button of four hour plus than current time should be atomatically checked and previous radio buttons should be disabled. for example suppose current time is 11.02am than the radio button of 3pm should be automatically checked and previous radio buttons should be disabled.
    please help me if u can?

    This should work but it needs testing out around midnight ( not sure if it is 00:00 or 24:00):
    <%@ page import="java.util.*" %>
    <html>
    <head><title>Time Page</title>
    </head>
    <body>
    <% Calendar c = Calendar.getInstance();
       c.add(Calendar.HOUR_OF_DAY, 4);
       int h = c.get(Calendar.HOUR_OF_DAY); %>
    The current hour is <%= h %><br>
    <% for (int i=0; i < 24; i++) { %>
       <input type=radio name=time <%= (i < h) ? "disabled" : ""%><%= (i == h) ? "checked" : ""%>><%= (i < 10) ? "0" : ""%><%= i %>:00<br>
    <% } %>
    </body>
    </html>

  • Window will close automatically with specfiy time using jsp

    hai
    have a peace day.
    i want to close the window or page automatically after 8 hours using jsp or java code
    please reply
    thank u

    One thing to consider is that you cannot enforce the use of JavaScript. You certainly can enforce the use of JSP. So if for example you are seeking to close the window as a security measure than the only way to do this is to timeout the user session in JSP as described in my first post.
    The first post asked if you can do this from Java and the answer remains it is impossible. Further it remains impossible for you to force this action upon the user using JavaScript which is a very important consideration.

  • To open a window & html page at a time on a single button, in JSP.

    Hello!
    I want to open 1 window as well as i want to open 1 html page on a single button click at a same time, in JSP.
    on button's "action" event i am opening the html page and button's "onclick" event i am opening the window, but it is not showing these 2 actions at a time. only window gets open when i click the button.
    [Also on form's "action" event i am having validate() function.]
    how do i open a window & html page at a time on a single button, in JSP?
    I don't know how to do this. I have stuck over here, if anyone is having any solution, please let me know.
    I need your help.
    Thank You.

    write js as
    window.open(page, "Popup", windowprops);
    windowprops = "height="+hi+",width="+wd+",top="+ wint +",left="+ winl +",location=no,"
              + "scrollbars=yes,menubars=no,toolbars=no,resizable=no,status=yes";
              encapsulate this in one function and call that function on button click event !!

  • JSP getting local machine time?

    I need to create a program which the users are located in two time zone. I will hence need to use the local machine time from their PC to check against certain record in my database. I understand JSP is processed at the server end. Is JSP capable of requesting the local machine time when a user hit the page?
    otherwise, is there a way to use javascript to parse the local machine time into JSP?
    Thank you.

    create a javascript function to get the local time:
    function getLocalTime() {
    var dDay = new Date();
    var nHours = dDay.getHours();
    var nMinutes = dDay.getMinutes();
    var localTime = nHours + ":" + nMinutes;
    document.localTime.value=localTime;
    in your jsp include a hidden field to accept the local time:
    <input type=hidden name=localTime value="">
    call the getLocalTime() function onload, in this way you can get the local time of the client machine when the page is loaded, store it in a hidden field and then retrieve it in the next jsp using request.getParameter("localTime") method.

  • JSP page display wrong time when compared to the server time

    Hi,
    This problem seems to weird but it is happening
    I have web application running where time is displayed in the page. In this application time is very critical. Currently, time is an hour behind the orginal time.
    I checked the server it is displaying proper time.
    As a matter of troubleshooting, I wrote a java program and run the program in the same server, where the application is running. The java program returns me proper time , but JSP is still displaying time an hour behind. To trouble shoot further, I created a test jsp page to just display the time and accessed the time and the jsp displayed wrong time as well, an hour behind.
    I am running[ tomcat 4.0.3 and j2sdk1.4.3 in suse linux enterprise server 9.0
    My Java program
    import java.util.*;
    import java.text.*;
    public class TestDate
    public static void main(String s[])
         try{
              DateFormat DF = new SimpleDateFormat( "dd/MM/yyyy");
    DateFormat DT = new SimpleDateFormat("hh:mm aa");
              SimpleDateFormat fmt=new SimpleDateFormat("HH.mm");
              Calendar cal= Calendar.getInstance();
              java.util.Date dt=cal.getTime();
              String curdt=DT.format(dt);
              System.out.println("Server Time" + curdt + "\n");
              int hh = cal.get(Calendar.HOUR);
              int mm = cal.get(Calendar.MINUTE);
              int aa = cal.get(Calendar.AM_PM);
              System.out.println("Time" + hh +":"+mm+":"+aa+"\n");
         }catch(Exception e) {
         e.printStackTrace();
    This display Time3:30:1
    My JSP Page
    <%@ page import="java.util.*,java.text.*"%>
    <%
    Calendar calen;
    calen = Calendar.getInstance();
    int hh=calen.get(Calendar.HOUR);
         int mm=calen.get(Calendar.MINUTE);
         int aa=calen.get(Calendar.AM_PM);
    %>
    <%=hh%> <%=mm%> <%=aa%>
    This display 2 30 1
    When I run Date in linux server it gives 3:30 PM EST 2004
    I am really confused, why this is happening, If you have any solutions or idea please post the solution.

    My guess is that the weirdness is caused by Daylight savings time.
    I will presume that you and the server are in the same timezone :-)
    Alternatively it could be caused by getting a different Locale.
    Try the following
    Print out "date.getTime()" value (ie long representing number of millis)
    They should be the same (or close) in both the app and in JSP
    Try simple date format in your JSP as well - what does that result in?
    Print the calendar object, and look for the difference.
    It might be in Locale, Timezone, or whether DST is set or not.
    Hope this helps,
    evnafets

  • Error in executing a process for compilation for jsp

    We have an iView which has jsp pages in it. We deployed the par & try toaccess the iview & we get an exception. The issue is that the iview has a jsp page. At the run time, this jsp is converted into a .java file
    without problem. But EP engine is having issues compiling this java fileinto .class file.
    On the other hand this same iview works just fine on our windows installation. Only Solaris EP install is having problems. The version onwindows as well as on Solaris is EP6 SP9.
    Here is the exact version on the solaris EP:
    sap.com/SAP-JEECOR 6.40 SP9 (1000.6.40.9.0.20041119045253) 20041122132733
    sap.com/SAP-JEE 6.40 SP9 (1000.6.40.9.0.20041119045409) 20041122132741
    When I copy the .class file from windows to unix machine, the iView works fine. Here is the exception I am getting:
    >>> JSPCompiler >>> error
    [email protected]a188b
    [EXCEPTION]
    com.sapportals.portal.prt.servlets_jsp.server.compiler.CompilingException:
    Error in executing a process for compilation
    at
    com.sapportals.portal.prt.servlets_jsp.server.compiler.impl.J2eeCompiler_6_30.launchCompilerProcess(J2eeCompiler_6_30.java:574)
    at
    com.sapportals.portal.prt.servlets_jsp.server.compiler.impl.J2eeCompiler_6_30.compileExternal(J2eeCompiler_6_30.java:370)
    at
    com.sapportals.portal.prt.servlets_jsp.server.compiler.impl.J2eeCompiler_6_30.compile(J2eeCompiler_6_30.java:672)
    at
    com.sapportals.portal.prt.servlets_jsp.server.jsp.JSPParser.parse(JSPParser.java:2143)
    at
    com.sapportals.portal.prt.servlets_jsp.server.jsp.JSPCompiler.compile(JSPCompiler.java:76)
    at
    com.sapportals.portal.prt.servlets_jsp.server.jsp.JSPCompiler.run(JSPCompiler.java:122)
    at
    com.sapportals.portal.prt.core.broker.JSPComponentItem.compileJSP(JSPComponentItem.java:279)
    at
    com.sapportals.portal.prt.core.broker.JSPComponentItem.getComponentInstance(JSPComponentItem.java:129)
    at
    com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.service(PortalComponentItemFacade.java:355)
    at
    com.sapportals.portal.prt.core.broker.PortalComponentItem.service(PortalComponentItem.java:934)
    at
    com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:435)
    at
    com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:527)
    at
    com.sapportals.portal.prt.component.AbstractComponentResponse.include(AbstractComponentResponse.java:89)
    at
    com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:232)
    at com.sapportals.portal.htmlb.page.JSPDynPage.doOutput(JSPDynPage.java:76)
    at
    com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:129)
    at
    com.sapportals.portal.htmlb.page.PageProcessorComponent.doContent(PageProcessorComponent.java:134)
    at
    com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
    at
    com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
    at
    com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
    at
    com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
    at
    com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
    at
    com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
    at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:646)
    at
    com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
    at
    com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
    at
    com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
    at
    com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
    at
    com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:232)
    at
    com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522)
    at java.security.AccessController.doPrivileged(Native Method)
    at
    com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:153)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385)
    at
    com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)
    at
    com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:340)
    at
    com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:318)
    at
    com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:821)
    at
    com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:239)
    at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
    at
    com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)
    at
    com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
    at
    com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at
    com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
    I am having the same issue with another iview which has jsp page in it.
    The web dynpro iview works fine.

    Hi, seems like there's some typo in your jsp. Check the .java file listed with a java editor (like eclipse or devstudio.). Maybe you'll find the typo this way faster.
    Most often, a multiline page import hampers jsp compilation,
    e.g.
    <%@page import="java.util.List,
                    java.util.Map"%>
    needs to be
    <%@page import="java.util.List,java.util.Map"%>
    Regards,
    Armin

  • JSP is not getting displayed in add portlet repositery

    Hi,
    I have registered two servlet in provider.xml and I was able to
    view that servlet as a portlet in add portlet repositery.
    After that I wanted to add one more JSP as portlet under same
    provider. So I have kept JSP in same directory where servlet is
    kept. I have added JSP as portlet in Provider(i.e. provider.xml)
    and given appPath and appRoot for that JSP. Whenever I am trying
    to view my provider by giving following URL
    http://servername/servlet/myprovider
    I am getting message -
    Congratulations! You have successfully reached your Provider's
    Test Page.
    in same page I am able to view my all portlets. in that list I
    am able to view my JSP as a portlet.
    Now I want to add JSP portlet in my page at that time that JSP
    portlet is not getting displayed in add portlet repositery.
    Can anybody tell why JSP is not getting displayed in portlet
    repositery ? What should I do to get it displayed in portlet
    repositery ?
    Thanks in advance.
    Biren

    You have to refresh the Provider. They are a couple of ways to
    do it.
    1. Take a look at the release notes for PDK-Java.
    http://portalstudio.oracle.com/servlet/page?_pageid=468&_dad=ops&
    _schema=OPSTUDIO
    It mentions and auto reload feature that will refresh the
    provider on the PDK-Java side when you make changes to the
    provider.xml. When you add portlet, you simply refresh the
    repository in portal and add the new portlet to a page.
    2. If you do not have the auto_reload parameter, you simply need
    to refresh manually.
    a. After updating the provider.xml, restart the HttpServer where
    your PDK-Java Provider is located.
    b. Refresh the Portlet Repository
    Both these do the same thing, and should solve your problem
    Sue

Maybe you are looking for