In .java add elements to .jsp

Hello!
I'm just beginning and can't understand one thing:
When I create JSPDynPage, system create JSP and JAVA file - it's clear. Then I add elements to form in JSP, for example, Layout.
Can I add, for example, row into that Layout in .java file?
    .JSP:
<hbj:form>
         <hbj:formLayout
             id="myLayout"
             width="100%">
             <hbj:formLayoutRow
                     id="Row1">
                     <hbj:formLayoutCell
                             id="Cell11"
                             align="LEFT"
                             width="100%">                
                             <hbj:textView
                                 id="welcome_message"
                                 text="May the force be with you unknown user"
                                 design="HEADER1" />
                       </hbj:formLayoutCell>
               </hbj:formLayoutRow>                      
           </hbj:formLayout>            
    </hbj:form>
.JAVA:
public void doProcessBeforeOutput() throws PageException {
         this.setJspName("myjsp.jsp");
      Form Reg_Form = null;
      FormLayout RF_All  = new FormLayout();
      Tray Left_Tray1 = new Tray("TrayRules1");
       Reg_Form = (Form)this.getForm();
       RF_All = (FormLayout) this.getComponentByName("myLayout");
       for (int i = 1; i <= 3; i++ ) {     RF_All.addRow(); }
       Left_Tray1.setTitle("Sample Title");
       Left_Tray1.setWidth("100%");
       TextView Left_Tray1_text = new TextView("Left_Tray1_text");
       Left_Tray1_text.setText("Sample Text");
       Left_Tray1_text.setEncode(false);
       Left_Tray1_text.setWrapping(true);
       Left_Tray1.addComponent(Left_Tray1_text);
       RF_All.addComponent(2,1, Left_Tray1);
       Reg_Form.addComponent(RF_All);
That code don't display Tray in page...

Paul,
I suggest you  not to add the your business logic in that auto generated file.
Instead you can have seperate java file or any Bean.
Since you are writing the logic for layout you can add the code in the jsp file
itself.
If you are using HTMLB Then keep the auto generated code in the jsp otherwise remove the code and keep the file as jsp meaning you use the html, javascript,
jsp code in the .jsp file itself.
you can add the java code in the jsp
<% String strName = "SAP"; %>
<sc ript>
al ert("<%=strName%>");
</sc ript>
Ram

Similar Messages

  • Java.lang.ClassCastException in JSP page

    My JSP page:
    <%@page contentType="text/html"%>
    <HTML>
    <HEAD>
    <TITLE> JDBC Servlet/JSP Example </TITLE>
    </HEAD>
    <BODY>
    <%@ page import="myBeans.memoryBean" %>
    <%@ page import="java.util.Vector" %>
    <H1> JDBC Servlet/JSP Example </H1>
    <H2> <%= session.getValue("message") %>
    </H2>
    <UL>
    <%
         Vector vData = (Vector) session.getValue("res");
         myBeans.memoryBean mb;
         Object o;
         for (Enumeration e = vData.elements() ; e.hasMoreElements() ;) {
              o = e.nextElement();
              mb = (myBeans.memoryBean) o;
    %>
        <LI> <%= o.getClass().getName() %>
    <%      } // end for
    %>
    </UL>
    </BODY>
    </HTML>Notice that I don't even use the object I cast but I still get the error message:
    Exception:
    java.lang.ClassCastException
         at _memory._search._jspService(_search.java:66)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java)
         at oracle.jsp.JspServlet.internalService(JspServlet.java)
         at oracle.jsp.JspServlet.service(JspServlet.java)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:314)
         at org.apache.jserv.JServConnection.run(JServConnection.java:188)
         at java.lang.Thread.run(Thread.java:534)When I comment out the line that castes my object my browser displays:
    JDBC Servlet/JSP Example
    Records Found:
        * myBeans.memoryBean
        * myBeans.memoryBean
        * myBeans.memoryBean Notice that the three objects that are returned are exactly the type that I caste to.
    Also, I did a getClass().getClassLoader() when I create the objects in my servlet code and again on the JSP pages for each object I pull out of the vector and the class loader matched.
    I even changed the package on my bean class and recompiled everything to make sure it wasn't a old .class file floating around.
    Could this have something to do with my classpath or where my classes are being placed? I found a similar problem here: http://forum.java.sun.com/thread.jsp?forum=33&thread=380437&start=0&range=15&hilite=false&q=
    but the explanation of what was done wasn't clear
    Anyone have any idea what's going on here?
    I am using:
    Oracle 9i
    Oracle HTTP Server Powered by Apache/1.3.12 (Unix)
    ApacheJServ/1.1
    Thanks in advance.
    - Linus

    Is ti at all possible that you have another jar / zip file with the same class file in it, seemingly away from the Server classpath ? In which case this could happen even though logically it shouldn't !!!

  • How can i  apply this  java program for  a jsp page?

    import java.io.*;
    import java.util.*;
    public class FileProcessing
      //create a vector container  for the input variables
         Vector variables = new Vector();
      //create a vector container for the constants
         Vector constants = new Vector();
      /*create a string expression container for the equation
         as read from the file */
         String expression = " ";
      //create double result container for the final result
         double result = 0;
         public boolean processFile(String filename,String delim)
          //index for values vector
              int num_values = 0;
          //index for constants vector
              int num_constants = 0;
          //current line being read from the external file.
              String curline = " ";
          //start reading from the external file
              try
                   FileReader fr = new FileReader(filename);
                   BufferedReader br = new BufferedReader(fr);
                   while(true)
                        curline = br.readLine();
                        if(curline == null)
                             break;
                    //determine the type of current interaction
                        boolean variable = curline.startsWith("input");
                        boolean constant = curline.startsWith("constant");
                        boolean equation = curline.startsWith("equation");
                        boolean output = curline.startsWith("result");
                   //on input variables
                        if(variable)
                          StringTokenizer st = new StringTokenizer(curline,delim);
                          int num = st.countTokens();
                          int count=0;
                          while(st.hasMoreTokens())
                               String temp = st.nextToken();
                               if(count==1)
                                    byte b[]= new byte[100];
                                    System.out.println(temp);
                                    System.in.read(b);
                                    String inputval = (new String(b)).trim();
                                    variables.add(num_values,inputval);
                                    num_values++;
                               count++;
                        // on constant values
                        if(constant)
                             StringTokenizer st = new StringTokenizer(curline,delim);
                             int num = st.countTokens();
                             int count = 0;
                             while(st.hasMoreTokens())
                                  String temp = st.nextToken();
                                  if(count==1)
                                       byte b[]= new byte[100];
                                       System.out.println(temp);
                                       System.in.read(b);
                                       String cons = (new String(b)).trim();
                                       constants.add(num_constants,cons);
                                       num_constants++;
                                  count++;
                        // on equation
                        if(equation)
                             StringTokenizer st = new StringTokenizer(curline,delim);
                             int num = st.countTokens();
                             int count = 0;
                             while(st.hasMoreTokens())
                                  String temp = st.nextToken();
                                  if(count==2)
                                       this.expression = temp;
                                  count++;
              // now we are ready to evaluate the expression
                       if(output)
                          org.nfunk.jep.JEP  myparser= new org.nfunk.jep.JEP();
                          myparser.setAllowAssignment(true);
                          for(int i=1;i<variables.size()+1;i++)
                             String name = "arg"+Integer.toString(i);
                             myparser.addVariable(name,new Double(variables.get(i-1)
                                                .toString()).doubleValue());
                          for(int i=1;i<constants.size()+1;i++)
                               String name = "arg" +Integer.
                                         toString(i+variables.size());
                               myparser.addConstant(name,new Double(constants.get(i-1).toString()));
                   //output is obtained as follows
                          myparser.parseExpression(expression);
                          result = myparser.getValue();
                          System.out.println("Assay value: "+result);
              catch(Exception e)
                   System.out.println(e.toString());
              return true;
         public static void main(String[] args)
              FileProcessing fp = new FileProcessing();
              fp.processFile("input.eqn",":");
    }//my text file name is: "input.eqn" (given below)
    input:Enter Value1:arg1
    input:Enter Value2:arg2
    input:Enter Value3:arg3
    constant:arg4
    constant:arg5
    Equation:arg1+arg2+arg3
    result:

    how can i apply this java program for a jsp pagewhy do you want to do this ?
    Your program reads from a file on the disk and formats based on a patterm.
    Jsp is not intended for such stuff.
    ram.

  • Passing a variable from Javascript to java variable in a JSP.

    Here is simple test Ive been messing around with.
    How do I assign the value that was selected in the radio button to a java variable in my JSP here. Javascript being client side and JSPs being serverside makes this difficult.
    <html>
    <head>
    <SCRIPT LANGUAGE="JavaScript">
    function valbutton(thisform)
         myOption = -1;
         for (i=0; i<thisform.myradiobutton.length; i++)
              if (thisform.myradiobutton.checked)
                   myOption = i;
         if (myOption == -1)
              alert("You must select a radio button");
              return false;
         alert("You selected button number " + myOption + " which has a value of " + thisform.myradiobutton[myOption].value);
         thisform.submit();
    </SCRIPT>
    <title>CreateCategoryContent</title>
    </head>
    <body>
    <BR>
    <center>
    <%
         for(int i = 0; i < 10; i++)
    %>
    <form name="myform">
    <table border="1" bordercolor="#C0C0C0" width="50%" cellpadding="0" cellspacing="0" bgcolor="white">
         <tr>
         <td><%=i%><input type="radio" VALUE="<%=i%>" name="myradiobutton"></td>
         </tr>
    <%
    %>
    </form>
    <input type="submit" name="submitit" onclick="valbutton(myform);return false;" value="Validate" />
    </table>
    </center>
    <!--//T2-->
    </body>
    </html>
    Thanks dudes.

    Please excuse me for appearing dim but my JSP skills are rather weak.
    I dynamically create rows in a table from an Iterator. If the mainTopic is news then I need a third column to appear with radio buttons. I have all this done. When a radio button is selected and the UPLOAD button is selected I need to know which of the values in the table was selected.
    When I ran the test below the selected value was null. Can you help me?
    Thanks.
    <%@ page session="false" %>
    // imports etc
    <%@ page errorPage="../com/digisoft/common/Error.jsp" %>
    <html>
    <head>
    <SCRIPT LANGUAGE="JavaScript">
    function valbutton(thisform)
         myOption = -1;
         for (i=0; i<thisform.myradiobutton.length; i++)
              if (thisform.myradiobutton.checked)
                   myOption = i;
         if (myOption == -1)
              alert("You must select a radio button");
              return false;
         alert("You selected button number " + myOption + " which has a value of " + thisform.myradiobutton[myOption].value);
    thisform.selected.value=thisform.myradiobutton[myOption].value;
         thisform.submit();
    </SCRIPT>
    <title>CreateCategoryContent</title>
    <LINK REL="stylesheet" HREF="<%=request.getContextPath() + "/stylesheets/digihostnews.css"%>" TYPE="text/css">
    <%
    HttpSession session = request.getSession(false);
    String mainTopic = request.getParameter("mainTopic");
    String subCategory = request.getParameter("subCategory");
    String subCategoryId = request.getParameter("subCategoryId");
    String subCategoryToBeDeleted = request.getParameter("subCategoryToBeDeleted");
    String selection = request.getParameter("selection");
    // other initializations etc
    %>
    </head>
    <body>
    <BR>
    <!--Another table-->
    <center>
    <table border="1" bordercolor="#C0C0C0" width="90%" cellpadding="0" cellspacing="0" bgcolor="white">
         <tr>
              <td class="blue">Select Topic</td>
         </tr>
         <tr>
         <td class="insidebox2">
         <BR>
              <form action="NewsUpdate.jsp" method=post>
              Select Topic
              <select NAME="mainTopic" class="dropdown">
              <%
                   Iterator menuItems = myLombardiaMgr.getMainCategories();
                   while(menuItems.hasNext())
                        MainCategory aMenuItemCategory = (MainCategory)menuItems.next();
                        String menuItem = aMenuItemCategory.getMainCategory();     
                        if(!menuItem.equalsIgnoreCase(mainTopic))
              %>
                        <option VALUE="<%= menuItem %>" ><%= menuItem %></option>
              <%
                        else
              %>
                        <option SELECTED VALUE="<%= menuItem %>" ><%= menuItem %></option>
              <%
              %>
         </select>
         <INPUT type=submit class="newsbutton" value="LOAD" name=Submit>
    </form>
    <form action="AddCategoryDescription.jsp" method=post>
    <INPUT TYPE=HIDDEN NAME="mainTopic" VALUE="<%=mainTopic%>">
    <INPUT type=submit class="newsbuttonlong" value="EDIT DESCRIPTION" name=Submit>
    </form>
    </td>
    </tr>
    </table>
    </center>
    <!--//Another table-->
    <!--T2-->
    <center>
    <table border="1" bordercolor="#C0C0C0" width="90%" cellpadding="0" cellspacing="0" bgcolor="white">
         <tr><td class="blue">Categories</td></tr>
         <tr>
              <td class="insidebox2">
              <BR>
              <form action="NewsUpdate.jsp" method=post>
                   Add Category
                   <input type="text" name="subCategory" class="dropdown" id="catId" value=""/>
                   <INPUT TYPE=HIDDEN NAME="mainTopic" VALUE="<%=mainTopic%>">
                   <%      
                   if (mainTopic != null)
                        %>
                        <INPUT type=submit class="newsbutton" value="ADD" name=Submit>
                   <%
                   else
              %>
                   <INPUT type=submit class="newsbutton" value="ADD" name=Submit disabled>
                   <%
                   %>
              </form>
                   <!--T3-->
         <table id="categoryTable" border="1" bordercolor="#035C98" width="60%" height="60%" cellpadding="0" cellspacing="0" bgcolor="white">
         <tr>
         <td colspan="1" class="result"><b>Category Name</b></td>
         <td colspan="1" class="result"><b></b></td>
         </tr>
    <%
              if(myApplicationDetails != null)
                   myApplicationDetails = myLombardiaMgr.getAllApplicationDetails();
                   Iterator myMainCategories = myApplicationDetails.getMainCategories();
              while(myMainCategories.hasNext())
                   MainCategory aMainCategory = (MainCategory) myMainCategories.next();
                   if(aMainCategory.getMainCategory().equalsIgnoreCase(mainTopic))
                        Iterator subTopics = aMainCategory.getSubTopics();
                        while(subTopics.hasNext())
                             SubTopic aSubTopic = (SubTopic) subTopics.next();
                   %>
                        <form action="NewsUpdate.jsp" method=post>
                             <tr>
                             <td class="result"><%=aSubTopic%></td>
                             <td class="result">
                                  <INPUT type=submit class="newsbutton" value="REMOVE" name=Submit>
                                  <INPUT TYPE=HIDDEN NAME="subCategoryId" VALUE="<%=aSubTopic.getId()%>">
                                  <INPUT TYPE=HIDDEN NAME="subCategoryToBeDeleted" VALUE="<%=aSubTopic%>">
                                  <INPUT TYPE=HIDDEN NAME="mainTopic" VALUE="<%=mainTopic%>">
                                  <INPUT TYPE=HIDDEN NAME="subCategory" VALUE="<%=aSubTopic%>">
                             </form>
                        <form action="EditStoryItem.jsp" method=post>
                             <INPUT TYPE=HIDDEN NAME="subCategory" VALUE="<%=aSubTopic%>">
                                  <INPUT TYPE=HIDDEN NAME="subCategoryId" VALUE="<%=aSubTopic.getId()%>">
                                  <INPUT TYPE=HIDDEN NAME="mainTopic" VALUE="<%=mainTopic%>">
                                  <INPUT type=submit class="newsbutton" value="EDIT" name=Submit>
                             </form>
                             <%
                                  if(mainTopic.equalsIgnoreCase("News"))
                             %>
                                  <td class="result">
                                       <INPUT type="radio" name="newsitem" VALUE="<%=aSubTopic%>" >
                                       <INPUT TYPE=HIDDEN onclick="valbutton(myform);return false;" NAME="selection" >
                                  </td>
                             <%
                             %>
                   </td>
                             </DL>
                                  </tr>
                        <%
                             } // end of if
                        %>
         </table>
         <table border="0" bordercolor="#C0C0C0" width="60%" cellpadding="0" cellspacing="0" bgcolor="white">
         <tr><td align="right">
         <form action="../../../../../../servlet/UploadXmlFiles" method=post>
         <% if(myApplicationDetails == null )
         System.out.println("******************* selection "+selection);
    %>
              <INPUT type=submit class="newsbutton" value="UPLOAD" name=Submit disabled>
    <%
         else
    %>
    <INPUT type=submit class="newsbutton" value="UPLOAD" name=Submit>
    <%
         System.out.println("******************* selection "+selection);
    %>
         </form>
         </td>
         </tr>
         </table>
         <!--//T3-->
         </td>
         </tr>
    </table>
    </center>
    <!--//T2-->
    </body>
    </html>

  • Invoke Java 3d from a JSP?

    Hi,
    I have a sample java code that invokes a Canvas3d and then invokes a 3D object.
    Our project goal is to create an online application-- A JSP page which will invoke the java 3d object.
    I am working on Oracle JDeveloper and OC4J server.
    Currently , the application runs thru a .java file.
    I want to know if it is technically possible to create a jsp page and transfer the 3d object generated by this java file onto the JSP?
    I tried renaming the main method of the java file to say testMain (made it static method).
    Then thru the JSP , i tried to call this testMain method.
    It doesnt work.
    thanks

    HI
    I was able to add a canvas3D to a webbrowser via an applet. I suppose you can always invoke an applet from a JSP.
    Venkat

  • Help on "java.lang.NoClassDefFoundError: oracle/jsp/runtimev2/JspReportUtil"

    Hi all,
    I encounted the following exception on a deployed project to ias 9.0.2:
    500 Internal Server Error
    java.lang.NoClassDefFoundError: oracle/jsp/runtimev2/JspReportUtil     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:333)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)     at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java(Compiled Code))     at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java(Compiled Code))     at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java(Compiled Code))     at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.include(ServletRequestDispatcher.java:108)     at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.EvermindPageContext.handlePageThrowable(EvermindPageContext.java:596)     at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.EvermindPageContext.handlePageException(EvermindPageContext.java:567)     at data.lookjjview._jspService(_lookjjview.java(Compiled Code))     at com.orionserver[Oracle9iAS (9.0.2.0.0) Containers for J2EE].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:302)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:407)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:330)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)     at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java(Compiled Code))     at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java(Compiled Code))     at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java(Compiled Code))     at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java(Compiled Code))     at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java(Compiled Code))     at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.AJPRequestHandler.run(AJPRequestHandler.java:151)     at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].util.ThreadPoolThread.run(ThreadPoolThread.java(Compiled Code))
    I found there is leak of memory resource on the Oracle RDBMS host while this problem occurs,the database host has only 512Mb RAM.And I once configred the database to worked on Shared Mode,in this case the database has less chance of memory leak,but the above exception occurs more often.So I have to change the database to work back on Dedicate Mode!It's hard to find any tips on my Exception as mentioned above.
    And I want to know the working principle of servlet on iAS.When invoke a servlet,will the servlet be cached on Memory from the first request,or it will be clear up and re-inload until next request?I just wonder if the iAS server will run out of memory,because I noticed there is a memory configure option in "jser.properties" file.And the exception I encoutered seems to occur at a critical point.

    Thanks but that did help since they are talking about
    JDK1.3. I downloaded J2SDK-Beta 3 it says that you
    don't need to set a class path variable. You need to be careful about how you interpret this statement. The rule is, if your system doesn't have a classpath set, you'll get a default of the current directory (.). If your system does have a classpath setting, then the setting will be used.
    Just because you didn't set your classpath doesn't mean someone or some other application didn't. Make sure that your system doesn't have a classpath setting. If it does, you may need to add the current directory (.) to it.

  • Dynamicall add element in Drop Down

    There is one for in which drop down list is present. I want to add element dynamicall into drop down list when certain event is occur

    trigger a Java script function at the end of the event which will
    add date into the combobox.

  • The element type jsp:useBean must be terminated by the matching end-tag

    Hi, I have deployed an application under WLS 8.1 SP4 and I get this error, when I try to access a page. I searched through the BEA site and it does refer to solution id S-13709 which says issue has been fixed in WLS 7.0. Hence should I not be seeing this error?
              java.io.IOException: javax.servlet.jsp.JspException: The taglib validator rejected the page: "org.xml.sax.SAXParseException: The element type "jsp:useBean" must be terminated by the matching end-tag "</jsp:useBean>"., "

    It would be useful if you provided a little more information about what you're trying to do on your JSP page. For instance, are you using an include directive or include action on the page? Are you trying to start the "jsp:useBean" element in one file, and end it in another? That, in particular, would likely be rejected.

  • Can't create dynamic html elements with jsp????? important

    Hi All,
    I am having problem creating dynamic html elements with jsp tags, i have tried to use EL and java scriplet, both of them don't work.
    i am trying to create dynamic menu in my "rightMenu.jspf", based on, if user has logged in or not.
    some like this!
    <jsp:if test ="${validUser == null}">
    some simple text menu here
    </jsp:if>
    but it is not working. it simply loading all and images with in statement, regardless of whether user has logged in or not. i think some how if statement is not working properly.
    "validUser" is a session bean, which is not creating at this point, it will created when user will log in successfully. and also this session bean does not exist at the page, where i am trying to check that .
    Is there any way to create dynamic values in jsp. It is really important, is there any body who help me in this matter. i would be really grateful.
    zaman

    hi jaspre,
    thanks for replying me. you know what, is it not something wrong with web.xml file. i remember once, i deleted some from there, a property with "*.jsp". i can't remember what exactly was it though.
    all if statements works on files ending with extension ".jsp" but don't work only on with extension ".jspf". there must be to do with this.
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <servlet>
    <servlet-name>ValidateServlet</servlet-name>
    <servlet-class>ValidateServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>ValidateServlet</servlet-name>
    <url-pattern>/ValidateServlet</url-pattern>
    </servlet-mapping>
    <servlet>
    <servlet-name>dwr-invoker</servlet-name>
    <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
    <init-param>
    <param-name>debug</param-name>
    <param-value>true</param-value>
    </init-param>
    <init-param>
    <param-name>pollAndCometEnabled</param-name>
    <param-value>true</param-value>
    </init-param>
    </servlet>
    <servlet-mapping>
    <servlet-name>dwr-invoker</servlet-name>
    <url-pattern>/dwr/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
         <welcome-file>
    main.jsp
    </welcome-file>
    </welcome-file-list>
    </web-app>
    if any one can figure it out. i would be grateful.
    zaman

  • ContextException : cannot bind or add element

    Hi all,
    I can't find an answer to my problem.
    Hope you'll be able to
    Here are the facts :
    Context :
    I'm currently creating a TeamViewer for Managers to be able to select the employees they manage.
    For that, I have a table which lists them all, displaying their infos in specific columns.
    Both columns and data are dynamic and are specified in the SAP back end.
    I use the following bapis to get these informations :
    - HRWPC_RFC_GET_COL_INFO (returns columns informations)
    - HRWPC_RFC_GET_OBJECTS (returns employees personal numbers -> pernr)
    Fact is the second one doesn't return as much informations as needed.
    So I have then to call a third bapi :
    - MYBAPI_USER_INFOS (return informations about an employee)
    which, from an employee pernr, returns a lot more informations about him.
    Fact is I manage to use efficiently both first bapis, so I get columns and pernr data.
    Then I would like to get in a context node the list of enhanced informations of the employees, which is mapped to my view context and applied to a dynamic table.
    My problem :
    While adding programmaticaly the columns to my context node, I get the following exception : "com.sap.tc.webdynpro.progmodel.context.ContextException: Node(TeamViewerApp.MainViewColumns): cannot bind or add element, because it is already bound to a node" error.
    Error summary :
    - com.sap.tc.webdynpro.progmodel.context.ContextException: Node(TeamViewerApp.MainViewColumns): cannot bind or add element, because it is already bound to a node
    -- at com.sap.tc.webdynpro.progmodel.context.Node.prepareAddElement(Node.java:649)
    -- at com.sap.tc.webdynpro.progmodel.context.Node.addElement(Node.java:635)
    -- at com.airfrance.tv1.teamviewer.components.TeamViewerApp.updateMainView(*TeamViewerApp.java:560*)
    -- at com.airfrance.tv1.teamviewer.components.wdp.InternalTeamViewerApp.updateMainView(InternalTeamViewerApp.java:534)
    -- at com.airfrance.tv1.teamviewer.components.views.TeamViewerView.onActionChangeView(TeamViewerView.java:197)
    TeamViewerComp code :
         wdThis.getColumnsMainView(viewId, userLanguage, userId); // get the columns infos
         IGetColumns_ResultNode columns = wdContext.nodeGetColumns_Result();
         for(int i=0; i<columns.size(); i++) {
              IWDNodeElement column = columns.getElementAt(i); // get the #i column
              wdContext.nodeMainViewColumns().addElement(column);  +//add this column to my other context +
    My context :
    Component
    - GetColumns (Model)
    -- GetColumns_Output
    --- GetColumns_Result
    Colname
    Heading
    -- Langu
    -- Uname
    -- Viewid
    - MainViewColumns (Value)
    -- lot of infos
    - SubViewColumns (Value)
    -- lot of infos
    My environment :
    - os : Windows XP SP2
    - procesor : 3GHz
    - memory : 3Gb
    - ide : SAP NWDS 7.0.12
    - server JEE : 7.00 SP12
    - server VM : Java Sun 1.4.2_12
    Any help will be really appreciated
    Thank you for your time!
    Alphonse

    HI,
    com.sap.tc.webdynpro.progmodel.context.ContextException: Node(HrChiefRedressalView.Ctx_FilteredOutput): cannot bind or add element, because it is already bound to a node
    Try to bind or add element from the source of the node instead of mapped one.
    Ex:
    Controller->View
    If your node is mapped from controller to view. bind/add element should be done at controller level not at view level.
    Regards
    Ayyapparaj

  • Error while installing the java add-on on abap system

    Dear All,
    We are trying to install java add-on with EP on present ABAP system, but getting struck up with error as below at creating java users (sapjsf) in central instance installation phase.
    ENVIRONMENT:
    ECC6.0
    WIN 2003
    KERNEL 136
    SUPPORT PACK LEVEL AT 13
    NETWEAVER 2004S SR1.
    DB- ORACLE
    error: ( usercheck.log)
    java.lang.NoClassDefFoundError: com/sun/tools/javac/Main
    Exception in thread "main" Reserved 1610612736 (0x60000000) bytes before loading DLLs.
    Critical Error
    Launching program failed
    -> Internal program error (rc = -1)
    error: (sapinst.log)
    WARNING 2008-08-11 15:00:00
    Execution of the command "C:\usr\sap\B60\DVEBMGS00\exe\jlaunch.exe UserCheck.jlaunch com.sap.security.tools.UserCheck "C:\Program Files\sapinst_instdir\ERP\LM\AS-JAVA\ADDIN\ORA\CENTRAL\CI\install\lib;C:\Program Files\sapinst_instdir\ERP\LM\AS-JAVA\ADDIN\ORA\CENTRAL\CI\install\sharedlib;C:\Program Files\sapinst_instdir\ERP\LM\AS-JAVA\ADDIN\ORA\CENTRAL\CI\install" -c sysnr=00 -c ashost=sapserver -c client=001 -c user=DDIC -c XXXXXX -a checkCreate -u SAPJSF -p XXXXXX -r SAP_BC_JSF_COMMUNICATION_RO -message_file UserCheck.message" finished with return code -1. Output:
    java.lang.NoClassDefFoundError: com/sun/tools/javac/Main
    Exception in thread "main" Reserved 1610612736 (0x60000000) bytes before loading DLLs.
    Critical Error
    Launching program failed
    -> Internal program error (rc = -1)
    INFO 2008-08-11 15:00:00
    Removing file C:\Program Files\sapinst_instdir\ERP\LM\AS-JAVA\ADDIN\ORA\CENTRAL\CI\dev_UserCheck.
    ERROR 2008-08-11 15:00:00
    CJS-30197  . For more details see output of logfile:
    ERROR 2008-08-11 15:00:00
    FCO-00011  The step createJSF with step key |NW_Addin_CI|ind|ind|ind|ind|0|0|NW_CI_Instance|ind|ind|ind|ind|8|0|NW_CI_Instance_Doublestack|ind|ind|ind|ind|2|0|createJSF was executed with status ERROR .
    Please help us out at your earliest convenience.
    Thanks and warm regards,

    Dear Samrat Dangeti ,
    Thanks.
    Inst version:   701.
    JDK version:  1.4.2_13
    Regards,

  • BI 7.0 Java Add-on installation hangs

    Hi Guru's
    While doing upgrade of BW 3.5 (Netweaver 2004) to BI 7.0 (Netweaver 2004s) during Java Add-on installation at "Database Instance Java Add-in" phase the installation hang on "Import Java dump" phase.
    I have tried to kill and restart the installation 2-3 times and restarting the complete installation once again it stops at the same phase. Kindly let me know what can be the reason because we have not face this issue in DEV and QA environment. It is my production server.
    The environment is HP-UX IA64 with oracle 10g.
    Thanks in advance.

    Hi Rajesh,
    What stage is the installation hanging at ?
    Please provide any error info from sapinst_dev.log
    Check if java engine is installed and is up and running or not.. You could check the j2ee work directory under which you find j2ee stack related traces.
    e.g. check std_server0 to see if the server is up or not
    Please send more details
    Regards,
    Snehal

  • Java Add-in Installation of the Central instance installation

    I'm trying to re-install the Java Add-in Central Instance for ABAP.
    During the installation of Java Engine, i met the error on SecureStore step.
    In the LOG:
    >> SAP Secure Store in the File System - Copyright (c) 2003 SAP AG
    >> A key/value pair with this key already exists in the store.
    I had the right roles at the user SAPJSF.
    I have also renamed the files in /usr/sap/MWF/SYS/global/security/data
    SecStore.key
    SecStore.properties
    ..and i receive the following:
    SAP Secure Store in the File System - Copyright (c) 2003 SAP AG
    com.sap.security.core.server.secstorefs.FileMissingException: File "/sapmnt/MWF/global/security/data/SecStore.properties" does not exist although it should.
            at com.sap.security.core.server.secstorefs.StorageHandler.openExistingStore(StorageHandler.java:372)
            at com.sap.security.core.server.secstorefs.SecStoreFS.openExistingStore(SecStoreFS.java:1946)
            at com.sap.security.core.server.secstorefs.SecStoreFS.handleInsert(SecStoreFS.java:963)
            at com.sap.security.core.server.secstorefs.SecStoreFS.main(SecStoreFS.java:1276)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
            at java.lang.reflect.Method.invoke(Method.java:391)
            at com.sap.engine.offline.OfflineToolStart.main(OfflineToolStart.java:81)
    If i rename only the SecStore.key in SecStore.key.old, i will receive the following:
    >> SAP Secure Store in the File System - Copyright (c) 2003 SAP AG
    >> Warning: this command line user interface is meant as a last resort if
    >> everything else fails.
    >> The key phrase that you must type in now will be visible on the screen!
    I've also lunched the following command from the opreating system level:
    /usr/java14_64/bin/java -classpath /tmp/sapinst_instdir/NW04S/LM/AS-JAVA/ADDIN/DB2/CENTRAL/CI/install/sharedlib/launcher.jar -Xmx256m -Xj9 com.sap.engine.offline.OfflineToolStart com.sap.security.core.server.secstorefs.SecStoreFS /usr/sap/MWF/SYS/global/security/lib/tools/iaik_jce.jar:/usr/sap/MWF/SYS/global/security/lib/tools/iaik_jsse.jar:/usr/sap/MWF/SYS/global/security/lib/tools/iaik_smime.jar:/usr/sap/MWF/SYS/global/security/lib/tools/iaik_ssl.jar:/usr/sap/MWF/SYS/global/security/lib/tools/w3c_http.jar:/tmp/sapinst_instdir/NW04S/LM/AS-JAVA/ADDIN/DB2/CENTRAL/CI/install/lib:/tmp/sapinst_instdir/NW04S/LM/AS-JAVA/ADDIN/DB2/CENTRAL/CI/install/sharedlib:/usr/opt/db2_08_01/java//db2jcc.jar:/usr/opt/db2_08_01/java//db2jcc_license_cisuz.jar insert -s MWF -f /usr/sap/MWF/SYS/global/security/data/SecStore.properties -k /sapmnt/MWF/global/security/data/SecStore.key admin/host/MWF
    >> SAP Secure Store in the File System - Copyright (c) 2003 SAP AG
    >> Usage:
    >> SecStoreFS status  <standard>
    >> SecStoreFS exists  <standard>
    >> SecStoreFS create  <standard> -noenc
    >> SecStoreFS create  <standard> -enc -p "<key phrase>" [-nostore]
    >> SecStoreFS insert  <standard> <key> <value>
    >> SecStoreFS encrypt <standard>      -p "<key phrase>" [-nostore]
    >> SecStoreFS updatep <standard>      -p "<key phrase>" [-nostore]
    >>where <standard> is [-s <SID>] [-f <data filename> -k <key filename>]
    >> No value given!
    Anybody knows how is possible to follow with the installation?
    Best Regards.

    Dear Kumar,
    referring to the note 1063396, i haven't got "iaik_jce_export.jar" file in the directory specifed in the note.
    So, i've just renamed the following files
    SecStore.key
    SecStore.properties
    NOTHING DIFFERENT.
    To be sure, i have also renamed the directory /sapmnt/MWF/global/security/data  --> data.old
    You can see the result on the following log:
    >>/tmp/sapinst_instdir/NW04S/LM/AS-JAVA/ADDIN/DB2/CENTRAL/CI#cat SecureStoreInsert.log
    >>SAP Secure Store in the File System - Copyright (c) 2003 SAP AG
    >>
    >>com.sap.security.core.server.secstorefs.FileMissingException: >>File "/sapmnt/MWF/global/security/data/SecStore.properties" does not exist although it should.
    >>        at com.sap.security.core.server.secstorefs.StorageHandler.openExistingStore(StorageHandler.java:372)
    >>        at com.sap.security.core.server.secstorefs.SecStoreFS.openExistingStore(SecStoreFS.java:1946)
    >>        at com.sap.security.core.server.secstorefs.SecStoreFS.handleInsert(SecStoreFS.java:963)
    >>        at com.sap.security.core.server.secstorefs.SecStoreFS.main(SecStoreFS.java:1276)
    >>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    >>        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
    >>        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
    >>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
    >>        at java.lang.reflect.Method.invoke(Method.java:391)
    >>        at com.sap.engine.offline.OfflineToolStart.main(OfflineToolStart.java:81)
    Do you have any idea to solve the problem and to start teh installation again?
    Best regards.

  • How to Generate a Java file for a JSP Page

    Hi ,
    I am using weblogic11 .
    I am working on a JSP page which nearly consists of 4000 lines of code.
    I need to debug the file , but weblogic server is not generating the java file for the JSP pages .
    Please let me know how can i genertae Java file for the jsp pages ??

    JSPs are compiled into servlets automatically and those classes are stored in WEB-INF/classes folder. Servlet engine handles servlets.

  • How to access a JAVA Script variable in JSP Code

    How to access a JAVA Script variable in JSP Code. I have been unable todo this.
    Plz Suggest a way.
    Thanks
    Soumya

    try to do this code
    String s=request.getParameter("javascriptvariablename");

Maybe you are looking for

  • Corrupted fonts

    After upgrading to Snow Leopard Mail was not displaying some fonts correctly. In particular, for me, courier was corrupted. I tracked down the problem to a corrupted font family. Using the font book I deleted the bad fonts and that seemed to resolve

  • How to change the amount of shared RAM

    Dear Sir, I am using Lenovo 3000 C100. When I check the system properties -> general tab, I see that i have 248 MB of RAM available. I suppose that the total RAM might be 256 MB. upon checking the size of my video RAM, in the plug and play monitor ->

  • Contribute CS4 no longer works with updated OS X 10.9.5, but as it won't launch I cannot deactivate - any advice?

    AS CS4 does not work wit the newer Mac version of OS X I want to deactivate from the computer. However, I cannot do so as I can't launch CS4 to deactivate and so I am going around in a loop. There must be a way to resolve and Adobe just is not respon

  • New site about J2ME game programming and optimization

    Hello! I just wanted to tell you about a new J2ME development site SupremeJ2ME found at http://supremej2me.bambalam.se It has a lot of useful guides and tips about mobile J2ME game development and optimization, a forum and information about the best

  • Cannot load Messages app on my iMac

    I have an iMac running Yosemite and an iPhone running 8.1. Occasionally messages appear on my iMac but they don't arppear on my phone. When I open the Messages app on my iMac I cannot access the messages. The Preferences option and Add Account option