JSP invoked method inside onclick property of html form

I have an html form with an action to itself. I'm using javabeans with jsp to hold a list of strings. I want to click a button on the html form and have it add to the list of strings. however, if I put onclick="<% mybean.addString("sample") %>" inside the button's tag, it executes the code every time I load the page, instead of only when the button is pressed. What do I have wrong here, and what's the code to fix it?

jobocop17 wrote:
What do I have wrong here, and You have misunderstood how web application works. Basically, server side code(jsp scriptlets, custom tags etc) get processed in server and the processed results are sent to client side where the client side code(eg: javascript) get executed. Following jsp code
  <% mybean.addString("sample") %>is processed in server and the browser will only get its result which is what you have noticed and which is how it works.
what's the code to fix it?Use either clientside scripting or make a server call to get it done on serverside.

Similar Messages

  • How to Change the Visible property of Adobe Form Dynamically - URGENT

    Hi,
        I am woking on a scenario where when I click a button in Adobe Form,
    another Adobe Form should be displayed. This is using Web Dynpro Java.
    For this I have made the second form invisible and I want to make this VISIBLE when the button is Clicked. I am unable to get a method where this property of interactive form can be changed.
    Also, If there is any other way this can be done please let me know.
    I am using NWDS 7.0.09 with Adobe Live cycle designer 7.1.
    Thanks in Advance,
    Vasu

    You need to get the handler to the adobe form in your webdynpro program. If you are using webdynpro for java the following code snipped could be useful...
    IWDPDFDocumentInteractiveFormHandler iFormHandler = WDPDFDocumentFactory.getDocumentHandler(wdThis.wdGetAPI(),"YourAdobeForm");
         // Get appearance setter. 
         IWDPDFDocumentAppearance appearance =
              iFormHandler.getDocumentContext().getAppearance();
         //appearance.
         // Set page layout option
         appearance.setPageLayout(pageLayoutOption);
         // Set show option.
         appearance.setShowOption(showOption);    
         // Hide menu bar.
         appearance.hideMenuBar(true); 
         // Hide tool bars.
         appearance.hideToolBars(true);
         // Hide window controls.
         appearance.hideWindowControl(true); 
         // Show full screen.   
         appearance.showFullScreen(true);
    Reward points if the post is helpful
    Thanks!
    Surya.

  • Jsp - calling a method form an HTML form inside a jsp

    Good mornig everybody,
    Does anybody know how to call a Java Method (a public method of a Class) form an Html form that stay in a jsp page.
    I'd like to do something like that in myPage.jsp
    <%
    // Declaration of object
    MyObject obj = new MyObject();
    %>
    <html>
    <form action="obj.myMethod()">
    <input type=submit vaule=runMethod>
    </form>
    </html>
    Many Tanks
    Matteo

    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8" import="java.util.*,java.text.*,java.math.*"%>
    <jsp:useBean id="p" scope="request" class="com.ecl.web.beans.Bean"/>
    <jsp:setProperty name="p" property="*"/>
    float t = p.geta(); // (geta() Function in Bean)
    do something like this...
    create a bean write ur function in that bean...Then call the function in that bean using set and get property...

  • SEVERE: Caught an exception while invoking method 'setFlag' on object 'Lock

    While try to run load test data , I got the exception as follows..
    SEVERE: Caught an exception while invoking method 'setFlag' on object 'LockManager'. Releasing locks.
    java.lang.reflect.InvocationTargetException
    Finally I got a hint ,
    "If the running Deployment Template script breaks halfway through its execution due to an unhandled
    exception, or is manually interrupted by a user pressing Ctrl-C while it is running, the lock remains
    set within the EAC"
    The resolution is ,
    On Windows: .\runcommand.bat LockManager releaseLock
    update_lock
    On UNIX: ./runcommand.sh LockManager releaseLock up¬
    date_lock

    After spending some time on this, I looked at the source code for com.evermind.server.ThreadState
    This is the code that throws the exception:
    if(applicationThread != null && applicationThread.httpHandler != null && applicationThread.servletInfo != null)
    try
    server = applicationThread.httpHandler.request.getApplication().getApplication().getServer();
    catch(Throwable t)
    System.out.println("caught exception while getting the server instance " + t.getMessage());
    t.printStackTrace(System.out);
    It looks like this method expects a httpRequest, and would find null because I'm in the servlet.init()
    (at least, that's my interpretation)
    I tested my code (the remoteFacade.create()) inside of a jsp, and it worked...
    So, the next logical question is:
    Can I make EJB calls from within the init method of a servlet? (or more specifically from a struts plugin, which I believe should be more or less the same thing)
    If so, do I need to take extra steps?
    Again, any experience/help on this will be much appreciated.
    Thanks,
    Christophe.

  • Error: Can't find a method to write property

    Hi, I'm very new to JAVA and I'm not sure if I should be posting this question here or in the JAVA forum but since it is the JSP page that is giving me the error I figure I will start here. I am receiving the error:
    org.apache.jasper.JasperException: Can't find a method to write property 'dayOfWeek' of type 'int' in a bean of type 'calendar.NewCalendar'
         org.apache.jasper.runtime.JspRuntimeLibrary.internalIntrospecthelper(JspRuntimeLibrary.java:368)
         org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(JspRuntimeLibrary.java:307)
         org.apache.jsp.calendar.index_jsp._jspService(index_jsp.java:60)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)There isn't much to my JSP.
    <html>
    <body>
    This is a page
    <jsp:useBean id="calendar" scope="page" class="calendar.NewCalendar" />
    <br>
    Today is: <jsp:getProperty name="calendar" property="day" />
    <br>
    <jsp:setProperty name="calendar" property="dayOfWeek" value="7" />
    Tommorow is: <jsp:getProperty name="calendar" property="day" />
    </font>
    </body>
    </html>I know the problem comes from the setPropery tag but I can't figure out what is wrong with my set method.
    public void setDayOfWeek(int x) {
         cal.set(Calendar.DAY_OF_WEEK, x);
    public String getDay() {
         int x = getDayOfWeek();
         if (x > 7){
             return "Unknown to Man";
         return days[x - 1];
    public void setDayOfWeek(int x) {
         cal.set(Calendar.DAY_OF_WEEK, x);
    }Help! Thanks in advance.
    PS. If you need the full class info let me know. Mostly I copied it from Tomcat's exaple of dates.
    Edited by: Millisa on Apr 23, 2008 2:09 PM

    You have declared two funtions called "setDayOfWeek" in your example code which would be a compile error.
    Apart from the it works fine for me.
    Note however that your check for dates "Not known to man" is probably unnecessary. The Calendar is handling that for you.
    So if you set the day to be 9, it will happily wrap it around to day 2 for you, as long as it is set in Lenient mode.
    Cheers,
    evnafets

  • Simpletagsupport invoke method

    I am confused about the interface SimpleTagSupport. My j2sdk1.4 compiler gives an error when I call the method invoke(java.io.Writer, java.util.Map) with 2 parameters. I found this in a wrox book I am using called Beginning J2EE 1.4 . Our sun java site http//java.sun.com/j2ee/1.4/docs/api/javax/servlet/jsp/tagext/SimpleTagSupport.html says that this method only acceps a single parameter. I found other sites on the web which gave me a different definition of this interface(I searched for this method on google). http://ganymed.informatik.uni-augsburg.de/doku/java/j2ee/api/javax/servlet/jsp/tagext/JspFragment.html
    Gives another implementation of this method which matches with the way it is used in my book. Now how is this possible? Please help me understand this issue.

    I am sorry guys. I meant the JspFragment class. The invoke method is of this class. But the problem I mentioned is there.

  • Invoking methods through reflection

    I need to check a property in the javax.faces.component.html.HtmlInputText.
    If i do it in the following manner,I get things fine:
    if(comp.getClass().getName().equalsIgnoreCase("javax.faces.component.html.HtmlInputText")) {
    String getter=((javax.faces.component.html.HtmlInputText)comp).getOnfocus();
    if(getter!=null) {
    System.out.println(getter);
    But if i invoke it through reflection,I get nothing.
    I am doing the following:
    Class reqClass = Class.forName("javax.faces.component.html.HtmlInputText");
    Method[] methodList = reqClass.getDeclaredMethods();
    int methodIdx = 0;
    for (int i = 0; i < methodList.length; i++) {
    Method reqMethod =methodList;
    if(reqMethod.getName().indexOf("getOn")== 0) //method starts with getOn
    // method accepts parameters, define the types in order here as Class[]
    Class[] classParams = new Class [] {};
    // set the method of the class object
    Method method = reqClass.getMethod( reqMethod.getName(), classParams );
    // pass values to fill parameters of method
    Object[] arguments = new Object [] {};
    // invoke method via reflection.Note that class has default constructor
    Object retobj=method.invoke( reqClass.newInstance() ,
    arguments );
    String getterResult = (String)retobj;
    if(getterResult!=null)
    System.out.println(reqMethod.getName() + " ## " + getterResult);
    What am i doing wrong while invoking the method through reflection.
    I get no exception either.

    It is a simple typo.
    An alternative I tried is the following ,but that does not work either.
    Class reqClass = Class.forName("javax.faces.component.html.HtmlInputText");
    Method[] methodList = reqClass.getDeclaredMethods();
    int methodIdx = 0;
    for (int i = 0; i < methodList.length; i++) {
    Method reqMethod =methodList;
    if(reqMethod.getName().startsWith("getOn")) //method starts with getOn
    System.out.println(reqMethod.getName());
    // pass values to fill parameters of method
    Object[] arguments = new Object [] {};
    // invoke method via reflection
    Object retobj=reqMethod.invoke( reqClass.newInstance(), arguments );
    String getterResult = (String)retobj;
    if(getterResult!=null)
    System.out.println(reqMethod.getName() + " ## " +getterResult);

  • Creating KEYS for a HashMap property of dynaAction form in jsp

    Hii Javaties
    I am developing a view customization module, where the view can be customized by the user .
    My view generally contains data from the join of two tables.
    Now to customize this view, i am providing a link (a action--viewColumns.do), this action will show user all the columns of both the tables,
    The user can then select the columns which he wants to view from customiseView.jsp
    The action viewColumns.do is actually returing a hashMap ListColumns in which the key is table name and value is a arraylist of columnNames for that table.
    I am able to display this hashMap in customiseView.jsp.
    Now the problem is tht i want to assosciate the name of table with the
    selected columnNames which users selects for customization in customiseView.jsp.
    To do this i am declaring a HashMap property (table_Column) in my formBean .
    Now i need to populate this property tableColumn when users selects the columns for the tables.
    I am thinking of populating a hashMap
    Can anyone tell me how that can be done.
    Incase if i am not clear plz tell me .

    Hi Garcia,
    You are creating a relative link from a link to a portal component, so when someone clicks on mailer.jsp, it creates a link that the PRT assumes is to a component. But mailer.jsp is not a component, and your JSP is hidden inside a component.
    You have to do one of the following:
    Wrap the second JSP in a portal component, like the first, and create a link to this portal component.
    Create a link back to the original component, and then you can redirect or include the second JSP (though here I am not sure how you would get the URL parameters to the included/redirected JSP).
    It might be simpler to use a JSP Dynpage, if you are using JSP pages.
    Daniel

  • Invoke Method: Run VI produces error when run as an application

    Hello,
    I have upgraded from LabView 7.0 to 2009. One test program uses Run VI Invoke Method to start the main UI. On LabView 7.0 it works OK , when build as an application, but with LabView 2009 it gives error 1003: Invoke Node xxx.vi <APPEND> VI Path: xxx. (I have checked that the path to "Open VI Reference" is correct.)
    When run on LabView 2009 development environment (.vi) - no problem. I used the "Convert built script.." tool to convert to LabView 2009 built specifications. I have tried numerous different variations building application with LabView 2009 (including main UI files, different setups, etc.), but no luck. If someone has any ideas...
    -timo

    Maybe it helps you for debugging:
    I checked the property for the broken arrow. You need a property node and go Select Class 'Vi Server'->'VI' (skip this in your Application but navigate to the VI via the server and feed it to the node). Then it is Execution->State.
    I need to draw some code to do it for me as well, once I'm done I'll post it here.
    Felix
    www.aescusoft.de
    My latest community nugget on producer/consumer design
    My current blog: A journey through uml

  • Problem using jsp:include from inside a custom tag

    Hi, All !
              I have a problem using <jsp:include> from inside a custom tag. Exception is:
              "java.lang.ClassCastException: weblogic.servlet.jsp.BodyContentImpl"
              Apparently, weblogic tries to cast BodyContentImpl to JspWriterImpl and
              could not do this. Is it a bug, since in the 1.1 spec is said: "The
              BodyContent is a subclass of JspWriter that can be used to process body
              evaluations so they can retrieved later on."
              My code is:
              <wfmklist:items>
              <jsp:include page="item.jsp" flush="true"/>
              </wfmklist:items>
              

    This is an area of contention with WL. It is not so tolerant with regards to
              the spec. I spent several days recently trying to convince it to accept the
              specification in regards to bodies and includes and it appears to have
              successfully rebuffed my efforts.
              Frankly, this is very disappointing. It appears that some shortcuts were
              taken on the way to JSP 1.1 support, and the result is a very hard-coded,
              inflexible implementation. As I have not seen the implementation myself, I
              hate to assume this, however one could posit that the term "interface" was a
              foreign concept during the implementation, other than as some annoying
              intermediary reference requiring an immediate cast to a specific Weblogic
              class, which in turn is apparently required to be final or have many final
              methods, as if being optimized for a JDK 1.02 JIT.
              I am sorry that I don't have any positive suggestions other than to use a
              URL object to come back in an execute the necessary "include" directly. You
              lose all context (other than session) and that can cause its own problems.
              However, you can generally get the URL approach to work, and you will
              hopefully avoid further frustration.
              Peace,
              Cameron Purdy
              Tangosol, Inc.
              http://www.tangosol.com
              Tangosol: How Weblogic applications are customized
              "Denis" <[email protected]> wrote in message
              news:[email protected]...
              > Hi, All !
              > I have a problem using <jsp:include> from inside a custom tag. Exception
              is:
              > "java.lang.ClassCastException: weblogic.servlet.jsp.BodyContentImpl"
              >
              > Apparently, weblogic tries to cast BodyContentImpl to JspWriterImpl and
              > could not do this. Is it a bug, since in the 1.1 spec is said: "The
              > BodyContent is a subclass of JspWriter that can be used to process body
              > evaluations so they can retrieved later on."
              >
              > My code is:
              > ...
              > <wfmklist:items>
              > <jsp:include page="item.jsp" flush="true"/>
              > </wfmklist:items>
              > ...
              

  • Cannot invoke method multiply() on null object

    Hi ,
    when im trying to follow Developing Rich Web Applications With Oracle ADF tutorial in this link http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_55/jdtut_11r2_55_3.html
    and in the part ( Add CRUD Operation Components to your Page ) when pressing the CreateInsert i got the error message Cannot invoke method multiply() on null object ,
    the logs as below
    <Utils> <buildFacesMessage> ADF: Adding the following JSF error message: Cannot invoke method multiply() on null object
    java.lang.NullPointerException: Cannot invoke method multiply() on null object
         at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:77)
         at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:750)
         at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:727)
         at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:17)
         at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
         at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:54)
         at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
         at bc4j_model_EmpDetails_AnnualSalary_null_gs.run(bc4j_model_EmpDetails_AnnualSalary_null_gs.groovy:1)
         at oracle.jbo.ExprEval.internalEvaluateGroovyScript(ExprEval.java:1200)
         at oracle.jbo.ExprEval.doEvaluate(ExprEval.java:1253)
         at oracle.jbo.ExprEval.evaluateForRow(ExprEval.java:1075)
         at oracle.jbo.server.AttributeDefImpl.evaluateTransientExpression(AttributeDefImpl.java:2131)
         at oracle.jbo.server.ViewRowStorage.getAttributeInternal(ViewRowStorage.java:1827)
         at oracle.jbo.server.ViewRowImpl.getAttributeValue(ViewRowImpl.java:1962)
         at oracle.jbo.server.ViewRowImpl.getAttributeInternal(ViewRowImpl.java:824)
         at oracle.jbo.server.ViewRowImpl.getAttrInvokeAccessor(ViewRowImpl.java:906)
         at oracle.jbo.server.ViewRowImpl.getAttribute(ViewRowImpl.java:854)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.internalGetAttributeValueFromRow(JUCtrlValueBinding.java:1213)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributeFromRow(JUCtrlValueBinding.java:764)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.getInputValueInRow(JUCtrlValueBinding.java:3004)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.getInputValue(JUCtrlValueBinding.java:2852)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.getInputValue(JUCtrlValueBinding.java:2841)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlAttrsBinding.getInputValue(FacesCtrlAttrsBinding.java:183)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.internalGet(JUCtrlValueBinding.java:2416)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlAttrsBinding.internalGet(FacesCtrlAttrsBinding.java:275)
         at oracle.adf.model.binding.DCControlBinding.get(DCControlBinding.java:749)
         at javax.el.MapELResolver.getValue(MapELResolver.java:164)
         at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
         at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
         at com.sun.el.parser.AstValue.getValue(Unknown Source)
         at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)
         at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
         at org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:73)
         at oracle.adfinternal.view.faces.renderkit.rich.ValueRenderer.getValue(ValueRenderer.java:184)
         at oracle.adfinternal.view.faces.renderkit.rich.SimpleInputBaseRenderer.renderContentStyleAttributes(SimpleInputBaseRenderer.java:512)
         at oracle.adfinternal.view.faces.renderkit.rich.SimpleInputBaseRenderer.renderNonElementContent(SimpleInputBaseRenderer.java:397)
         at oracle.adfinternal.view.faces.renderkit.rich.FormInputRenderer.encodeAllAsNonElement(FormInputRenderer.java:300)
         at oracle.adfinternal.view.faces.renderkit.rich.FormElementRenderer.encodeAll(FormElementRenderer.java:160)
         at oracle.adf.view.rich.render.RichRenderer.delegateRenderer(RichRenderer.java:1700)
         at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.renderFieldCellContents(LabeledInputRenderer.java:228)
         at oracle.adfinternal.view.faces.renderkit.rich.LabelLayoutRenderer.renderFieldCell(LabelLayoutRenderer.java:528)
         at oracle.adfinternal.view.faces.renderkit.rich.LabelLayoutRenderer.encodeAll(LabelLayoutRenderer.java:305)
         at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.encodeAll(LabeledInputRenderer.java:215)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer._encodeFormItem(PanelFormLayoutRenderer.java:1088)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer.access$100(PanelFormLayoutRenderer.java:50)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer$FormColumnEncoder.processComponent(PanelFormLayoutRenderer.java:1604)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer$FormColumnEncoder.processComponent(PanelFormLayoutRenderer.java:1523)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:187)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:318)
         at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:283)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer._encodeChildren(PanelFormLayoutRenderer.java:420)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer.encodeAll(PanelFormLayoutRenderer.java:208)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:447)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$1500(PanelGroupLayoutRenderer.java:30)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:734)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:637)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:187)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:318)
         at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:283)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:360)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
         at oracle.adfinternal.view.faces.renderkit.rich.DecorativeBoxRenderer.encodeFacet(DecorativeBoxRenderer.java:440)
         at oracle.adfinternal.view.faces.renderkit.rich.DecorativeBoxRenderer._encodeCenterPane(DecorativeBoxRenderer.java:704)
         at oracle.adfinternal.view.faces.renderkit.rich.DecorativeBoxRenderer.encodeAll(DecorativeBoxRenderer.java:380)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
         at oracle.adfinternal.view.faces.renderkit.rich.DecorativeBoxRenderer.encodeFacet(DecorativeBoxRenderer.java:440)
         at oracle.adfinternal.view.faces.renderkit.rich.DecorativeBoxRenderer._encodeCenterPane(DecorativeBoxRenderer.java:704)
         at oracle.adfinternal.view.faces.renderkit.rich.DecorativeBoxRenderer.encodeAll(DecorativeBoxRenderer.java:380)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeCenterFacet(PanelStretchLayoutRenderer.java:879)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeCenterPane(PanelStretchLayoutRenderer.java:1294)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeMiddlePanes(PanelStretchLayoutRenderer.java:351)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeAll(PanelStretchLayoutRenderer.java:316)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:641)
         at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3062)
         at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:274)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:641)
         at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3062)
         at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1277)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1655)
         at oracle.adfinternal.view.faces.component.AdfViewRoot.encodeAll(AdfViewRoot.java:91)
         at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:399)
         at org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ChangeApplyingVDLWrapper.renderView(ViewDeclarationLanguageFactoryImpl.java:350)
         at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
         at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:273)
         at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:165)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:1027)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:334)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:232)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:122)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    <Utils> <buildFacesMessage> ADF: Adding the following JSF error message: Cannot invoke method multiply() on null object
    any help please ?

    Thanks Frank ,
    really i've already downloaded the ZIP of the final application , but the same error message ,
    when removing the Annual salary ( Which is a new Attribute ( not DB column) Salary * 12 ) every think is fine and no more error message ,there is no null salary all the employees have a salary , my JDeveloper Version is 11.1.2.1.0
    also , because of the EmpDetails is based on the query
    FROM EMPLOYEES Employees, DEPARTMENTS Departments
    WHERE Employees.DEPARTMENT_ID = Departments.DEPARTMENT_ID
    and the Department id is non editable value , that means even if you add a new user u cant never check this user in this interface , u can check this user only on DB (SQL) level .
    Edited by: 876602 on Jul 1, 2012 5:17 AM

  • Can't pass parameter from HTML form of multipart/form-dta type to JSP

    I am using request.getParameter(passed variable name) to pass data from HTML form to JSP with no problem. WHen I try to pass data from HTML form of multipart/form-dta type to JSP as following:
    < form enctype="multipart/form-data" name="theForm" method="post" ACTION="http://titan.ssd.loral.com:7778/ifs/jsp-bin/ifs-cts/stringsecond.jsp">
    The passed value is null. Why?
    How can I pass data successfully from this form to JSP?
    How can I pass data from JavaScript to JSP?
    Thank you

    I am using request.getParameter(passed variable name)
    to pass data from HTML form to JSP with no problem.
    WHen I try to pass data from HTML form of
    multipart/form-dta type to JSP as following:
    < form enctype="multipart/form-data" name="theForm"
    method="post"
    ACTION="http://titan.ssd.loral.com:7778/ifs/jsp-bin/if
    -cts/stringsecond.jsp">
    The passed value is null. Why?because the jsp most likely does not handling of POST parameters like this.
    How can I pass data successfully from this form to
    JSP?jsp's are not meant to read such amounts of data. this (= uploading) is a typical task for a specialized servlet. there you have full control over input and output. if you need to, you can still forward to a jsp after processing in the servlet.
    How can I pass data from JavaScript to JSP???? i'm not sure what exactly you mean. normally you put it into an url and submit it.
    robert

  • Using JSP, HTML Form for uploading image  in order to be saved into a db

    I have a HTML form and I am using <input type="file"> tag. The problem is that I don't know the Java code needed for the JSP page in order to get through the path and get the image(of course I refer to binary object). Below there is the html code
    <%@ page language="java" import="java.sql.*, java.awt.*, java.awt.Event, java.util.*, java.io.*, javax.servlet.*"%>
    <html>
    <head>
    </head>
    <body>
    <div align="left"></div>
    <form action="action.jsp" method="POST" name="form"
    <h1>Add Data</h1>
    <table>
    <tr>
    <td>Name</td>
    <td><input type="text" name="Name" value="" /></td>
    </tr>
    <tr>
    <td>Last Name</td>
    <td><input type="text" name="lastname" value=""/></td>
    </tr>
    <tr>
    <td>Studies</td>
    <td><textarea name="studies" rows="4" cols="20" >
    </textarea>
    </td>
    </tr>
    <tr>
    <td>General Data</td>
    <td><textarea name="gendata" rows="4" cols="20">
    </textarea>
    </td>
    </tr>
    <tr>
    <td>Photo</td>
    <td><input type="File" name="photo"/></td>
    </tr>
    <tr>
    <td> <input type="submit" > </td>
    </tr>
    </table>
    </form>
    If you want to view the Personnel List click here<br>
    Go to index
    </body>
    </html>

    A JSP should not be involved in this. The browser will offer a way to specify a file, and the target of the form should be a servlet that can handle multipart uploads. JSPs should not process any input.
    More info: http://www.jguru.com/faq/view.jsp?EID=160 or Google

  • JSP part of HTML form

    i have an html form (part of code included below) and don't know how to write the JSP for the results page. I want to be able to click "submit" and have the inputed information placed in a text file and saved in the same folder as my HTML files. I am new to JSP and am trying to learn. thanks in advance.
    code:
    <html>
    <head>
    <title>Form</title>
    </head>
    <form name="input" action="html_form_action.asp" method="get" >
    Model Name:
    <br>
    <input type="text" name="modelname">
    <br>
    Lenght Unit:
    <br>
    <input type="text" name="lenghtunit">
    <br>
    <br>
    <TEXTAREA ROWS="5" COLS="50">

    You need to learn some java first. Then learn a bit about JSP. It isn't like classic ASP.
    Then write a java class that takes arguments and writes them to a file. It will be good practice for making the full bean. :)
    When you're comfortable with the class and it does what you want (writes things to a file), make the class a bean (use a package) and make the arguments be gettable and settable properties and have a method do the write using those properties (instead of main doing it).
    Put the bean in a JSP and set the properties and call the method that writes them to a file.
    If you can't follow that, you're not ready to write it. Go, read, learn more about java and java beans, and come back to this.
    Note that you may have permissions problems if the directory the class writes to is not writable by the user that the web server runs as.
    Note on your html page: you should be targetting a JSP page, not ASP, and you should be using POST, not GET, as the method.
    HTH

  • Html form-jsp retrieval problem..very urgent plz help

    i have created the following html form.
    <form method="POST" action="b.jsp" >
                Insert Feed URL <input type="text" name=""></br></br>
                        <input type="submit" value="Search"> <input type ="reset" value ="Reset">now when i click search i should be able to get that url which i inserted in the text box through b.jsp which has the code for retrieving it. it is basically a .xml url. hence i have used
    object.put("1", " ");
    in the b.jsp(just a part of the code)
    what value should i put in between the quotes(" ") so that i retrieve the info as per the url input in the html form.
    kindly help
    very urgent
    cheers

    ok i tried but i got the following error:
    symbol  : variable request
    location: class org.apache.jsp.b_jsp.FeedServer
                            object.put("1",request.getParameter("feedURL"));
                                          ^
    1 error
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
         org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:246)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)i also tried this
    String feedURL = request.getParameter("feedURL");
    object.put("1","feedURL");
    but still errors
    Generated servlet error:
    .java:30: feedURL is already defined in org.apache.jsp.b_jsp.FeedServer
                 String feedURL = request.getParameter("feedURL");
                        ^
    Generated servlet error:
    java:30: cannot find symbol
    symbol  : variable request
    location: class org.apache.jsp.b_jsp.FeedServer
                 String feedURL = request.getParameter("feedURL");
                                  ^
    2 errors
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
         org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:246)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)

Maybe you are looking for

  • New hard drive for mac, how do i move all the old over?

    My partitioned HD on my mac now has too small a partition for the OS 10.3 to run stably. As I believe it is impossible to enlarge the partition OS runs on without erasing the whole HD first I want to put a larger HD into the mac. How can I move every

  • Dynamic ORDER BY clause - Possible different data types...

    I have a lexical parameter in my ORDER BY clause: ORDER BY &P_ORDER_BY My problem is that I have to designate this parameter as either a date, character or number, but the user defined column being ordered by could be any one of these. When I designa

  • Sends: Prefader + Post pan

    Is it possible to set a channel strip to Prefader as well as Post pan? Or is there a tricksy way to acheive the same effect? I want to send all my orchestral instrument tracks to one aux to manipulate as a single track. I did this by sending all the

  • Arrays to List component

    I am fairly new AS3 coder now using Flash Builder and I can't work out how to display my data (a collection of actionscript arrays returned by a AS3 function) in a List component as a list of labels and images. My arrays look like this: var aNames:Ar

  • C.s.p.e.IncompatibleClassException: Mutation is missing

    I'm getting this error and I can't figure out why. Greatful for any hint. I'm a complete n00b and could not find anything while searching. com.sleepycat.persist.evolve.IncompatibleClassException: Mutation is missing to evolve class: org.apache.limax.