JSP Scope Limits

I'm just starting with JSP. Can someone tell me why I can query the database and output the first occurance of lastName, but not the 2nd occurance (noted by comments in caps)? Are there scope limits between the action sections?
Is there a better way to output database fields in the HTML form?
Here's a section of the code.
<%@ page import="java.io.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
<!% try {
//Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection
("jdbc:oracle:thin:@myserver:1521:orcl","login","pass")
String employeeNum = request.getParameter("empNum");
Statement s = con.createStatement();
String sql = "SELECT LAST_NAME FROM EMPLOYEE WHERE EMPLOYEE=" +
employeeNum;
ResultSet rs = s.executeQuery(sql);
while (rs.next()) {
     //out.println(rs.getString(1));
     String lastName = rs.getString(1); //***********************
     out.println(lastName); //GET OUTPUT HERE
     s.close();
con.close();
catch (SQLException e) {
out.println("<B>Error</B>");
out.println("<BR>");
out.println(e.toString());
catch (Exception e) {
out.println("<B>Error</B>");
out.println("<BR>");
out.println(e.toString());
%>
<HTML>
<HEAD>
<TITLE>Personnel Actions</TITLE>
</HEAD>
<BODY>
<H1 align="center">Personnel Action</H1>
<HR>
<FORM METHOD="POST" ACTION="PAValidate.jsp">
<BLOCKQUOTE>
<table border="0" width="764">
<tr>
<td width="92"><b>Employee</b></td> //**************
<td width="292"> <%= out.print(lastName) %> </td> //NO OUTPUT HERE
<td width="101"><b>Employee #</b></td>
<td width="253"> <%= request.getParameter("empNum") %> </td>
</tr>
<tr>
<td width="92"><b>Dept #</b></td>
<td width="292"></td>
<td width="101"><b>Effective Date</b></td>
<td width="253"> <%= request.getParameter("effDate") %> </td>
</tr>
</table>

If i understand your question, you have many employees that will be returned into the resultset after your query. You will need to get your HTML code nested into your jsp code (in the while(rs.next())). Try this:
<%@ page import="java.io.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
<HTML>
<HEAD>
<TITLE>Personnel Actions</TITLE>
</HEAD>
<BODY>
<H1 align="center">Personnel Action</H1>
<HR>
<FORM METHOD="POST" ACTION="PAValidate.jsp">
<BLOCKQUOTE>
<table border="0" width="764">
<!% try {
//Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection
("jdbc:oracle:thin:@myserver:1521:orcl","login","pass")
String employeeNum = request.getParameter("empNum");
Statement s = con.createStatement();
String sql = "SELECT LAST_NAME FROM EMPLOYEE WHERE EMPLOYEE=" +
employeeNum;
ResultSet rs = s.executeQuery(sql);
while (rs.next()) {
//out.println(rs.getString(1));
String lastName = rs.getString(1); //***********************
%>
<tr>
<td width="92"><b>Employee</b></td> //**************
<td width="292"> <%=lastName %> </td> //NO OUTPUT HERE
<td width="101"><b>Employee #</b></td>
<td width="253"> <%=employeeNum %> </td>
</tr>
<%
s.close();
con.close();
catch (SQLException e) {
out.println("<B>Error</B>");
out.println("<BR>");
out.println(e.toString());
catch (Exception e) {
out.println("<B>Error</B>");
out.println("<BR>");
out.println(e.toString());
%>
</tr>
</table>
If this isnt what you need, please give more details...

Similar Messages

  • Scopes limited to a bounding box!

    I've put in a wishform request (  https://www.adobe.com/cfusion/mmform/index.cfm?event=processform&name=wishform#wishprodlan g  ) for something that would have a HUGE effect on the speed of my grading: being able to have the scopes limited to the data in a drawn bounding-box! I'd want it to be a key-boarded shortcut, but one you could set to "on" and just leave as you wanted to.
    Think of how this would assist you in  skin-tone corrections/controls, being able to at any moment draw a quick bounding-box and see where on the vector-scope your "skin" falls, both for rotational degree (hue) and saturation!
    Think of the way this could work in checking for secondary corrections ... both in determining IF you need to do the work of making a secondary, and ... if so ... showing you where you need to start AND where you need to go.
    Currently the only way to do this is to make a top-level primary layer, create a mask on it futzing around to make the mask fit exactly the area you need to "see" in the scope, set the layer for controlling the outside of the mask, and then "grade" the outer area to black.
    You need to do all this anytime you want to restrict the scopes to one small section of the image. The control as I've suggested, only because I've learned it is something available in some other software and is slicker than SNOT to use (    ) ... well, it would be available INSTANTLY all the time. What a huge time-saver this would be for me.
    Y'all are welcome to post this on to Adobe also ... 
    Neil

    FWIW Neil
    In my experience ..."skin tone" and any other is ultimately CC and graded to the "eye-ometer"
    Key to subtleties and control  is the use of Secondaries thru HSL qualifiers and masks.
    Personally ..once I get into areas such as skin tone...its all eye and not a glance at a scope ...apart from the constant eye on Black and highlight levels.
    I would like to see Adobe gain scope consistency across the apps.  SG , PPRO and AEFX
    I am not adverse to a "floating point scope" as an optional tool. ( Another scope).
    If you can get a look at DVRack (Serious Magic)  or Adobe On Location scopes... do so.

  • Difference between JSP Scopes

    Hey people,
    My name is Lucas Abrao, 22, Brazil. I'm a Java Programmer and now, I'm starting learning JSP. I' ve been having some easy doubts 'cause the books I have boght are a little bit advanced for that. I wanna know if you could tell me the differences between the JSP Scopes Pages. I mean, I wanna know the difference between application, session, request and page scopes and when do I utilize each one of them. Could you give four simple code example with each one of them at work?
    Thanks you all.

    Page Scope is the smallest scope, and is a representation of the PageContext object for your JSP. Each JSP has it's own page scope, so objects in the page scope of one JSP are not accessible to other JSPs. This is sorta like making a private variable in Java.
    Request scope is the next smallest scope, and is represented with the JSP's request object. All JSPs and servlets that share a request share the request scope. For example, if I have a JSP that forwards to another page, and that second page includes a third JSP page, then all three pages are in the same request, and can share objects through the request scope. A special note here, is the response.redirect(), will create a new request, unlike forwards and includes. Also note, a new request is made every time the user gets a new page, be it by clicking a link, a button, or some JavaScript call.
    Session scope is the next lowest scope, represented by an HttpSession object. All requests from the same user are in the same session (unless you or they make it otherwise). Each user has his own session. If you want data to be referred to through multiple pages, after each page is displayed and the user requests a new page, then store the information in the session. Note, in order for sessions ot work, the user must have cookies on, or you must re-write the URLs. Take a look for maintaining sessions for more help on that.
    The widest scope is the application scope, represented by the ServletContext object. All users share the same values of the application scope, as there is only one made for the web application. If you have some static material that all users should be able to access, then put it in the application, but be carefull. Each user will see the changes other users make, and certain threading issues can occur if not handled properly. So application scope is usually best used for Read-Only data.

  • Concept of using scope in JSP !!

    Hi All,
    I have some confusions about Scope field used in JSP.
    1. Can anyone please tell me what is the significance of using scope in jsp?

    Is google not installed on your computer?
    http://www.google.com/search?hl=en&q=jsp+scope&meta=
    http://www.cs.unc.edu/Courses/jbs/lessons/java/java_jsp/jsp_syntax.html

  • Values from a jsp page are null in Action Class

    hi, i am working on an application...i have a jsp page with several inputs (type=text) and when a submit the form to to my action class all values      received are null.
    Here is a part of code:
    the jsp file: letter.jsp
    <form target="_self" action="/Test/editLetter.do" name="letterTF">
    <table>
    <tbody>
    <tr>
    <th>
    No of objects
    </th>
    <th>
    Weight
    </th>
    <th>
    Description
    </th>
    </tr>
    <tr>
    <td>
    Package
    <input name="package" id="package" type="checkbox">
    </td>
    <td>
    <input name="package_No" type="text" value="<%=currentBean.getPackageNo() %>"> <%-- from session...have to edit some date from a data base--%>
    </td>
    <td>
    <input name="package_weight" type="text" value="<%=currentBean.geWeight()%>">
    </td>
    <td>
    <input name="description" type="text" value="<%=currentBean.Description()%>"
    </td>
    </tr>
    <tr>
    ..................................................... <%-- It's a big form --%>
    </tr>
    <tr>
    <input type="submit" name="send" value="Send">
    </tr>
    </tbody>
    </table>
    </form>
    struts-config.xml:
    <form-bean
              name="letterTF"
              type="Test.LetterForm">
    </form-bean>
    <action path="/editLetter"
                   type="Test.LetterAction"
                   name="scrisoareTF"
                   input="/letter.jsp"
                   scope="request"
                   validate="false">
                   <forward name="success" path="/index_orders.jsp"/>
    </action>
    The ActionForm class:
    public class LetterForm extends ActionForm{
    private String package;
         private String package_No;
         private String package_weight;
         public void setPackage(String package){
    this.package = package
    public String getPackage(){
    return package;
    The action class:
    public class LetterAction extends Action{
    public ActionForward execute(     
                   ActionMapping mapping,
                   ActionForm form,
                   HttpServletRequest request,
                   HttpServletResponse response)
         throws Exception{
    String package;
    String package_No;
    String package_weight;
    LetterForm letterTF = (LetterForm) form;
    package = letterTF.getPackage();
    package_No = letterTF.getPackageNo()
    package_weight = letterTF.getPackageWeight();
    System.out.println("Package: "+package);//it will print Package: null
    System.out.println("Weight: "+weight);//it will print Weight: null
    System.out.println("Description "+description) //it will print Description: null
    As I observed its not making the set methods from LetterForm.java
    I am dealing with this bug for a couple of days an i didn't managed to break it. If anyone has an idea would he be so kind to share it with me.
    Thanks in advanced,
    David

    Basically your form beans are the place holders or containers for your jsp attributes. It has to be mapped in such a way that when the form is submitted the user entered values get populated on to your form bean.
    For Eg:
    JSP
    <html:form action="accountSearchResults.do">
    <html:text property="myName" size="15"/>
    //USE ONLY STRUTS TAGS IN JSP's. U CAN REFER TO
    //http://struts.apache.org/1.x/struts-taglib/tlddoc/index.html
    //THE PROPERTY NAME "myName" SHOULD BE DEFINED IN
    //YOUR FORMBEAN WITH getMyName AND setMyName
    //METHODS DEFINED
    </html:form>
    struts-config.xml
    <form-beans>
         <form-bean name="addEditAccount" type="org.apache.struts.validator.LazyValidatorForm">
              <form-property name="myName" type="java.lang.String">
              </form-property>
         </form-bean>
    </form-beans>
    <action-mappings>
         <action path="/accountSearchResults" type="com.zzz.AccountSearchResultAction" name="addEditAccount" scope="request">
              <forward name="success" path="NextPage.jsp">
              </forward>
         </action>
    </action-mappings>
    Action Class
    Since we have defined the form bean as a lazyvalidator instance you can use:
    PropertyUtils.copyProperties(targetBean, form);to fetch the values entered by the user. Try to use struts tags in your jsp's and map the properties to your form bean variables. Hope that helps.
    SirG

  • Values from a jsp page are null in an Action class

    hi, i am working on an application...i have a jsp page with several inputs (type=text) and when a submit the form to to my action class all values received are null.
    Here is a part of code:
    the jsp file: letter.jsp
    <form target="_self" action="/Test/editLetter.do" name="letterTF">
    <table>
    <tbody>
    <tr>
    <th>
    No of objects
    </th>
    <th>
    Weight
    </th>
    <th>
    Description
    </th>
    </tr>
    <tr>
    <td>
    Package
    <input name="package" id="package" type="checkbox">
    </td>
    <td>
    <input name="package_No" type="text" value="<%=currentBean.getPackageNo() %>"> <%-- from session...have to edit some date from a data base--%>
    </td>
    <td>
    <input name="package_weight" type="text" value="<%=currentBean.geWeight()%>">
    </td>
    <td>
    <input name="description" type="text" value="<%=currentBean.Description()%>"
    </td></tr>
    <tr>
    ..................................................... <%-- It's a big form --%>
    </tr>
    <tr>
    <input type="submit" name="send" value="Send">
    </tr>
    </tbody>
    </table>
    </form>
    struts-config.xml:
    <form-bean
    name="letterTF"
    type="Test.LetterForm">
    </form-bean>
    <action path="/editLetter"
    type="Test.LetterAction"
    name="scrisoareTF"
    input="/letter.jsp"
    scope="request"
    validate="false">
    <forward name="success" path="/index_orders.jsp"/>
    </action>
    The ActionForm class:
    public class LetterForm extends ActionForm{
    private String package;
    private String package_No;
    private String package_weight;
    public void setPackage(String package){
    this.package = package
    public String getPackage(){
    return package;
    The action class:
    public class LetterAction extends Action{
    public ActionForward execute(
    ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception{
    String package;
    String package_No;
    String package_weight;
    LetterForm letterTF = (LetterForm) form;
    package = letterTF.getPackage();
    package_No = letterTF.getPackageNo()
    package_weight = letterTF.getPackageWeight();
    System.out.println("Package: "+package);//it will print Package: null
    System.out.println("Weight: "+weight);//it will print Weight: null
    System.out.println("Description "+description) //it will print Description: null
    As I observed its not making the set methods from LetterForm.java
    I am dealing with this bug for a couple of days an i didn't managed to break it. If anyone has an idea or a solution would he be so kind to share it with me
    Thanks in advance,
    David

    Basically your form beans are the place holders or containers for your jsp attributes. It has to be mapped in such a way that when the form is submitted the user entered values get populated on to your form bean.
    For Eg:
    JSP
    <html:form action="accountSearchResults.do">
    <html:text property="myName" size="15"/>
    //USE ONLY STRUTS TAGS IN JSP's. U CAN REFER TO
    //http://struts.apache.org/1.x/struts-taglib/tlddoc/index.html
    //THE PROPERTY NAME "myName" SHOULD BE DEFINED IN
    //YOUR FORMBEAN WITH getMyName AND setMyName
    //METHODS DEFINED
    </html:form>
    struts-config.xml
    <form-beans>
         <form-bean name="addEditAccount" type="org.apache.struts.validator.LazyValidatorForm">
              <form-property name="myName" type="java.lang.String">
              </form-property>
         </form-bean>
    </form-beans>
    <action-mappings>
         <action path="/accountSearchResults" type="com.zzz.AccountSearchResultAction" name="addEditAccount" scope="request">
              <forward name="success" path="NextPage.jsp">
              </forward>
         </action>
    </action-mappings>
    Action Class
    Since we have defined the form bean as a lazyvalidator instance you can use:
    PropertyUtils.copyProperties(targetBean, form);to fetch the values entered by the user. Try to use struts tags in your jsp's and map the properties to your form bean variables. Hope that helps.
    SirG

  • 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();}
    }

  • Problem with  Handling  Exception  in Jsp

    hi
    I am unable to handling exception in Jsp.
    In my Simple Form i taken a simple text field named salary.
    Details.jsp
    <%@ page language="java" isErrorPage="true" errorPage="Det.jsp"%>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
    <html:html>
    <html:form action="/det.do">
    Enter Salary<html:text property="sal"/><br>
    <br>
    <html:submit value="SEND" />
    </html:form>
    </html:html>and my Actionclass is:
    package com.gurukul.util;
    import java.io.IOException;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public class DetUserAction extends Action {
         String s=null;
         int sal;
    public ActionForward execute(ActionMapping map,ActionForm form,HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException
         try
         sal=Integer.parseInt(req.getParameter("sal"));
         if (sal>0)
              s="success";
         else
         throw new SalException(sal);}
         catch(SalException e)
              e.getMessage();
         return map.findForward(s);
    and my Formbean is
    package com.gurukul.util;
    import java.io.IOException;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public class DetUserAction extends Action {
         String s=null;
         int sal;
    public ActionForward execute(ActionMapping map,ActionForm form,HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException
         try
         sal=Integer.parseInt(req.getParameter("sal"));
         if (sal>0)
              s="success";
         else
         throw new SalException(sal);}
         catch(SalException e)
              e.getMessage();
         return map.findForward(s);
    }and my struts-config.xml is
                                  </form-bean>
                                  <form-bean name="DetUser"  
                           type="com.gurukul.util.DetUserForm">
                                  </form-bean>
    <action path="/det"
                          type="com.gurukul.util.DetUserAction"
                          name="DetUser"
                        input="/Details.jsp"
                           scope="request">
                           <exception key="errors.sal"
                           type="com.gurukul.util.SalException"
                           path="/jsp/Det.jsp"/>
                       <forward name="success" path="/jsp/DetailList.jsp"  />
                       <forward name="failure" path="/jsp/Details.jsp"/>
                         </action>and Det.jsp(i.e error jsp) is
    <%@ page language="java" isErrorPage="true"%>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
    <html:html>
    <center><b>
    Invalid Salary</b></center>
    <%= exception.getMessage() %>
    </html:html>but i didnt get exception on jsp.
    please help me
    Regards
    VAS

    hi
    can you please guide me how to handle exceptions in Jsp(struts)?

  • Error:Cannot find bean org.apache.struts.taglib.html.BEAN in any scope

    I want to submit this page so that i can retrieve values in the new employer name and license type depending on the license # my jsp code is as below
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <%@ page import="org.apache.struts.action.Action.*"%>
    <%@ page contentType="text/html;charset=windows-1252" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <html:html>
    <HEAD>
    <TITLE><bean:message key="application.title"/></TITLE>
    <META HTTP-EQUIV="Content-Type" content="text/html; charset=ISO-8859-1">
    <META NAME="GENERATOR" content="Oracle JDeveloper 10g">
    <META HTTP-EQUIV="Content-Style-Type" content="text/css">
    <META HTTP-EQUIV="PRAGMA" VALUE="NO-CACHE">
    <LINK href="theme/Master.css" rel="stylesheet" type="text/css">
    <SCRIPT src="javascript/common_validation.js"></SCRIPT>
    </HEAD>
    <BODY MARGINHEIGHT="0" marginweight="0" topmargin="0" leftmargin="0" bgcolor="#FFFFFF">
    <%@ include file="../../includes/icolaMenu.jsp" %>
    <html:form action="/addTransfer.do" focus="newEmplic" onsubmit="return validateTransferlicenseeForm(this);">
    <html:javascript formName="transferlicenseeForm" /><html:errors />
    <tr><td>
    <table align="left" border="1" width="736" bgcolor="ffffff" cellpadding="0" cellspacing="0" bordercolor="c0c0c0">
    <tr><td>
    <table width="736" border="0" cellpadding="1" cellspacing="0">
    <tr>
    <td width="730" align=center><b><font face="Verdana, Arial, Helvetica, sans-serif">Transfer License</font></b></td>
    </tr>
    <tr>
    <td> </td>
    </tr>
    <tr>
    <td><%@ include file="../../includes/licenseDetails.jsp" %></td>
    </tr>
    <tr>
    <td align="center">
    <table class="tabledec" width="730" border="0" cellpadding=0 cellspacing=0>
    <tr>
    <td align="left"><font size="-2" face="Verdana, Arial, Helvetica, sans-serif"><b>  &#58;&#58;  Current Employing Licensee Information:</b></font></td>
    <td align="right"><font size="-2" face="Verdana, Arial, Helvetica, sans-serif"><b>&#164; &#164; &#164;  </b></font></td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td align="left"><table width="734" border="0">
    <tr>
    <td width="30"> </td>
    <td width="106"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><b>License #:</b></font></td>
    <td width="598"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><bean:write name="transferlicenseeForm" property="currentEmplic" /></font></td>
    </tr>
    <tr>
    <td width="4%"> </td>
    <td width="20%"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><b>Name:</b></font></td>
    <td width="30%"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><bean:write name="transferlicenseeForm" property="currentEmpname" /></font></td>
    <td width= "20%" <font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><b>DBA Name:</b></font></td>
    <td width="30%" <font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><bean:write name="transferlicenseeForm" property="currentEmpdbaname" /></font></td>
    </tr>
    <tr>
    <td width="30"> </td>
    <td width="106"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><b>License Type:</b></font></td>
    <td width="598"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><bean:write name="transferlicenseeForm" property="currentEmplictype" /></font></td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td nowrap><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
    </tr>
    <tr>
    <td align="center">
    <table class="tabledec" width="730" border="0" cellpadding=0 cellspacing=0>
    <tr>
    <td align="left"><font size="-2" face="Verdana, Arial, Helvetica, sans-serif"><b>  &#58;&#58;  New Employing Licensee Information:</b></font></td>
    <td align="right"><font size="-2" face="Verdana, Arial, Helvetica, sans-serif"><b>&#164; &#164; &#164;  </b></font></td>
    </tr>
    </table>
    </td>
    </tr>
    <logic:equal name="transferlicenseeForm" property="transferButton" value="button.submit">
    <tr>
    <td align="left"><table width="734" border="0">
    <html:form action="ChangeEvent.do" name ="transferlicenseeForm" type="com.dleg.cola.helper.TransferLicensee" >
    <html:hidden property="method" />
    <tr>
    <td width="4%"> </td>
    <td width="20%"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><b>License #:</b></font></td>
    <td width="76%"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><html:text styleClass="required" maxlength="10" name="transferlicenseeForm" property="newEmplic" onkeyup="if(true){this.form.elements[0].value='populateDetails';this.form.submit();}" /></font>  
    <font size="-2" color=blue face="Verdana, Arial, Helvetica, sans-serif"><b>License Lookup</b></font></td>
    <!-- <td width="120"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><b>Transfer Status:</b></font></td>
    <td width="198"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><bean:write name="transferlicenseeForm" property="transferStatus" /></font></td>-->
    </tr>
    <!-- </html:form> -->
    <tr>
    <td> </td>
    <td><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><b>Name:</b></font></td>
    <td colspan="3"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><bean:write name="transferlicenseeForm" property="newEmpname" /></font></td>
    </tr>
    <tr>
    <td> </td>
    <td><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><b>License Type:</b></font></td>
    <td colspan="3"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><bean:write name="transferlicenseeForm" property="newEmplictype" /></font></td>
    </tr>
    <tr>
    <td colspan=5><p align=justify><font size="-2" face="Verdana, Arial, Helvetica, sans-serif"><B>NOTE:</B><BR> * Transfer
    fee will be added to your online invoice upon Submit. Transfers require approval from New employing Licensee. Please inform new employing
    Licensee that you have completed this transfer request. Your new License will be printed upon new employing Licensee's approval.</font></p>
    </td>
    </tr>
    </table></td>
    </tr>
    <html:hidden property="parentLicid" />
    <tr>
    <td> </td>
    </tr>
    <tr>
    <td colspan=3>
    <font size="-1" face="Verdana, Arial, Helvetica, sans-serif" color="Gray"><b>Have you been convicted of a felony or misdemeanor for which you could have gone to jail that has not previously been reported to the department?</b></font>
    </td>
    </tr>
    <tr>
    </tr>
    <tr>
    <td colspan=3>
    <font size="-1" face="Verdana, Arial, Helvetica, sans-serif" color="Gray">
    <html:radio property="GMCind" value="N" disabled="true"/>NO
    <html:radio property="GMCind" value="Y" disabled="true"/>YES (Complete and return this questionaire)
    (http://www.cis.state.mi.us/bcsc/forms/lce020.pdf)
    </font>
    </td>
    </tr>
    <!-- <tr>
    <td colspan=3>
    <font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><b>Have you had disciplinary action taken against any license, registration or permit you now hold or have ever held that you have not reported to the department?</b></font>
    </td>
    </tr>
    <tr>
    <td colspan=3>
    <font size="-1" face="Verdana, Arial, Helvetica, sans-serif">
    <html:radio property="dispInd" value="N" />NO
    <html:radio property="dispInd" value="Y" />YES (Complete and return this questionaire)
    (http://www.cis.state.mi.us/bcsc/forms/lce021.pdf)
    </font>
    </td>
    </tr>-->
    </td>
    </tr>
    </logic:equal>
    <logic:equal name="transferlicenseeForm" property="transferButton" value="button.canceltransfer">
    <tr>
    <td align="left"><table width="734" border="0">
    <tr>
    <td width="30"> </td>
    <td width="106"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif" ><b>License #:</b></font> </td>
    <td width="280"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif" color="Gray"><html:text styleClass="required" maxlength="10" property="newEmplic" disabled="true" /></font>   </td>
    <!-- <font size="-2" color="Gray" face="Verdana, Arial, Helvetica, sans-serif"><b>License Lookup</b></font></td> -->
    <!--<td width="120"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><b>Transfer Status:</b></font></td>
    <td width="198"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><bean:write name="transferlicenseeForm" property="transferStatus" /></font></td> -->
    </tr>
    <tr>
    <td> </td>
    <td><font size="-1" face="Verdana, Arial, Helvetica, sans-serif" ><b>Name:</b></font></td>
    <td colspan="3"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif" ><bean:write name="transferlicenseeForm" property="newEmpname" /></font></td>
    </tr>
    <tr>
    <td> </td>
    <td><font size="-1" face="Verdana, Arial, Helvetica, sans-serif" ><b>License Type:</b></font></td>
    <td colspan="3"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><bean:write name="transferlicenseeForm" property="newEmplictype" /></font></td>
    </tr>
    <tr>
    <td colspan=5><p align=justify><font size="-2" face="Verdana, Arial, Helvetica, sans-serif"><B>NOTE:</B><BR> * Transfer
    fee will be added to your online invoice upon Submit. Transfers require approval from New employing Licensee. Please inform new employing
    Licensee that you have completed this transfer request. Your new License will be printed upon new employing Licensee's approval.</font></p>
    </td>
    </tr>
    </table></td>
    </tr>
    <html:hidden property="parentLicid" />
    <tr>
    <td> </td>
    </tr>
    </logic:equal>
    <tr>
    <td align="center">
    <table width="734" border="0">
    <tr>
    <td align="left" width="240" valign="middle"> <img src="images/icon_required.gif" align=top width="6" height="6" border="0"> Required Field</td>
    <td align="center" width="20">
    <html:submit property="confirmTrans">
    <bean:message name="transferlicenseeForm" property="transferButton" />
    </html:submit>
    </td>
    </html:form>
    <html:form action="/Button">
    <td align="left" width="330">
    <html:cancel property="method">
    <bean:message key="button.returnChild"/>
    </html:cancel>
    </td>
    </html:form>
    </tr>
    </table></td>
    </tr>
    </table>
    </td></tr>
    </table>
    </td></tr>
    <%@ include file="../../includes/icolaFooter.html" %>
    </BODY>
    </html:html>
    my struts-config as below
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
    <struts-config>
    <form-beans>
         <form-bean name="loginForm" type="org.apache.struts.validator.DynaValidatorForm">
    <form-property name="userID" type="java.lang.String" />
    <form-property name="pinNum" type="java.lang.String" />
    </form-bean>
    <form-bean name="renewalLoginForm" type="org.apache.struts.validator.DynaValidatorForm">
    <form-property name="licNum" type="java.lang.String" />
    </form-bean>
    <form-bean name="reqPwdResetForm" type="org.apache.struts.validator.DynaValidatorForm">
    <form-property name="chooseOption" type="java.lang.String" />
    <form-property name="lName" type="java.lang.String" />
    <form-property name="SSN" type="java.lang.String" />
    <form-property name="DOB" type="java.lang.String" />
    <form-property name="licNum" type="java.lang.String" />
    </form-bean>
    <form-bean name="reqNewAcctForm" type="org.apache.struts.validator.DynaValidatorForm">
    <form-property name="chooseOption" type="java.lang.String" />
    <form-property name="lName" type="java.lang.String" />
    <form-property name="SSN" type="java.lang.String" />
    <form-property name="DOB" type="java.lang.String" />
    <form-property name="licNum" type="java.lang.String" />
    </form-bean>
    <form-bean name="changePinForm" type="org.apache.struts.validator.DynaValidatorForm">
    <form-property name="userID" type="java.lang.String" />
    <form-property name="pinNum" type="java.lang.String" />
    <form-property name="dupPinNum" type="java.lang.String" />
    </form-bean>
    <form-bean name="newAppInitialForm" type="org.apache.struts.validator.DynaValidatorForm">
    <form-property name="board" type="java.lang.String" />
    <form-property name="licType" type="java.lang.String" />
    <form-property name="obtBy" type="java.lang.String" />
    <form-property name="allObtBy" type="java.lang.String" />
    <form-property name="allLicTypes" type="java.lang.String" />
    </form-bean>
    <form-bean name="mainForm" type="org.apache.struts.validator.DynaValidatorForm" >
    <form-property name="chooseOption" type="java.lang.String" />
    </form-bean>
    <form-bean name="buttonForm" type="org.apache.struts.validator.DynaValidatorForm" />
    <form-bean name="transferlicenseeForm" type="com.dleg.cola.helper.TransferLicensee" />
    <form-bean name="apprTransferForm" type="org.apache.struts.validator.DynaValidatorForm" >
    <form-property name="trApprFlag" type="java.lang.String[]" />
    </form-bean>
    <form-bean name="empRenewForm" type="com.dleg.cola.forms.EmpRenewForm" >
    <form-property name="empRenFlag" type="java.lang.String[]" />
    </form-bean>
    <form-bean name="renewalForm" type="com.dleg.cola.forms.RenewForm" />
    <form-bean name="reprintlicenseForm" type="com.dleg.cola.forms.ReprintLicenseForm" />
    <form-bean name="invoiceForm" type="com.dleg.cola.forms.InvoiceForm" />
    <form-bean name="creditCardForm" type="com.dleg.cola.forms.CreditCardForm" />
    <form-bean name="addressChangeForm" type="com.dleg.cola.forms.AddressChangeForm" />
    <form-bean name="personForm" type="com.dleg.cola.forms.PersonForm" />
    <form-bean name="companyForm" type="com.dleg.cola.forms.CompanyForm" />
    <form-bean name="checkListForm" type="com.dleg.cola.forms.CheckListForm" />
    </form-beans>
    <global-exceptions>
    <exception type="com.dleg.cola.exceptions.DatabaseException" key="error.database.missing" path="/error.jsp" scope="request" />
    </global-exceptions>
    <global-forwards>
    <forward name="login" path="/login.jsp" redirect="false" />
    </global-forwards>
    <action-mappings type="org.apache.struts.config.SecureActionConfig">
    <action path="/RequestPwdReset" input="/WEB-INF/jsps/reqPwdReset.jsp" type="com.dleg.cola.actions.RequestPwdResetAction" name="reqPwdResetForm">
              <forward name="success" path="/changePin.jsp" />
              <forward name="failure" path="/error.jsp" redirect="false" contextRelative="false" />
         </action>
    <action path="/RequestNewAcct" input="/WEB-INF/jsps/reqNewAcct.jsp" type="com.dleg.cola.actions.RequestNewAcctAction" name="reqNewAcctForm">
              <forward name="destination1" path="/changePin.jsp" />
    <forward name="destination2" path="/changePin.jsp" />
    <forward name="destination3" path="/register.jsp" />
              <forward name="failure" path="/error.jsp" redirect="false" contextRelative="false" />
         </action>
         <action path="/RenewalLogin" input="/WEB-INF/jsps/renewalLogin.jsp" type="com.dleg.cola.actions.RenewalLoginAction" name="renewalLoginForm">
              <forward name="success" path="Licensee.do" />
              <forward name="failure" path="/error.jsp" redirect="false" contextRelative="false" />
         </action>
    <action path="/Login" input="/WEB-INF/jsps/login.jsp" type="com.dleg.cola.actions.LoginAction" name="loginForm">
              <forward name="success" path="Licensee.do" />
    <!--<forward name="success1" path="/UserLogin.jsp" /> -->
    <forward name="success1" path="/changePin.jsp" />
    <forward name="success2" path="/newApp.jsp" />
              <forward name="failure" path="/error.jsp" redirect="false" contextRelative="false" />
         </action>
    <action path="/UpdateAddrInfo" type="com.dleg.cola.actions.UpdateAddrInfoAction" name="personForm">
    <forward name="success" path="ShowCheckList.do" />
         </action>
    <action path="ShowCheckList" type="com.dleg.cola.actions.ShowCheckListAction" name="checkListForm">
    <forward name="success" path="/checkList.jsp" />
         </action>
    <action path="/SubmitCheckList" type="com.dleg.cola.actions.SubmitCheckListAction" name="checkListForm">
    <forward name="success" path="viewInvoice.do" />
         </action>
    <action path="Licensee" type="com.dleg.cola.actions.LicenseeAction" name="licenseeForm">
              <forward name="success" path="/licHome.jsp" />
         </action>
    <action path="/Button" type="com.dleg.cola.actions.ButtonAction" name="buttonForm" parameter="method">
    <set-property property="secure" value="true"/>
    <forward name="exit" path="/login.jsp" />
    <forward name="exit1" path="/renewalLogin.jsp" />
    <forward name="changePin" path="/changePin.jsp" />
    <forward name="approve" path="PendAppr.do" redirect="false" />
    <forward name="submit" path="/ApprTransfer.do" redirect="false" />
    <forward name="returnHome" path="/licHome.jsp" redirect="false" />
    <forward name="returnChild" path="ChildLic.do" redirect="false" />
    <forward name="renewSubLic" path="EmpRenew.do" redirect="false" />
    <forward name="cancel" path="/login.jsp" redirect="false" />
    <forward name="renew" path="RenewLic.do" redirect="false"/>
    <forward name="addCart" path="/viewInvoice.jsp" redirect="false"/>
    <forward name="viewInvoice" path="/viewInvoice.jsp" redirect="false"/>
    <forward name="pay" path="/makePayment.jsp" redirect="false" />
    <forward name="failure" path="/error.jsp" redirect="false"/>
    <forward name="login" path="/login.jsp" redirect="false" />
    <forward name="main" path="/main.jsp" redirect="false" />
    <forward name="reqPwdReset" path="/requestPwdReset.jsp" redirect="false" />
    <forward name="newLicApp" path="NewApp.do" redirect="false" />
    <forward name="renewMore" path="/licHome.jsp" redirect ="false" />
    </action>
    <action path="Button" type="com.dleg.cola.actions.ButtonAction" name="buttonForm" parameter="method">
    <set-property property="secure" value="true"/>
    <forward name="exit" path="/login.jsp" />
    <forward name="changePin" path="/changePin.jsp" />
    <forward name="approve" path="PendAppr.do" redirect="false" />
    <forward name="submit" path="/ApprTransfer.do" redirect="false" />
    <forward name="returnHome" path="/licHome.jsp" redirect="false" />
    <forward name="returnChild" path="ChildLic.do" redirect="false" />
    <forward name="renewSubLic" path="EmpRenew.do" redirect="false" />
    <forward name="cancel" path="/login.jsp" redirect="false" />
    <forward name="renew" path="RenewLic.do" redirect="false"/>
    <forward name="addCart" path="/viewInvoice.jsp" redirect="false"/>
    <forward name="viewInvoice" path="/viewInvoice.jsp" redirect="false"/>
    <forward name="pay" path="/makePayment.jsp" redirect="false" />
    <forward name="failure" path="/error.jsp" redirect="false"/>
    <forward name="main" path="/main.jsp" redirect="false" />
    <forward name="reqPwdReset" path="/requestPwdReset.jsp" redirect="false" />
    <forward name="newLicApp" path="NewApp.do" redirect="false" />
    <forward name="renewMore" path="/licHome.jsp" redirect ="false" />
    </action>
    <action path="NewApp" type="com.dleg.cola.actions.NewAppAction" name="newAppInitialForm" scope="request">
    <forward name="success" path="/newApp.jsp" />
    </action>
    <action path="/NewApp" type="com.dleg.cola.actions.NewAppAction" name="newAppInitialForm" scope="request">
    <forward name="success" path="/newApp.jsp" />
    </action>
    <action path="/AddressInfo" type="com.dleg.cola.actions.AddressInfoAction" name="personForm" scope="request">
    <forward name="success" path="/addressInfo.jsp" />
    </action>
    <action path="/NewAppContinue" type="com.dleg.cola.actions.NewAppContinueAction" name="newAppInitialForm" scope="request">
    <forward name="success" path="/newAppContinue.jsp" />
    </action>
    <action path="/ChildLic" type="com.dleg.cola.actions.ChildLicAction" name="licenseeForm" scope="request">
    <forward name="success" path="/child_lic.jsp" />
    <forward name="failure" path="/error.jsp" redirect="false" />
    </action>
    <action path="ChildLic" type="com.dleg.cola.actions.ChildLicAction" name="licenseeForm" scope="request">
    <forward name="success" path="/child_lic.jsp" />
    <forward name="failure" path="/error.jsp" redirect="false" />
    </action>
    <action path="/transferLic" type="com.dleg.cola.actions.ButtonAction" name="transferlicenseeForm" parameter="transferLicense" scope="request">
    <forward name="transfer" path="/transferLicense.jsp" />
    <forward name="failure" path="/error.jsp" redirect="false" />
    </action>
    <action path="/transferLicense" type="com.dleg.cola.actions.TransferLicAction" name="transferlicenseeForm" scope="request">
    <forward name="transfer" path="/transferLicense.jsp" />
    <forward name="failure" path="/error.jsp" redirect="false" />
    </action>
    <action path="/ChangeEvent" type="com.dleg.cola.actions.ChangeAction" name="transferlicenseeForm" scope="request" parameter="method">
    <forward name="success" path="/transferLicense.jsp"></forward>
    <forward name="failure" path="/error.jsp"></forward>
    </action>
    <action path="/addTransfer" input="transferLicense.jsp" type="com.dleg.cola.actions.TransferLicenseAction" name="transferlicenseeForm" parameter="confirmTrans" scope="request">
    <forward name="success" path="/viewInvoice.jsp" />
    <forward name="failure" path="/error.jsp" redirect="false" />
    <forward name="cancel" path="/child_lic.jsp" redirect="false" />
    <forward name="transfer" path="/licHome.jsp" redirect="false" />
    <forward name="invalid" path="/error.jsp" redirect="false" />
    </action>
    <action path="/reprintLic" input="child_lic.jsp" type="com.dleg.cola.actions.ButtonAction" name="reprintlicenseForm" parameter="reprintLicense" scope="request">
    <forward name="reqDuplicate" path="/dupReprint.jsp" redirect="false" />
    <forward name="failure" path="/error.jsp" redirect="false" />
    </action>
    <action path="/addReprint" input="dupReprint.jsp" type="com.dleg.cola.actions.ReprintAction" name="reprintlicenseForm" scope="request">
    <forward name="success" path="/viewInvoice.jsp" />
    <forward name="failure" path="/error.jsp" redirect="false" />
    <forward name="cancel" path="/child_lic.jsp" redirect="false" />
    </action>
    <action path="/ChangePin" input="/WEB-INF/jsps/changePin.jsp" type="com.dleg.cola.actions.ChangePinAction" name="changePinForm">
    <forward name="success" redirect="false" path="Licensee.do" />
    <forward name="failure" path="/error.jsp" redirect="false" />
    </action>
    <action path="/changeAddress" type="com.dleg.cola.actions.ChangeAddressAction" name="addressChangeForm" parameter="method" scope="request">
    <forward name="changeEntAddr" path="/changeAddress.jsp" redirect="false" />
    <forward name="success" path="/viewInvoice.jsp" redirect="false" />
    <forward name="failure" path="/error.jsp" redirect="false" />
    </action>
    <action path="/ChangeLicAddr" type="com.dleg.cola.actions.ChangeLicAddrAction" name="addressChangeForm" parameter="method" scope="request">
    <forward name="changeLicAddr" path="/changeLicAddr.jsp" redirect="false" />
    <forward name="success" path="/viewInvoice.jsp" redirect="false" />
    <forward name="failure" path="/error.jsp" redirect="false" />
    </action>
    <action path="/RenewLicense" type="com.dleg.cola.actions.RenewLicenseAction" name="renewalForm" scope="request">
    <forward name="success" path="/renew.jsp" redirect="false" />
    <forward name="failure" path="/error.jsp" redirect="false" />
    </action>
    <action path="/Register" input="/WEB-INF/jsps/register.jsp" type="com.dleg.cola.actions.RegisterAction" name="personForm" scope="request">
    <forward name="success" path="/login.jsp" />
    <forward name="failure" path="/error.jsp" redirect="false" />
    </action>
    <action path="/RegisterCom" input="/WEB-INF/jsps/register.jsp" type="com.dleg.cola.actions.RegisterComAction" name="companyForm" scope="request">
    <forward name="success" path="/login.jsp" />
    <forward name="failure" path="/error.jsp" redirect="false" />
    </action>
    <action path="/addRenewal" input="renew.jsp" type="com.dleg.cola.actions.RenewLicAction" name="renewalForm" scope="request">
    <forward name="success" path="/viewInvoice.jsp" redirect="false" />
    <forward name="failure" path="/error.jsp" redirect="false" />
    </action>
    <action path="/PendAppr" type="com.dleg.cola.actions.PendApprAction">
    <forward name="approve" path="/approveTransfer.jsp" redirect="false" />
    </action>
    <action path="PendAppr" type="com.dleg.cola.actions.PendApprAction">
    <forward name="approve" path="/approveTransfer.jsp" redirect="false" />
    </action>
    <action path="/ApprTransfer" type="com.dleg.cola.actions.ApprTransferAction" name="apprTransferForm">
    <forward name="success" path="Licensee.do" redirect="false" />
    </action>
    <action path="EmpRenew" type="com.dleg.cola.actions.EmpRenewAction" name="empRenewForm">
    <forward name="empRenew" path="/subRenewal.jsp" redirect="false" />
    </action>
    <action path="/SubmitEmpRenew" type="com.dleg.cola.actions.SubmitEmpRenewAction" name="empRenewForm">
    <forward name="success" path="/viewInvoice.jsp" redirect="false" />
    <forward name="failure" path="/error.jsp" redirect="false" />
    </action>
    <action path="/remove" type="com.dleg.cola.actions.ButtonAction" name="invoiceForm" parameter="method">
    <forward name="success" path="/viewInvoice.jsp" redirect="false" />
    <forward name="failure" path="/error.jsp" redirect="false" />
    </action>
    <action path="/addRenew" type="com.dleg.cola.actions.ButtonAction" name="invoiceForm" parameter="method">
    <forward name="addCart" path="/viewInvoice.jsp" redirect="false" />
    <forward name="failure" path="/error.jsp" redirect="false" />
    </action>
    <action path="/backHome" type="com.dleg.cola.actions.HomeAction" name="buttonForm">
    <forward name="success" path="/licHome.jsp" redirect="false" />
    <forward name="failure" path="/error.jsp" redirect="false" />
    </action>
    <action path="/viewInvoice" type="com.dleg.cola.actions.ViewInvoiceAction" name="buttonForm">
    <set-property property="secure" value="true"/>
    <forward name="success" path="/viewInvoice.jsp" redirect="false" />
    <forward name="failure" path="/error.jsp" redirect="false" />
    </action>
    <action path="viewInvoice" type="com.dleg.cola.actions.ViewInvoiceAction" name="buttonForm">
    <set-property property="secure" value="true"/>
    <forward name="success" path="/viewInvoice.jsp" redirect="false" />
    <forward name="failure" path="/error.jsp" redirect="false" />
    </action>
    <!--
    <action path="/checkOut" input="payNow.jsp" type="com.dleg.cola.actions.CheckOutAction" name="creditCardForm" parameter="method" scope="request">
    <forward name="success" path="https://www.govone.com/epay/http/pay.aspx" redirect="true" />
    <forward name="confirm" path="/confirmPayment.jsp" redirect="false"/>
    <forward name="failure" path="/error.jsp" redirect="false" />
    </action>
    -->
    <action path="/checkOut" type="com.dleg.cola.actions.CheckOutAction" name="creditCardForm" parameter="method" scope="request">
    <forward name="success" path="/wait.jsp" redirect="false" />
    <forward name="failure" path="/error.jsp" redirect="false" />
    <forward name="cancel" path="viewInvoice.do" redirect="false" />
    </action>
    <action path="/CommitTxn" type="com.dleg.cola.actions.CommitTxnAction" >
    <forward name="success" path="/paymentConf.jsp" redirect="false"/>
    <forward name="fail

    looking at the code...dont know where to start ... but usally this error occurs when u r using a property attribute in in html tag which wont actually exist in the action form or with a different spell....
    just check the exact naming and spelll of property attribute of HTML tag ,,,

  • Cannot find bean in any scope

    Hi,
    I am getting the following error
    Cannot find bean allJobsForm in any scope. I need some help in trying to identify the problem. I have attached the strust action mapping, the JSP, and the action and form classes. Please have a look and assist me in solving this problem as it I am becoming really frustrated.
    Warm Regards
    Denzil
    Action Mapping
    <action
    path="/secure/moshomo/search/GetAllJobsAction"
    type="za.co.mpilo.moshomo.web.action.GetAllJobsAction"
    name="allJobsForm"
    scope="session"
    input="/secure/CVHomeHR.do?p_content=/jsp/secure/moshomo/ms_recruiter_jobs.jsp"
    unknown="false"
    validate="true"
    >
    <forward
    name="success"
    path="/secure/CVHomeHR.do?p_content=/jsp/secure/moshomo/ms_recruiter_jobs.jsp"
    redirect="false"
    />
    JSP
    <%@ taglib uri="/tags/struts-bean" prefix="bean" %>
    <%@ taglib uri="/tags/struts-html" prefix="html" %>
    <%@ taglib uri="/tags/struts-logic" prefix="logic" %>
    <%@ taglib uri="/tags/struts-nested" prefix="nested" %>
    <%@ taglib uri="/tags/war-extranet" prefix="extranet" %>
    <%@ taglib uri="http://struts.apache.org/tags-html-el" prefix="html-el" %>
    <nested:root name="allJobsForm">
         <div align="center">
         <table width="80%" class="mstable" >
              <thead>
                   <td>Posted Jobs</td>
              </thead>
              <tr>
                   <td>
                        <table width="100%" >
                             <tr class="mssubhead">                         
                                  <td width="60%" ><font color="#160866">
                                       Job Title
                                  </font></td>
                                  <td width="22%" align="center" ><font color="#160866">
                                       Posted Date
                                  </font></td>
                                  <td width="18%" align="center" ><font color="#160866">
                                       Expiration Date
                                  </font></td>
                             </tr>
                             <tr>
                             <td width="80%" ><font color="#160866">
                                       Job Description
                                  </font></td>                              
                             </tr>
                             <nested:iterate property="all" id="ref" type="za.co.mpilo.moshomo.vo.JobVO">
                                  <tr>
                                       <td width="60%"><font color="#160866">
                                            <nested:write name="ref" property="jobTitle"/>
                                       </font></td>
                                       <td width="22%"><font color="#160866">
                                            <nested:write name="ref" property="postedDate"/>
                                       </font></td>
                                       <td width="18%"><font color="#160866">
                                       <nested:write name="ref" property="expirationDate"/>
                                       </font></td>     
                                  </tr>
                                  <tr>
                                       <td width="80%" align="center"><font color="#160866">
                                            <nested:write name="ref" property="jobDescription"/>                                   
                                       </td>
                                  </tr>
                             </nested:iterate>
                             <nested:empty property="all">
                                  <tr>
                                       <td colspan="3"><font color="#160866"> No results found. </font></td>
                                  </tr>
                             </nested:empty>
                        </table>                    
                   </td>
              </tr>
         </table>
         </div>
    </nested:root>
    Action Class
    package za.co.mpilo.moshomo.web.action;
    import java.util.HashMap;
    import java.util.logging.Level;
    import javax.ejb.FinderException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.action.ActionMessage;
    import org.apache.struts.action.ActionMessages;
    import za.co.mpilo.common.web.action.CommonAction;
    import za.co.mpilo.moshomo.interfaces.CVRepositoryManager;
    import za.co.mpilo.moshomo.util.CVRepositoryManagerUtil;
    import za.co.mpilo.moshomo.vo.CVVO;
    import za.co.mpilo.moshomo.vo.SearchVO;
    import za.co.mpilo.moshomo.vo.JobVO;
    import za.co.mpilo.moshomo.web.form.AllJobsForm;
    import za.co.mpilo.moshomo.web.form.AllTertiaryEducationForm;
    import za.co.mpilo.moshomo.web.form.JobSearchForm;
    * @struts.action
    *                     name="allJobsForm"
    *                     path="/secure/moshomo/search/GetAllJobsAction"
    *                     input="/secure/CVHomeHR.do?p_content=/jsp/secure/moshomo/ms_recruiter_jobs.jsp"
    *                     scope="session"
    *                     validate="true"
    * redirect="false"
    * @struts.action-forward
    *                     name="success"
    *                     path="/secure/CVHomeHR.do?p_content=/jsp/secure/moshomo/ms_recruiter_jobs.jsp"
    * @version $Revision: 1.4 $
    *      @author $Author: denzilf $
    *      @date $Date: 2006/11/02 11:03:10 $
    public class GetAllJobsAction extends CommonAction{
         public ActionForward execute(ActionMapping mapping, ActionForm f, HttpServletRequest request, HttpServletResponse response) throws Exception {
                   if ( getLogger().isLoggable(Level.INFO) )
                        getLogger().info( "execute" );
                   ActionForward result = mapping.getInputForward();
                   ActionMessages errors = new ActionMessages ();
                   AllJobsForm form = (AllJobsForm) f;
                   try {
                        //vo.setAllORany( form.getAllORany());
                        //vo.setMatch( form.getMatch());
                        //vo.setSearchText(form.getSearchText());
                        String uid = request.getUserPrincipal().getName(); //logged in user
                        CVRepositoryManager manager = CVRepositoryManagerUtil.getHome( getIntialProperies() ).create();
                        HashMap jobs = manager.findAllJobsPerUserId(uid);
                        form.setAll( jobs.values() );     
                        result = mapping.findForward( "success" );
                   catch (Exception xe) {
                        if ( getLogger().isLoggable(Level.WARNING) )
                             getLogger().log( Level.WARNING , xe.getMessage() , xe );
                        errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.general" ) );               
                   if ( !errors.isEmpty() )
                        saveErrors( request , errors );
                   return result;     
    Form
    package za.co.mpilo.moshomo.web.form;
    import java.util.Collection;
    import org.apache.struts.validator.ValidatorForm;
    import za.co.mpilo.moshomo.vo.JobVO;
    * @struts.form
    *           name="allJobsForm"
    public class AllJobsForm extends ValidatorForm {
         private int selection;
         private Collection all;
         public JobVO[] getAll() {
              JobVO[] array = new JobVO[all.size()];
              all.toArray( array );
              return array;
         public void setAll(Collection all) {
              this.all = all;
         public int getSelection() {
              return selection;
         public void setSelection(int selection) {
              this.selection = selection;
    }

    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: An exception occurred processing JSP page /jsp/Edituser.jsp at line 36
    33: <html:form action="/Updateuser" method="post">
    34:
    35:           <table border="0" align="center">
    36:           *<logic:iterate id="details" name="user">*
    37:           <tr>
    38:                <td><html:hidden property="userid" name="details"/></td>
    39:                <td><html:hidden property="contactid" name="details"/></td>
    Stacktrace:
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:397)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
         org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:1023)
         org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:988)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:207)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
         org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    root cause
    javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find bean: "user" in any scope
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
         org.apache.jsp.jsp.Edituser_jsp._jspService(Edituser_jsp.java:844)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
         org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:1023)
         org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:988)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:207)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
         org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    root cause
    javax.servlet.jsp.JspException: Cannot find bean: "user" in any scope
         org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:935)
         org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:232)
         org.apache.jsp.jsp.Edituser_jsp._jspService(Edituser_jsp.java:184)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
         org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:1023)
         org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:988)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:207)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
         org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    note The full stack trace of the root cause is available in the JBossWeb/2.0.1.GA logs.
    --------------------------------------------------------------------------------

  • Philisophical Question:  Tools for synchronizing JSPs, Java Beans and XML?

    This is a "best practices" question...
    The JSTL and JSF tags provide a lot of support for minimizing the amount of text that must be included in a JSP page. For example:
    <c:out value="${customer.firstName}"/>This snippet will find an object named "customer" in any of the JSP scopes, extract the value of the property named "firstName", and output it as part of the page.
    Here are my questions:
    (1) Is there a recommended method to communicate to the page designer what objects are in scope for a particular page, and what the properties of those objects are?
    (2) Is there any programmatic way to determine from the program's source code that an object with the specified name and of the expected type will be in scope at run time?
    I would love to have an IDE that would be able to help the page designer by providing a list of the objects that are expected to be in scope, along with the name of their properties. What conventions exist to make this possible?

    Maybe you like this, it's one of dozens of tools for Struts and in version 3.0
    http://www.scioworks.com/scioworks_camino.html
    hth,
    .V

  • Jsp struts url

    Hi All,
    I am using Java struts. We have several Struts-Jsps. when we browse from one jsp to another, the url is shown as below: All values are visible in the url
    http://localhost:8080/PSS/pim/location.do?page=1&methodName=fetchAll&showSearchPage=true&beGeoId=52468
    our requirement is we do not want the user to see the value of our parameters for e.g beGeoId=52468
    Reason is user might change the value 52468 to say 52400 and may get different page. How can we avoid user from doing this. what technique we can use?
    thanks,
    pp

    You could save the values in a browser cookie that your
    JSP could read. This would allow you to avoid stringing
    together a command for a JSP app. Have your JSP read
    the browser cookie to get the values you need from the
    client.
    Within a JSP application that has multiple JSP pages, you
    can use a JSP scope of session and store parms in a bean.
    But, if you link to another JSP app, you'll have to string
    together you command like your example or use a cookie.
    Have Fun!!
    John

  • Multipe AD yet Single Search Scope - CUCM/CUC

    Hi all,
    Wondering  if anyone has had experience integrating mutiple ADs (different forests  and domains) with a single CUCM. The CUCM has a limit of 5 ldap  directories but even more impotantly only a single search scope.
    The  following document describes using ADLDS which would solve the multiple  AD scenario but would this solve the single search scope issue as well  (same goes for CUC)?
    http://www.cisco.com/en/US/products/sw/voicesw/ps556/products_configuration_example09186a0080b2b103.shtml
    Any pointers appreciated.
    Thanks,
    Kamran

    Hi Chris,
    Thanks tip, thats the solution i was alluding to above. It would solve the 5 ldap directory limit issue but I am not clear about the single search scope limitation.
    From my testing, it seems that the LDAP would sync multiple ADs (in their own domains) into a separate partition - will try to get some screenshots. So my questions are:
    1) Is this correct? would ADLDS sync separete ADs (in separate domains) in a separate partition? I am basing this on an assumption we will need to run the ADLDS sync with all ADs separately.
    2) Where do we point our search scope on the ADLDS so that it syncs all ADs sync'ed to the ADLDS?
    Thanks,
    Kamrna

  • Java Bean scope when used with the JPDK

    Portal 3.0.9.8.4 and Jserv
    When using JSPs with Java Beans and the JPDK I have noticed problems when setting the scope attribute of the useBean action to something other than "page". For example, &lt;jsp:useBean id="provider" scope="session" class="MyClass" /&gt; causes a java.lang.ClassCastException when there are more than two JSP portlets than attempt to access the ProviderSession object.
    Does anyone know what value the JSP scope should be set to when you want the JSPs read/write to the ProviderSession?

    The behavior you report is an expected one as your keys of objects on session are not unique to the two portlet instances. Two portlets with the same session object (may have been deployed on the same Portal page), are sharing the same object put on session, thus resulting in thread conflicts. What you need to do is to generate unique keys for objects stored for each portlet instance.
    For example, instead of having the id as "provider", you should have it as <portlet instance name> + "provider".
    You are not experiencing the same behavior in "request" or "page" scope, as in these scopes, the objects are not shared across portlet instances.
    Please let me know if my interpretation of your issue is wrong.
    Regards,
    Abhinav

  • Trying to submit back to jsp with struts

    Ok, so I have a jsp page that displays tons of stuff.
    I get there from the struts flow of:
    InputFormJsp -> strutsFormBean ->strutsActionBean->JSP View Page
    So I'm at my view page and I was to resubmit back to the view page again using a bunch of hidden input fields to redo the page with different vars (historic data, based on the 1st time through).
    So it will go:
    JSP View Page->strutsFormBean->strutsActionBean->JSP View Page
    I want to use the same form and action beans and the same view page, just want to pass the hidden vars instead of prompting the user all over again.
    I have my form and hidden fields set up, but my problem is how do I get struts to see the resubmit. I made a new actionmapping that labeled the "input" as the same jsp page as the forward but I keep getting:
    javax.servlet.ServletException
         org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
         org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
         org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)followed by a good old NullPointerException from my actionbean's execute method (I think):
    root cause
    java.lang.NullPointerException
         com.air2web.SysReportAction.execute(SysReportAction.java:85)
         org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
         org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)struts-config.xml looks like:
    <action   path="/getSysReport"
                  type="com.air2web.SysReportAction"
                  name="SysReportForm"
                  input="/pages/SysReport.jsp"
                  scope="request">
        <forward name="success" path="/pages/genSysReport.jsp"/>         
        </action>
    <action   path="/getSysReportHistoric"
                  type="com.air2web.SysReportAction"
                  name="SysReportForm"
                  input="/pages/genSysReport.jsp"
                  scope="request">
        <forward name="success" path="/pages/genSysReport.jsp"/>         
        </action>Is there a way to specify many input pages or some other trick to do this??
    Thanks
    Chris Liles

    I had exactly the same problem with Struts, and Finally I solve this.
    first of all put into <form-beans> the form path
        <form-bean name="updUserForm" type="com.yourcompany.struts.form.UpdUserForm" />and in <action-mappings >
        <action
          attribute="updUserForm"
          input="/UpdateUser.jsp"
          name="updUserForm"
          path="/updUser"
          scope="request"
          type="com.yourcompany.struts.action.UpdUserAction" >
          <forward name="success" path="/MyJsp.jsp" />
        </action>Be carefull with the first letter of attribute and name they must be in minus! (Instead of mayus in form).
    For more ..
    [email protected]

Maybe you are looking for

  • How to connect my ipad2 to apple tv the first time

    Having trouble connecting iPad 2 to apple tv.

  • How do I print black and white on Mountain Lion?

    Hey. Does anyone know how to print black and white on Mountain Lion? I searched the community and Google but I couldn't find anything... Regards, TeaDragon

  • Weird email behavior in iPhone Photos app

    On the weekend I took a few photos with my iPhone and I emailed one of them to my family, and everything seemed to be okay. Now every time I open the "Photos" app it automatically opens the "New Message" window with a photo in the body as if I didn't

  • Anyone notice a slowdown in accessing topics?

    While there will be a learning curve in getting used to the new "look" and use of these forums, I'm a bit disappointed in the lag in getting to the information. Before the upgrade, it was almost instantaneous. Now, it takes at least 20 secs or more t

  • Need advice about transfering files

    Hello. I just got a new mac through an education deal at school. I hate this process of transferring files from one computer to the next but have never done it from one Mac to another before so thought it would be pretty smooth. Im new to the whole M