JSP page and the pageContext.forward() method

I am running JSP pages on a coldfusion site so that a CF page (i.e. login.cfm) hosts my login.jsp page. I want to reload the JSP page without having to reload the cfm page each time. pageContext.forward() does do this, however, it only forwards on to a new page. I want to be able to reload a page with the new URL parameters (e.g. when there is an error, login.jsp will reload and give the user an error). What is a method to reload the page with the proper URL variables?
The following code does not work:
pageContext.forward("login.jsp?operation=user_edit&jsessionid=" + f_URLEncode(session.getId()));
Because it runs from the login.jsp page (the forward command only goes to a new page)

Just to clarify...
I log into your site. The first page shown is the CF page. The CF page automatically redirects me to the JSP page. Then what, exactly?
Does the login page automatically determine my URL, attempt to validate it, and if it doesn't work, it reloads the page?
The reason I ask is because there is a difference between the resulting HTML page and the JSP class file that generates that HTML page. Generally speaking, most web servers, particularly Tomcat, do not recompile the JSP class file, they just simply pass the parameters to the existing class file, and a new HTML page is generated.
So technically speaking, every time you visit the login.jsp page, you will get a brand new HTML page. The contents of that page are the same because you presumably pass the same parameters to the class which hasn't changed. But in other words, no, you can't forward to an "old" page that was previously generated by the class - each time the web server calls that class, it creates a "new" page.
Or are you saying that every time you attempt to forward to the login.jsp page, the system erronously calls the CF page instead?

Similar Messages

  • The content type for office excel 2007 in jsp page and the mime-type in  we

    Hi,
    In my system MS Office 2007 is installed. I am trying to generating excel sheets from JSP page by setting the content type "application/vnd.ms-excel" in jsp page and as well as in web.xml file. I am getting the below message
    The file you are trying to open, 'xxxxxxxx.xls', is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?
    Then finally the excel file is opening and displaying properly. If in my system MS Office 2003 is installed , then the above message is not coming.
    I have changed the content type according to Excel 2007 <%@ page contentType= "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" %> and in web.xml file the mime type to
    <mime-mapping>
    <extension>xlsx</extension>
    <mime-type>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</mime-type>
    </mime-mapping>
    even the content type is changed according to office excel 2007 , i am getting the same above message.
    My client is asking not to display the above message. So how to prevent that message ?
    It's very great if any body reply me as soon as possible.

    Hi Akash,
    I am not using the POI. I am generating the excel sheet using the below code.
    <jsp:directive.page import="java.util.Map" />
    <jsp:directive.page import="lehman.ra.Report.ReportDefinition" />
    <jsp:directive.page import="lehman.ra.RAUtilBean" />
    <jsp:directive.page import="java.util.ArrayList" />
    <jsp:directive.page import="lehman.util.GeneralUtil" />
    <jsp:directive.page import="lehman.admin.report.AdminHtmlReportFormatter"/>
    <jsp:directive.page import="lehman.helper.irprod.IRProdHelper"/>
    <%@ page contentType= "application/vnd.ms-excel" %>
    <jsp:directive.page import="java.util.Iterator"/>
    <jsp:directive.page import="java.util.HashMap"/>
    <%
         String strTradeDate = (String) session.getAttribute("TradingDate");
         String sContextPath = request.getContextPath();
         IRProdHelper irHelper     = new IRProdHelper();
         String  sReportFormat  = "E2E";     
         String subtab1 = request.getParameter("subtab1");
         if (subtab1 == null)
              subtab1 ="";     
         Map report_Ids    = (Map) session.getAttribute("ADMIN_E2E_REPORTS");
         AdminHtmlReportFormatter formatter = new AdminHtmlReportFormatter();
         ArrayList contentData = new ArrayList();
         ArrayList headerData  = new ArrayList();
         ArrayList metaData    = new ArrayList();
         Map resultMap            = null;
         String headerString       = "";
         String contentString  = "";
         String reportId            = "";
         int titleSpan         = 5;     
         if( report_Ids!=null && report_Ids.size() > 0){
              Object oReportObj      = null;
              Iterator rowIter = report_Ids.keySet().iterator();
              RAUtilBean raUtilBean = new RAUtilBean();
              ReportDefinition rdef = new ReportDefinition();
              while ( rowIter.hasNext() ){          
                   oReportObj = rowIter.next();     
                   reportId = oReportObj.toString();
                   System.out.println("**************reportId="+reportId);     
                   resultMap  =  (HashMap) report_Ids.get(oReportObj);
                   if(resultMap == null )
                        continue;
                   if(resultMap.size() > 0 ) {
                        contentData          = (ArrayList)resultMap.get(GeneralUtil.CONTENT_DATA);
                        headerData          = (ArrayList)resultMap.get(GeneralUtil.COL_METADATA);
                        metaData          = (ArrayList)resultMap.get(GeneralUtil.METADATA);
                        rdef = new ReportDefinition();                    
                        raUtilBean.setReportAttributes(rdef, headerData, metaData,reportId, sReportFormat);
                        titleSpan = raUtilBean.findMaxCol(contentData, rdef.getDisplayCols());
                        if("51031".equals(reportId)){                         
                             if(resultMap.get("HIDE_ETA")!=null){
                                  boolean hideETA = ((Boolean)resultMap.get("HIDE_ETA")).booleanValue();                              
                                  formatter.setHideETA(hideETA);
                                  if(hideETA){
                                       titleSpan = titleSpan-1;
                        rdef.setMaxCol(titleSpan);
                        headerString = formatter.constructHeadingForE2E(rdef, headerData);
                        contentString = formatter.constructContentForE2E(rdef, contentData, strTradeDate, sReportFormat);
    %>     
    <html xmlns:o="urn:schemas-microsoft-com:office:office"
         xmlns:x="urn:schemas-microsoft-com:office:excel"
         xmlns="http://www.w3.org/TR/REC-html40">
         <head>
         <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
         <meta name="ProgId" content="Excel.Sheet"/>
         <meta name="Generator" content="Microsoft Excel 9"/>
         <link rel="File-List" href="./Test33_files/filelist.xml"/>
         <link rel="Edit-Time-Data" href="./Test33_files/editdata.mso"/>
         <link rel="OLE-Object-Data" href="./Test33_files/oledata.mso"/>
         <link href="<%=sContextPath %>/llehman.css" rel="stylesheet" type="text/css">
         <link href="<%=sContextPath %>/llcontent.css" rel="stylesheet" type="text/css">
         <style>
         <xsl:comment>
         table
              {mso-displayed-decimal-separator:"\.";
              mso-displayed-thousand-separator:"\,";}
         .style0
              {mso-number-format:General;
              text-align:general;
              vertical-align:bottom;
              white-space:nowrap;
              mso-rotate:0;
              mso-background-source:auto;
              mso-pattern:auto;
              color:windowtext;
              font-size:10.0pt;
              font-weight:400;
              font-style:normal;
              text-decoration:none;
              font-family:Arial;
              mso-generic-font-family:auto;
              mso-font-charset:0;
              border:none;
              mso-protection:locked visible;
              mso-style-name:Normal;
              mso-style-id:0;}
         .xl21
         {mso-style-parent:style0;
         color:black;
         font-size:8.0pt;
         font-family:Arial, sans-serif;
         mso-font-charset:0;
         border-top:.5pt solid silver;
         border-right:.5pt solid silver;
         border-bottom:.5pt solid silver;
         border-left:none;}
         .xl24
              {mso-style-parent:style0;
              mso-number-format:"\#\,\#\#0\.00_\)\;\\\(\#\,\#\#0\.00\\\)";}
         .xl25
              {mso-style-parent:style0;
              mso-number-format:0%;}
         .xl26
              {mso-style-parent:style0;
              mso-number-format:"\#\,\#\#0_\)\;\\\(\#\,\#\#0\\\)";}
         .xl27
         {mso-style-parent:style0;
         background-color:#666666;
         color:#FFFFFF;
         font-size:9.0pt;     
         font-family:Arial, sans-serif;
         mso-font-charset:0;
         text-align:left;
         vertical-align:middle;
         border-top:none;
         border-right:.5 pt solid silver;
         border-bottom:.5pt  silver;
         border-left:none;
         mso-pattern:auto none;
         white-space:normal;
         .xl55
         color:black;
         font-size:8.0pt;
         font-weight:700;
         mso-style-parent:style0;
         mso-number-format:"\#\,\#\#0_\)\;\[Red\]\\\(\#\,\#\#0\\\)";
         mso-pattern:auto none;
         font-size:9.0pt;
         font-family:Arial, sans-serif;
         mso-font-charset:0;
         text-align:right;
         border-top:none;
         border-right:.5pt solid silver;
         border-bottom:.5pt solid silver;
         border-left:none;
         .xlDate{
         mso-style-parent:style0;
         mso-number-format:"yyyy\\-mm\\-dd";
         .xlDateTime{
         mso-style-parent:style0;
         mso-number-format:"yyyy\\-mm\\-dd\\ h\\:mm\\ AM\/PM";
         </xsl:comment>
         </style>
         <xml>
          <x:ExcelWorkbook>
           <x:ExcelWorksheets>
            <x:ExcelWorksheet>
              <x:Name><%=subtab1%></x:Name>
              <x:WorksheetOptions>
               <x:ProtectContents>False</x:ProtectContents>
               <x:ProtectObjects>False</x:ProtectObjects>
               <x:ProtectScenarios>False</x:ProtectScenarios>
              </x:WorksheetOptions>
            </x:ExcelWorksheet>
           </x:ExcelWorksheets>
          </x:ExcelWorkbook>
          </xml>
         </head>
    <body text="#000000" style="margin-left:5px;margin-top:5px">
          <table border="0" cellpadding="0" cellspacing="0" width="100%">
              <tr>
                  <td>
                       <table  border='0' cellpadding="0"  cellspacing='0' width="100%">
                             <tr class="xl21">
                                  <td align="left" nowrap style='font-size:11px;' colspan="<%=titleSpan%>"><b><%=subtab1%></b> -  COB  <%=irHelper.formatDate(strTradeDate)%>  </td>
                                  </tr>
                         </table>
                   </td>
                </tr>
                <tr>
                     <td> </td>
              </tr>
    <!-- Report Processing -->
              <tr>
                   <td>
                        <%=headerString%>
                        <%=contentString%>
                   </td>
              </tr>
    <%
                   }//end of if
              }//end of while
         }//end of if report_Ids     
    %>          
         </table>
    </body>
    </html>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Problem deploying my jsp pages to the BPEL Server

    Hi,
    I want to invoke a bpel process using a java file that is executed by a jsp page, so I deployed the jsp page and the java file to the bpel server where my bpel processes are, but i get the next error when i execute the jsp page. I use struts to define my pages.
    Please help
    here is the error in the browser:
    500 Internal Server Error
    java.lang.NoClassDefFoundError: com/collaxa/common/util/NonSyncStringWriter     at com.oracle.bpel.client.ClientResources.sanitizeArgs(ClientResources.java:123)     at com.oracle.bpel.client.ClientResources.getString(ClientResources.java:93)     at com.oracle.bpel.client.util.BeanRegistry.lookupDomainManagerBean(BeanRegistry.java:232)     at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:83)     at com.oracle.bpel.client.Locator.<init>(Locator.java:126)     at com.oracle.bpel.client.Locator.<init>(Locator.java:97)     at mypackage2.BpelManager.invokeProcess(BpelManager.java:58)     at mypackage2.ConstanciaTrabajoAction.execute(ConstanciaTrabajoAction.java:45)     at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)     at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)     at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)     at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)     at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:649)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)     at java.lang.Thread.run(Thread.java:534)
    here the strut.config:
    <?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>
    <action-mappings>
    <action path="/constanciaTrabajoAction" type="mypackage2.ConstanciaTrabajoAction" input="/constanciaTrabajo.jsp" scope="request" validate="true">
    <forward name="OK" path="/exito.jsp"/>
    <forward name="FALLO" path="/fracaso.jsp"/>
    </action>
    </action-mappings>
    <message-resources parameter="mypackage2.ApplicationResources"/>
    </struts-config>
    the jsp file:
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
    <%@ page import="java.util.*"%>
    <%@ page contentType="text/html;charset=windows-1252"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>untitled</title>
    </head>
    <body>
    <html:link action="/constanciaTrabajoAction">Constancia de Trabajo</html:link></body>
    </html>
    here the java files:
    * ConstanciaTrabajoAction.java
    package mypackage2;
    import java.util.Map;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionMapping;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionError;
    import org.apache.struts.action.ActionErrors;
    import java.io.IOException;
    import javax.servlet.ServletException;
    public class ConstanciaTrabajoAction extends Action
    * This is the main action called from the Struts framework.
    * @param mapping The ActionMapping used to select this instance.
    * @param form The optional ActionForm bean for this request.
    * @param request The HTTP Request we are processing.
    * @param response The HTTP Response we are processing.
    * @throws javax.servlet.ServletException
    * @throws java.io.IOException
    * @return
    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
    String xml = "<ConcatRequest xmlns='http://xmlns.oracle.com/Concat'>"
    +"<input><Solicitud><SolicitudData><tipoSolicitud>Constancia Trabajo</tipoSolicitud>"
    +"</SolicitudData><Solicitante><ID>vcuello</ID><Nombre>Veronica</Nombre><Apellido>Cuello"
    +"</Apellido><Email>[email protected]</Email></Solicitante><Supervisor><ID>rperez</ID>"
    +"<Nombre>Roberto</Nombre><Apellido>Perez</Apellido><Email>[email protected]</Email>"
    +"</Supervisor><Gerente><ID>asanchez</ID><Nombre>Alfredo</Nombre> <Apellido>Sanchez</Apellido>"
    +"<Email>[email protected]</Email></Gerente><Datos><Dato><Nombre>dato</Nombre>"
    +"<Valor>valor</Valor></Dato></Datos><exito><notificacionCons>false</notificacionCons>"
    +"<docManager><imprimir>false</imprimir><firmar>false</firmar></docManager></exito></Solicitud>"
    +"</input>"
    + "</ConcatRequest>";
    String oxml = "<ConcatResponse xmlns='http://xmlns.oracle.com/Concat'>"
    + "<result></result>"
    + "</ConcatResponse>";
    BpelManager.invokeProcess("ConstanciaTrabajo","initiate",xml);
    Map res = BpelManager.requestProcess("ConstanciaTrabajo","onResult",oxml);
    return mapping.findForward("OK");
    * [i]BpelManager.java
    package mypackage2;
    import com.oracle.bpel.client.Locator;
    import com.oracle.bpel.client.NormalizedMessage;
    import com.oracle.bpel.client.ServerException;
    import com.oracle.bpel.client.delivery.IDeliveryService;
    import com.oracle.bpel.client.util.WhereCondition;
    import com.oracle.services.bpel.task.ITask;
    import com.oracle.services.bpel.task.IWorklistService;
    import java.util.Map;
    import java.util.Properties;
    public class BpelManager
    static Locator locator = null;
    static String bpelDomain = "default";
    static String bpelDomainPassword = "bpel";
    static String orabpelPlatform = "oc4j_10g";
    static String javaNamingFactoryInitial = "com.evermind.server.rmi.RMIInitialContextFactory";
    static String javaNamingProviderUrl = "ormi://develc15:23791";
    static String javaNamingSecurityPrincipal = "admin";
    static String javaNamingSecurityCredentials = "welcome";
    static String dedicatedRmiContext = "true";
    public static String bpelProcessName = "ConstanciaTrabajo";
    public static void invokeProcess(String processName, String operationName, String sXml)
    try
    Properties props = new java.util.Properties();
    props.setProperty("orabpel.platform",orabpelPlatform);
    props.setProperty("java.naming.factory.initial",javaNamingFactoryInitial);
    props.setProperty("java.naming.provider.url",javaNamingProviderUrl);
    props.setProperty("java.naming.security.principal",javaNamingSecurityPrincipal);
    props.setProperty("java.naming.security.credentials",javaNamingSecurityCredentials);
    props.setProperty("dedicated.rmicontext", dedicatedRmiContext);
    locator = new Locator(bpelDomain,bpelDomainPassword,props);
    /*IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME);
    // construct the normalized message and send to Oracle BPEL Process Manager
    NormalizedMessage nm = new NormalizedMessage( );
    nm.addPart("payload", sXml);
    deliveryService.post(processName, operationName, nm);*/
    } catch (Exception r)
    r.printStackTrace();
    public static Map requestProcess(String processName, String operationName, String sXml)
    try
    IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME);
    //IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
    // construct the normalized message and send to Oracle BPEL Process Manager
    NormalizedMessage nm = new NormalizedMessage( );
    nm.addPart("payload", sXml );
    NormalizedMessage res = deliveryService.request(processName, operationName, nm);
    Map payload = res.getPayload();
    return payload;
    } catch (Exception r)
    r.printStackTrace();
    return null;
    public static ITask[] queryWorklistService(String arg)
    // Lookup the worklist service.
    IWorklistService worklist =
    (IWorklistService)locator.lookupService( IWorklistService.SERVICE_NAME );
    try
    ITask[] tasks = worklist.listTasksByAssignee(arg);
    return tasks;
    } catch (ServerException s)
    s.printStackTrace();
    return null;
    public static ITask[] queryWorklistServiceByCondition(WhereCondition cond)
    // Lookup the worklist service.
    IWorklistService worklist =
    (IWorklistService)locator.lookupService( IWorklistService.SERVICE_NAME );
    try
    ITask[] tasks = worklist.listTasks(cond);
    return tasks;
    } catch (ServerException s)
    s.printStackTrace();
    return null;
    public static void updateTask(ITask task)
    // Lookup the worklist service.
    IWorklistService worklist =
    (IWorklistService)locator.lookupService( IWorklistService.SERVICE_NAME );
    try
    worklist.updateTask(task);
    } catch (ServerException s)
    s.printStackTrace();
    public static void completeTask(ITask task)
    // Lookup the worklist service.
    IWorklistService worklist =
    (IWorklistService)locator.lookupService( IWorklistService.SERVICE_NAME );
    try
    worklist.completeTask(task);
    } catch (ServerException s)
    s.printStackTrace();
    public static ITask lookupTask(String taskId)
    // Lookup the worklist service.
    IWorklistService worklist =
    (IWorklistService)locator.lookupService( IWorklistService.SERVICE_NAME );
    System.out.println("Entro a Cargo tarea");
    try
    ITask task = worklist.lookupTask(taskId);
    System.out.println("Cargo tarea");
    return task;
    } catch (ServerException s)
    System.out.println("La boto");
    s.printStackTrace();
    return null;
    public void setLocator(Locator locator)
    this.locator = locator;
    public Locator getLocator()
    return locator;
    public void setBpelDomain(String bpelDomain)
    this.bpelDomain = bpelDomain;
    public String getBpelDomain()
    return bpelDomain;
    public void setBpelDomainPassword(String bpelDomainPassword)
    this.bpelDomainPassword = bpelDomainPassword;
    public String getBpelDomainPassword()
    return bpelDomainPassword;
    public void setOrabpelPlatform(String orabpelPlatform)
    this.orabpelPlatform = orabpelPlatform;
    public String getOrabpelPlatform()
    return orabpelPlatform;
    public void setJavaNamingFactoryInitial(String javaNamingFactoryInitial)
    this.javaNamingFactoryInitial = javaNamingFactoryInitial;
    public String getJavaNamingFactoryInitial()
    return javaNamingFactoryInitial;
    public void setJavaNamingProviderUrl(String javaNamingProviderUrl)
    this.javaNamingProviderUrl = javaNamingProviderUrl;
    public String getJavaNamingProviderUrl()
    return javaNamingProviderUrl;
    public void setJavaNamingSecurityPrincipal(String javaNamingSecurityPrincipal)
    this.javaNamingSecurityPrincipal = javaNamingSecurityPrincipal;
    public String getJavaNamingSecurityPrincipal()
    return javaNamingSecurityPrincipal;
    public void setJavaNamingSecurityCredentials(String javaNamingSecurityCredentials)
    this.javaNamingSecurityCredentials = javaNamingSecurityCredentials;
    public String getJavaNamingSecurityCredentials()
    return javaNamingSecurityCredentials;
    public void setDedicatedRmiContext(String dedicatedRmiContext)
    this.dedicatedRmiContext = dedicatedRmiContext;
    public String getDedicatedRmiContext()
    return dedicatedRmiContext;
    public void setBpelProcessName(String bpelProcessName)
    this.bpelProcessName = bpelProcessName;
    public String getBpelProcessName()
    return bpelProcessName;
    }

    hi,
    I fix it, thanx
    static Locator locator = null;
    // public static IWorklistService worklist = null;
    static String bpelDomain = "default";
    static String bpelDomainPassword = "bpel";
    static String orabpelPlatform = "oc4j_10g";
    static String javaNamingFactoryInitial = "com.evermind.server.rmi.RMIInitialContextFactory";
    static String javaNamingProviderUrl = "ormi://myserver:23791/orabpel"; /*this was wrong
    static String javaNamingSecurityPrincipal = "admin";
    static String javaNamingSecurityCredentials = "welcome";
    static String dedicatedRmiContext = "true";
    static{
    try{
    Properties props = new java.util.Properties();
    props.setProperty("orabpel.platform",orabpelPlatform);
    props.setProperty("java.naming.factory.initial",javaNamingFactoryInitial);
    props.setProperty("java.naming.provider.url",javaNamingProviderUrl);
    props.setProperty("java.naming.security.principal",javaNamingSecurityPrincipal);
    props.setProperty("java.naming.security.credentials",javaNamingSecurityCredentials);
    props.setProperty("dedicated.rmicontext", dedicatedRmiContext);
    locator = new Locator(bpelDomain, bpelDomainPassword, props);
    } catch (ServerException se){se.printStackTrace();}
    }

  • How can I stop the execution on a JSP page and start it again

    Hi
    I am making a program that simulates how to manage transactions when accessing a database by using locks. I have run into a problem and I hope someone has the time to help me.
    When a user does an update the transaction commits and releases its locks when the program executes
    <%stmt.executeUpdate("commit!"); %>
    I need to put a break in to stop the program executing this statement, to illustrate the lock is set correctly.
    I have tried to put in an alert box but this does not prevent the rest of the java code being executed.
    I have tried to use prompt boxes, JavaScript functions, but these functions cannot have any java code in them.
    I have tried using the java.swing JOptionPane boxes but this didn?t work either
    I have tried to get input from the user but I don?t know how to retrieve this data on the same page. (As far as I know you have to use submit and even refresh the page or retrieve it on the next page).
    Does anyone know how I can stop the execution on a JSP page and start it again (on same page)
    Mette

    I already have another client (Tomcat jsp application) running and it throws a SQLException correctly when I don�t put in a commit=true statement and don't close the database connection.
    But the problem is how to get the code above to stop to illustrate I have set this lock.
    I have tried to use the JOptionPane but because my program is running in a web browser I cannot use the JOptionPane dialog box.
    I have tired using an alert box but it executes the commit statement before the alert box is dispayed. So this does not work
    While (i < 2)
    if( i==1)
    %>alert(�The transactions commits when you press Ok�); <% //what it to stop execution here
    else
    stmt.executeUpdate(�commit�);
    I am not using threads so I cannot use the sleep function.
    I am using mysql and have already configured it to detect deadlocks and how long to wait for locks.
    Thanks for your help
    Mette

  • I'm trying to run a .jsp page and all I get is the following error. Thoughts?

    Running Coldfusion 8 / JRun 4 updater 7 / Coldfusion 8 hotfix
    2.
    I'm trying to run a .jsp page and all I get is the following
    error. Thoughts?
    Could not invoke Java compiler, please make sure jikesw is in
    I:\JRun4/bin or put a JDK bin directory in your path.
    jrunx.compiler.JavaCompiler$NoCompilerFoundException: Could
    not invoke Java compiler, please make sure jikesw is in
    I:\JRun4/bin or put a JDK bin directory in your path.
    at
    jrunx.compiler.JavaCompiler.outProcessCompile(JavaCompiler.java:474)
    at
    jrunx.compiler.JavaCompiler.compile(JavaCompiler.java:132)
    at
    jrunx.compiler.JavaCompiler.compile(JavaCompiler.java:100)
    at jrun.jsp.Translator.compilePage(Translator.java:176)
    at jrun.jsp.Translator.translate(Translator.java:254)
    at jrun.jsp.Translator.translate(Translator.java:101)
    at jrun.jsp.JSPEngine.translateJSP(JSPEngine.java:707)
    at jrun.jsp.JSPServlet.translate(JSPServlet.java:125)
    at jrun.jsp.JSPServlet.service(JSPServlet.java:113)
    at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
    at
    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
    at
    jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

    You're right, that ws another fix I tried. There is no fix fo
    rthe issue described, but it still seems like an old issue. My
    class paths are short. Here is my jvm.config (pretty standard):
    # VM configuration
    # Where to find JVM, if {java.home}/jre exists then that JVM
    is used
    # if not then it must be the path to the JRE itself
    java.home=I:/JRun4/jre
    # If no java.home is specified a VM is located by looking in
    these places in this
    # order:
    # 1) bin directory for java.dll (windows) or
    lib/<ARCH>/libjava.so (unix)
    # 2) ../jre
    # 3) registry (windows only)
    # 4) JAVA_HOME env var plus jre (ie $JAVA_HOME/jre)
    # Arguments to VM
    java.args=-server -Xmx1000m -Dsun.io.useCanonCaches=false
    -XX:MaxPermSize=256m -XX:+UseParallelGC
    -Dcoldfusion.rootDir={application.home}/
    # commas will be converted to platform specific separator and
    the result will be passed
    # as -Djava.ext.dirs= to the VM
    java.ext.dirs={jre.home}/lib/ext
    # where to find shared libraries
    java.library.path={application.home}/lib,{application.home}/servers/cfusion/cfusion-ear/cf usion-war/WEB-INF/cfusion/lib,{application.home}/servers/cfusion/cfusion-ear/cfusion-war/W EB-INF/cfusion/jintegra/bin,{application.home}/servers/cfusion/cfusion-ear/cfusion-war/WEB -INF/cfusion/jintegra/bin/international
    system.path.first=false
    # set the current working directory - useful for Windows to
    control
    # the default search path used when loading DLLs since it
    comes
    # before system directory, windows directory and PATH
    java.user.dir={application.home}/../lib
    # JVM classpath
    java.class.path={application.home}/servers/lib,{application.home}/lib

  • HT4994 I have an Iphone 4 and can not forward calls. every time I put the number in the call forward field it jumps back a page and the button moves to off. can anyone assist.

    I can not forward calls. I go to call forwarding, turn it on, copy and paste my phone number into the correct field (including the international dialling code).
    I then tap the Call Forwarding button, which takes me back one stage and the Call Forwarding button goes to off after a couple of seconds. Anyone who can help?

    Yes, a blocked call will go immediately to your voice mail.
    If you would rather not have that behavior, ask your cellular carrier if you can block that person through the carrier.

  • Single signon between JSP page and Net.Data page

    I am trying to setup a single signon between a JSP page hosted on a tomcat server, and a Net.Data page hosted on an IBM HTTP server. Both of these servers are running on an AS400. The JSP page (www.jsppage.com/menu) contains a link to the Net.Data page (www.netData.com/page2). In order to access www.jsppage.com/menu the user needs to login. Once this happens I want them to be able to go back and forth between the two pages without having to log in when they switch servers. Page navigation is handled through myServlet.java so that when a user clicks on a link the request is forwarded on to myServlet.java where the servlet determines where to redirect the user to. The servlet uses
    RequestDispatcher requestDispatcher = getServletContex().getRequestDispatcher(url);
    requestDispatcher.forward(request, response);
    to forward the user to the correct page. This works fine for the JSP pages but when I forward to www.netData.com/page2 I get an error telling me the address doesn't start with a /. I also need to send the user name and password for the net.data pages to avoid the second login window to popup.
    I understand that the requestDsipatcher.forward() method directs the browser to a page that is relative to the current root directory. If I try to use response.sendRedirect(url) I get sent to the right page but the signon window pops up. I would appreciate any help.

    I am trying to setup a single signon between a JSP
    page hosted on a tomcat server, and a Net.Data page
    hosted on an IBM HTTP server. Both of these servers
    are running on an AS400. The JSP page
    (www.jsppage.com/menu) contains a link to the Net.Data
    page (www.netData.com/page2). In order to access
    www.jsppage.com/menu the user needs to login. Once
    this happens I want them to be able to go back and
    forth between the two pages without having to log in
    when they switch servers. Page navigation is handled
    through myServlet.java so that when a user clicks on a
    link the request is forwarded on to myServlet.java
    where the servlet determines where to redirect the
    user to. The servlet uses
    RequestDispatcher requestDispatcher =
    getServletContex().getRequestDispatcher(url);
    requestDispatcher.forward(request, response);
    to forward the user to the correct page. This works
    fine for the JSP pages but when I forward to
    www.netData.com/page2 I get an error telling me the
    address doesn't start with a /. I also need to send
    the user name and password for the net.data pages to
    avoid the second login window to popup.
    I understand that the requestDsipatcher.forward()
    method directs the browser to a page that is relative
    to the current root directory. If I try to use
    response.sendRedirect(url) I get sent to the right
    page but the signon window pops up. I would
    appreciate any help.You can't do that without passing username and password.
    The servers keep track of the user by storing a cookie on the clients computer. The cookie is only valid for the domain that created it.
    So, to make this work you need to send the username and password as part of the sendRedirect. the forward() method won't work.
    What you could do is create some code on the .net machine that accepts username, password and target URL as input. Once it receives those parameters it should perform the .net login procedure and redirect to the correct page.
    In your servlet you should pass those parameters on to the .net machine and the user should get the correct page without ever seeing any login windows.
    Make sure to use https if you decide to follow this scheme since http will transmit the username/password in cleartext.
    /Christopher

  • Urgent....How can i redirect to my jsp page from servlet in init() method..

    How can i redirect to my jsp page from servlet in init() method..Becoz that servlet is calling while server startsup..so im writing some piece of code in init() method..after that i want to redirect to some jsp page ...is it possible?
    using RequestDispatcher..its not possible..becoz
    RequestDispatcher rd = sc.getRequestDispatcher("goto.jsp");
    rd.foward(req,res);
    Here the request and response are null objects..
    So mi question can frame as how can i get request/response in servlet's init method()..

    Hi guys
    did any one get a solution for this issue. calling a jsp in the startup of the servlet, i mean in the startup servlet. I do have a same req like i need to call a JSP which does some data reterival and calculations and i am putting the results in the cache. so in the jsp there in no output of HTML. when i use the URLConnection i am getting a error as below.
    java.net.SocketException: Unexpected end of file from server
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:707)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:612)
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:705)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:612)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
    nection.java:519)
    at com.toysrus.fns.alphablox.Startup.callJSP(Unknown Source)
    at com.toysrus.fns.alphablox.Startup.init(Unknown Source)
    at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
    so plz do let me know how to call a jsp in the start up of a servlet.
    Thanks
    Vidya

  • Retrieving an ArrayList object in a JSP page and loop it

    i have these statements in the java servlet class:
    request.setAttribute("searchresults",searchResults);
    request.getRequestDispatcher("/searchStaff.jsp").forward(request, response);
    return;the searchResults is the ArrayList object.
    i would very much like to know how i can retrieve this object in a JSP page and iterate through this ArrayList using JSTL. I know i will need to use the <c:forEach> tag but i don't know what i should include in the body of this tag.
    thanks a lot~~~~~

    <c:forEach var="columnName" items="${requestScope.searchResults}">
    ...

  • Submit the jsp page containing the textarea

    Hi,
    I have a jsp page containing the textarea and a submit button. This page is submitted using POST. In the next page the content of the textarea is obtained and displayed. Can anyone let me know if there is any maximum limit on the characters in the textarea?
    I am using JRUN3.1.
    If the characters in the textarea is increasing 2000 characters, in the next page if i try to get the content of the textarea i am getting as null???
    please help me out.

    Hi,
    There is a limit as to how much data that can be passed using the GET method. Dont remember it at the top of my head now.
    It would be better to use the POST method.
    Sandesh

  • How to redirect a JSP page after the session is killed

    Hello!
    I am quite new to JSP. I have a question about how to redirect a jsp page after the session is killed. Could anyone help?
    thanks a lot in advance!

    You can't, directly. There's no connection betweenthe server and browser.
    even after invalidating the session. we can do it
    directly using the statement
    response.sendRedirect("....");
    or we can use the meta refresh tag.if session is invalidated and if we try to do response.sendRedirect(".. ") it throws IllegalStateException

  • How to Link another JSP Page in the same portal component

    Hi Guys,
      I am a new guy to SAP, currently, I want to add href link to another JSP in the same component, so I used <a href="<%=webpath%>/jsp/AboutPage.jsp">, but obviously, the link can not display target page due to privilege restriction, does anyone know how to resolve this problem? thanks very much!
      Best Regards
      James

    Thanks srinivas,
       Sorry for late response, too busy yesterday.
       Currently, I want to create a URL link in the page which links another JSP page in the same portal component, but the problem is this JSP page is under PORTAL-INF folder, so due to privilege problem, I can not create the link like the following:
    <a href="jsp/test.jsp">Link</a>
       I konw if I move test.jsp out of folder PORTAL-INF, the above way should work, but then, I found the JSP page can not access componentRequest and get resource bundle object.
      Am I clear, please let me know, thanks!
    Regards.
    James

  • Pass the data back from the jsp page to the java code

    Hi,
    I have written an iView that receives an event using EPCF and extracts data from the client data bag.
    I need this iView to pass the data back from the jsp page to the java code.
    I am trying to do this using a hidden input field, but I cannot get the code to work.
    Here is the code on the jsp page.
    <%@ taglib uri="tagLib" prefix="hbj" %>
    <hbj:content id="myContext" >
      <hbj:page title="PageTitle">
       <hbj:form id="myFormId">
    <hbj:inputField id="myInputField" type="string" maxlength="100" value="" jsObjectNeeded="true">
    <% myInputField.setVisible(false);%>
    </hbj:inputField>      
       </hbj:form>
      </hbj:page>
    </hbj:content>
    <script language=JavaScript>
    EPCM.subscribeEvent("urn:com.peter", "namedata", window, "eventReceiver");
    function eventReceiver(eventObj) {
         var url = eventObj.dataObject;
         var funcName = htmlb_formid+"_getHtmlbElementId";
         func = window[funcName];
         var ipField = eval(func("myInputField"));
         ipField.setValue(url);
         var form = document.all(htmlb_formid);
         form.submit();
    </script> 
    Here is my java code
    package com.sap.training.portal;
    import com.sapportals.htmlb.InputField;
    import com.sapportals.htmlb.page.DynPage;
    import com.sapportals.htmlb.page.PageException;
    import com.sapportals.portal.htmlb.page.JSPDynPage;
    import com.sapportals.portal.htmlb.page.PageProcessorComponent;
    public class ListSalesOrder extends PageProcessorComponent {
      public DynPage getPage(){
        return new ListSalesOrderDynPage();
      public static class ListSalesOrderDynPage extends JSPDynPage{
         private String merong;
        public void doInitialization(){
        public void doProcessAfterInput() throws PageException {
              InputField reportfld = (InputField) getComponentByName("myInputField");
              if (reportfld != null)      merong = reportfld.getValueAsDataType().toString();
        public void doProcessBeforeOutput() throws PageException {
              if ( merong != null ) setJspName("merong.jsp");
              else setJspName("ListSalesOrder.jsp");
    Here is DD
    <?xml version="1.0" encoding="utf-8"?>
    <application>
      <application-config>
        <property name="SharingReference" value="com.sap.portal.htmlb"/>
        <property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>
      </application-config>
      <components>
        <component name="SearchSalesOrder">
          <component-config>
            <property name="ComponentType" value="jspnative"/>
            <property name="JSP" value="/pagelet/SearchSalesOrder.jsp"/>
          </component-config>
          <component-profile>
            <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
          </component-profile>
        </component>
        <component name="ListSalesOrder">
          <component-config>
            <property name="ClassName" value="com.sap.training.portal.ListSalesOrder"/>
          </component-config>
          <component-profile>
            <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
          </component-profile>
        </component>
      </components>
      <services/>
    </application>
    After receive event, then call java script function "eventReceiver" and call "form.submit()".
    But .. PAI Logic in Java code doesn't called ...
    Where is my problme ?
    Help me ...
    Regards, Arnold.

    Hi Arnold,
    you should not do a form.submit yourself. Instead you can put a component called ExternalSubmit to your page:
    ExternalSubmit exSubmit = new ExternalSubmit("EX_SUBMIT"));
    exSubmit.setServerEventName("MyEvent");
    This results in a java script funtion on the page which is called "_htmlb_external_submit_". If you call this function the the form gets submitted and your event handler is called.
    regards,
    Martin

  • Ive just learned that i can use loadjava to load jsp pages into the database.

    Ive just learned that i can use loadjava to load jsp pages into the database. How is that possible. How can someone go to my lets say, index.jsp page and actually see it if its inside the database? What authenticates it? Where would you set the parameters to tell http(apache) to look inside the db for the pages?
    Any ideas?

    Thanks for the reply. If I put the file on the database, does it have to be in a particular location? I've put it on the database server, launched sql*plus (as APPS) and ran the following:
    execute dbms_java.loadjava('-v', 'ZebraGetPrinterFromXML.class');
    PL/SQL procedure successfully completed.Then when I try to run a process that uses this I get this:
    ORA-29540: class ZebraGetPrinterFromXML does not exist

  • Stored application and the ExtendedAppAttributes.isStartable() method

    Hi,
    According to MHP 1.1.3 sub-chapter 10.14.2 the application could be launched also when:
    - not_launchable_from_broadcast is set to "1"
    - is_launchable_with_older_version is set to "1"
    - some older version of this application is stored (but not the current version)
    So it seems that the ExtendedAppAttributes.isStartable() method shall return true in this case.
    However the specification describing this method says nothing about the is_launchable_with_older_version flag. Instead of it says:
    "+An Application is not startable if ... The application is signalled as not_launchable_from_broadcast and is not stored...+".
    Does it mean that application is stored also when the is_launchable_with_older_version flag is set to "1" and any older version of this application is stored (but not the current version)? And the ExtendedAppAttributes.isStored() method shall return true in this case?
    Or the ExtendedAppAttributes.isStartable() method has nothing common with the possibility of application launching? That is, even if it returns false the application may be launched/started by the terminal/another xlet.
    Regards,
    Adam Lessnau

    Hi cf090,
    Audit logs are stored in a hidden, dedicated arbitration mailbox. We can access them by using the ECP Auditing Reports page, the Search-AdminAuditLog or New-AdminAuditLogSearch cmdlet.
    For more information, here is an article for your reference.
    Overview of Administrator Audit Logging
    http://technet.microsoft.com/en-us/library/dd335052(v=exchg.141).aspx
    Hope it helps.
    If there are any problems, please feel free to let me know.
    Best regards,
    Amy
    Amy Wang
    TechNet Community Support

Maybe you are looking for

  • Pdf slideshow in LR1.3.1 appalling resolution

    There is something seriously wrong with the downsizing of images for a slideshow exported to pdf. I exported using 1024x768 as the chosen resolution. On viewing the pictures looked horrid, so I repeated the export but with jpg quality set to 100%. Sa

  • My MacBook Pro corrupts USB hard discs

    Hi, this is my first time so cut me some slack please :-) My computer details are : Hardware Information:          MacBook Pro (17-inch, Early 2011)          MacBook Pro - model: MacBookPro8,3          1 2.2 GHz Intel Core i7 CPU: 4 cores          16

  • HT1688 my default apps are gone. Restoring does not work

    Pleas help I tried to jailbreak my iphone 4 and my default apps are gone(settings, photos, exct)

  • RH7 Crashes When Adding/Renaming Folders

    I am using RH 7.02.001 on WinXP (via the TCS, if that is relevant). I think what I'm looking for is some perspective on migrating a single project to a collection of merged projects. I have a fairly large HTML project (1500 topics in 100 or so folder

  • I want to update my Ipod.

    I want to update my Ipod touch. But it says I need to move all the files from it to my itunes on my laptop. How do I do that?