Struts and Threads

Are Struts thread-safe.
Also please let me know the disadvantages of Struts
Thanks

It is not thread safe -- your Action classes must be programmed just as if you were coding a JSP/ Servlet. I think the disadvantage of using Struts is when you want to write model 1.
To quote from the Action class javadoc :
Actions must be programmed in a thread-safe manner, because the controller will share the same instance for multiple simultaneous requests. This means you should design with the following items in mind:
Instance and static variables MUST NOT be used to store information related to the state of a particular request. They MAY be used to share global resources across requests for the same action.

Similar Messages

  • Urgently!! Deploy project using Struts and Toplink

    Hello. I want to make a deploy of a project in wich I'm using Struts and Toplink technologies.
    I'm using JDeveloper 10g for Windows and my production server is a SUN V880 with Soloaris 8 and I make it ok, but when I run it since a PC in the intranet the following errors appears (obviously those don't appear before):
    java.lang.NullPointerException     at org.apache.struts.taglib.html.JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:309)     at jsp.login._jspService(_login.java:50)     [SRC:/jsp/login.jsp:5]     at com.orionserver[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)     at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:567)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:302)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)     at java.lang.Thread.run(Thread.java:536)
    Thank you so much for help.

    NOO!! :( I don't install any libraries in the server, but in the WAR file of the application, in the lib folder, there was the jars corresponding. I thought that those libraries, in the WAR file, was "local" to the project, anyway, the Struts and Toplink libraries must be global at server level, 'cause I will use it sure once agian, and now I'm trying to install those in the server...
    Thank you so much!!

  • Struts and ADF in Portal

    Hello. We have had a TAR going for some time regarding an issue with Struts and ADF in Portal. This is the summary of the TAR:
    Customer followed the following document to create his Struts ADF application:
    Developing an End-to-End Web Application Using the Default Technology Scope
    at
    http://www.oracle.com/technology/obe/obe9051jdev/ADFtoJSP/defaultendtoend.htm
    After following the steps in the documentation, his application worked just fine.
    - After this he decided to portletize his application using the following document:
    OracleAS Portal Developer Kit (PDK)
    How to create a Struts Portlet ?
    at
    http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/ARTICLES/pdkstruts/portletize-your-app.html
    When adding his portlet to a page, he basically received a portlet without any data, while the same worked fine outsi
    de of Portal.
    These are examples from the JSP file that do not show up in the portlet:
    <c:out value="${bindings.DepartmentsView1.labels['DepartmentId']}">
    <c:out value="${bindings.DepartmentId.label}"/>
    </c:out>
    We figured out that if we add the following filter mapping then it works fine:
    <filter-mapping>
    <filter-name>ADFBindingFilter</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>
    This filter mapping would mean that it maps all URLs to the ADFBindingFilter. I suppose this would not be necessary and we're concerned about the implications this might cause and we believe that there should be a better solution for this.
    The final reply from support was that Portal is not yet supported with ADF technology. Does anyone have any comment on the above filter issue and other thoughts on using Struts and ADF in Portal? Another issue we found was that the PDK Struts tags do not support EL expressions. Have a look at this forum post:
    Re: Struts and nested tags in parameters. Possible?

    I am trying to create a portlet with JSF/ADF
    I Developed a Application with Oracle ADF UIX from: http://www.oracle.com/technology/obe/obe_as_1012/j2ee/develop/client/uix/lesson_uix.htm
    and then I followed this link: http://oracle001.cedecra.it/pdk/articles/pdkstruts/portletize-your-app.html
    to portletize the application
    and I am getting the below error message:
    500 Internal Server Error
    java.lang.SecurityException: sealing violation at com.evermind.naming.ContextClassLoader.defineClass(ContextClassLoader.java:1153) at com.evermind.naming.ContextClassLoader.defineClass(ContextClassLoader.java:1065) at com.evermind.naming.ContextClassLoader.findClass(ContextClassLoader.java:404) at com.evermind.naming.ContextClassLoader.loadLocalClassFirst(ContextClassLoader.java:158) at com.evermind.naming.ContextClassLoader.loadClass(ContextClassLoader.java) at java.lang.ClassLoader.loadClass(ClassLoader.java) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:539) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java) at com.evermind.util.OC4JSecureClassLoader.defineClassEntry(OC4JSecureClassLoader.java:172) at com.evermind.naming.ContextClassLoader.defineClass(ContextClassLoader.java:1179) at com.evermind.naming.ContextClassLoader.defineClass(ContextClassLoader.java:1065) at com.evermind.naming.ContextClassLoader.findClass(ContextClassLoader.java:404) at com.evermind.naming.ContextClassLoader.loadLocalClassFirst(ContextClassLoader.java:158) at com.evermind.naming.ContextClassLoader.loadClass(ContextClassLoader.java) at java.lang.ClassLoader.loadClass(ClassLoader.java) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:539) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java) at com.evermind.util.OC4JSecureClassLoader.defineClassEntry(OC4JSecureClassLoader.java:172) at com.evermind.naming.ContextClassLoader.defineClass(ContextClassLoader.java:1179) at com.evermind.naming.ContextClassLoader.defineClass(ContextClassLoader.java:1065) at com.evermind.naming.ContextClassLoader.findClass(ContextClassLoader.java:404) at com.evermind.naming.ContextClassLoader.loadLocalClassFirst(ContextClassLoader.java:158) at com.evermind.naming.ContextClassLoader.loadClass(ContextClassLoader.java) at java.lang.ClassLoader.loadClass(ClassLoader.java) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:1655) at java.lang.Class.getMethod0(Class.java:1901) at java.lang.Class.getMethod(Class.java:984) at oracle.portal.utils.xml.v2.DefaultNodeHandler.findMethod(Unknown Source) at oracle.portal.utils.xml.v2.DefaultNodeHandler.setCustomValue(Unknown Source) at oracle.portal.utils.xml.v2.DefaultNodeHandler.handleSimpleElement(Unknown Source) at oracle.portal.utils.xml.v2.DefaultNodeHandler.processNode(Unknown Source) at oracle.portal.utils.xml.v2.DefaultNodeHandler.processNode(Unknown Source) at oracle.portal.provider.v2.http.DefaultProviderLoader.getProviderDefinition(Unknown Source) at oracle.portal.provider.v2.http.DefaultProviderLoader.validate(Unknown Source) at oracle.webdb.provider.v2.adapter.soapV1.ProviderAdapter.validate(Unknown Source) at oracle.webdb.provider.v2.adapter.soapV1.ProviderAdapter.showTestPage(Unknown Source) at oracle.webdb.provider.v2.adapter.soapV1.ProviderAdapter.handleHttp(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java) at oracle.webdb.provider.v2.adapter.SOAPServlet.doHTTPCall(Unknown Source) at oracle.webdb.provider.v2.adapter.SOAPServlet.service(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65) at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source) at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16) at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:239) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:669) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:340) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:285) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:126) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) at java.lang.Thread.run(Thread.java:534)
    [b]provider.xml
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <?providerDefinition version="3.1"?>
    <provider class="oracle.portal.provider.v2.DefaultProviderDefinition">
    <session>true</session>
    <passAllUrlParams>true</passAllUrlParams>
    <preferenceStore class="oracle.portal.provider.v2.preference.FilePreferenceStore">
    <name>prefStore1</name>
    <useHashing>true</useHashing>
    </preferenceStore>
    <portlet class="oracle.portal.provider.v2.DefaultPortletDefinition">
    <id>1</id>
    <name>MyTest2Portlet</name>
    <title>My Test2 Portlet</title>
    <description>My Test2 Portlet Description</description>
    <timeout>40</timeout>
    <showEditToPublic>false</showEditToPublic>
    <hasAbout>false</hasAbout>
    <showEdit>true</showEdit>
    <hasHelp>false</hasHelp>
    <showEditDefault>false</showEditDefault>
    <showDetails>false</showDetails>
    <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>/portal/browseDeptEmp.do</defaultAction>
    </showPage>
    <editPage>/htdocs/mytest2portlet/MyTest2PortletEditPage.jsp</editPage>
    </renderer>
    <personalizationManager class="oracle.portal.provider.v2.personalize.PrefStorePersonalizationManager">
    <dataClass>oracle.portal.provider.v2.personalize.NameValuePersonalizationObject</dataClass>
    </personalizationManager>
    </portlet>
    </provider>
    struts_config.xml
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
    <form-beans>
    <form-bean name="DataForm" type="oracle.adf.controller.struts.forms.BindingContainerActionForm"/>
    </form-beans>
    <action-mappings>
    <action path="/portal/browseDeptEmp" className="oracle.adf.controller.struts.actions.DataActionMapping" type="oracle.adf.controller.struts.actions.DataForwardAction" name="DataForm" parameter="/browseDeptEmp.uix">
    <set-property property="modelReference" value="browseDeptEmpUIModel"/>
    <forward name="formEmpLink" path="/portal/formEmp.do"/>
    <forward name="createEmpLink" path="/portal/createEmpAction.do"/>
    <forward name="searchEmpLink" path="/portal/searchEmp.do"/>
    </action>
    <action path="/portal/formEmp" className="oracle.adf.controller.struts.actions.DataActionMapping" type="oracle.adf.controller.struts.actions.DataForwardAction" name="DataForm" parameter="/formEmp.uix">
    <set-property property="modelReference" value="formEmpUIModel"/>
    </action>
    <action path="/portal/createEmpAction" className="oracle.adf.controller.struts.actions.DataActionMapping" type="oracle.adf.controller.struts.actions.DataAction" name="DataForm">
    <set-property property="modelReference" value="formEmpUIModel"/>
    <set-property property="methodName" value="formEmpUIModel.Create"/>
    <set-property property="resultLocation" value="${requestScope.methodResult}"/>
    <set-property property="numParams" value="0"/>
    <forward name="success" path="/portal/formEmp.do"/>
    </action>
    <action path="/portal/searchEmp" className="oracle.adf.controller.struts.actions.DataActionMapping" type="oracle.adf.controller.struts.actions.DataForwardAction" name="DataForm" parameter="/searchEmp.uix">
    <set-property property="modelReference" value="searchEmpUIModel"/>
    </action>
    </action-mappings>
    <message-resources parameter="view.ApplicationResources"/>
    </struts-config>
    web.xml
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <description>Empty web.xml file for Web Application</description>
    <context-param>
    <param-name>CpxFileName</param-name>
    <param-value>DataBindings</param-value>
    </context-param>
    <context-param>
    <param-name>oracle.portal.log.LogLevel</param-name>
    <param-value>4</param-value>
    </context-param>
    <filter>
    <filter-name>ADFBindingFilter</filter-name>
    <filter-class>oracle.adf.model.servlet.ADFBindingFilter</filter-class>
    <init-param>
    <param-name>encoding</param-name>
    <param-value>windows-1252</param-value>
    </init-param>
    </filter>
    <filter-mapping>
    <filter-name>ADFBindingFilter</filter-name>
    <url-pattern>*.jsp</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>ADFBindingFilter</filter-name>
    <url-pattern>*.jspx</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>ADFBindingFilter</filter-name>
    <servlet-name>uix</servlet-name>
    </filter-mapping>
    <!-- <filter-mapping>
    <filter-name>ADFBindingFilter</filter-name>
    <servlet-name>action</servlet-name>
    </filter-mapping>
    -->
    <filter-mapping>
    <filter-name>ADFBindingFilter</filter-name>
    <servlet-name>SOAPServlet</servlet-name>
    </filter-mapping>
    <servlet>
    <servlet-name>SOAPServlet</servlet-name>
    <description>Extended Portal SOAP Server</description> <servlet-class>oracle.webdb.provider.v2.adapter.SOAPServlet</servlet-class>
    </servlet>
    <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>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>uix</servlet-name>
    <servlet-class>oracle.cabo.servlet.UIXServlet</servlet-class>
    <init-param>
    <param-name>oracle.cabo.servlet.pageBroker</param-name>
    <param-value>oracle.cabo.servlet.xml.UIXPageBroker</param-value>
    </init-param>
    <init-param>
    <param-name>oracle.cabo.servlet.UIXRequestListeners</param-name>
    <param-value>oracle.cabo.adf.rt.InitModelListener</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>SOAPServlet</servlet-name>
    <description>Extended Portal SOAP Server</description>
    <servlet-class>oracle.webdb.provider.v2.adapter.SOAPServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>uix</servlet-name>
    <url-pattern>*.uix</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>uix</servlet-name>
    <url-pattern>/uix/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>SOAPServlet</servlet-name>
    <url-pattern>/providers</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>SOAPServlet</servlet-name>
    <url-pattern>/providers/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>35</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <welcome-file-list>
    <welcome-file>index.uix</welcome-file>
    </welcome-file-list>
    </web-app>
    someone please help me out.
    Thank you so much

  • Problem occurs when working with the struts and mYsql database

    Hi all,
    I am working on Struts and using database mysql. I am getting this error when i tries to modify the values of jsp page and after modify when i submit a page ,the values are modifying but it is showing this error.
    After modifying the values i am forwarding the controller to the Display page where all records from the databse will be displayed.Please tell me how to solve.this..
    Thanks
    javax.servlet.ServletException: Cannot find bean employees in any scope
         at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:495)
         at org.apache.jsp.viewEmployee_jsp._jspService(viewEmployee_jsp.java:208)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:162)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:627)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:306)
         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:716)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)
    root cause
    javax.servlet.jsp.JspException: Cannot find bean employees in any scope
         at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:938)
         at org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:277)
         at org.apache.jsp.viewEmployee_jsp._jspService(viewEmployee_jsp.java:124)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:162)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:627)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:306)
         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:716)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)
    Apache Tomcat/4.1.31

    Hi,
    i think you have got this sample application from Mastering Jakarta Struts book.
    Try the following changes, you can escape from this exception:
    1) In the employeelist.jsp, change the name attribute to "USER instead of "employees" as follows
    <logic:iterate id="employee" name="USER">
    and also <logic:present name="USER"> </logic:present> before and after the iterate tags.
    2)In the EmployeeList Action.java,add the following in the excute method...
              EmployeesActionMapping employeesMapping =
                   (EmployeesActionMapping)mapping;
                   if ( employeesMapping.isLoginRequired() ) {
                        HttpSession session = request.getSession();
                             if ( session.getAttribute("USER") == null ) {
                                  System.out.println("session.getAttribute is NULL");
                                  target = "login";
                             ActionErrors errors = new ActionErrors();
                             errors.add(ActionErrors.GLOBAL_ERROR,
                             new ActionError("errors.login.required"));
                             if (!errors.empty()) {
                             saveErrors(request, errors);
                        }else{
                   session.setAttribute("USER",getEmployees());
    Thanks,
    Shanmu

  • I have a problem in this that i want to paas a form in a case that when user pres n then it must go to a form but error arises and not working good and threading is not responding

    made in cosmos help please need it
    using System;
    using Cosmos.Compiler.Builder;
    using System.Threading;
    using System.Windows.Forms;
    namespace IUOS
        class Program
            #region Cosmos Builder logic
            // Most users wont touch this. This will call the Cosmos Build tool
            [STAThread]
            static void Main(string[] args)
                BuildUI.Run();
            #endregion
            // Main entry point of the kernel
            public static void Init()
                var xBoot = new Cosmos.Sys.Boot();
                xBoot.Execute();
                Console.ForegroundColor = ConsoleColor.DarkBlue;
                a:
                Console.WriteLine("------------------------------");
                Console.WriteLine("WELCOME TO THE NEWLY OS MADE BY THE STUDENTS OF IQRA UNIVERSITY!");
                Console.WriteLine("------------------------------");
                Console.WriteLine();
                Console.WriteLine();
                Console.WriteLine();
                Console.WriteLine("\t _____                                
                Console.WriteLine("\t|     |        |            |        
    |            |      |");
                Console.WriteLine("\t|     |        |            |        
    |            |      |");
                Console.WriteLine("\t|     |        |            |        
    |            |      |");
                Console.WriteLine("\t|     |        |            |        
    |            |      |___________");
                Console.WriteLine("\t|     |        |            |        
    |            |                  |");
                Console.WriteLine("\t|     |        |            |        
    |            |                  |");
                Console.WriteLine("\t|     |        |            |        
    |            |                  |");
                Console.WriteLine("\t|     |        |            |        
    |            |                  |");
                Console.WriteLine("\t|     |        |            |        
    |            |                  |");
                Console.WriteLine("\t|_____|        |____________|         |____________|      ____________");
                string input;
                Console.WriteLine();
                Console.Write("\nAbout OS     : a");
                Console.Write("\nTo Shutdown  : s");
                Console.Write("\nTo Reboot    : r");
                Console.Write("\nStart Windows Normaly : n");
                Console.WriteLine();
                input = Console.ReadLine();
                if (input == "s" || input == "S"){
                    Cosmos.Sys.Deboot.ShutDown();
                else
                if (input == "r" || input == "R"){
                    Cosmos.Sys.Deboot.Reboot();
                else
                if (input == "a" || input == "A"){
                    Console.ForegroundColor = ConsoleColor.DarkBlue;
                    Console.Clear();
                    Console.WriteLine("\n\n\n-------------------------------------");
                    Console.WriteLine("version: DISPLAYS OS VERSION");
                    Console.WriteLine("about: DISPLAYS INFO ABOUT ANGRY OS");
                    Console.WriteLine("hello or hi: DISPLAYS A HELLO WORLD");
                    Console.WriteLine("MESSAGE THAT WAS USED TO TEST THIS OS!!");
                    Console.WriteLine("-----------------------------------");
                    Console.Write("You Want to know : ");
                    input = Console.ReadLine();
                    if (input == "version"){
                        Console.WriteLine("--------------------");
                        Console.WriteLine("OS VERSION 0.1");
                        Console.WriteLine("--------------------");
                    else
                    if (input == "about"){
                        Console.WriteLine("--------------------------------------------");
                        Console.WriteLine("OS IS DEVELOPED BY Qazi Jalil-ur-Rahman & Syed Akber Abbas Jafri");
                        Console.WriteLine("--------------------------------------------");
                    Console.Write("Want to go back to the main window");
                    Console.Write("\nYes : ");
                    string ans = Console.ReadLine();
                    if (ans == "y" || ans == "Y")
                        goto a;
                        Thread.Sleep(10000);
                    else
                    if (input == "n" || input == "N")
                        Thread.Sleep(5000);
                        Console.Clear();
                        for (int i = 0; i <= 0; i++){
                            Console.Write("\n\n\n\n\t\t\t\t\t  ____        ____   ___  
                            Console.Write("\n\t\t|\t\t |  |      |    |     
    |   |  | |  |  |");
                            Console.Write("\n\t\t|\t|    |  |----  |    |     
    |   |  | |  |  |---");
                            Console.Write("\n\t\t|____|____|  |____  |___ |____  |___|  |    |  |___");
                            Thread.Sleep(500);
                        Thread.Sleep(5000);
                        Console.Clear();
                        BootUserInterface();
                        Console.ReadLine();
    //                    Form1 fo = new Form1();
                    else{
                        for (int i = 0; i <= 5; i++){
                            Console.Beep();
                            Thread.Sleep(1000);
                            goto a;
                while (true);
            private static void BootUserInterface() {
                Thread t = new Thread(UserInterfaceThread);
                t.IsBackground = true;
                t.SetApartmentState(ApartmentState.STA);
                t.Start();
            private static void UserInterfaceThread(object arg) {
                Form1 frm = new Form1();  // use your own
                Application.Run(frm);
     

    Hi
    Jalil Cracker,
    >>when user pres n then it must go to a form but error arises and not working good and threading is not respondin
    Could you post the error information? And which line caused this error?
    If you want to show Form1, you can use form.show() method
    Form1 frm = new Form1();
    frm.Show();
    In addition, Cosmos is an acronym for C# Open Source Managed Operating System. This is not Microsoft product.If the issue is related to Cosmos, it would be out of our support. Thanks for your understanding. And you need raise an issue at Cosmos site.
    Best regards,
    kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Struts and JSF Integration in OPDk-java based portlet

    Hi,
    thanks in advance for your help.
    I'm developing a PDK java based portlet. For some reasons I cannot use the JSF bridge but I would like to integrate Struts and Jsf in my portlet, using Struts to manage actions and navigation and JSF (with ADF Faces components) for the view. I'm using the Strus-Faces library.
    When I try to submit my portlet form, I receive the error "request URL not found on this server". I'm posting some exstracts of my code.
    It's made of three pages: the main one "Integration1ShowPage", "error" and "result". The MainAction.java displays my mainPage, where there's a form. To keep it easy, when the user submits this form, the ActionName returns "success" and the "result" page should be displayed.
    The MainAction works properly: the portlet is displayed but when I tried to submit the form I receive
    The requested URL /provaDeploy/htdocs/integration1/integration1ShowPage.do was not found on this server.Could you please suggest me something?
    Many many thanks,
    B.
    <struts-config>
    <action-mappings>
      <action path = "/mainAction" type = "strutsjsfintegration1.MainAction">
        <forward name = "success" path = "/faces/htdocs/integration1/integration1ShowPage.faces"/>
      </action>
      <action path = "/nameAction" name = "nameForm"
      input = "/faces/htdocs/integration1/integration1ShowPage.faces" scope = "request"
      type = "strutsjsfintegration1.NameAction">
        <forward name = "success" path = "/faces/htdocs/integration1/result.faces"/>
        <forward name = "failure" path = "/faces/htdocs/integration1/error.faces"/>
        <forward name = "again" path = "faces/htdocs/integration1/integration1ShowPage.faces"/>
      </action>
    </action-mappings>
    <controller>
      <set-property property = "processorClass"
       value="org.apache.struts.faces.application.FacesRequestProcessor"/>
       </controller>
    <message-resources parameter="definitiveStrutsPortlet.ApplicationResources"/>
    </struts-config>

    Hi,
    have a look at this whitepaper for how to use JavaScript in ADF.
    http://www.oracle.com/technetwork/developer-tools/jdev/1-2011-javascript-302460.pdf
    This link here (http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html --> see sample 71) shows an integration sample between a Java Applet and ADF. Its a similar use case to yours
    Frank

  • Can Struts and JSF coexist?

    I have a Struts based application and now I want to build an additional module on top of that using pure JSF. My question is, can Struts and JSF co-exist in the same application? If yes, what are the cons of that approach? What are the places I need to tweak in the configuration files so that they work together?
    thanks,

    Hi,
    Yes they can coexist. Actually that's the approach recommended by Craig McClanahan. I have developed a full enterprise application (80% completed) which uses JSF in front and Struts in the back using Struts-Faces integration library (developed by Apache).
    So far I haven't faced any major issues with this approach. However, I haven't try using Struts validator on JSF objects.
    Read the article below on how to integrate JSF w/ Struts.
    http://www.oracle.com/technology/pub/articles/masterj2ee/j2ee_wk8.html

  • Weblogic Enterprise 5.1 and threads

    I know when building servers based on WLE 4.2 in was a big no-no to link in threading libraries like pthread and thread. Is this still the case in Weblogic Enterprise 5.1?

    According to the product information, WLE 5.1 does not support Oracle 8.1.6, it
    only goes up to
    Oracle 8.1.5. But in general, I thought that with oracle there are 2 sets of
    libraries, one for threads and
    one for non-threaded support. You need to use the correct one, in the case of
    WLE, that would be the
    non-threaded one.
    MAS
    Paul Power wrote:
    Thanks Mary,
    Do you know of any customers who have managed to work
    with Oracle 8.1.6 without linking with the thread libraries ?
    cheers,
    P.
    Mary Ann Slavin wrote in message <[email protected]>...
    WLE 5.1 C++ is not a threaded product. Compiling WLE 5.1 C++ with thread
    libraries is not supported and will give unpredictable results for allprograms.
    This should not be done.
    Paul Power wrote:
    Hi Mary,
    Is it a dictate from BEA that you "can't" link with thread libraries ?
    We are using WLE 5.0.1 ( and some 5.1) with Oracle 8.1.6 on
    Solaris and found that we had to link using -lthread in order to use
    Oracle (not the case in 8.1.5)
    We don't actually attempt to try any threading in our apps and
    have not had any problems yet but if it's the case that there
    are known problems using threads we'd love to hear about
    them :-)
    As an aside, is Oracle 8.1.6 cleared for use by WLE ?
    P.
    Mary Ann Slavin wrote in message <[email protected]>...
    No matter how WLE 5.1 C++ is used, it cannot be compiled with threadedlibraries, so that restriction remains.
    A WLE C++ server can act as a client and call a WLE Java Server. Doingthis does not require the WLE C++ server to be compiled with threaded
    libraries.
    Wendell MacKenzie wrote:
    Does this also mean if CORBA C++ servers want to invoke threaded
    JavaServers
    the same DEFECT will be prevent this from being accomplished?
    Mary Ann Slavin wrote:
    WLE 5.1 does not have threads in the C++ clients or servers. Java
    threads are naturally occuring in the language, however, there are WLE
    restrictions on what can be done in the
    Java threads. These are documented.
    jd wrote:
    I know when building servers based on WLE 4.2 in was a big no-no
    to
    link in threading libraries like pthread and thread. Is this still thecase
    in Weblogic Enterprise 5.1?
    >

  • Problems when using shared instances of struts and apache-commons?

    I found this worrisome statement on this page (http://struts.apache.org/1.3.8/userGuide/configuration.html) regarding sharing jar files across multiple applications:
    <i>When a class is loaded from a shared class loader, static variables used within that class become global as well. This can cause inter-webapp conflicts when the underlying code assumes that the statics are global only within a particular web applicaiton (which would be true if the class was loaded from the webapp class loader). There are many cases where the framework, and the Commons libraries it relies on, use static variables to maintain information that is presumed to be visible only within a single web application. <b>Sharing these JAR files can cause unwanted interactions, and probably cause incorrect behavior</b>.</i>
    For those of you currently using Struts and Apache Commons (and perhaps other open source libraries) have you run into any issues when sharing the jars amongst multiple applications?
    I would like to avoid having multiple applications loading their own copies of these libraries, for obvious reasons.  However, if there are issues with doing so, I may have to relax that position.

    To answer my own questions, while we didn't run into any issues with sharing Struts, it may be a good idea to incorporate the libraries directly into the web app if suspicious behaviour is observed by the application.
    Also, the taglib definitions could not be loaded from the referenced jar files - these had to be placed into the WEB-INF directory, which introduces a synchronization problem - you could conceivably have different versions of the tld's and the base libraries.

  • Login Box example and source code on adf struts and JSP

    Dear all..
    I want to make application using ADF struts and JSP using oracle 10g Jdeveloper.
    The user should login into the login box and verify everyone who has right to enter the home.jsp.
    Anybody could help me with the source code as well as the step by step explanation...
    I'm looking forward the help...

    http://www.oracle.com/technology/products/jdev/collateral/papers/10g/reviewer/viewlets/reviewer_struts_viewlet_swf.html

  • Implementing sockets and threads in a jframe gui program

    Hi, I am trying to find a solution to a problem I am having designing my instant messenger application.
    I am creating listening sockets and threads for each client logged into the system. i want to know if there is a way to listen to other clients request from the main gui and then if another client tries to establish a connection with me for example, a thread is created for that client and then my chat gui opens automatically has soon has the other client sends his or hers first text message to me.
    I am relatively new at socket programming has I am currently studying along this area. I know how to create threads and sockets but I am having trouble finding out a solution to my problem. Here is the code that I have done so far for the listening method from my main gui, and the thread class of what I have done so far.
    listening socket:
         private void listeningSocket()
                ServerSocket serverSocket = null;
                boolean listening = true;
                try
                    //listen in port 4444;
                    serverSocket = new ServerSocket(4444);
                catch(IOException x)
                    JOptionPane.showMessageDialog(null, "cannot listen to port 4444", null, JOptionPane.ERROR_MESSAGE);
                while(listening)
                    client_thread w;
                    try
                       w = new client_thread(serverSocket.accept(), jTextArea1);
                       Thread t = new Thread(w);
                       t.start();
                    catch(IOException x)
                         JOptionPane.showMessageDialog(null, "error, cannot start new thread", null, JOptionPane.ERROR_MESSAGE);
            }thread class:
    import java.io.*;
    import java.net.*;
    import javax.swing.*;
    import java.sql.*;
    import java.awt.event.*;
    * @author jonathan
    public class client_thread extends Thread
         //define new socket object
        private Socket client_user = null;
        private JTextArea textArea;
        public client_thread(Socket client_user, JTextArea textArea)
            this.client_user = client_user;
            this.textArea = textArea;
        public void run()
            BufferedReader in = null;
            PrintWriter out = null;
            String error = "error has occured, messege was not sent";
            String messege = null;
             try
                //create input and output streams
                in = new BufferedReader(new InputStreamReader (client_user.getInputStream()));
                out = new PrintWriter(client_user.getOutputStream(), true);
                while(true)
                   //read messege sent by user
                   messege = in.readLine();
                    //display messege in textfield
                   out.println(messege);
                   textArea.append(messege);
            catch (IOException e)
                //error messege
                JOptionPane.showMessageDialog(null, error, null, JOptionPane.ERROR_MESSAGE);
    }

    Seems like all you need to do is create a new dialog for each socket that is established. Your current design looks like it will attempt to use the same textarea for all the sockets.
    I would say in your thread class do the following:
    MyConversationDialog dialog = new MyConversationDialog();
    while(true)
                   //read messege sent by user
                   messege = in.readLine();
                    //display messege in textfield
                   out.println(messege);
                   dialog.setVisible (true);
                   dialog.addMessage (message);
                }

  • Documents and threads to start with Crystal reports with BI

    Hi,
    I am a BI consultant and searching for documents and threads to gain knowledge on Crystal reports .Could any one pls send me the pointers for the same...
    Kindly do the needful
    Points are assured.
    Thanks
    James

    You are in the right place for Crystal Reports and you may also want to look in the BI Forums.
    A good place to start is the Help file for Crystal Reports Designer and download our sample reports. They don't use B1 as the data source but it will help to see how to use CR.
    You need to specify specific questions and "how to's". Books have been written on how to use Crystal reports which is beyond the scope of this forum on one post.
    Thank you
    Don

  • MS 6.0 and Threads

    What is the official status of Measurement Studio 6.0 and Thread access? Right now all my DAQ stuff works great from Visual C++ 6.0 worker threads but my NiButton stuff doesn't. Is this expected? Do I still need to Post Messages to my NiButton controls in order to access them from within worker threads?
    Grant
    Grant M. Johnson
    Project Engineer
    LECO Corporation

    No, the User Interface controls should now support access from other threads. If you are seeing a problem, post the code or contact our tech support through http://www.ni.com/ask and we will see if we can give you an explanation.
    Best Regards,
    Chris Matthews
    National Instruments

  • User and thread feeds - wrong links in feed icon - Admins please check

    It seems (at least for me) that the user- and thread-specific feeds are broken. There are feed icons on user (for example: [https://forums.sdn.sap.com/profile.jspa?userID=3472354]) and thread (for example: [How to hide the columns in EVDRE]) pages. The tooltip for these icons indicate that it is a feed for the specific user or thread, but it actually just redirects to the main feed page where I can subscribe to individual forums.
    Am I doing something wrong here?
    Thanks!
    Ethan
    Edited by: Thomas Zloch on Oct 14, 2010 9:35 AM

    Hi David,
    No, that is incorrect. It is an issue with the SDN web page, not with the feeds or a feed reader. Try clicking on the little orange RSS icon at the bottom of this page. The page it redirects to is not an RSS feed - it is a web page that lists RSS feeds.
    For a long long time I thought that this was what was meant to happen. But I was really confused about why I couldn't find the feeds for threads or users, but the threads and users seemed to think that they had their own feeds. So I asked (a year ago).
    Then, more recently, I realized that the link at the bottom of the page was incorrect and if I re-jiggered it a little bit I could get to the actual RSS feed of the thread. Please take another look. Hopefully we can get this fixed!
    Thanks,
    Ethan

  • Making a delete commit automatically with ADF BC, Struts and ADF UIX

    I'm trying to create a delete action that commits to the database automatically using ADF Business Components, Struts and ADF UIX.
    I have a browse page from which the user can view all records in the table, and perform edit, create and delete actions on the data.
    When the user selects a record and clicks edit they are taken to a screen where they can amend the details of that record. Create works in a similar way, but the create action on the view object is invoked before taking the user to the edit page (this is done by linking the browse page to an ADF DataAction (bound to Create) on the Struts page flow diagram, and then linking the ADF DataAction to the edit page).
    When the user clicks submit on the edit page, the container follows a forward from the edit page to an ADF DataAction bound to the Commit method, and then from there a forward back to the browse page.
    This seems to work fine for edit and create, but when I try to do something similar for delete, it behaves unpredictably - sometimes the delete is committed to the database, sometimes not.
    To be more specific, the way I have tried to implement the auto commit delete is as follows:
    There is a UIX submitButton on the browse page called Delete. When clicked, this button triggers an event, which is caught by an event handler inside the page. The event handler causes the UIX servlet to take a forward to an ADF DataAction bound to the Delete method on the relevant view object. It thens follows a forward from the previously mentioned DataAction to another ADF DataAction bound to the Commit method for the application module. There is then a forward leading back to the browse page.
    Has anyone else encountered similar problems?

    did you figure this out?

Maybe you are looking for