Servlet cannot find Bean

I am trying to access a java bean through a servlet..
the bean is defined in the package com.mycomp
when i use this bean using test.jsp it works fine it finds the package com.mycomp.. but when i am using the Servlet it cannot find the package...when i am trying to compile the servlet it says it cannot resolve the symbol class ConnectionBean
it cannot find the package com.mycomp
your help will be appreciatied....
here is the structure of files:
tomcat
webapps
myapp
jsp
-test.jsp
WEB-INF
classes
-PropertyServlet.java
-PropertyServlet.class
-ConnectionBean.java
com
mycomp
-ConnectionBean.class
I have tried importing in the servlet import com.mycomp.*; but i still get an error com.mycomp not found...
I have also tried importing the class itself by import com.mycomp.ConnectionBean;
I still get the package com.mycomp not found;
is there any xml file or anything that i need to edit so servlets can read the packages located in classes folder?

me also same problem...
this class path is included in server itself..
or we can set during compiling time...
then this is my compile.bat file please check
set classpath=%CLASSPATH%; ./WEB-INF/classes;
@echo off
javac -d ./WEB-INF/classes/ ./dev/beans/*.java
javac -d ./WEB-INF/classes/ ./dev/ContentManagement/beans/*.java
javac -d ./WEB-INF/classes/ ./dev/servlets/*.java
and my servlet file like this below..
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import com.deploy.servlet.*;
public class ControlServlet extends HttpServlet
     public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException,IOException
          response.setContentType("text/html");
          PrintWriter out = response.getWriter();
          out.println("Testing");
/*          if (request.getParameter("pageName")=="CEOSpeak")
               CEOBean CB = new CEOBean();
               if (request.getParameter("actionType")=="add")
               else if (request.getParameter("actionType")=="edit")
               else if (request.getParameter("actionType")=="delete")
                    if(CB.deleteCEO(request.getParameter("CEOId")))
                         response.sendRedirect("CEO_Speaks.jsp");

Similar Messages

  • Javax.servlet.ServletException: Cannot find bean CustForm in any scope

    while i m running my struts application.. i m getting this error.. can any one pointout wat error is this...
    javax.servlet.ServletException: Cannot find bean CustForm in any scope
         at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:533)
         at org.apache.jsp.Result_jsp._jspService(Result_jsp.java:100)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
         at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
         at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:76)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:65)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:197)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)
         at java.lang.Thread.run(Thread.java:534)

    hi shanu
    getting in jsp call..
    ERROR [Engine] ApplicationDispatcher[customTag] Servlet.service() for servlet jsp threw exception.
    n this is the action
    <action-mappings >
         <action path="/select" type="customTld.CustAction" name="custform" scope="request">
              <forward name="ok" path="/Result.jsp"/>
         </action>
         </action-mappings >

  • Javax.servlet.jsp.JspException: Cannot find bean: "org.apache.struts.taglib

    Hi
    i have a form from which i am gettin values and i am using struts to get those values and perform actions in my DAO,
    i am able to retrieve values from DAO but the value is not gettin printed in front end.. its throwing
    "javax.servlet.jsp.JspException: Cannot find bean: "org.apache.struts.taglib.html.BEAN" in any scope" error
    got any suggestions
    thankx

    Got the solution,. i had closed my <html:form> before closing one of my <html:form>
    thankx

  • 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.
    --------------------------------------------------------------------------------

  • Cannot find bean: "bean name" in any scope???? plsssssssssss  Urgent!

    Hi!
    I have a jsp with Combo boxes, when i select a value of one combo box
    OnChnage of it the 2nd combo box gets its value dynamically from the
    database..
    Here is my JSP..............................
    <script language="JavaScript">
    function ELMORG_MNEMONIC1Changed() {
    var frm = document.RetrieveReportDynaForm;
         frm.actionType.value = "1";
         frm.submit();
    function ELMORG_MNEMONIC2Changed(){
         var frm = document.RetrieveReportDynaForm;
         frm.actionType.value = "2";
         frm.submit();
    function ELMORG_MNEMONIC3Changed(){
         var frm = document.RetrieveReportDynaForm;
         frm.actionType.value = "3";
         frm.submit();
    </script>
    </head>
    <body>
    <table>
    <html:form action="/RetrieveReport.do" styleId="RetrieveReportDynaForm">
    <input type="hidden" name="actionType" value="">
    <table cellspacing=0 cellpadding=2 border=0 class="table_data" id="TABLE1" >
         <tr>
                        <td height="20px" colspan="5" class="table_top_td">Telecom DashBoard</td>
              </tr>
    <tr >     
         <tr class="table_data">
                   <td width="90px"></td>
                        <td class="smalltext" width="75px" align="right"><b>Organizational Element1</b></td>
                        <td>
                        <html:select property="ELMORG_MNEMONIC1" styleClass="mediumtext" style="width:120px; height:30px" onchange="ELMORG_MNEMONIC1Changed()">
                        <html:option value="">Select</html:option>
                        <html:optionsCollection name="reportlist" label="ELMORG_MNEMONIC1" value="ELMORG_MNEMONIC1"/>
                        </html:select>
                   </td>
         </tr>
    <tr class="table_data">
                   <td width="90px"></td>
                        <td class="smalltext" width="75px" align="right"><b>Organizational Element2</b></td>
                        <td>
                        <html:select property="ELMORG_MNEMONIC2" styleClass="mediumtext" style="width:120px; height:30px" onchange="ELMORG_MNEMONIC2Changed()">
                        <html:optionsCollection name="mnemonic1" label="ELMORG_MNEMONIC2" value="ELMORG_MNEMONIC2"/>
                        </html:select>
                   </td>
         </tr>     
         <tr class="table_data">
                   <td width="90px"></td>
                        <td class="smalltext" width="75px" align="right"><b>Organizational Element3</b></td>
                        <td>
                        <html:select property="ELMORG_MNEMONIC3" styleClass="mediumtext" style="width:120px; height:30px" onchange="ELMORG_MNEMONIC3Changed()">
                        <html:optionsCollection name="mnemonic2" label="ELMORG_MNEMONIC3" value="ELMORG_MNEMONIC3"/>
                        </html:select>
                   </td>
         </tr>
         <tr class="table_data">
                   <td width="90px"></td>
                        <td class="smalltext" width="75px" align="right"><b>Organizational Element4</b></td>
                        <td>
                        <html:select property="RC_MNEMONIC" styleClass="mediumtext" style="width:120px; height:30px" onchange="RC_MNEMONICChanged()">
                        <html:optionsCollection name="mnemonic3" label="RC_MNEMONIC" value="RC_MNEMONIC"/>
                        </html:select>
                   </td>
         </tr>
         <tr>
                   <td></td>
                   <td><html:submit/></td>
         </tr>
    </table>
    </html:form>          
    </body>
    </html:html>
    I am getting a error....
    javax.servlet.jsp.JspException: Cannot find bean: "mnemonic2" in any scope
         at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:935)
         at org.apache.struts.taglib.html.OptionsCollectionTag.doStartTag(OptionsCollectionTag.java:173)
         at org.apache.jsp.jsp.reportParameter_jsp._jspx_meth_html_optionsCollection_2(reportParameter_jsp.java:469)
         at org.apache.jsp.jsp.reportParameter_jsp._jspx_meth_html_select_2(reportParameter_jsp.java:438)
         at org.apache.jsp.jsp.reportParameter_jsp._jspx_meth_html_form_0(reportParameter_jsp.java:210)
         at org.apache.jsp.jsp.reportParameter_jsp._jspService(reportParameter_jsp.java:130)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
         at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
         at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
    when i execute this page..
    I am using struts action where i am setting the "mnemonic2" variable in a session....................................
         if ("2".equals(actionType)){
              String MNEMONIC1 = request.getParameter("ELMORG_MNEMONIC1");
              String MNEMONIC2 = request.getParameter("ELMORG_MNEMONIC2");
              if(MNEMONIC2==""){
                   request.getSession().removeAttribute("mnemonic2");
                   }else{
                        ArrayList reportParam1 = (ArrayList)this.reportService.getELMORG_MNEMONIC3(MNEMONIC1,MNEMONIC2);
                        System.out.println("The arraysize in the Action class2 is"+reportParam1.size());
                        request.getSession().setAttribute("mnemonic2", reportParam1);
    Can any one pls tell me why m i getting this error???

    hi enoch!
    yeah definitely...
    <action path="/FourthAction" name="RetrieveReportDynaForm"
                   type="org.springframework.web.struts.DelegatingActionProxy" >
                   <forward name="success" path="/jsp/reportParameter.jsp"></forward>
                   <forward name="failure" path="/jsp/reportParameter.jsp"></forward>
              </action>
    <form-bean name="RetrieveReportDynaForm"
                   type="org.apache.struts.validator.DynaValidatorForm">
                   <form-property name="GRP_MNEMONIC" type="java.lang.String"
                        initial="" />
                   <form-property name="POL_MNEMONIC" type="java.lang.String"
                        initial="" />
                   <form-property name="GRP_MNEMONIC1" type="java.lang.String"
                        initial="" />
                   <form-property name="ELMORG_MNEMONIC1" type="java.lang.String"
                        initial="" />
                   <form-property name="GRP_MNEMONIC2" type="java.lang.String"
                        initial="" />
                   <form-property name="ELMORG_MNEMONIC2" type="java.lang.String"
                        initial="" />
                   <form-property name="GRP_MNEMONIC3" type="java.lang.String"
                        initial="" />
                   <form-property name="ELMORG_MNEMONIC3" type="java.lang.String"
                        initial="" />
                   <form-property name="GRP_MNEMONIC4" type="java.lang.String"
                        initial="" />
                   <form-property name="ELMORG_MNEMONIC4" type="java.lang.String"
                        initial="" />
                   <form-property name="GRP_MNEMONIC5" type="java.lang.String"
                        initial="" />
                   <form-property name="ELMORG_MNEMONIC5" type="java.lang.String"
                        initial="" />
                   <form-property name="GRP_MNEMONIC6" type="java.lang.String"
                        initial="" />
                   <form-property name="RC_MNEMONIC" type="java.lang.String"
                        initial="" />
                   <form-property name="RC_LABEL" type="java.lang.String"
                        initial="" />
                   <form-property name="RC_MANAGER" type="java.lang.String"
                        initial="" />
                   <form-property name="RC_CODE" type="java.lang.String"
                        initial="" />
                   <form-property name="RC_MANAGER_EMAIL" type="java.lang.String"
                        initial="" />
                   <form-property name="actionType" type="java.lang.String"
                        initial="" />
              </form-bean>

  • Exception [EJB - 10008]: Cannot find bean of type [SalesBean] using finder

    I'm trying to call an entity bean froma session bean i get the error :-
    7/02/27 14:35:25 javax.ejb.ObjectNotFoundException: Exception [EJB - 10008]: Cannot find bean of type [SalesBean] using finde
    [findByCustID].
    7/02/27 14:35:25       at oracle.toplink.internal.ejb.cmp.EJBExceptionFactory.objectNotFound(EJBExceptionFactory.java:325)
    7/02/27 14:35:25       at oracle.toplink.internal.ejb.cmp.finders.Finder.checkNullResult(Finder.java:224)
    My session bean looks like this :-
    public class HelloBean implements SessionBean
      public String helloWorld (String pzCustomerID) throws SQLException,RemoteException
         String lzRevenue=null;
         int liCustomerID=Integer.parseInt(pzCustomerID);
         try
              Context initial = new InitialContext();
              Object objref =   initial.lookup("SalesBean");
              SalesHome salesHome =(SalesHome) PortableRemoteObject.narrow(objref,SalesHome.class);
              Sales sales=salesHome.findByCustID(liCustomerID);
              lzRevenue=(String) sales.findByCustID(liCustomerID);
    My entity bean looks like this:-
    public class SalesBean implements EntityBean
      public String factPK;
      public int timeID;
      public int custID;
      public int locID;
      public int itemID;
      public int entityID;
      public String currency;
      public float qty;
      public float unitPrice;
      public float amount;
      public EntityContext context;
      private Connection con;
        private void makeConnection() {
            try {
                InitialContext ic = new InitialContext();
                javax.sql.DataSource ds = (javax.sql.DataSource) ic.lookup("jdbc/DSource");
                con = ds.getConnection();
            } catch (Exception ex) {
                throw new EJBException("Unable to connect to database. " +
                    ex.getMessage());
      public SalesBean()
      public String ejbFindByCustID(int custID) throws SQLException,RemoteException,FinderException
         makeConnection();
         PreparedStatement pstmt = con.prepareStatement("select sum(amount) from sales where cust_id= ? ");
         pstmt.setInt(1, custID);
         ResultSet rset = pstmt.executeQuery();
         if (!rset.next())
              throw new RemoteException("no records present" );
         return rset.getString(1);
      }My entity bean's home interface looks like this:-
    public interface SalesHome extends EJBHome
    public Sales create() throws RemoteException, CreateException;
    public Sales findByCustID(int custID) throws SQLException,RemoteException,FinderException;
    My entity bean's remote interface looks like this:-
    public interface Sales extends EJBObject
         public String findByCustID(int custID) throws SQLException,RemoteException,FinderException;
    my ejb-jar.xml looks like this:-
    <enterprise-beans>
    <session>
    <description>Hello Bean</description>
    <ejb-name>HelloBean</ejb-name>
    <home>myEjb.HelloHome</home>
    <remote>myEjb.HelloRemote</remote>
    <ejb-class>myEjb.HelloBean</ejb-class>
    <session-type>Stateful</session-type>
    <transaction-type>Container</transaction-type>
    </session>
         <entity>
              <ejb-name>SalesBean</ejb-name>
              <home>myEjb.SalesHome</home>
              <remote>myEjb.Sales</remote>
              <ejb-class>myEjb.SalesBean</ejb-class>
              <persistence-type>Container</persistence-type>
              <prim-key-class>java.lang.String</prim-key-class>
              <reentrant>False</reentrant>
              <cmp-field>
              <field-name>factPK</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>timeID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>custID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>locID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>itemID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>entityID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>currency</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>qty</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>unitPrice</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>amount</field-name>
         </cmp-field>
              <primkey-field>factPK</primkey-field>
              <resource-ref>
              <res-ref-name>jdbc/DSource</res-ref-name>
              <res-type>javax.sql.DataSource</res-type>
              <res-auth>Container</res-auth>
         </resource-ref>
         </entity>
    </enterprise-beans>
    please help me out of this trouble.

    I'm trying to call an entity bean froma session bean i get the error :-
    7/02/27 14:35:25 javax.ejb.ObjectNotFoundException: Exception [EJB - 10008]: Cannot find bean of type [SalesBean] using finde
    [findByCustID].
    7/02/27 14:35:25       at oracle.toplink.internal.ejb.cmp.EJBExceptionFactory.objectNotFound(EJBExceptionFactory.java:325)
    7/02/27 14:35:25       at oracle.toplink.internal.ejb.cmp.finders.Finder.checkNullResult(Finder.java:224)
    My session bean looks like this :-
    public class HelloBean implements SessionBean
      public String helloWorld (String pzCustomerID) throws SQLException,RemoteException
         String lzRevenue=null;
         int liCustomerID=Integer.parseInt(pzCustomerID);
         try
              Context initial = new InitialContext();
              Object objref =   initial.lookup("SalesBean");
              SalesHome salesHome =(SalesHome) PortableRemoteObject.narrow(objref,SalesHome.class);
              Sales sales=salesHome.findByCustID(liCustomerID);
              lzRevenue=(String) sales.findByCustID(liCustomerID);
    My entity bean looks like this:-
    public class SalesBean implements EntityBean
      public String factPK;
      public int timeID;
      public int custID;
      public int locID;
      public int itemID;
      public int entityID;
      public String currency;
      public float qty;
      public float unitPrice;
      public float amount;
      public EntityContext context;
      private Connection con;
        private void makeConnection() {
            try {
                InitialContext ic = new InitialContext();
                javax.sql.DataSource ds = (javax.sql.DataSource) ic.lookup("jdbc/DSource");
                con = ds.getConnection();
            } catch (Exception ex) {
                throw new EJBException("Unable to connect to database. " +
                    ex.getMessage());
      public SalesBean()
      public String ejbFindByCustID(int custID) throws SQLException,RemoteException,FinderException
         makeConnection();
         PreparedStatement pstmt = con.prepareStatement("select sum(amount) from sales where cust_id= ? ");
         pstmt.setInt(1, custID);
         ResultSet rset = pstmt.executeQuery();
         if (!rset.next())
              throw new RemoteException("no records present" );
         return rset.getString(1);
      }My entity bean's home interface looks like this:-
    public interface SalesHome extends EJBHome
    public Sales create() throws RemoteException, CreateException;
    public Sales findByCustID(int custID) throws SQLException,RemoteException,FinderException;
    My entity bean's remote interface looks like this:-
    public interface Sales extends EJBObject
         public String findByCustID(int custID) throws SQLException,RemoteException,FinderException;
    my ejb-jar.xml looks like this:-
    <enterprise-beans>
    <session>
    <description>Hello Bean</description>
    <ejb-name>HelloBean</ejb-name>
    <home>myEjb.HelloHome</home>
    <remote>myEjb.HelloRemote</remote>
    <ejb-class>myEjb.HelloBean</ejb-class>
    <session-type>Stateful</session-type>
    <transaction-type>Container</transaction-type>
    </session>
         <entity>
              <ejb-name>SalesBean</ejb-name>
              <home>myEjb.SalesHome</home>
              <remote>myEjb.Sales</remote>
              <ejb-class>myEjb.SalesBean</ejb-class>
              <persistence-type>Container</persistence-type>
              <prim-key-class>java.lang.String</prim-key-class>
              <reentrant>False</reentrant>
              <cmp-field>
              <field-name>factPK</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>timeID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>custID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>locID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>itemID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>entityID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>currency</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>qty</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>unitPrice</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>amount</field-name>
         </cmp-field>
              <primkey-field>factPK</primkey-field>
              <resource-ref>
              <res-ref-name>jdbc/DSource</res-ref-name>
              <res-type>javax.sql.DataSource</res-type>
              <res-auth>Container</res-auth>
         </resource-ref>
         </entity>
    </enterprise-beans>
    please help me out of this trouble.

  • Cannot find bean          in            html:write gag

    hi everybody
    i am new to struts
    in my application i am getting the following error
    Cannot find bean error in any scope
    in my code
    in jsp i have given
    logic:messagesPresent>
    <UL>
    <html:messages id="error" message="false">
    <LI><bean:write name="error"/></LI>
    </html:messages>
    </UL>
    </logic:messagesPresent>
    and in my validate method in action form
    i have given
    ActionErrors errors = new ActionErrors();
    errors.add(text parameter,ActionError parameter)
    while creating ActionError Object i am passing one key that is refering the message in property file
    any body can help me to resolve this problem
    thanks in advance

    Good Morning here!
    Thank you all for the fabulous responses!
    First of all, let me mention an important Fact. I am using The Struts Layout Library to build dependent Combo Boxes. so My enclosing html tag is <html:layout>
    I am not sure If this has an influence on how Struts verifies the existence of Session Beans/Variables.
    As I mentioned before: Action Class1 puts some variables in session and forwards to the JSP page in Question, those values load well the first time, and get printed in the JSP.
    The JSP page has an Action Class2, triggered by a submit button, Action Class2 forwards to the same JSP page, But when this Action Class2 is called the values that were put in Session using Action Class1 get Lost.
    tolmank, your reply is Very Interesting, because my server is internally changing my IP address to somename:8080. Are you sure this is what definitely could be causing the problem?
    Thanks to all of you guys!
    God Bless.
    Post your comments... and let me know what you think.

  • Cannot find bean  in html:write

    hi everybody
    i am new to struts
    in my application i am getting the following error
    Cannot find bean error in any scope
    in my code
    in jsp i have given
    logic:messagesPresent>
    <UL>
    <html:messages id="error" message="false">
    <LI><bean:write name="error"/></LI>
    </html:messages>
    </UL>
    </logic:messagesPresent>
    and in my validate method in action form
    i have given
    ActionErrors errors = new ActionErrors();
    errors.add(text parameter,ActionError parameter)
    while creating ActionError Object i am passing one key that is refering the message in property file
    any body can help me to resolve this problem
    thanks in advance

    Good Morning here!
    Thank you all for the fabulous responses!
    First of all, let me mention an important Fact. I am using The Struts Layout Library to build dependent Combo Boxes. so My enclosing html tag is <html:layout>
    I am not sure If this has an influence on how Struts verifies the existence of Session Beans/Variables.
    As I mentioned before: Action Class1 puts some variables in session and forwards to the JSP page in Question, those values load well the first time, and get printed in the JSP.
    The JSP page has an Action Class2, triggered by a submit button, Action Class2 forwards to the same JSP page, But when this Action Class2 is called the values that were put in Session using Action Class1 get Lost.
    tolmank, your reply is Very Interesting, because my server is internally changing my IP address to somename:8080. Are you sure this is what definitely could be causing the problem?
    Thanks to all of you guys!
    God Bless.
    Post your comments... and let me know what you think.

  • Cannot find Bean under name..

    Hello everyone,
    I'm new to struts, please be patient with me!!
    I have a series of JSP pages with forms, when I submit a form, I store the contents to the database & take the user to the next page, if its an update action, I need to populate the forms on load.
    The storing part & populating parts are working fine (using ActionForm) BUT the page transitions are not working. I mean, after storing to the database I send a "success" message & my next page is not getting loaded. I'm geting this error "Cannot find bean under name projectOverviewForm" (2nd form name).
    Here's the code snippet...
    struts-config.xml:
    <form-beans>
    <form-bean name="projectIdentificationForm" type="roi.form.ProjectIdentificationForm"></form-bean>
    <form-bean name="projectOverviewForm" type="roi.form.ProjectOverviewForm"></form-bean>
    </form-beans>
    <global-forwards>
    <forward name="identification" path="toolBg.identification"></forward>
    <forward name="overview" path="toolBg.overview"></forward>
    </global-forwards>
    <action-mappings>
    <action path="/identification" type="roi.action.ProjectIdentificationAction" parameter="method" name="projectIdentificationForm" scope="request" validate="false">
      <forward name="success" path="toolBg.identification"></forward>
      <forward name="nextSuccess" path="toolBg.overview"></forward>
      <forward name="deleteSuccess" path="roi.welcome"></forward>
    </action>
    <action path="/overview" type="roi.action.ProjectOverviewAction" parameter="method" name="projectOverviewForm" scope="request" validate="false">
      <forward name="success" path="toolBg.overview"></forward>
      <forward name="nextSuccess" path="toolBg.scd"></forward>
    </action>
    </action-mappings>On searching on the web, I heard this error mostly occurs due to html:select but I'm not using it in my JSP.
    Please let me know if I need to upload any more code? Any help would be greatly appreciated!
    Thanks & Regards,
    Vidya Shankar

    Exception: Cannot find bean under name ...
    Probable Cause: This is usually seen in association with a problematic Struts HTML SELECT custom tag. The Struts html:select tag behaves differently depending whether one or both of the name and property attributes is specified for its encompassed <html:options> tags. If the name attribute is specified, whether or not if the property attribute is specified, then a bean matching the specified name will be expected in some scope (such as page, request, session, or application). If the matching bean is not found in any available scope, the error above will be seen.
    There are two ways to address this. The first approach is to put a bean in one of the scopes so that the html:options might be associated with it. The second approach is to not specify the name attribute and instead use only the property attribute.
    Change your Frombean scope from "Request" to "Session", then it works.
    Thanks,
    Thagelapally

  • Servlet cannot find helper class

    Hello
    Under WEB-INF/classes I put ServletExample and SingletonExample. Compiling ServletExample, that makes use of SingletonExample, works.
    In the directory WEB-INF/classes I also have another direcotry, test. And in WEB-INF/classes/test I put again ServletExample and SingletonExample.
    Here I have tried in several ways to compile the servlet, but I always get an:
    Cannot find symbol class SingletonExample.
    I tried writing package test at the top of both files, and even at the top of only one of these two.
    I even tried to make WEB-INF/classes/test/ServletExample make use of SingletonExample residing in WEB-INF/classes, but I didnt succeded.
    What happens when you have subdirectory in WEB-INF/classes/? I think this is a MUST, to have subdirectory in large webapplication, so I really dont want to put everything in the classes directory.
    Do you how to resolve this prolem? And: if Im in WEB-INF/classes/test and want to referr from a servlet residing in this direcory to a Singleton/helper class residing in WEB-INF/classes/, which approach do I have to use?
    Thanks
    Paolo

    Jeez, you aren't gonna get very far in Java like this.
    CLASSPATH is wrong - again. You're supposed to give JARs and paths where the class loader is supposed to look, not the actual .class file.
    Also, you're not telling the compiler to put the .class file in the package directory structure.
    Your example is pretty awful. Try this:
    Put this code into c:\common
    package common;
    import common.test.TestDown;  // What the hell is this?  There is no package test, but there is a package named common.test
    public class TestUp
       public void sayHello()
          System.out.println("Hello.....");
    }Put this code into c:\common\test
    package common.test;
    import common.TestUp;
    public class  TestDown
       public TestDown()
            TestUp testUp = new TestUp();
            testUp.sayHello();
       public static void main(String[] args)
            new TestDown();
    }Open a command shell and navigate to c:\, then do the following:
    Directory of c:
    07/01/2005  03:43 PM    <DIR>          .
    07/01/2005  03:43 PM    <DIR>          ..
    07/01/2005  03:45 PM    <DIR>          common
                   0 File(s)              0 bytes
                   3 Dir(s)  74,909,675,520 bytes free
    C:\>javac -d . common\*.java
    C:\>javac -d . common\test\*.java
    C:\>java -classpath . common.test.TestDown
    Hello.....Once you've got your head around this, go learn Ant and have it compile your projects properly.
    %

  • Servlet cannot access bean

    Hi all,
    I am having some problems accessing JavaBeans from my servlets, but I can access them from my JSP page(i used the import command, <%@ page import="servlets.myBeans.login.User" %>, and it works).
    I have placed my User bean in the following package
    \webapps\ROOT\WEB-INF\classes\servlets\myBeans\login
    Here's the java code for User Bean
    package servlets.myBeans.login;
    * A simple Java Bean for users.
    public class User implements java.io.Serializable{
    private String username = null;
    private String password = null;
    public User() {}
    public User (String u, String p) {
         username = u;
         password = p;
    public String getUsername() {
         return username;
    public void setUsername(String username) {
         this.username = username;
    public String getPassword() {
         return password;
    public void setPassword(String password) {
         this.password = password;
    public String toString() {
         return username + ":" + password;
    This compiles and creates a class file.
    My servlet LoginControlServlet is in the following path
    \webapps\ROOT\WEB-INF\classes\servlets
    when I try to compile this servlet i get the following errors
    C:\jakarta-tomcat-4.1.1.12-LE\jakarta-tomcat-4.1.24-LE-jdk14\webapps\ROOT\
    WEB-INF\classes\servlets\LoginControlServlet.java:18:
    cannot resolve symbol
    symbol : class User
    location: class servlets.LoginControlServlet
    User up = (User)session.getAttribute("up");
    ^
    C:\jakarta-tomcat-4.1.1.12-LE\jakarta-tomcat-4.1.24-LE-jdk1\webapps\ROOT
    \WEB-INF\classes\servlets\LoginControlServlet.java:18:
    cannot resolve symbol
    symbol : class User
    location: class servlets.LoginControlServlet
    User up = (User)session.getAttribute("up");
    ^
    C:\jakarta-tomcat-4.1.1.12-LE\jakarta-tomcat-4.1.24-LE-jdk1\webapps\ROOT
    \WEB-INF\classes\servlets\LoginControlServlet.java:27:
    cannot resolve symbol
    symbol : class User
    location: class servlets.LoginControlServlet
    up = new User(user,pass);
    ^
    3 errors
    I have already included the \webapps\ROOT\WEB-INF\classes in my class path
    infact, I have even included \webapps\ROOT\WEB-INF\classes\servlets and
    \webapps\ROOT\WEB-INF\classes\servlets\myBeans\login in my classpath.
    Any ideas, as to why I am having the above errors.
    thanks,
    manish

    I think it's pretty much got to be a compile time classpath problem. Either your bean is compiling to a funny place, or you classpath is wrong when you compile the servlet. Probably the latter if your jsp picks it up OK.
    The entry in the classpath should be
    <tomcat directory>/webapps/ROOT/WEB-INF/classes
    Check the syntax carefully.
    putting package directories on your classpath can only confuse things.
    Make sure that ...../webapps/servlets/myBeans/login/User.class exists.

  • Servlet cannot find local interface

    I have created a session bean called "UsersManagementBean" and his local interface called "UsersManagement".
    After deploying the application on JBoss server i got the error "PackageName.UserManagement not bound".
    my jndi tree view shows (under global jndi namespace)-
      +- UsersManagementBean (class: org.jnp.interfaces.NamingContext)
      |   |   +- local (proxy: $Proxy85 implements interface PackageName.UsersManagement,interface org.jboss.ejb3.JBossProxy)code related from the servlet-
      @EJB
        UsersManagement mng;
        mng=(UsersManagement)context.lookup(UsersManagement.class.getName());local interface-
    @Local
    public interface UsersManagement
    {}session bean-
    @Stateless
    public class UsersManagementBean implements UsersManagement
    {}what's wrong?
    why can't he find the local interface?
    thanks in advanced.

    According to the EJB 2.0 spec:
    "A local client of an entity bean may be a session bean, a
    message-driven bean, or another entity bean."
    This is not exclusive list, servlets and JSPs also can work with local EJB interfaces. Please note that your WEB app. and EJBs should be deployed in the same EAR.
    The question is, can I use a JNDI lookup for the local
    Home and EJBObject interfaces, rather than having the
    overhead of using the RMI based remote implementationsYes you can. You will need to define local ref in web.xml descriptor:
    <ejb-local-ref>
        <ejb-ref-name>ejb/CarmichaelSessionRef</ejb-ref-name>
        <ejb-ref-type>Session</ejb-ref-type>
        <local-home>carmichaelbeans.beans.CarmichaelSessionLocalHome</local-home>
        <local>carmichaelbeans.beans.CarmichaelSessionLocal</local>
        <ejb-link>CarmichaelSession</ejb-link>
      </ejb-local-ref>lookup you bean in java:comp/env context:
    InitialContext ic = new InitialContext();
                CarmichaelSessionLocalHome home =  (CarmichaelSessionLocalHome) ic.lookup("java:comp/env/ejb/CarmichaelSessionRef");Maris Orbidans

  • Servlet cannot find applet class.. HELP..DONT REPLY..SOLUTION FOUND

    Hi.. can anybody help me.. with this age old problem?
    I have an applet.. which generates a pie chart .. Pie.class. If i embed it in a normal HTML page.. it runs smoothly.
    Now the problem is.. in my servlet i tried to do this
    out.println("<applet code=Pie.class codebase=/mywebapp/  height=300 width=300">);etc..
    but when the servlet runs.. the applet is not initalised .. so instead of having the applet i have a 'x' sign.. .. To diagnose the problem better.. i right click on the area that is supposed to be the applet and select 'Open Java Console' . ..there i see.. a ClassNotFound Exception.
    I have kept the Pie.class in the WEB-INF -> classes Folder ( where all the other class files of the servlets are kept ).
    Can anybody help me??
    Thanks in advance
    Hi guys sorry to bother u.. i have found the soln. myslef... my mistake was to place the applet class in web-inf-> class folder.. as soon as i placed it outside the folder.. it worked superbly. Thanks anyway
    Message was edited by:
    arijit_datta

    me also same problem...
    this class path is included in server itself..
    or we can set during compiling time...
    then this is my compile.bat file please check
    set classpath=%CLASSPATH%; ./WEB-INF/classes;
    @echo off
    javac -d ./WEB-INF/classes/ ./dev/beans/*.java
    javac -d ./WEB-INF/classes/ ./dev/ContentManagement/beans/*.java
    javac -d ./WEB-INF/classes/ ./dev/servlets/*.java
    and my servlet file like this below..
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import com.deploy.servlet.*;
    public class ControlServlet extends HttpServlet
         public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException,IOException
              response.setContentType("text/html");
              PrintWriter out = response.getWriter();
              out.println("Testing");
    /*          if (request.getParameter("pageName")=="CEOSpeak")
                   CEOBean CB = new CEOBean();
                   if (request.getParameter("actionType")=="add")
                   else if (request.getParameter("actionType")=="edit")
                   else if (request.getParameter("actionType")=="delete")
                        if(CB.deleteCEO(request.getParameter("CEOId")))
                             response.sendRedirect("CEO_Speaks.jsp");

  • External servlets cannot find initialize

    I'm trying to get the Portal to execute servlets for external providers and I'm having difficulties.
    The instructions from the provider had me change the zone.properties to include an alias for the servlet and init parameters for the alias
    servlet.webexportlet.code=oracle.portal.provider.v1.http.HttpProvider
    servlet.webexportlet.initArgs=provider_root=<path to directory containing provider.xml>,sessiontimeout=180000
    When I go to test the portlet, I get an exception in jserv.log
    (ERROR) ajp12: Servlet Error: ClassNotFoundException: oracle.portal.provider.v1.http.HttpProvider
    It couldn't find the HttpProvider class
    Found a directory path ..../oracle/portal/provider/v1 that contained a provider.jar file. This may not be the correct one though. It's path doesn't seem to relate to the portal.
    Created wrapper.classpath=<above path to provider.jar file > in jserv.properties.
    Then when I test it, it seems to find the HttpProvider class. I then get the following error.
    webexportlet/oracle.portal.provider.v1.http.HttpProvider: init
    (ERROR) ajp12: Servlet Error: Initialization error while loading the servlet: No Provider class defined via this servlet's initArgs
    The first line of the provider.xml file in the directory pointed to as the provider_root in the initArgs contains the following:
    <provider class="oracle.portal.provider.v1.http.DefaultProvider" session="true">
    so it does look like the provider class is defined. May not be finding it in provider.jar file though. Not sure. Certain it's not a typo in the path to the provider.xml file.
    There are three different servlets we're trying to add with the provider.xml file in different directories and they all give the same error.
    Stuck from here. Any help you can provide will be a great assistance.

    what version of the portal are you using?
    What version of the JPDK are you using?

  • Helper class invoking by servlet cannot find file.

              Hi,
              I have the following file structure in the war for my web application.
              WEB-INF/classes/com/olf/servlets/AppServlet.class
              WEB-INF/classes/com/olf/util/CommonUtil.class
              WEB-INF/classes/com/olf/util/JndiUtil.class
              WEB-INF/classes/com/olf/util/jndi.xml
              When the JndiUtil is invoked by the CommonUtil , the JndiUtil has no problem to
              locate the jndi.xml; however, when
              the JndiUtil class is invoked by the AppServlet. An exception thrown from the
              JndiUtil states that it can't locate
              the XML file from WebLogic Home directory. Does anyone know why the search is
              done on WebLogic Home or even got up there?
              Any help is greatly appreciate!
              kenny
              In AppServlet.class
              ===================
              public void init(ServletConfig config) throws ServletException
                   InitialContext ic = JndiUtil.getInstance().getInitialContext();
              In JndiUtil.class
              public final static JndiUtil getInstance()
                   SAXParserFactory factory = SAXParserFactory.newInstance();
                   SAXParser saxParser = factory.newSAXParser();
                   saxParser.parse(new File("jnid.xml"), handler);
                   catch (SAXException e){
                        e.printStackTrace();
                        System.out.println("SAXException:" + e.getMessage());
              Below is the exception thrown by the SAX parser
              org.xml.sax.SAXParseException: File "file:C:/bea/wlserver6.1/jndi.xml" not found.
              at weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1088)
              at weblogic.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocument(DefaultEntityHandler.java:512)
              at weblogic.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:310)
              at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:966)
              at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:123)
              at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:125)
              at javax.xml.parsers.SAXParser.parse(SAXParser.java:346)
              at javax.xml.parsers.SAXParser.parse(SAXParser.java:286)
              at com.olf.util.JndiUtil.getInstance(JndiUtil.java:59)
              at com.olf.servlets.AppServlet.init(AppServlet.java:60)
              at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:700)
              at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:643)
              at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:588)
              at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:368)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:242)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
              at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2495)
              at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2204)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              

    Since your class may be used by other subsystems also you can write a
              small abstract class or an interface for example
              interface ResourceHandler {
              public InputStream getStream();
              and make our method take ResourceHandler as an argument.
              which can be used as follows
              JndiUtil.someMethod(new ResourceHandler(){
              public InputStream getStream(String name){
                             return context.getResourceAsStream("name");
              u can create a new inner class to serve a different purpose..
              e.g. standalone
              JndiUtil.someMethod(new ResourceHandler(){
              public InputStream getStream(String name){
                             return new FileInputStream(name);
              hope this helps
              nagesh
              PS: ooh yes, make this method throw an IOException      
              and also you can use an abstract class if u have any
              common logic to be added to this class..
              Kenny wrote:
              >
              > Nagesh,
              >
              > Thanks for the thought! However, by using the ServletContext, the JndiUtil class
              > would be tighted to the Servlet Container because it expects the caller passing
              > in a ServletContext. I would like to make the JndiUtil class shared by other
              > components in the system instead of only serving Servlets.
              >
              > Do you know if there is a way to locate a file in the system regardless which
              > container the call is in?
              >
              > Thanks!
              > kenny
              > Nagesh Susarla <[email protected]> wrote:
              > >try using ServletContext.getResourceAsStream()
              > >
              > >Kenny wrote:
              > >>
              > >> Hi,
              > >>
              > >> I have the following file structure in the war for my web application.
              > >>
              > >> WEB-INF/classes/com/olf/servlets/AppServlet.class
              > >>
              > >> WEB-INF/classes/com/olf/util/CommonUtil.class
              > >> WEB-INF/classes/com/olf/util/JndiUtil.class
              > >> WEB-INF/classes/com/olf/util/jndi.xml
              > >>
              > >> When the JndiUtil is invoked by the CommonUtil , the JndiUtil has no
              > >problem to
              > >> locate the jndi.xml; however, when
              > >> the JndiUtil class is invoked by the AppServlet. An exception thrown
              > >from the
              > >> JndiUtil states that it can't locate
              > >> the XML file from WebLogic Home directory. Does anyone know why the
              > >search is
              > >> done on WebLogic Home or even got up there?
              > >>
              > >> Any help is greatly appreciate!
              > >> kenny
              > >>
              > >> In AppServlet.class
              > >> ===================
              > >> public void init(ServletConfig config) throws ServletException
              > >> {
              > >> ...
              > >>
              > >> InitialContext ic = JndiUtil.getInstance().getInitialContext();
              > >> ...
              > >> }
              > >>
              > >> In JndiUtil.class
              > >>
              > >> public final static JndiUtil getInstance()
              > >> {
              > >> ...
              > >>
              > >> SAXParserFactory factory = SAXParserFactory.newInstance();
              > >> SAXParser saxParser = factory.newSAXParser();
              > >> saxParser.parse(new File("jnid.xml"), handler);
              > >>
              > >> ...
              > >> catch (SAXException e){
              > >> e.printStackTrace();
              > >> System.out.println("SAXException:" + e.getMessage());
              > >> }
              > >> ...
              > >> }
              > >>
              > >> Below is the exception thrown by the SAX parser
              > >>
              > >> org.xml.sax.SAXParseException: File "file:C:/bea/wlserver6.1/jndi.xml"
              > >not found.
              > >> at weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1088)
              > >> at weblogic.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocument(DefaultEntityHandler.java:512)
              > >> at weblogic.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:310)
              > >> at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:966)
              > >> at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:123)
              > >> at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:125)
              > >> at javax.xml.parsers.SAXParser.parse(SAXParser.java:346)
              > >> at javax.xml.parsers.SAXParser.parse(SAXParser.java:286)
              > >> at com.olf.util.JndiUtil.getInstance(JndiUtil.java:59)
              > >> at com.olf.servlets.AppServlet.init(AppServlet.java:60)
              > >> at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:700)
              > >> at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:643)
              > >> at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:588)
              > >> at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:368)
              > >> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:242)
              > >> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
              > >> at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2495)
              > >> at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2204)
              > >> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              > >> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              

Maybe you are looking for

  • N:1 Mapping and Matching Lines of Message 1 to Message 2

    Hi Everyone, I have an n:1 mapping and I need to match up the lines of message 1 to the lines of message 2 to map the target.  For example: Source 1 Key1 = A, Key2 = A, Key3 = A, Field1 = Red Key1 = A, Key2 = B, Key3 = B, Field1 = Blue Source 2 Key1

  • How to convert mp3 songs on my laptop to itunes for ipad?

    how do i convert my mp3 songs to itunes for my ipad

  • Out of "Request thread waiting" in KJS iAS SP4

    We are developing a J2EE aplication in iPlanet Application Server SP4. When we load the main page (Servlet), that composes a HTML page with 3 frames, the KJS of iAS takes 2 threads to process the request of the upper frame (call to a HttpServlet) and

  • Eprint edit image on ipad

    I have just updated the i pad operating system and eprint. Now when i choose a photo to print i can no longer make the picture smaller, and move it around on the page and choose where abouts on the page i want the image to print. I know that i can cr

  • Permissions messed up after changing short name

    Hello all, Following the directions provided on the support website (http://docs.info.apple.com/article.html?artnum=106824), I successfully changed the short name of my account. I created a new user, used the root user to move the old files, and dele