Struts - Problem with ActionMessages

Hi everyone:
Here is my problem: This is the code in my action class
catch (Exception e){
                    ActionMessages errors = new ActionMessages();
                    if (e instanceof DatabaseException)
                         errors.add("error", new ActionMessage("errors.database", e
                                   .getMessage().toString()+" Hay un error en la BD"));
                    else
                         errors.add("error", new ActionMessage("error", e
                                   .getMessage().toString()+" Hay un error"));
                    saveMessages(request, errors);
                    System.out.println(errors.size());
                    res = mapping.findForward("repetimos");
               }I print the errors.size in order to check if it's not empty. Well, it's size is 1.
In my jsp my code is this:
<logic:messagesPresent message="true">
     <html:messages id="error" message="true">
          <c:out value="${error}" />
     </html:messages>
</logic:messagesPresent>But I don't get any message when an error occurs. Am I doing anything wrong? I can't see the fail.
I appreciate very much your attention. Thanks a lot

In your action do you add errors to the Request or Session? It's been a while since I have worked with struts. Looking back I think we used lists to contain our error messages and displayed them in our JSP.

Similar Messages

  • Struts problem with forwards using BEA portlet

    My problem is, I would like to know if there is a way to pass a variable to the path properties
    of the <forward /> tag inside BEA portlet, for example: <forward name="Action" path="/Action.do?reqCode=select"/> because this forward works fine outside the portlet.
    A good example would be really appreciated.
    Regards
    Calderwood

    My problem is, I would like to know if there is a way to pass a variable to the path properties
    of the <forward /> tag inside BEA portlet, for example: <forward name="Action" path="/Action.do?reqCode=select"/> because this forward works fine outside the portlet.
    A good example would be really appreciated.
    Regards
    Calderwood

  • A problem with struts -  DispatchAction class

    Hi,
    I am facing a problem with DispatchAction class in struts 1.1.
    Here is my senario:
    I have a two classes that extend DispatchAction - classA and classB.
    In classA, I have a start method. In classB, I have two methods - display and submit.
    When my application starts, my index.jsp does a logic:forward to the struts-config.xml file.
    e.g.:
    index.jsp<logic:forward name="startApp"/>
    struts-config.xml<form-beans>
         <form-bean name="testFormBean" type="package.testFormBean">
         </form-bean>
    </form-beans>
    <global-forwards>
         <forward name="startApp" path="/startApp.do?method=start"/>
    </global-forwards>
    <action-mappings>
         <action name="testFormBean"
    path="/startApp"
    parameter="method"
    validate="false"
    scope="request"
    type="package.StartAppActions">
         <forward name="successOneUser" path="/runSearch.do?method=display"/>
         </action>
         <action name="testBean"
    path="/runSearch"
    parameter="method"
    validate="false"
    scope="request"
    type="package.SearchActions">
                   <forward name="success" path="/html/jsps/success.jsp"/>
         </action>
    </action-mappings>
    when my application starts, the control goes to the index.jsp and then because of the logic forward goes to the start method of the /startApp action(i.e. the StartAppActions class). I return a ActionForward element with the value of "successOneUser".
    Uptill this point everything works fine.
    But now it should go the /runSearch element (i.e. SearchActions class) and the display method of it. But it is not going there. The error I am getting is action[runSearch] does not have a method named "start".
    I checked the value for the method parameter using the RAD/WSAD debugger, the value of parameter is "method" is still "start".
    I do not understand why it is not overiding the value of parameter "method" with display even though I am doing a
    <forward name="successOneUser" path="/runSearch.do?method=display"/> in the /startApp element, which should send the control to the display method of the [runSearch] element (i.e. in the startActions class).
    Can anyone tell me what the problem is ?
    Thanks in advance.
    kaushal

    Try this:
    Runtime.getRuntime().exec("your_batch_file.bat");
    where your_batch_file is:
    SET CLASSPATH=....(place all needed classes here)
    javac.exe filename
    must work,but there is some limitation...
    you must think to solve this problems.
    i hope that will help,
    Marius

  • Weblogic 10.0 Problems with stripes/struts

    When trying to deploy the sample application for the stripes framework on weblogic 10.0 I get the following error when deploying.
    <Dec 3, 2009 12:16:51 PM CET> <Error> <HTTP> <BEA-101165>
    <Could not load user defined filter in web.xml:
    net.sourceforge.stripes.controller.StripesFilter.net.sourceforge.stripes.exception.StripesRuntimeException:
    Problem instantiating default configuration objects.I actually had to switch to using the Sun JDK to get this error. JRockit does not report it, and just fails when I try to use the application. The problem appear to be weblogic 10.0 specific. No problems with jetty or tomcat, and I've heard reports that it is resolved in weblogic 10.3. Have ayone come accross similar problems when using stripes/struts on weblogic 10.0, and found a solution to this? Is there a patch available for 10.0 than fix this?
    Regards
    Morten
    PS: I have ommited the complete stack trace, since it is monstrously huge.

    Guess I was wrong in thinking that this was an isolated weblogic 10.0 problem. I just downloaded weblogic 10.3 and tried to deploy the same application there, and the same error happened.
    <03.des.2009 kl 15.12 CET> <Error> <HTTP> <BEA-101165>
    <Could not load user defined filter in web.xml:
    net.sourceforge.stripes.controller.StripesFilter.net.sourceforge.stripes.exception.StripesRuntimeException:
    Problem instantiating default configuration objects.
            at net.sourceforge.stripes.config.DefaultConfiguration.init(DefaultConfiguration.java:220)
            at net.sourceforge.stripes.config.RuntimeConfiguration.init(RuntimeConfiguration.java:272)
            at net.sourceforge.stripes.controller.StripesFilter.init(StripesFilter.java:125)
            at weblogic.servlet.internal.FilterManager$FilterInitAction.run(FilterManager.java:329)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
            Truncated. see log file for complete stacktrace
    java.lang.NullPointerException
            at java.io.FilterInputStream.read(FilterInputStream.java:116)
            at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
            at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
            at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
            at java.io.InputStreamReader.read(InputStreamReader.java:167)
            Truncated. see log file for complete stacktraceSo is there anyone out there with experience with struts/stripes, that can tell why this does not work? If you need to try this yourself, you can download the stripes sample application here:
    http://sourceforge.net/projects/stripes/files/stripes/Stripes%201.5.2/stripes-1.5.2.zip/download
    There is an example WAR called "stripes-examples.war" in the zip that is ready to be deployed.
    Regards
    Morten
    PS: you still need to start weblogic with Sun JDK rather than JRockit to get the error. With JRockit the application simply fails when used.

  • Help! Problem with Struts tag html:errors/

    Hi everybody,
    In my JSP page called addUser.jsp, i have the different Struts Tag
    <html:errors/>
    <html:form action="/addUser" focus="firstName">
    </html:form>
    I have of course the ApplicationResources.properties file with differents Struts properties:
    errors.footer=</ul><hr>
    errors.header=<h3><font color="red">Validation Error</font></h3>You must correct the following error(s) before proceeding:<ul>
    errors.ioException=I/O exception rendering error messages: {0}
    and an other one:
    error.fieldsNeeded=<font color="#FF0000">Some fields are missing.</font>
    when I call the addUser form, my JSP page display:
    null Some fields are missing. null
    Have u any suggestion about my prob?
    tx a lot
    s.

    Hi,
    can u post the java code where u are actually adding the error to the action errors. may be there is something wrong with that. I dont see any problem with the jsp or the applicationsResources.properties.
    Thanks
    Latha

  • Struts \ POI \ Javascript Problem with IE 7

    Alright folks, I'm having a problem migrating my application from IE 6 to IE 7. We have search functionality in the app that triggers off of javascript calls when a button is pressed in the search. Once the data is retrieved, an export button becomes enabled that allows the user to export those results to Excel using POI. On the back end, we're using struts running in WAS 6. When the results are exported, the action class manually writes the excel workbook to the output stream as below:
         protected void print(HSSFWorkbook a_wb, HttpServletResponse a_response)
              throws IOException, ServletException {
              // generate output
              a_response.setContentType("application/vnd.ms-excel");
              ServletOutputStream out = a_response.getOutputStream();
              a_wb.write(out);
    Then the action returns null to signify to struts that the response has already been handled manually.
    Everything works perfectly in IE 6. In IE 7, however, everything is not so great. The search works to retrieve the results and I can export them to Excel. The problem is that after I export them to Excel, all the Javascript on my page ceases to work. Basically, what I've been able to determine is that upon receiving the Excel document response something is causing the document Javascript variable to become undefined. This causes all my javascript -- things like:
    document.getElementById('actionIndicator').value ="Clear";
    to completely fail because document is undefined. Mind you, the page is still sitting there rendered in IE, and I can do things like window.frames and programmatically see a list of the frames defined on the page -- but the document variable is completely gone.
    At this point I'm kind of at a loss as to what to check or test next, so I'm open to any suggestions. Thanks!

    Hey Gina
    we have not seen broken images like you did, but have seen dramatic reduction in respose time with IE 7 (~20 times slower than normal). A bunch of IT folks tried various settings and configurations, with no success. Finally, we figured that different versions of IE 7 acd differently. Version 5700 was running fine. Version 5713 (or something like that, the latest one) was slooooow.
    Our Office of Information Resources does not "support" any other browser than IE. So, in addition to problems with Office 2007 I described previously, we may get a double whammy from Microsoft. Don't get me started.
    Vojin

  • Problem with ADF Application after upgrade to 10.1.2.3

    Hello,
    i have some problems with my ADF applications after upgrade of AppServer to 10.1.2.3.
    The only Excteption i got is in the application.log of the container:
    Error in errorPage /faces/pages/error/error404.jspx
    javax.servlet.ServletException
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.EvermindPageContext.handlePageThrowable(EvermindPageContext.java:614)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.EvermindPageContext.handlePageException(EvermindPageContext.java:556)
         at pages.error._error404._jspService(_error404.java:682)
         at com.orionserver[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:356)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:498)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:402)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.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.3.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:674)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:341)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:230)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:346)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:152)
         at oracle.adfinternal.view.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:157)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:214)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.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.3.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:674)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:341)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:230)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.EvermindHttpServletResponse.sendError(EvermindHttpServletResponse.java:1298)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.EvermindHttpServletResponse.sendError(EvermindHttpServletResponse.java:1428)
         at javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:162)
         at oracle.security.jazn.oc4j.JAZNServletResponse.sendError(Unknown Source)
         at oracle.adf.view.faces.webapp.ResourceServlet.doGet(ResourceServlet.java:169)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at oracle.adf.view.faces.webapp.ResourceServlet.service(ResourceServlet.java:135)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.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.3.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:674)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:341)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:816)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:231)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:136)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    Does anybody know how to handle it?
    Regards.
    Krystian.

    I am also getting the similar error if I enable a particular coloumn of a table to load into ORM , I am getting the following error,
    javax.servlet.jsp.JspException     at jsp.viewsinglerecord.throwError(_viewsinglerecord.java:31)     [SRC:/jsp/standardinclude.jsp:84]     at jsp.viewsinglerecord._jspService(_viewsinglerecord.java:1185)     [SRC:/jsp/displaymultiplerecords.jsp:461]     at com.orionserver[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:356)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:498)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:402)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:835)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:341)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:230)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:257)     at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)     at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)     at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)     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:760)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:835)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:341)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:816)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:231)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:136)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)     at java.lang.Thread.run(Thread.java:534)

  • Problems with importing classes in Java

    Hello,
    i have some problems with a simple project.
    The structure is like this:
    web-inf/classes/databeans/loginexistinguserform.java
    web-inf/classes/formactions/loginexistinguseraction.java
    loginexistinguserform.java :
    package databeans;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionError;
    import org.apache.struts.action.ActionMapping;
    import javax.servlet.http.HttpServletRequest;
    public class LoginExistingUserForm extends ActionForm
         String userid;
         String password;
         public String getUserid(){return userid;}
         public void setUserid(String newUserid){userid=newUserid;}
         public String getPassword(){return password;}
         public void setPassword(String newPassword) {password=newPassword;}
         public ActionErrors validate(ActionMapping mapping, HttpServletRequest request){
              ActionErrors errors=new ActionErrors();
              if(this.userid==null||this.userid.equals(""))
                   errors.add("user",new ActionError("error.userid.required"));
              if(this.password==null||this.password.equals(""))
                   errors.add("pass",new ActionError("error.password.required"));
              return errors;
    }loginexistinguseraction.java
    package formactions;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import java.io.IOException;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import databeans.LoginExistingUserForm;
    public class LoginExistingUserAction extends Action
         public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
         throws IOException, ServletException
              LoginExistingUserForm loginData=(LoginExistingUserForm)form;
              if(loginData.getUserid().equals("Admin")&&loginData.getPassword().equals("Parola"))
                   return mapping.findForward("successLogin");
              else
                   return mapping.findForward("failureLogin");
    }I can complie succesfully loginexisitinguserform.java but problems appears when i want to compile the second file, loginexistinguseraction.java with command: javac loginexistinguseraction.java
    C:\ApacheGroup\Tomcat\webapps\PersonalWeb\WEB-INF\classes\formactions>javac loginexistinguseraction.java
    loginexistinguseraction.java:10: package databeans does not exist
    import databeans.LoginExistingUserForm;
    ^
    loginexistinguseraction.java:17: cannot find symbol
    symbol : class LoginExistingUserForm
    location: class formactions.LoginExistingUserAction
    LoginExistingUserForm loginData=(LoginExistingUserForm)form;
    ^
    loginexistinguseraction.java:17: cannot find symbol
    symbol : class LoginExistingUserForm
    location: class formactions.LoginExistingUserAction
    LoginExistingUserForm loginData=(LoginExistingUserForm)form;
    ^
    3 errors
    I have the CLASSPATH variable setup tu C:/Sun/Appserver/lib/j2ee.jar
    Can someone help me ? Thank you in advance !

    Thank you very much ! It worked. I'm really new in Jav a programming.
    Now i have encoutered another problem. When i want to login, and enter user name and password i am redirected to a login.do page, instead of Welcome.jsp
    Here is Login.jsp:
    <%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@page contentType="text/html; charset=ISO-8859-1"%>
    <html>
    <head><title>Login Form</title></head>
    <body>
    <html:errors/>
    <html:form action="/login">
    <table border="0" width="200">
    <tr>
         <td>User Name:</td>
         <td><html:text property="userid" maxlength="13"/></td>
    </tr>
    <tr>
         <td>Password:</td>
         <td><html:password property="password" maxlength="13"/></td>
    </tr>
    </table>
    <br />
    <html:submit value="Login"/>
    </html:form>
    </body>
    </html>and here is struts-config.xml :
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE struts-config PUBLIC
              "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
              "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
    <struts-config>
    <!--========================beans for HTML form data=======================-->
    <form-beans>
         <form-bean name="loginBean" type="databeans.LoginExistingUserForm"/>
    </form-beans>
    <!--========================Action Mappings================================-->
    <action-mappings>
         <action path="/login" type="formactions.LoginExistingUserAction" name="loginBean" input="/Login.jsp" scope="session">
              <forward name="succesLogin" path="/pages/Welcome.jsp" redirect="true"/>
              <forward name="failureLogin" path="/pages/Diverse.jsp" redirect="true"/>
         </action>
    </action-mappings>
        <message-resources parameter="MessageResources" />
    </struts-config>

  • JDeveloper problem with actions

    Hello
    I'm working on my first struts application and I have any problem with actions(I think).
    When I run the application, I don't see any data from DB on my page but when I click any of these 4 buttons, then the data load from DB.....Can anybody help me....I want to see my data when the page loads for the first time, not after the button click. Thanks a lot.
    (The buttons shows the rows of the table....first,previous,next,last)
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
    <html:form action="/zuctzaz.do" >
    <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
    <input type="hidden" name="<c:out value='${bindings.statetokenid}'/>" value="<c:out value='${bindings.statetoken}'/>" >
    <tr>
    <td>
    <table>
    <tr>
    <td>
    <table>
    <tr>
    <td><input type="submit" name="event_First" value="First" STYLE="width:35px" <c:out value="${bindings.First.enabledString}" /> ></td>
    <td><input type="submit" name="event_Previous" value="Prev" STYLE="width:35px" <c:out value="${bindings.Previous.enabledString}" /> ></td>
    <td><input type="submit" name="event_Next" value="Next" STYLE="width:35px" <c:out value="${bindings.Next.enabledString}" /> ></td>
    <td><input type="submit" name="event_Last" value="Last" STYLE="width:35px" <c:out value="${bindings.Last.enabledString}" /> ></td>
    </tr>
    </table>
    </td>
    <td>
    <table>
    <tr>
    <td colspan="3"><strong>Z�&#269;tovac� z�znam</strong></td>
    </tr>
    <tr>
    <td>Date</td>
    <td><input type="text" name="textfield1" value="<c:out value="${bindings['datZuct']}"/>"></td>
    <td><c:out value="${bindings['cisPdo']}"/> AND <c:out value="${bindings['zucZazn']}"/></td>
    </tr>
    <tr>
    <td>Place</td>
    <td colspan="2">Brusel</td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </html:form>

    Hy Again!
    I forgot to say one more thing that could be relevant:
    If i add any action from the struts-config.xml in the provider for the <defaultAction> of the portlet it works correctly.
    So the actions work correctly, the problem is that when sending back to the oracle portal the request with the new action, there is no response.
    Pls help!
    Thanx, and best regards!
    Ado

  • DeepMergeClone problem with unsolicited updates

    Hi,
    I am having an odd problem with deepMergeClone and was hoping someone could point me in the correct direction. I am using Weblogic, WebLogicJTSExternalTransactionController, and TopLink 4.6.
    My object model is something like:
    Organization
    - Address
    - Employees(collection of Person)
    - Name, etc...
    Person
    - Address
    - Name, etc...
    Address
    - Region
    - Country
    - Street1, etc...
    The application uses Session Beans that provide TopLink mapped objects to a Servlet layer using Struts. The objects are updated, created, etc. in the Struts actions and then sent to the Session Beans. In the Session Bean we do the something like
    ExternalTransactionController controller = session.getExternalTransactionController();
    UnitOfWork uow = uow = controller.getActiveUnitOfWork();
    uow.readObject(obj); //ensure obj is cached and registered
    uow.deepMergeClone(obj);
    Here is my problem: In the Struts layer, I read a organization by id for an update.
    Updating an organization.address.region will sometimes cause an update to multiple employee's address.region. If you look at the object heirarchy before it gets passed into deepMergeClone, everything looks great.
    If I add code to read the address by id for the organization.address and then set the address into the organization, the update seems to work as expected.
    Is there some rule about needing to register nested objects prior to deepMergeClone? Any other thoughts on what I might be doing wrong?
    Tom

    DeepMergeClone is a very useful feature of TopLink as it allows the application to not have to be concerned with what it changes on the client. The client can traverse any relationships of the objects that are serialized to it (provided the relationships were serialized) and make whatever changes to whatever objects it desires. It can then send the entire object graph back to the server which can does not have to be aware of what the client was doing and can just deepMergeClone everything back into a unit of work and commit the changes to the database.
    Unfortunately the main benefit of deepMergeClone can also be its biggest issue when something goes wrong. DeepMergeClone traverses "everything" related to an object and merges "everything", for complex objects this can occasionally lead to the merging of changes that were not intended or desired by the client.
    Examples can include:
    - Transient attributes. These will be serialized as null so will be merged as null into the unit of work causing incorrect updates to null.
    - Duplicate objects and loss of object identity. Since TopLink is not running on the client, it is possible for the client to violate object identity through retrieving two separately serialized objects from the server that contain relationships to the same object. If these two objects are then related and serialized back to the server and deepMergeClone'd, TopLink will be given two different versions of the same object, this object can be merged twice and one copy can overwrite the other copy. This may be what is occurring with the problem at the start of this thread.
    There is another thread with a similar issue that also links to another thread that has a good description of each of the unit of work merge APIs.
    Re: 1-M deepMergeClone leaves old items in DB
    In general deepMergeClone is a very useful feature, and if you are using it successfully definitely don't stop using it. But if you commonly experience problems, or performance issues, you may wish the consider one of the other merge APIs that give the application more control over what is and is not merged.
    If you are still experiencing the problem and have verified that you are not violating object identity, you will probably need to contact technical support to have them investigate your issue in more detail.

  • Struts Portlet With Input Parameters

    Hi Everyone,
    Am I able to write a struts portlet that has input parameters? Right now, I have a struts portlet with a provider.xml that looks like this:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <?providerDefinition version="3.1"?>
    <provider class="oracle.portal.provider.v2.DefaultProviderDefinition">
    <session>true</session>
    <passAllUrlParams>true</passAllUrlParams>
    <portlet class="oracle.portal.provider.v2.DefaultPortletDefinition">
    <id>1</id>
    <name>ManageQuotes</name>
    <title>Manage Quotes Portlet</title>
    <description>Manage Quotes Portlet</description>
    <timeout>40</timeout>
    <showEditToPublic>false</showEditToPublic>
    <hasAbout>false</hasAbout>
    <showEdit>false</showEdit>
    <hasHelp>false</hasHelp>
    <showEditDefault>false</showEditDefault>
    <showDetails>false</showDetails>
    <inputParameter class="oracle.portal.provider.v2.DefaultParameterDefinition">
    <name>encryptedDealerNumber</name>
    <displayName>encryptedDealerNumber</displayName>
    </inputParameter>
    <renderer class="oracle.portal.provider.v2.render.RenderManager">
    <renderContainer>true</renderContainer>
    <renderCustomize>true</renderCustomize>
    <autoRedirect>true</autoRedirect>
    <contentType>text/html</contentType>
    <showPage class="oracle.portal.provider.v2.render.http.StrutsRenderer">
    <defaultAction>/viewquotes.do</defaultAction>
    </showPage>
    </renderer>
    </portlet>
    </provider>
    The <session>true</session> and <passAllUrlParams>true</passAllUrlParams> need to be there to have a struts portlet. The problem is when I put my portlet on a page and then check out 'Page Properties', 'Portlet Parameters', there are no parameters that show up for my portlet. Can anyone help me?
    Thanks
    Cory

    I just went through this two days ago. I ended up logging a TAR/SR with Oracle and it turns out Struts portlets do not support input parameters. Instead you have to set the passAllUrlParams tag to true and then just use portletRequest.getParameter("parameterName") to retrieve page parameters. You have to be careful here because in this older style of doing parameters you have to manage all the uniqueness in naming parameters in case you have more than one portlet on the same page. However, it seems that if all you want to do is read the portal page parameters that unique naming doesn't come into play.
    In my case I have an OmniPortlet setting some Page Parameters via an Event. Then in my struts portlet I just do:
    String foo = "";
    String bar = "";
    PortletRenderRequest portletRequest = (PortletRenderRequest)
    request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    if ( portletRequest != null ) {  
    foo = portletRequest.getParameter("Foo"));
    bar = portletRequest.getParameter("Bar"));
    That seems to work just fine for me, but in my case I will only ever use my portlet once per page so this fine. If you wanted the same portlet to have different page parameters fed to it for different instances on the same page this style won't work since all the portlets would just read the same page parameters since those page parameters names are coded in the implementation code.
    Hope that helps,
    David

  • Jsp, struts, problem in session invalidation

    Hello,
    Though have seen many topics here related to this, still cudn't get a proper solution. I'm having a struts application with many jsp's. have used session.invalidate for expiring sessions. Now the problem is my jsp have both button specific action and <html:link> forwards. tried including "response.setHeader("Cache-Control", "no-cache"); //Forces caches to obtain a new copy of the page from the origin server
    response.setHeader("Cache-Control", "no-store"); //Directs caches not to store the page under any circumstance
    response.setDateHeader("Expires", 0); //Causes the proxy cache to see the page as "stale"
    response.setHeader("Pragma", "no-cache"); //HTTP 1.0 backward compatibility"
    got it from one of the topics here only.
    Now when i logout from any of my jsp and press back button of browser, the jsp's having struts specific action(http://...../xyz/edituser.do)works fine but forward specific jsp's(http://...../xyz/edit.jsp) is not redirecting to my login page(page not found error :- /xyz/edit.jsp). Also what if i press the browser back button more thn once????? weather this thing works on client side???at the moment in my application even the action specific logout is not working.........how can i solve this problem elegantly?????

    I faced same problem.
    I used below code.
    This code in every Authorized page.
    <%
    response.setHeader("Cache-Control","no-cache");
    response.setHeader("Cache-Control","no-store");
    response.setDateHeader("Expires", 0);
    response.setHeader("Pragma","no-cache");
    %>
    <%
    String username=(String) session.getAttribute("user");
    if(null==username)
         response.sendRedirect("../jsp-modLogin/login.jsp");
    }This code in logout page
    <%
    session.removeAttribute("user");
    session.invalidate();
    response.sendRedirect("../index.jsp");
    %>For me, It is working fine...
    Check it with ur code
    Regards
    Ramesh

  • Drill Out Problem with drill down

    Hello,
    help needed.
    I have two workbooks. The first consists of a hierachical Rowset. This workbook ist stored complettly collapsed.
    When I open it in Portal and use the option "analyze" and after that follow a drillout link to the second workbook it works.
    When I open it in Portal and use the option "analyze" open one level of the hierarchy and after that follow a drillout link to the second workbook the "save dialog" apears. If I answer yes I get an error and also if the answer is no.
    I also set in the discoverer\configuration.xml the flag saveWorkBehavior="never_save" nothing (still asking).
    Logging level is none
    Discoverer 10.1.2.48.18 with patch 5729515
    Can anybody can give me a solution, workaround or hint
    Application.log
    07/01/09 14:54:18 discoverer: [ERROR] [AJPRequestHandler-ApplicationServerThread-6] oracle.discoverer.applications.framework.ApplicationController._logException error.handling.event
    oracle.discoverer.applications.framework.ApplicationException: error.handling.event
         at oracle.discoverer.applications.framework.GlobalExceptionHandler.execute(Unknown Source)
         at org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:553)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486)
         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:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.discoverer.applications.framework.ApplicationEncodingFilter.doFilter(Unknown Source)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    Caused by: java.lang.NullPointerException
         at oracle.discoverer.applications.framework.RawRequest.populateParameters(Unknown Source)
         at oracle.discoverer.applications.framework.RawRequest.<init>(Unknown Source)
         at oracle.discoverer.applications.framework.RawRequest.initDeferredRequest(Unknown Source)
         at oracle.discoverer.applications.framework.RawRequest.<init>(Unknown Source)
         at oracle.discoverer.applications.framework.ApplicationController.execute(Unknown Source)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         ... 14 more

    Hi user 552235...
    I am not sure if my next post will help you, since I am not working with portal, but I had a problem with drill to link in the same disco version (10.1.2.48.18) and the problem solved after applying patch 5507746 for bug 5475467.
    You can read more in metalink with the number I supplied you and try in a test environment of course...
    Hope this will help you solving your problem, if it does please update the thread for the rest of our community...
    Gidi Halamish

  • JNDI problem with Sun Application Server

    I am trying to call a extremely simple EJB from a remote computer. But everytime I run the client I get a Class castException. I have used Weblogic and Jboss in the past and I never had any problem with JNDI. I included all the files except for the descriptor. Please help, this is driving me nut.
    Here is the exception i get:
    java.lang.ClassCastException
    at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
    at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
    at clients.testEjbTest.main(testEjbTest.java:42)
    The remote Interface :
    package ejb.test;
    import javax.ejb.*;
    public interface Test extends javax.ejb.EJBObject{
    public String getResult() throws java.rmi.RemoteException;
    The Home interface is:
    package ejb.test;
    import javax.ejb.*;
    public interface TestHome extends javax.ejb.EJBHome{
    public Test create() throws java.rmi.RemoteException, CreateException;
    The Bean is:
    package ejb.test;
    import javax.ejb.*;
    public class TestBean implements javax.ejb.SessionBean {
    public TestBean() {}
    public String getResult() { return "hello";}
    public void ejbActivate() {  }
    public void ejbPassivate() {  }
    public void ejbRemove() {  }
    public void ejbCreate() throws CreateException {  }
    public void setSessionContext(javax.ejb.SessionContext sessionContext) { }
    The client is:
    public class testEjbTest {
    public testEjbTest() { }
    public static void main(String[] args) {
    try{
    Properties env = new Properties();
    env.setProperty("java.naming.factory.initial", "com.sun.jndi.cosnaming.CNCtxFactory" );
    env.setProperty("java.naming.provider.url", "iiop://192.168.0.102:3700");
    InitialContext ic = new InitialContext(env);
    Object objref = ic.lookup("TestBean");
    Object tt = PortableRemoteObject.narrow(objref, ejb.test.TestHome.class);
    }catch(Exception e){e.printStackTrace();}

    Hi,
    I am new to this Forum.
    I have an application running on Weblogic.
    I want to shift to using SunOne as the Webserver and weblogic as application server.
    But when I deploy the application I am getting this ClassCastException
    at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow.
    java.lang.ClassCastException
         at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
         at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
         at com.elsevier.portal.admin.web.proxy.LoginProxy.getLoginSession(LoginProxy.java:156)
         at com.elsevier.portal.admin.web.proxy.LoginProxy.authenticateUser(LoginProxy.java:48)
        at com.elsevier.portal.admin.web.actions.LoginAction.login(LoginActi
    on.java:201)
         at com.elsevier.portal.admin.web.actions.LoginAction.execute(LoginAction.java:80)
         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:807)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletServic
    e(StandardWrapperValve.java:771)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    warning: CORE3283: stderr: at org.apache.catalina.core.StandardHostValve.invoke(StandardHostVal
    ve.java:209)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
         at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)The code snippet is as follows�.
    protected LoginSession getLoginSession() throws ApplicationException {
    LoginSessionHome home = null;
    LoginSession object = null;
    try {
    home = (LoginSessionHome) (PortableRemoteObject.narrow(ProxyUtil.getEJBHome(getProperties().getProperty(DataCoreConstants.LOGIN_JNDI_NAME),getProperties()),LoginSessionHome.class));
    object = home.create();
    catch(ClassCastException cse){
    cse.printStackTrace();
    logger.error("Class Cast Exception is thrown while casting the Object to                      LoginSessionHome");
    logger.error(cse);
    throw new ApplicationException(ExceptionConstants.CLASS_CAST_EXCEPTION);
    return object;
    }Same method is running on weblogic without any problem�
    Help needed urgently.
    Regards,
    Neha.

  • How to run Struts program with the help of tomcat

    Hello Everybody
    This is Adesh.I am a newcomer of java and facing a problem with struts, so if any one know how to set the path of struts and how to run struts program, so plz inform me.
    THX in Advance.............................................

    struts-config.xml
    <struts-config>
    <action-mappings>
         <action path  = "/welcome"
                    type  = "Welcome"
                    scope="session">
                <forward name="success" path=".welcome"/>
                <forward name="failure" path=".base.error"/>
         </action>
    </action-mappings>
        <plug-in className="org.apache.struts.tiles.TilesPlugin">
            <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml"/>
            <set-property property="definitions-debug" value="1"/>
            <set-property property="definitions-parser-details" value="0"/>
            <set-property property="definitions-parser-validate" value="true"/>
        </plug-in>
    </struts-config>tiles-defs.xml
    <tiles-definitions>
         <definition name = ".base" path = "/include/template.jsp">
              <put name = "title" value = "${title}"/>
              <put name = "header" value = "/include/top.jsp"/>
              <put name = "body" value = "${body}"/>
              <put name = "footer" value = "/include/footer.jsp"/>
         </definition>
    </tiles-definitions>web.xml
    <servlet>
            <servlet-name>action</servlet-name>
            <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
            <init-param>
                <param-name>config</param-name>
                <param-value>/WEB-INF/struts-config.xml</param-value>
            </init-param>
    <init-param>
                <param-name>definitions-config</param-name>
                <param-value>/WEB-INF/tiles-defs.xml</param-value>
            </init-param>
            <load-on-startup>1</load-on-startup>
        </servlet>
    <servlet>
            <servlet-name>init</servlet-name>
            <servlet-class>Init</servlet-class>
            <load-on-startup>2</load-on-startup>
        </servlet>
        <servlet-mapping>
            <servlet-name>action</servlet-name>
            <url-pattern>*.do</url-pattern>
        </servlet-mapping>
      <jsp-config>
        <taglib>
            <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
            <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
            <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
            <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/wall.tld</taglib-uri>
            <taglib-location>/WEB-INF/wall.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/c.tld</taglib-uri>
            <taglib-location>/WEB-INF/c.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/fn.tld</taglib-uri>
            <taglib-location>/WEB-INF/fn.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/fmt.tld</taglib-uri>
            <taglib-location>/WEB-INF/fmt.tld</taglib-location>
        </taglib>
    </jsp-config>
        <resource-ref>
            <description>DB Connection</description>
            <res-ref-name>jdbc/SQLServerDB</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <res-auth>Container</res-auth>
        </resource-ref>
    </web-app>This should help....

Maybe you are looking for

  • I have forgotten my password. how can i get into the ibook g3

    My brother had baught me this i book g3. and he had set it up in a way that whenever i start the mac it goes in my account. so i never knew the password. but when i went into user accounts and changed the way you log in, it started asking me for the

  • Null value in Datetime field

    I have a form that inserts data, but the date fields are getting a default value (1/1/1900 12:00:00 AM) even though I don't insert a value for that field. How would I insert a NULL value in the datatime fields in MSSQL.instead of the default value (1

  • Workcenter group link to call URL in new browser

    Hi, using the transaction launcher i configured a workcenter group link to call an URL in a new browser window. This works. The requirement is now that in the CRM L-shape the opened workcenter should stay. At the moment to workcenter is gone at the m

  • Indesign CS6 crashes repeatedly

    When do crashes occur? Seemingly after an object (jpg, pdf) has been imported, individual page objects (text, image container) get corrupted. When accessing them (or menu items) CS6 crashes. Workaround: Save as IML-file, reopen, save. Sometimes this

  • Playlists from windows media player into itunes.

    I used import playlist and it doesnt work. Like my computer doesnt even register that i clicked that. Help please!