Problem in creating Jsp Page.

i am working on bulletin board Project.
now my problem is that how to create Dynamic Page.
Suppose :-
i have created a Jsp page in that page there are 4 Categories like ( Java , dot net , PHP , XML ).
ok
Now when u click on it suppose java a new jsp page will open if u logdin through yout login ID the u can able to post any thing related to java lie Quation or Ans etc.
ok
now u have posted a quation now the problem is that wen u have posted a quation in java section it will stored in database but how can i display that quation in new page & if some one reply to that Quation the how can i display that Ans just under that quation.
At that moment i have to create a jsp page Dynamically. i am right so how can i do that PL help me i have to submit my project withen 3 to 5 days in my collage PL.
PL Hellp me & tell me how to do that.
Thanks
HARSH

It is generally a bad idea to start threads in JSPs and Servlets. However, there is a need for them ... sometimes... Stress the rarety of sometimes. If you want to cancel the TimeTask, then chances are you don't want the Timer running from your JSP.
To answer your question, how is the Timer/TimerTask objects you are working with stored? To make changes, they would need to be stored in some scope where they can be accessed later. That means session if you want different users to have dirrerent tasks. application scope if all users should control the same task (be careful with this, you may have problems with synchronization issues).
I would think there is probably a better solution to your problem. Maybe if you explain in more detail, we can come up with a better one.

Similar Messages

  • Problem launching a jsp page with eclipse and tomcat

    Hi,
    I have just started using eclipse and tomcat for creating dynamic web pages. I tried to launch a jsp page after starting the tomcat server with the URL: http://locahost:8080/HelloWorld/, an error page was displayed as below:
    HTTP Status 404 -/
    type Status report
    message /_
    description The requested resource (-) is not available
    Apache Tomcat/5.5.17
    I didn't get any error at the console and when i just typed http://localhost, a pop up menu saying that the connection was refused when attempting to contact localhost.
    I'm not sure what is the problem here. Could it be the permssion to the localhost is not granted by the system as the eclipse IDE is running using linux?
    Hope someone can help.
    Thanks.

    http://www-128.ibm.com/developerworks/library/os-ectom/

  • Problem in custom jsp page when pressing enter button

    Hi to all,
    <pre>
    I am created a cutom jsp page. When i am clicking on a button it working fine, but if i am pressing
    Enter key it redirecting to home page and showing an exception in cosole.
    <b>Exception is </b>
    18:00:50,718 ERROR [WEBAPP] Class/Method: tcActionBase/execute encounter some problems: {1}
    java.lang.NullPointerException
    at com.thortech.xl.webclient.actions.tcLookupDispatchAction.execute(Unknown Source)
    at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source)
    at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
    at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:110)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
    at java.lang.Thread.run(Thread.java:619)
    18:00:50,718 ERROR [WEBAPP] Class/Method: tcAction/execute encounter some problems: {1}
    java.lang.NullPointerException
    at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source)
    at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
    at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:110)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
    at java.lang.Thread.run(Thread.java:619)
    18:00:50,718 WARN [RequestProcessor] Unhandled Exception thrown: class java.lang.NullPointerException
    18:00:50,718 ERROR [[action]] Servlet.service() for servlet action threw exception
    java.lang.NullPointerException
    at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
    at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:110)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
    at java.lang.Thread.run(Thread.java:619)
    </pre>
    Edited by: iceman513 on Aug 11, 2010 7:14 PM
    Edited by: iceman513 on Aug 24, 2010 10:32 AM
    Edited by: iceman513 on Aug 24, 2010 10:33 AM

    once you click a button, say, "Draw Rectangle", it should draw a rectangleYes, but you need to repaint() the component (in your case panel) to see the change.
    The error is: The method paintComponent(Grpahics) is undefined for the type ObjectThe compiler never lies. As far as your code goes, you have added a method paintComponent(...) to a class that implicitly extends Object. Perhaps you wanted to create an anonymous subclass of JPanel.JPanel panel = new JPanel() {
      public void paintComponent(Graphics g) {
        super.paintComponent(g);
        myPaint(g);
    };Note the changes in brace and semicolon placement.
    Also:
    1. You're setting a FlowLayout to a JPanel, which is anyhow the default layout manager. And when using a layout manager, setSize calls are redundant and effectively ignored.
    2. For a JFrame to be centered on the screen, setLocationRelativeTo(null) after setting the size, not before.
    3. To void visual artifacts, setVisible(true) after all other properties are set.
    It looks to me like you've been throwing together bits of code from here and there without adequate understanding. I recommend you go through the Swing tutorials linked from the topic listing page for this forum.
    db

  • Compilation problem in a JSP page

    Hi all,
    I'm trying to write a jsp page and some java stuff in it.
    It goes something like this -
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1255"%>
    <html>
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=windows-1255"/>
        <title>Michael</title>
      </head>
      <body>
    <%
              String strError="";
    %>
    </body>Now the problem is that I get compilation problem about the use in java -
    "String cannot be resolved to a type"
    I know for sure that in other computers it's work, the question is what I'm missing?
    I have Java VM installed and I've downloaded and installed the latest JDK, what else?
    thanks,
    Michael.

    Michael4488 wrote:
    BalusC wrote:
    Then you should be using JSTL/EL.I don't familiar with this technology, any way - Its work on one computer so in my understanding it should work on the other as well.It is not related to the actual problem. It was just a comment on your code. Using scriptlets is considered as bad practice.
    I understand that of course, but I don't use any configuration file or set any special parameters in my computer.
    What exactly does the compiler need in order to recognize the Java code in the JSP page? If i manually add the JAVA_HOME environment variable it will work?
    where should I refer it to? "..\Java\jre1.6.0_07\lib" will do?It must point to the root installation directory of the JDK (thus not the JRE!).

  • Problem in loading jsp page

    Hi ,
    I'm facing a problem in displaying a JSP page . I'm displaying records from the database on the page . I want to display only 20 records at a time . I have given the navigation facility for previous,first ,last ,next etc.
    I'm getting all the records at once and displaying them at once . But , I show only 20 records at a time ,hiding the remaining records .
    This works fine for less no . of records but for more records ,say 2000-3000 records , it gets quite slow as expected .
    I don't want to fire the query again .
    Is there any other way possible using this technique .
    It's very urgent . So kindly help .
    Thanks.

    Just get a scrollable ResultSet with the row amount for 1 page, e.g.
          * Returns a result set for the given query, that is read only and scrollable
         * (cursor can move forward and backward). The default fetch size is used and
         * can be changed anytime by calling resultSet.setFetchSize(newFetchSize).
         * <p>
         * Note: be sure that the used JDBC driver supports scrollable result sets via
         * <code>DatabaseMetaData.supportsResultSetType(ResultSet.TYPE_SCROLL_SENSITIVE)</code>
          * @param select SQL select query.
         * @param fetchSize Number of rows to prefetch.
          * @return Scrollable, read-only result set.
        private ResultSet getScrollableResultSet(String select, int fetchSize) {
            ResultSet result = null;
            if (select != null) {
                try {
    //TYPE_SCROLL_SENSITIVE can throw SQLException "Unsupported syntax for refreshRow()" with the
    //current ORACLE driver (8.1.7.0.0).
    //                Statement stmt = createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
                    Statement stmt = createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
                    int maxRows = stmt.getMaxRows();
                    if (fetchSize < 0 || fetchSize > maxRows) {
                        fetchSize = 0; //ignore fetch size
                    stmt.setFetchSize(fetchSize);
                    long t = System.currentTimeMillis();
                    result = stmt.executeQuery(select);
                    logger.debug(select + (" ("+(System.currentTimeMillis() - t)+")"));
                    if (result == null) {
                        stmt.close();
                } catch (SQLException sqle) {
                    logger.error("Error getting scrollable ResultSet for '"+select+"'.", sqle);
                    throw new BavException(sqle);
            return result;
        }//getScrollableResultSet()and fetch the next/previous page records via the resultSets next()/previous() methods. But beware that the SQL statement doesn't use an ORDER BY or GROUP BY that needs to fetch all rows anyway.

  • Problem in compiling JSP page in OC4J 10.1.3.0.0

    Dear all,
    I started the ocj4 container that came with Jdeveloper. After starting the ocj4 server, I try to test it with the Servlet and JSP example. The Servlet Example work fine but I encounter the following error when I run the JSP example.
    2006-01-12 11:08:39.379 NOTIFICATION J2EE JSP0008 Unable to dispatch JSP Page :Exception:oracle.jsp.provider.JspCompileException: <H3>Errors compiling:C:\Program Files\Oracle\j2ee\home\application-deployments\default\defaultWebApp\persist
    ence\_pages\_examples\_jsp\_jsp2\_el\_basic_2d_arithmetic_2e_jsp.java</H3><pre><
    /pre>
    I think this should be a setup problem, please kndly advise.

    After reading the theads in the forum, I am able to get the jsp running by using full path to specify the java executable.
    e.g. C:\Program Files\Java\jdk1.5.0_02\bin\java -jar oc4j.jar
    This should be a path problem. After I set the path variable correctly
    i.e. add C:\Program Files\Java\jdk1.5.0_<version>\bin to PATH environment variable. It work fine. I hope this help the newbie like me. :D
    Indeed, I wonder why we need two jdk for the oc4j. Follow the instruction, I need to install a jdk. However, I find there is another jdk under $ORACLE_HOME\jdk. This is make the situation confusing and saw quite a lot of threads are related to this problem long time ago!

  • Jsf problem go from jsp page to another jsp in new window

    I’ve two jsp pages attendReport.jsp and printAttendReport.jsp
    attendReport.jsp contains inputs for attend duration and employee id and command button “view” to view attendance data entered employee during entered duration inside the same page(this work very good)
    the problem is the same page includes another command button “print” its job is to get the same data but view them in the second page printAttendReport.jsp in another window in order to print the data in some suitable format , but the print button opens attendReport.jsp instead of printAttendReport.jsp and does not hold the inputs else if I set <managed-bean-scope> to session not request which cause caching data , please help me if you to solve this problem
    and here the related lines of code
    <faces-config >
    <managed-bean>
    <managed-bean-name>attendReportBean</managed-bean-name>
    <managed-bean-class>csc.attend.bean.AttendReportBean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
    <from-view-id>/attend/attendReport.jsp</from-view-id>
    <navigation-case>
    <from-action>#{AttendReportBean.attendReport}</from-action>
    <from-outcome>attendReport</from-outcome>
    <to-view-id>/attend/attendReport.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    <navigation-rule>
    <from-view-id>/attend/attendReport.jsp</from-view-id>
    <navigation-case>
    <from-action>#{AttendReportBean.printAttendReportAction}</from-action>
    <from-outcome>printAttendReportAction</from-outcome>
    <to-view-id>/attend/printAttendReport.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    </faces-config> // here is managed bean code
    public class AttendReportBean {
    // data , getters and setters
    init();
    //Preload in initialization block.
    public void init() {
    // initialize data
    public String attendReport() {
    // code to get attend data to go to view page(same page) it is ok
    return "attendReport"; // Navigation case.
    public static String getRequestParameter(String name) {
    return (String) FacesContext.getCurrentInstance().getExternalContext()
    .getRequestParameterMap().get(name);
    public void printAttendReportListener(ActionEvent event) {
    String fromYearStr = getRequestParameter("fromYearAtt");
    System.out.println("fromYearStr = "+fromYearStr);
    // try to get inputs through ActionListener but it gives me null
    public String printAttendReportAction() {
    // code to get attend data to go to print page(another page in new //window) but inputs come in default values
    return "printAttendReportAction"; // Navigation case.
    }attendReport.jsp
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <f:view>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    //title . styles and validations //
    </head>
    <body>
    <h:form id="attendReportForm">/the form tag appear in running source as <form id="attendReportForm" method="post" action="/newdiwan/faces/attend/attendReport.jsp" enctype="application/x-www-form-urlencoded" >
    i.e. it always submit to attendReport.jsp page
    / some inputs and outputs /
    <h:commandButton onclick="return check();" id="view" action="#{attendReportBean.attendReport}" value="" styleClass="linksNumBlue" />//it works good/
    // some outputs to view data /
    <h:commandLink immediate="true" id="printLink" value="" action="#{attendReportBean.printAttendReportAction}" actionListener="#{attendReportBean.printAttendReportListener}" target="_blank" styleClass="linksNumBlue">
        <f:attribute  name="fromYearAtt" value="2009" />
        <f:attribute  name="fromMonth" value="01" />
       <f:attribute  name="toYear" value="2010" />
       <f:attribute  name="toMonth" value="06" />
    </h:commandLink>//this has two problems 1)submit to attendReport.jsp not printAttendReport.jsp which I want to go to.
    //2)does not get the inputs but return the default values only /
    </h:form></body></html></f:view>I use libraries { jsf-api.jar , jsf-impl.jar , jstl-1.1.0.jar and tomahawk-1.1.6.jar } and deploy on tomcat 6.0
    I’m sorry for the prolongation, please help me if you can
    Edited by: alynoor on Jul 8, 2010 1:51 AM
    Edited by: alynoor on Jul 8, 2010 1:55 AM

    my problem solved 1- i use 2 managed bean , one of request scope (used in attendReport.jsp ) and the other with session scope (used in printAttendReport.jsp)
    2 - add new jsp contains the h:commandLink of the print (attendReportPrintAction.jsp)
    3 - divide the view of attendReport.jsp to two subviews (each subview has its own form) one contains inputs and outputs of attend and the other contains include to (attendReportPrintAction.jsp)
    <%@ include file="attendReportPrintAction.jsp" %>
    4 - send and get parameters using two methods
                public static Object getSessionMapValue(String key) {
                   return FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get(key);
                public static void setSessionMapValue(String key, Object value) {
                   FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put(key, value);
                }faces-config.xml
       <managed-bean>
          <managed-bean-name>attendReportBean</managed-bean-name>
          <managed-bean-class>csc.attend.bean.AttendReportBean</managed-bean-class>
          <managed-bean-scope>request</managed-bean-scope>
       </managed-bean>
        <managed-bean>
          <managed-bean-name>print_attendReportBean</managed-bean-name>
          <managed-bean-class>csc.attend.bean.AttendReportBean</managed-bean-class>
          <managed-bean-scope>session</managed-bean-scope>
       </managed-bean>
    <navigation-rule>  
        <display-name>viewReport</display-name>  
        <from-view-id>/attend/attendReport.jsp</from-view-id>  
        <navigation-case>  
            <from-action>#{AttendReportBean.attendReport}</from-action>
            <from-outcome>attendReport</from-outcome>  
            <to-view-id>/attend/attendReport.jsp</to-view-id>  
        </navigation-case>  
    </navigation-rule>
    <navigation-rule>  
        <display-name>printReport</display-name>
        <from-view-id>/attend/attendReport.jsp</from-view-id>  
        <navigation-case>  
            <from-outcome>printAttendReportAction</from-outcome>  
            <to-view-id>/attend/printAttendReport.jsp</to-view-id>  
        </navigation-case>  
    </navigation-rule>attendReportPrintAction.jsp
    <f:subview id="printAttendReportSubView" >
    <h:form id="printAttendReportForm" onsubmit="return check222();" >
                                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                  <tr>
                                    <td width="11%">
                                    <table width="70" border="0" cellpadding="0" cellspacing="0">
                                        <tr>
                                          <td width="7" height="28"><img src="../images/B-left.gif" width="7" height="28" /></td>
                                          <td align="center" background="../images/B-bg.gif">
                                            <!--a href="printAttendReport.jsp" class="linksNumBlue" target="_blank" >&#1591;&#1576;&#1575;&#1593;&#1577;</a-->
    <h:commandLink id="printLink" value="&#1591;&#1576;&#1575;&#1593;&#1577;" title="&#1591;&#1576;&#1575;&#1593;&#1577;"  action="#{print_attendReportBean.printAttendReportAction}"   target="_blank"  styleClass="linksNumBlue">
                                        </h:commandLink>
                                            </td>
                                          <td width="7" height="28"><img src="../images/B-right.gif" width="7" height="28" /></td>
                                        </tr>
                                      </table>
                                      </td>
                                    <td align="right"> </td>
                                  </tr>
                                </table>
    </h:form>
    </f:subview>i hope this helps someone

  • Problem with running jsp pages

    Hello everybody,
    I have created a simple jsp page in JBuilder10.
    I have also installed tomcat 5.5.9
    When i run the jsp page, it appears the following error :
    LifecycleException: Protocol handler start failed: java.net.BindException: Address already in use: JVM_Bind:8080
    What can i do in order to view my jsp page in a web browser?

    you can change the address, because the address 8080 has already been used. open the file <CATALINA_HOME>/conf/server.xml , replace all 8080 by other value, like 1234.

  • Problem deploying my jsp pages to the BPEL Server

    Hi,
    I want to invoke a bpel process using a java file that is executed by a jsp page, so I deployed the jsp page and the java file to the bpel server where my bpel processes are, but i get the next error when i execute the jsp page. I use struts to define my pages.
    Please help
    here is the error in the browser:
    500 Internal Server Error
    java.lang.NoClassDefFoundError: com/collaxa/common/util/NonSyncStringWriter     at com.oracle.bpel.client.ClientResources.sanitizeArgs(ClientResources.java:123)     at com.oracle.bpel.client.ClientResources.getString(ClientResources.java:93)     at com.oracle.bpel.client.util.BeanRegistry.lookupDomainManagerBean(BeanRegistry.java:232)     at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:83)     at com.oracle.bpel.client.Locator.<init>(Locator.java:126)     at com.oracle.bpel.client.Locator.<init>(Locator.java:97)     at mypackage2.BpelManager.invokeProcess(BpelManager.java:58)     at mypackage2.ConstanciaTrabajoAction.execute(ConstanciaTrabajoAction.java:45)     at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)     at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)     at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)     at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)     at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:649)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)     at java.lang.Thread.run(Thread.java:534)
    here the strut.config:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
    <action-mappings>
    <action path="/constanciaTrabajoAction" type="mypackage2.ConstanciaTrabajoAction" input="/constanciaTrabajo.jsp" scope="request" validate="true">
    <forward name="OK" path="/exito.jsp"/>
    <forward name="FALLO" path="/fracaso.jsp"/>
    </action>
    </action-mappings>
    <message-resources parameter="mypackage2.ApplicationResources"/>
    </struts-config>
    the jsp file:
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
    <%@ page import="java.util.*"%>
    <%@ page contentType="text/html;charset=windows-1252"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>untitled</title>
    </head>
    <body>
    <html:link action="/constanciaTrabajoAction">Constancia de Trabajo</html:link></body>
    </html>
    here the java files:
    * ConstanciaTrabajoAction.java
    package mypackage2;
    import java.util.Map;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionMapping;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionError;
    import org.apache.struts.action.ActionErrors;
    import java.io.IOException;
    import javax.servlet.ServletException;
    public class ConstanciaTrabajoAction extends Action
    * This is the main action called from the Struts framework.
    * @param mapping The ActionMapping used to select this instance.
    * @param form The optional ActionForm bean for this request.
    * @param request The HTTP Request we are processing.
    * @param response The HTTP Response we are processing.
    * @throws javax.servlet.ServletException
    * @throws java.io.IOException
    * @return
    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
    String xml = "<ConcatRequest xmlns='http://xmlns.oracle.com/Concat'>"
    +"<input><Solicitud><SolicitudData><tipoSolicitud>Constancia Trabajo</tipoSolicitud>"
    +"</SolicitudData><Solicitante><ID>vcuello</ID><Nombre>Veronica</Nombre><Apellido>Cuello"
    +"</Apellido><Email>[email protected]</Email></Solicitante><Supervisor><ID>rperez</ID>"
    +"<Nombre>Roberto</Nombre><Apellido>Perez</Apellido><Email>[email protected]</Email>"
    +"</Supervisor><Gerente><ID>asanchez</ID><Nombre>Alfredo</Nombre> <Apellido>Sanchez</Apellido>"
    +"<Email>[email protected]</Email></Gerente><Datos><Dato><Nombre>dato</Nombre>"
    +"<Valor>valor</Valor></Dato></Datos><exito><notificacionCons>false</notificacionCons>"
    +"<docManager><imprimir>false</imprimir><firmar>false</firmar></docManager></exito></Solicitud>"
    +"</input>"
    + "</ConcatRequest>";
    String oxml = "<ConcatResponse xmlns='http://xmlns.oracle.com/Concat'>"
    + "<result></result>"
    + "</ConcatResponse>";
    BpelManager.invokeProcess("ConstanciaTrabajo","initiate",xml);
    Map res = BpelManager.requestProcess("ConstanciaTrabajo","onResult",oxml);
    return mapping.findForward("OK");
    * [i]BpelManager.java
    package mypackage2;
    import com.oracle.bpel.client.Locator;
    import com.oracle.bpel.client.NormalizedMessage;
    import com.oracle.bpel.client.ServerException;
    import com.oracle.bpel.client.delivery.IDeliveryService;
    import com.oracle.bpel.client.util.WhereCondition;
    import com.oracle.services.bpel.task.ITask;
    import com.oracle.services.bpel.task.IWorklistService;
    import java.util.Map;
    import java.util.Properties;
    public class BpelManager
    static Locator locator = null;
    static String bpelDomain = "default";
    static String bpelDomainPassword = "bpel";
    static String orabpelPlatform = "oc4j_10g";
    static String javaNamingFactoryInitial = "com.evermind.server.rmi.RMIInitialContextFactory";
    static String javaNamingProviderUrl = "ormi://develc15:23791";
    static String javaNamingSecurityPrincipal = "admin";
    static String javaNamingSecurityCredentials = "welcome";
    static String dedicatedRmiContext = "true";
    public static String bpelProcessName = "ConstanciaTrabajo";
    public static void invokeProcess(String processName, String operationName, String sXml)
    try
    Properties props = new java.util.Properties();
    props.setProperty("orabpel.platform",orabpelPlatform);
    props.setProperty("java.naming.factory.initial",javaNamingFactoryInitial);
    props.setProperty("java.naming.provider.url",javaNamingProviderUrl);
    props.setProperty("java.naming.security.principal",javaNamingSecurityPrincipal);
    props.setProperty("java.naming.security.credentials",javaNamingSecurityCredentials);
    props.setProperty("dedicated.rmicontext", dedicatedRmiContext);
    locator = new Locator(bpelDomain,bpelDomainPassword,props);
    /*IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME);
    // construct the normalized message and send to Oracle BPEL Process Manager
    NormalizedMessage nm = new NormalizedMessage( );
    nm.addPart("payload", sXml);
    deliveryService.post(processName, operationName, nm);*/
    } catch (Exception r)
    r.printStackTrace();
    public static Map requestProcess(String processName, String operationName, String sXml)
    try
    IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME);
    //IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
    // construct the normalized message and send to Oracle BPEL Process Manager
    NormalizedMessage nm = new NormalizedMessage( );
    nm.addPart("payload", sXml );
    NormalizedMessage res = deliveryService.request(processName, operationName, nm);
    Map payload = res.getPayload();
    return payload;
    } catch (Exception r)
    r.printStackTrace();
    return null;
    public static ITask[] queryWorklistService(String arg)
    // Lookup the worklist service.
    IWorklistService worklist =
    (IWorklistService)locator.lookupService( IWorklistService.SERVICE_NAME );
    try
    ITask[] tasks = worklist.listTasksByAssignee(arg);
    return tasks;
    } catch (ServerException s)
    s.printStackTrace();
    return null;
    public static ITask[] queryWorklistServiceByCondition(WhereCondition cond)
    // Lookup the worklist service.
    IWorklistService worklist =
    (IWorklistService)locator.lookupService( IWorklistService.SERVICE_NAME );
    try
    ITask[] tasks = worklist.listTasks(cond);
    return tasks;
    } catch (ServerException s)
    s.printStackTrace();
    return null;
    public static void updateTask(ITask task)
    // Lookup the worklist service.
    IWorklistService worklist =
    (IWorklistService)locator.lookupService( IWorklistService.SERVICE_NAME );
    try
    worklist.updateTask(task);
    } catch (ServerException s)
    s.printStackTrace();
    public static void completeTask(ITask task)
    // Lookup the worklist service.
    IWorklistService worklist =
    (IWorklistService)locator.lookupService( IWorklistService.SERVICE_NAME );
    try
    worklist.completeTask(task);
    } catch (ServerException s)
    s.printStackTrace();
    public static ITask lookupTask(String taskId)
    // Lookup the worklist service.
    IWorklistService worklist =
    (IWorklistService)locator.lookupService( IWorklistService.SERVICE_NAME );
    System.out.println("Entro a Cargo tarea");
    try
    ITask task = worklist.lookupTask(taskId);
    System.out.println("Cargo tarea");
    return task;
    } catch (ServerException s)
    System.out.println("La boto");
    s.printStackTrace();
    return null;
    public void setLocator(Locator locator)
    this.locator = locator;
    public Locator getLocator()
    return locator;
    public void setBpelDomain(String bpelDomain)
    this.bpelDomain = bpelDomain;
    public String getBpelDomain()
    return bpelDomain;
    public void setBpelDomainPassword(String bpelDomainPassword)
    this.bpelDomainPassword = bpelDomainPassword;
    public String getBpelDomainPassword()
    return bpelDomainPassword;
    public void setOrabpelPlatform(String orabpelPlatform)
    this.orabpelPlatform = orabpelPlatform;
    public String getOrabpelPlatform()
    return orabpelPlatform;
    public void setJavaNamingFactoryInitial(String javaNamingFactoryInitial)
    this.javaNamingFactoryInitial = javaNamingFactoryInitial;
    public String getJavaNamingFactoryInitial()
    return javaNamingFactoryInitial;
    public void setJavaNamingProviderUrl(String javaNamingProviderUrl)
    this.javaNamingProviderUrl = javaNamingProviderUrl;
    public String getJavaNamingProviderUrl()
    return javaNamingProviderUrl;
    public void setJavaNamingSecurityPrincipal(String javaNamingSecurityPrincipal)
    this.javaNamingSecurityPrincipal = javaNamingSecurityPrincipal;
    public String getJavaNamingSecurityPrincipal()
    return javaNamingSecurityPrincipal;
    public void setJavaNamingSecurityCredentials(String javaNamingSecurityCredentials)
    this.javaNamingSecurityCredentials = javaNamingSecurityCredentials;
    public String getJavaNamingSecurityCredentials()
    return javaNamingSecurityCredentials;
    public void setDedicatedRmiContext(String dedicatedRmiContext)
    this.dedicatedRmiContext = dedicatedRmiContext;
    public String getDedicatedRmiContext()
    return dedicatedRmiContext;
    public void setBpelProcessName(String bpelProcessName)
    this.bpelProcessName = bpelProcessName;
    public String getBpelProcessName()
    return bpelProcessName;
    }

    hi,
    I fix it, thanx
    static Locator locator = null;
    // public static IWorklistService worklist = null;
    static String bpelDomain = "default";
    static String bpelDomainPassword = "bpel";
    static String orabpelPlatform = "oc4j_10g";
    static String javaNamingFactoryInitial = "com.evermind.server.rmi.RMIInitialContextFactory";
    static String javaNamingProviderUrl = "ormi://myserver:23791/orabpel"; /*this was wrong
    static String javaNamingSecurityPrincipal = "admin";
    static String javaNamingSecurityCredentials = "welcome";
    static String dedicatedRmiContext = "true";
    static{
    try{
    Properties props = new java.util.Properties();
    props.setProperty("orabpel.platform",orabpelPlatform);
    props.setProperty("java.naming.factory.initial",javaNamingFactoryInitial);
    props.setProperty("java.naming.provider.url",javaNamingProviderUrl);
    props.setProperty("java.naming.security.principal",javaNamingSecurityPrincipal);
    props.setProperty("java.naming.security.credentials",javaNamingSecurityCredentials);
    props.setProperty("dedicated.rmicontext", dedicatedRmiContext);
    locator = new Locator(bpelDomain, bpelDomainPassword, props);
    } catch (ServerException se){se.printStackTrace();}
    }

  • Problem in Reloading JSP Page

    I am having list of users in parent window(1st JSP Page), user selects one user and presses edit button, the details of the selected user is populated in the pop-up window (using java script), now user modifies the details and presses the save button and i am fwd to parent window(child window is closed), now the details are saving in the database but the parent page is not displaying the updated user details. i am using struts to pass data from jsp to db. Even i used System.out.println statement in the user display loop(parent jsp page), the updated details is printing, but it is not shown in the web page.
    Sabarish R L

    Hi,
    This is because ur page is not refreshed.
    After updating database when u coming back to ActionClass, you can invoke mapping which refreshed ur JSP (means call a mapping which invoke ur JSP again but remember do not hit the database again it will reduce programe efficiency).

  • I have problem in my jsp page

    <%@ page import="beans.FormuBean" %>
    <jsp:useBean id="formu" class="beans.FormuBean" />
    <% FormuBean[] fbOnForm= (FormuBean[])request.getAttribute("fbDataToForm"); %>
    <html>
    <head>
    </head>
    <body>
         <%
              formu= (beans.FormuBean)pageContext.findAttribute("formu");
              for (int i=0; i<fbOnForm.length; i++){
              formu=fbOnForm;
              out.println (formu.getIdSeccion());
    out.println (formu.getDNombreSeccion())
         %>
    <jsp:getProperty name="formu" property="idSeccion" />
    <jsp:getProperty name="formu" property="DNombreSeccion" />
    <%}%>
    </body>
    </html>
    My problem is: the info into <%...%> is well, but the info in <jsp:getProperty...> is wrong. That info is how create a new object "formu" (whit the same name) but inicializate a default constructor!!
    Sorry for my english, I from Spain...
    Thanks

    Coding<jsp:useBean id="formu" class="beans.FormuBean" />is equivalent to:<%
    beans.FormuBean formu = (beans.FormuBean) pageContext.getAttribute("formu");
    if (formu == null) {
         formu = new beans.FormuBean();
         pageContext.setAttribute("formu", formu);
    %>Coding<jsp:getProperty name="formu" property="idSeccion" />is equivalent to:
    <%
    formu = (beans.FormuBean) pageContext.getAttribute("formu");
    out.println(formu.getIdSeccion());
    %>jsp:getProperty retrieves the reference from the "formu" attribute which is why is does not give you what you want. Either save the new reference or don't use jsp:useBean and getProperty.
    e.g.
    <%@ page import="beans.FormuBean" %>
    <jsp:useBean id="formu" class="beans.FormuBean" />
    <% FormuBean[] fbOnForm= (FormuBean[])request.getAttribute("fbDataToForm"); %>
    <html>
    <head>
    </head>
    <body>
    <%
    for (int i=0; i<fbOnForm.length; i++){
        formu=fbOnForm;
    out.println (formu.getIdSeccion());
    out.println (formu.getDNombreSeccion())
    pageContext.setAttribute("formu", formu); // save new reference as attribute for getProperty
    %>
    <jsp:getProperty name="formu" property="idSeccion" />
    <jsp:getProperty name="formu" property="DNombreSeccion" />
    <%}%>
    </body>
    </html>

  • Problem with creating Edit page for employees , based on otn tutorial

    Hi
    Thank you for reading my post
    I used one of oracle tutorial and create a jsf page which contain a for for departments
    and a table for employeed ( I used visual and declarative development with oracle jdeveloper)
    Now i want to add an edit page to my jsf project which allow me to edit an employee
    to do this : I add a jsf page , I add editing form (the edit form work well , I mean which i change the data and press submit it change the data in database)
    now the problem is that i want to link this two page
    in a manner that when user select an employee from table and pressed edit button ,
    it shows edit page with that employee as "under edit" employee
    here is the link that i used to learn this stuff.
    http://www.oracle.com/technology/products/jdev/viewlets/1013/jdev_overview_xp_viewlet_swf.html
    Thanks

    Basically you create a JSF Page Navigation diagram and drag on you customerList page and your Edit Customer page. Add an "arrow" to link the two pages and name this arrow EDIT.
    Then drop a button onto the CustomerList page and the ACTION property will not have a drop down list and you select EDIT (which is the name of the arrow you created).
    Simple steps available using the workshop on the right hand side of the page
    otn.oracle.com/formsdesignerj2ee
    Regards
    Grant Ronald

  • Problem in calling JSP page from a servlet

    can anyone please tell me how to call a JSP from servlet?
    My code is:
    ServletContext sc = this.getServletContext();
                                                 RequestDispatcher rd = sc.getRequestDispatcher("./Welcome.jsp");
                                                 if (rd !=null)
                                                      try
                                                           rd.forward(req, res);
                                                      catch (Exception e)
                                                           sc.log("---------------Problem invoking JSP.------------------", e);
    I n the browser when i call this servlet it gives error-404.
    NOT Found.
    please help.

    I would try to change "./Welcome.jsp" to "/Welcome.jsp". I'm not sure what that period will do.
    Are you able to access that JSP directly from your browser (even if it's not designed to be accessed that way)? If not, then you have some other problem.
    When you say you get a 404 when you access the servlet, is that when you access the servlet, or when it tries to forward to the JSP? If you get the 404 when you access the servlet, perhaps your servlet-mapping to the servlet is invalid.

  • Problem in displaying jsp page

    I read a tutorial and followed their instrction where the first step is to install a server so I installed the Blazix server.
    I then put this following jsp file in the c:\blazix\webfiles and named it as hello.jsp.
    I first ran the server and then open that file where it shows :
    Hello ! The time is now
    <html>
    <body>
    <%@ page import="java.util.*" %>
    <HTML>
    <BODY>
    <%!
        Date theDate = new Date();
    %>
    Hello!  The time is now <%= theDate %>
    </BODY>
    </HTML>

    if by apache you mean Tomcat then its a good idea to start with that one.
    http://jakarta.apache.org/tomcat/index.html

  • Dynamically  creating jsp page fields

    HI
    i have one jsp with enter id then click go button.
    when the user click go button i have to display the details like name,address from the back end to same jsp.
    i am using the struts frame work
    please help.

    Help you with what? You are only saying that you have a requirement and that you need to use struts. What exactly do you have a problem with? If it's the fact that you don't know much about struts, then you need to help yourself by learning to use it.

Maybe you are looking for