Context Parameter PlugIn

Hi...
Thanks for your time....
I am doing performance test and I want if response containing a specific value then test will abort. As performance test check URL request and response, my all test getting 200 OK status.  I attach a plugin and override PostRequest() and check existence
of response and StatusCode value >200.
Here is the code
public override void PostRequest(object sender, PostRequestEventArgs e)
            if(!e.ResponseExists||((int)e.Response.StatusCode>200))
                e.WebTest.Stop();
Here is my response data: {"StatusCode":200,"Data":{"Status":"N","ErrorMessages":null,"ErrorResults":null}}
[Data containing JSON data generated in server side.]
As you can see response is coming and response status code is 200 so plugin not aborting test.
I am passing wrong input and so response is coming with Status="N" in Data. I want to abort if Status ="N" is present in response.
How can i do that??
What I try...
I create a validation rule where I set searching text and in success test get fail. But it allowing to execute next request.
I add a context parameter and extract value of Status. Based on that context parameter value  I try to stop test in plugin. But I am not getting that value in Plugin.  So plugin not working.
Thanks...
R

Hi SCRana,
I am glad that you have solved the problem and thanks for your share us the solution here, so it would be
helpful for other members who get the same issue and we will close this case.
Best Regards,
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.

Similar Messages

  • Doubt in locating a file in context parameter

    I have got a file named mylibrary.txt in WEB-INF/data directory.
    I wish to map the file in context Parameter.
    While trying this,
    <context-param>
         <param-name>library-file</param-name>
         <param-value>/WEB-INF/data/my-library.txt</param-value>
    </context-param>     
    I got a null pointerException while reading the file in my servlet. I am using Eclipse.

    The code as follows
    public class ListLibraryServlet extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
        /* (non-Java-doc)
          * @see javax.servlet.http.HttpServlet#HttpServlet()
         public ListLibraryServlet() {
              super();
         /* (non-Java-doc)
          * @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
         protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              // TODO Auto-generated method stub
              response.setContentType("text/html");
              PrintWriter out=response.getWriter();
              ServletContext context=getServletContext();
              List dvd=(List)context.getAttribute("dvdlist");
              out.println("<head><title>ListLibraryServlet</title></head>");
              out.println("<body bgcolor='D2B48C'>");
              out.println("You currently have <b>3</b> DVDs in your collection<br>");
              out.println("<table>");
              out.println("<tr>");
              out.println("<th>Title</th>");
              out.println("<th>Year</th>");
              out.println("<th>Genre</th>");
              out.println("</tr>");
            Iterator it=dvd.iterator();
            while(it.hasNext())
              DVDItem item=(DVDItem)it.next();
              out.println("<tr>");
              out.println("<td>");
            out.println(item.getTitle());
            out.println("</td>");
              out.println("<td>"+item.getYear()+"</td>");
              out.println("<td>"+item.getGenre()+"</td>");
              out.println("</tr>");
              out.println("<tr>");
            out.println("</table>");
            out.println("</body>");
            out.println("</html>");
         /* (non-Java-doc)
          * @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
         protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              // TODO Auto-generated method stub
         }                   I am retrieving the file as
    public class InitializeLibrary extends javax.servlet.http.HttpServlet implements javax.servlet.ServletContextListener {
        /* (non-Java-doc)
          * @see javax.servlet.http.HttpServlet#HttpServlet()
         public InitializeLibrary() {
              super();
         public void contextInitialized(ServletContextEvent event)
         {   InputStream is=null;
             BufferedReader reader=null;
              List dvdlist=new ArrayList();
              ServletContext context=event.getServletContext();
              String libraryfile=context.getInitParameter("library-file");
              try
              is=context.getResourceAsStream("libraryfile");
              reader=new BufferedReader(new InputStreamReader(is));
              String record;
              while((record=reader.readLine())!=null)
                 String[] fields=record.split("\\|");
                 String title=fields[0];
                 String year=fields[1];
                 String genre=fields[2];
                 DVDItem item=new DVDItem(title,year,genre);
                 dvdlist.add(item);
              context.setAttribute("dvdlist",dvdlist);
              catch(IOException e)
                   e.printStackTrace();
              catch(Exception e)
                   e.printStackTrace();
         public void contextDestroyed(ServletContextEvent event)
    }

  • Access Context Parameter in Java Bean.

    Hi,
    I want to access the Context parameter set by the web.xml from a java bean or simple java class. For example, If I have database connection details in my web.xml and I want to get these in a Java Bean of a class which will pick up the values and create a Connection object and return to the guy calling it, either JSP or servlet.
    I have a idea of using InitialContext class. But I doubt it works for
    Context parameter defined in the web.xml.
    It worked if I use like this for DataSource object which is created in my application server.
    Context ctx = new InitialContext();
    DataSource ds = (DataSource)ctx.lookup("OMSDataSource");
    return ds.DatabaseConnection.getConnection();
    So how can I access a parameter like this..
    <context-param>
    <param-name>Webmaster</param-name>
    <param-value>[email protected]</param-value>
    </context-param>
    Cheers.
    L G Goundalkar

    Greetings,
    Hi,
    I want to access the Context parameter set by the web.xml from a java bean or simple java class.The bean doesn't have direct access to the context object so that access must to supplied to it - i.e by calling getServletContext() and passing the resulting reference to the bean.
    For example, If I have database connection details in my web.xml and I want to get these in a Java
    Bean of a class which will pick up the values and create a Connection object and return to the guy
    calling it, either JSP or servlet.Why not write a DAO to handle the JSP or servlet's access needs? The DAO can be initialized at application start with a context listener and the initialized instance placed in the context where the JSP or servlet can get it directly. ;)
    I have a idea of using InitialContext class. But I doubt it works for Context parameter defined in the
    web.xml.Not for context parameters (a different "space" from the JNDI namespace ;). But, of course, it does work for "environment entries" which may also be placed in the web.xml DD (er, presuming your web container supports JNDI, of course).
    Cheers.
    L G GoundalkarRegards,
    Tony "Vee Schade" Cook

  • Passing context parameter as Subject to GP Mail template

    Hi ,
    I am using NW 7.0 SP14. I am using GP mail notifications to send out mails and I am successful sending context parameter values in the  body of mail template. Is there any way I can change the mail subject line dynamically by passing context parameter to the mail template.
    Thanks.
    Madhan

    Hi Madhan
    Unfortunately, using the standard mail templates in GP, it is not possible to add context variables for the mail Subject. These can be only added to the mail content.
    Best regards
    Armando

  • Context parameter com.sun.faces.DEFAULT_SUFFIX

    Hi All
    I was wondering about the context parameter com.sun.faces.DEFAULT_SUFFIX. Back when I learned JSF for the first time, together with learning Facelet, we use javax.faces.DEFAULT_SUFFIX context parameter to set to xhtml, as such:
    <context-param>
    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
    <param-value>.xhtml</param-value>
    </context-param>
    Now, I noticed that almost all javax.faces context parameter has been refactored to com.faces.* context parameter, and all have been documented in the wiki here:
    http://wiki.glassfish.java.net/Wiki.jsp?page=JavaServerFacesRI#section-JavaServerFacesRI-WhatContextParametersAreAvailableAndWhatDoTheyDo
    well, all context parameter but DEFAULT_SUFFIX. since all our code in my company uses this. If we omit this context parameter, the code wouldnt work.
    Question:
    1. Why there is no documentation about this context parameter in wiki?
    2 If this context param has been refactored to com.faces.DEFAULT_SUFFIX, why is it when we use com.faces.DEFAULT_SUFFIX, the code would not work, but when we changed back to javax.faces.DEFAULT_SUFFIX it would work.?

    Well, I am using apache tomcat 6.26, below is what I got when starting the app server (I commented out javax.faces.DEFAULT_SUFFIX in web.xml when I started this).
    INFO: JSF1026: [xray] Configuration option 'com.sun.faces.managedBeanFactoryDecoratorClass' not configured
    Jul 3, 2010 12:31:24 PM com.sun.faces.config.WebConfiguration <init>
    INFO: JSF1018: [xray] Configuration option 'com.sun.faces.STATE_SAVING_METHOD' set to 'server'
    Jul 3, 2010 12:31:24 PM com.sun.faces.config.WebConfiguration <init>
    *INFO: JSF1018: [xray] Configuration option 'com.sun.faces.DEFAULT_SUFFIX' set to '.jsp'*
    Jul 3, 2010 12:31:24 PM com.sun.faces.config.WebConfiguration <init>
    INFO: JSF1026: [xray] Configuration option 'com.sun.faces.CONFIG_FILES' not configured
    Jul 3, 2010 12:31:24 PM com.sun.faces.config.WebConfiguration <init>
    INFO: JSF1026: [xray] Configuration option 'com.sun.faces.LIFECYCLE_ID' not configured
    Jul 3, 2010 12:31:24 PM com.sun.faces.config.WebConfiguration <init>
    INFO: JSF1018: [xray] Configuration option 'com.sun.faces.numberOfViewsInSession' set to '15'
    Jul 3, 2010 12:31:24 PM com.sun.faces.config.WebConfiguration <init>
    INFO: JSF1018: [xray] Configuration option 'com.sun.faces.numberOfLogicalViews' set to '15'
    Jul 3, 2010 12:31:24 PM com.sun.faces.config.WebConfiguration <init>
    INFO: JSF1021: [xray] Configuration option 'com.sun.faces.validateXml' - DISABLED
    Jul 3, 2010 12:31:24 PM com.sun.faces.config.WebConfiguration <init>
    INFO: JSF1021: [xray] Configuration option 'com.sun.faces.verifyObjects' - DISABLED
    Jul 3, 2010 12:31:24 PM com.sun.faces.config.WebConfiguration <init>
    INFO: JSF1021: [xray] Configuration option 'com.sun.faces.forceLoadConfiguration' - DISABLED
    Jul 3, 2010 12:31:24 PM com.sun.faces.config.WebConfiguration <init>
    INFO: JSF1021: [xray] Configuration option 'com.sun.faces.disableVersionTracking' - DISABLED
    Jul 3, 2010 12:31:24 PM com.sun.faces.config.WebConfiguration <init>
    INFO: JSF1021: [xray] Configuration option 'com.sun.faces.enableHtmlTagLibValidator' - DISABLED
    Jul 3, 2010 12:31:24 PM com.sun.faces.config.WebConfiguration <init>
    INFO: JSF1021: [xray] Configuration option 'com.sun.faces.preferXHTML' - DISABLED
    Jul 3, 2010 12:31:24 PM com.sun.faces.config.WebConfiguration <init>
    INFO: JSF1021: [xray] Configuration option 'com.sun.faces.compressViewState' - ENABLED
    Jul 3, 2010 12:31:24 PM com.sun.faces.config.ConfigureListener contextInitialized
    INFO: Initializing Sun's JavaServer Faces implementation (1.2-NIGHTLY_20060407) for context '/xray'
    Jul 3, 2010 12:31:24 PM com.sun.faces.config.ConfigureListener contextInitialized
    INFO: Completed initializing Sun's JavaServer Faces implementation (1.2-NIGHTLY_20060407) for context '/xray'
    Jul 3, 2010 12:31:24 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory docs
    Jul 3, 2010 12:31:24 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory examples
    Jul 3, 2010 12:31:25 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory ROOT
    Jul 3, 2010 12:31:25 PM org.apache.coyote.http11.Http11AprProtocol start
    INFO: Starting Coyote HTTP/1.1 on http-8080
    Jul 3, 2010 12:31:25 PM org.apache.coyote.ajp.AjpAprProtocol start
    INFO: Starting Coyote AJP/1.3 on ajp-8009
    Jul 3, 2010 12:31:25 PM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 1789 ms
    Edited by: niner on Jul 2, 2010 11:07 PM

  • Context parameter

    Hi,
    Currently I am migrating my tomcat application to sun java web server 7.1.
    I am getting annoyed due to failed set context parameter, How to set servlet context paramerer outside web.xml. Currently I use separate xml file or add it in tomcat server.xml like
    <?xml version="1.0" encoding="utf-8"?>
    <Context>
         <!-- #Internal API -->
           <Parameter name="login_uri" value="http://127.0.0.1/cgi-bin/login.fcgi"  override="false"/>
    </Context>This parameter shared by all wars. How do I set this in sun one web server, if is there way to set it via admingui it will me much better.
    Thanks

    you might want to use 7.0 update 4 (http://www.sun.com/webserver) . there is no 7.1 yet .
    you should be able to do this within <https-<hostname>/config/default-web.xml (append it at the end just before the last line..)
    <context>
    </context>
    </web-app>
    finally, if every thing is working out for you, then you need to do the following command so that admin gui is aware of your manual changes
    bin/wadm pull-config user=admin config=<hostname.domainname> <hostname.domainname>

  • Access context parameter in web.xml

    Hi, all. I add a entry into Context Initialization parameter at tab Application in file web.xml with name: path and value img/product. I don't know how to get the context parameter. I want access the context by EL in file .jspx or .jsf, as #{path} but error. Can anyone help me.Thanks.

    Hi,
    have a go with
    #{initParam['param_name_here']}"
    alternatively
    #{facesContext.externalContext.initParameterMap['param_name_here']}
    Frank

  • Define a context parameter not using web.xml

    Dears,
    With a web.xml file, it is possible to define a context parameter available in the web app via de ServetContext.getInitParameters method.
    Is it possible to define a context parameter not using the web.xml file ? Can I, in a java Class, init a custom context parameter ? (for exampel, init as a context param a key/value pair read from a property file).
    PS: the need is that the value (hmac key) currently define in the web.xml needs to be updated monthly. Apparently, under WebSphere (the app server we are using) changing the web.xml of the deployed app it not enought for it to be taken into account.
    Sincerely,
    Beno�t Bertrand

    Is it possible to define a context parameter not
    using the web.xml file ? Can I, in a java Class, init
    a custom context parameter ? (for exampel, init as a
    context param a key/value pair read from a property
    file).Does it necessarily have to be a value retrieved through the context param ? AFAIK, there's no way you could programatically 'set' an init param, which going by the name, 'init param' is quite understandable.
    You could define this value in a property file and read it in, in the init method. You should provide a mechanism to reload the new value after 'x' days. One approach is a Timer that does the job, do have a look at SteveJLuke's recommendations on the same in this thread
    http://forum.java.sun.com/thread.jspa?threadID=637355&tstart=0cheers,
    ram.

  • Error while using date as a context parameter

    Hello,
    I am using webdynpro component(GP Interface) Callable Object in which i have added date as one of the parameters to be entered by the initiator.....but it gives me a Runtime Exception as:
    when i remove the date parameter keeping just integers and strings it works fine....please help as i need to use the date parameter..
    Unable to create web dynpro callable object implementation.
    java.lang.NullPointerException
    at com.sfwmd.GpInterface.execute(GpInterface.java:248)
    at com.sfwmd.wdp.InternalGpInterface.execute(InternalGpInterface.java:137)
    at com.sfwmd.wdp.InternalGpInterface$External.execute(InternalGpInterface.java:192)
    at com.sap.caf.eu.gp.ui.co.exec.wd.COExecWD.execute(COExecWD.java:303)
    at com.sap.caf.eu.gp.ui.co.exec.wd.wdp.InternalCOExecWD.execute(InternalCOExecWD.java:171)
    at com.sap.caf.eu.gp.ui.co.exec.wd.COExecWDInterface.execute(COExecWDInterface.java:122)
    at com.sap.caf.eu.gp.ui.co.exec.wd.wdp.InternalCOExecWDInterface.execute(InternalCOExecWDInterface.java:134)
    at com.sap.caf.eu.gp.ui.co.exec.wd.wdp.InternalCOExecWDInterface$External.execute(InternalCOExecWDInterface.java:249)
    at com.sap.caf.eu.gp.ui.act.container.VContainer.onPlugFromDispatcher(VContainer.java:391)
    at com.sap.caf.eu.gp.ui.act.container.wdp.InternalVContainer.wdInvokeEventHandler(InternalVContainer.java:167)
    at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
    at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.navigate(ClientApplication.java:826)
    at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.navigate(ClientComponent.java:881)
    at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doNavigation(WindowPhaseModel.java:498)
    at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:144)
    at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
    at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
    at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:319)
    at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingPortal(ClientSession.java:733)
    at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:668)
    at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
    at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
    at com.sap.tc.webdynpro.clientserver.session.core.ApplicationHandle.doProcessing(ApplicationHandle.java:73)
    at com.sap.tc.webdynpro.portal.pb.impl.AbstractApplicationProxy.sendDataAndProcessActionInternal(AbstractApplicationProxy.java:860)
    at com.sap.tc.webdynpro.portal.pb.impl.localwd.LocalApplicationProxy.sendDataAndProcessAction(LocalApplicationProxy.java:77)
    at com.sap.portal.pb.PageBuilder.updateApplications(PageBuilder.java:1299)
    at com.sap.portal.pb.PageBuilder.SendDataAndProcessAction(PageBuilder.java:326)
    at com.sap.portal.pb.PageBuilder$1.doPhase(PageBuilder.java:868)
    at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processPhaseListener(WindowPhaseModel.java:755)
    at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doPortalDispatch(WindowPhaseModel.java:717)
    at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:136)
    at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
    at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
    at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:319)
    at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
    at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
    at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
    at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
    at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
    at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
    at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
    at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
    at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
    Any help would be highy appreciated
    Regards,
    Anil
    Edited by: Anil Kumar on Feb 4, 2009 8:19 PM

    Resolved the issue by setting System date where expected

  • How to set up context parameter of a web application

    Hi,
    I am tring to deploy a ear file to J2EE Engine 7.1
    with the help of import feature of NWDS.
    Is there any option to set the value of the context parameters defined in web.xml inside the ear.
    Regards,
    Chitra

    Thanks for your response.
    Th e version no. of IE Tab is 4.0.20130422 and it is from https://addons.mozilla.org/en-US/firefox/addon/ie-tab/
    Look forward your reply.Thank you in advance.

  • Add Context/Parameter Elements to UWL

    Hi, as you know, when you connect the UWL with CAF-Guided Procedures, it shows to the user as subject for the UWL Task the name of the GP Action that is related in a GP Process.
    I need to add a context element (ctx.variable) to the text that is shown to the user in the UWL, 'cause the same user can have several time the same Action on his UWL Inbox with the same name and he needs to be able to identify between them.
    Thanks for your help.

    Weird piece of code and no question. I assume you can't figure out have to add a row to your other table?
            DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
            OperationBinding operBind = bindings.getOperationBinding("CreateInsert");
            operBind.execute();
            DCIteratorBinding dcItteratorBinding = bindings.findIteratorBinding("UserDetailsViewVO1Iterator");     
            RowSetIterator customRSIter = dcItteratorBinding.getRowSetIterator();
            Row currentRow = customRSIter.getCurrentRow();
            currentRow.setAttribute("Username", (String)requestMap.get("pusername"););
            currentRow.setAttribute("Firstaname", (String)requestMap.get("pfirstname"););
    ...And so on...Assuming you have an CreateInsert binding on your Iterator.

  • Taw web xml file ADMINREADCC8 context parameter

    when I run the scipt for CCA the Useme.sql I only see the ADMINCC8 user I don't see the ADMINREADCC8 so I'm not sure what to put on the following context for web.xml
    <!-- Needs to be removed for MSSQL-->
    <!--<context-param>-->
    <!--<param-name>databaseSchemaReadOnly</param-name>-->
    <!--<param-value>ADMINCCREAD813</param-value>-->
    <!--</context-param>-->

    This is the eclipse error
    The content of element type "web-app" must match "(icon?,display-
    name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-
    mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-
    ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-
    ref*)".
    Web.xml file
    <?xml version="1.0" encoding="UTF-8"?>
    <!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>
         <display-name>tapestryHiber Tapestry 5 Application</display-name>
         <context-param>
              <!-- The only significant configuration for Tapestry 5, this informs Tapestry
                   of where to look for pages, components and mixins. -->
              <param-name>tapestry.app-package</param-name>
              <param-value>com.kids.crm</param-value>
         </context-param>
         <filter>
              <filter-name>app</filter-name>
              <filter-class>org.apache.tapestry5.TapestryFilter</filter-class>
         </filter>
         <filter-mapping>
              <filter-name>app</filter-name>
              <url-pattern>/*</url-pattern>
         </filter-mapping>
         <context-param>
              <param-name>contextConfigLocation</param-name>
              <param-value>/WEB-INF/spring/spring-servlet.xml</param-value>
         </context-param>
         <listener>
              <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
         </listener>
    </web-app>
          Edited by: csckid on Aug 29, 2011 5:51 AM

  • Assignment using context parameter

    Hi all,
    Does anybody know how to set more than one user to a GP Role using context attribute?
    I've tried set the attribute with users delimited by comman, semicolon, but it doesn't work.
    Best regards

    Hi Isaias,
    You have to give the user logon Ids separated by comma. And your attribute should be a list in that case.
    Regards,
    Srinivasan Subbiah

  • Custom plugin based on user role membership

    Hi all,
    I would like to develope a custom plugin that generates account userid (on process form) with different syntax against role membership.
    With "syntax" I mean name.surname.random_number for employee users and surname.company.random_number for example.
    I'll try to explain the scenario more in details:
    1. I create a user identity through a request
    2. After user identity has created successfully, I assign a role to the user. Since roles are associated with access policies, role assignment triggers provisioning on target system.
    3. The custom plugin that I would like to develope shuold be able to generate proper userid against role membership. For example if I assigned the role "Project Manager" the custom plugin should generate the account userid with name.surname.random_number format; viceversa if I assigned the role "External Reseller" the custom plugin should generate the account userid with surname.company.random_number format.
    Looking for custom plugin based on role membership in forum, I found a couple of threads about this subject:
    - Email notifications after role grant
    - Re: OIM 11g Role Membership Event Handlers.
    I tried to implement what explained in the threads, but I would be sure about what I've done.
    Here what I've done:
    1. created plugin.xml file
    2. created EventHandler.xml metadata file
    3. developed a java calss for testing pourpose
    4. copied the custom plugin class to OIM server for example in $MIDDLEWARE_HOME/OIMPlugins/lib
    NOTE: during this operation I have exactly mantained the same directory structure of custom java package.
    For example custom plugin class is under my.custom.plugin java package and I have copied custom java class under $MIDDLEWARE_HOME/OIMPlugins/lib/my/custom/plugin folder
    5. created a zip file containing custom plugin class (always with its directory structure) and plugin.xml file
    6. copied the zip file to $OIM_HOME/server/plugins
    7. edited ant.properties file (under $OIM_HOME/server/plugin_utility) setting wls.home and oim.home variables
    8. built the wlfullclient.jar (only the first time)
    9. registered the custom plugin
    10. created the custom plugin dataset file
    11. imported it in OIM database using "weblogicImportMetadata" utility
    12. purged cache using "PurgeCache" utility
    NOTE: all the steps above was executed using the system user running OIM process
    test java class
    package com.zeropiu.sky.custom.eventhandlers;
    import java.io.Serializable;
    import java.util.HashMap;
    import com.thortech.util.logging.Logger;
    import oracle.iam.platform.kernel.spi.ConditionalEventHandler;
    import oracle.iam.platform.kernel.spi.PostProcessHandler;
    import oracle.iam.platform.kernel.vo.AbstractGenericOrchestration;
    import oracle.iam.platform.kernel.vo.BulkEventResult;
    import oracle.iam.platform.kernel.vo.BulkOrchestration;
    import oracle.iam.platform.kernel.vo.EventResult;
    import oracle.iam.platform.kernel.vo.Orchestration;
    import oracle.iam.platform.context.ContextManager;
    import java.util.Set;
    public class TestUserAnonimi implements PostProcessHandler, ConditionalEventHandler {
         private static final Logger logger = Logger.getLogger("com.zeropiu.sky.custom.eventhandlers");
    private static final String className = "TestUserAnonimi";
         @Override
         public void initialize(HashMap<String, String> arg0) {
              // TODO Auto-generated method stub
              String methodName = "initialize";
              System.out.println("###### " + className + " - " + methodName);
         @Override
         public boolean isApplicable(AbstractGenericOrchestration abstractGenericOrchestration) {
              // TODO Auto-generated method stub
              String methodName = "isApplicable";
    System.out.println("###### " + className + " - " + methodName + " - STARTED");
    System.out.println("###### " + className + " - " + methodName + " - ContextManager.getContextType(): " + ContextManager.getContextType());
    System.out.println("###### " + className + " - " + methodName + " - ContextManager.getContextSubType(): " + ContextManager.getContextSubType());
    System.out.println("###### " + className + " - " + methodName + " - abstractGenericOrchestration.getOperation(): " + abstractGenericOrchestration.getOperation());
    System.out.println("###### " + className + " - " + methodName + " - Printing ContextManager parameters");
    HashMap allContextManagerPairs = ContextManager.getAllValuesFromCurrentContext();
    Set<String> allContextManagerParams = allContextManagerPairs.keySet();
    String[] parameters = allContextManagerParams.toArray(new String[allContextManagerParams.size()]);
    for (int i = 0; i < parameters.length; i++) {
              System.out.println("###### " + className + " - " + methodName + " - Context parameter " + i + ": " + parameters[i] + " - Object type is: " + Utils.getObjectType(ContextManager.getValue(parameters)));
    System.out.println("###### " + className + " - " + methodName + " - ENDED");
    return true;
         @Override
         public boolean cancel(long arg0, long arg1,     AbstractGenericOrchestration arg2) {
              // TODO Auto-generated method stub
              String methodName = "cancel";
              System.out.println("###### " + className + " - " + methodName);
              return false;
         @Override
         public void compensate(long arg0, long arg1, AbstractGenericOrchestration arg2) {
              // TODO Auto-generated method stub
              String methodName = "compensate";
              System.out.println("###### " + className + " - " + methodName);
         @Override
         public EventResult execute(long arg0, long arg1, Orchestration orchestration) {
              // TODO Auto-generated method stub
              String methodName = "Eventresult execute";
              System.out.println("###### " + className + " - " + methodName);
              return null;
         @Override
         public BulkEventResult execute(long arg0, long arg1, BulkOrchestration arg2) {
              // TODO Auto-generated method stub
              String methodName = "BulkEventResult execute";
              System.out.println("###### " + className + " - " + methodName);
              return null;
    plugin.xml file
    <?xml version="1.0" encoding="UTF-8"?>
    <oimplugins xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <plugins pluginpoint="oracle.iam.platform.kernel.spi.EventHandler">
    <plugin pluginclass="com.zeropiu.sky.custom.eventhandlers.TestUserAnonimi" version="1.0" name="TestUserAnonimi">
    </plugin>
    </plugins>
    </oimplugins>
    EventHandler.xml metadata file
    <?xml version='1.0' encoding='UTF-8'?>
    <eventhandlers xmlns="http://www.oracle.com/schema/oim/platform/kernel" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.oracle.com/schema/oim/platform/kernel orchestration-handlers.xsd">
    <action-handler class="com.zeropiu.sky.custom.eventhandlers.TestUserAnonimi" entity-type="RoleUser" operation="CREATE" name="TestUserAnonimi" stage="preprocess" order="1007" sync="FALSE" />
    </eventhandlers>When I assign a role to a user through OIM web interface, I can see in OIM log file all System.out.println contained in initialize(), isApplicable() and BulkEventResult execute() methods. Is it correct? Can I implement my custom plugin logic now, or my starting point is wrong?
    ###### TestUserAnonimi - initialize
    ###### TestUserAnonimi - isApplicable - STARTED
    ###### TestUserAnonimi - isApplicable - ContextManager.getContextType(): ADMIN
    ###### TestUserAnonimi - isApplicable - ContextManager.getContextSubType():
    ###### TestUserAnonimi - isApplicable - abstractGenericOrchestration.getOperation(): CREATE
    ###### TestUserAnonimi - isApplicable - Printing ContextManager parameters
    ###### TestUserAnonimi - isApplicable - Context parameter 0: origuser - Object type is: java.lang.String
    ###### TestUserAnonimi - isApplicable - Context parameter 1: oimuser - Object type is: java.lang.String
    ###### TestUserAnonimi - isApplicable - Context parameter 2: RESOLVED_LOCALE - Object type is: java.lang.String
    ###### TestUserAnonimi - isApplicable - Context parameter 3: counter - Object type is: java.lang.String
    ###### TestUserAnonimi - isApplicable - Context parameter 4: TIME_ZONE - Object type is: java.lang.String
    ###### TestUserAnonimi - isApplicable - Context parameter 5: ipaddress - Object type is: java.lang.String
    ###### TestUserAnonimi - isApplicable - ENDED
    ##### TestUserAnonimi - BulkEventResult execute
    Thanks,
    Daniele
    Edited by: 886636 on Jan 24, 2012 2:53 AM
    Edited by: 886636 on Jan 24, 2012 2:53 AM

    Probably I don't explain myself clearly....sorry for that!
    Anyway you are right, the role of the user can change after the user is initially provisioned.
    I'll try to summarize to be sure to have understood your answer and to explain my scenario more in details:
    1. After user identity creation, I'll assign the role "Project Manager". Before role assignment the user has not any role. So using a pre-populate adapter I can retrieve the assigned role and compose the right userid.
    2. After step 1, I need to assign another role to the user, the new role should be "External Reseller" for example. In this case the user has a role already. What I would is: basing on the role that I'm assigning (External Reseller), the pre-populate should compose the right userid. Obviously this second userid will be different from the first one and this means a new account will be created for the user. At the moment I don't care to deprovisioning the first userid.
    Is it possible with pre-populate adapter?
    Sorry again for my not very clear explanations.
    Daniele
    Edited by: 886636 on Jan 24, 2012 4:10 AM

  • Access data source from plugin

    I have a recorded webtest. I added a csv file as data source in WebAndLoadTestProject. Now I added a PlugIn which containing several class for pre/post request override method. I want to access that added csv file as source of data and want to assign value
    to context parameter or URL parameter created under request. From msdn blogs I did not find any solution. 
    What I want to know...
    1. Is it possible to access data source files which is in WebAndLoadTestProject from PlugIn? How??
    2. How can I assign context parameter with data from data source?
    Thanks to every one...
    R

    Thanks for Adrian's help.
    Hi SCRana,
    Based on your issue, I know that it is possible to access data source files which is in WebAndLoadTestProject from PlugIn.
    I find a similar thread about your issue, please refer the following thread to check this issue.
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/a22708ec-77de-4851-84d3-f0096683c009/data-from-the-datasource-in-plugin?forum=vstswebtest
    Best Regards,
    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.

Maybe you are looking for

  • ITunes was unable to load dataclass information from Sync Services

    Hi, I have Iphone 3GS with the latest version 3.1.3 and iTunes 9.1. After i uograded my iPhone to the latest version i am not able to sync with the iTunes and receive the message "iTunes was unable to load dataclass information from Sync Services, Re

  • Calendar upgrade failure, how can I reset the new calendar

    Upgrading to the new v4 calendar on MobileMe has been a complete failure. Currently have a ticket open with Apple support, the upgrade failed with a "catastrophic failure message", my data was not fully transferred, etc. I need to reset the new calen

  • Apache, MySQL, and PHP

    I am new PHP development and working on a test project. I've installed Apache, MySQL and PHP on my Windows XP box and now I'm a little confused. I created a database and some sample code to retrieve data. Now, on a server I'm using which supports thi

  • Not Booting From DVD Macbook Pro Early 2011

    Put a brand new Snow Leopard disc in the drive. Started the laptop with ALT depressed and when the available drives came up I selected DVD Drive. Disk is spinning, but apple logo screen just sits there and 3 beeps keep repeating. Does nothing. Anyone

  • Regarding PP Extraction

    Hi Gurus, Iam extracting data from 2lis_04_P_ARBPL to zcube (copy of 0pp_c04) in BI7. Iam getting error as  Request Idoc: "Application document not posted" but the request shows green, so can anybody help me regarding this. Regards, Naren.