Help class import

I am using Tomcat 3.2.1 to implement servlet and javabean, jsp application. My class path is /webapps/myapp/web-inf/classes/bean. I put two classes in bean folder(they are videocustomer and videoavail). Now i want to use object of videoavail within videocustomer, i import videoavail on the top of videocustomer, but the error message indicates compiler can't find class videoavail(jdk1.2.2). Why? usually two classes in the same folder should be able to access each other.
qiang

When two classes are in the same folder there is no need to import one to use within another. However make sure that the package names for both are the same and in your case the package should be "package bean;"
Also make sure that the classpath has the "." added to tell the classloader to look in the current directory first.
Good Luck!
Eshwar Rao
Developer Technical Support
Sun microsystems inc
http://www.sun.com/developers/support

Similar Messages

  • XSLT mapping with Java helper classes

    Hi,
    I'm trying to implement a XSLT mapping to convert my request to a specific soap request message format for this I'm calling some methods from a java helper class. I have imported the jar file into the archives. When I tried to test the interface it keeps complaing there is some exception but doesn't give me the exact error. Has any one called any java helper classes with in XSLT mapping, if so I would appreciate if you could help me with this. Here is the code from xsl.
    <wsse:Security soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/07/secext"   xmlns:UserToken="java:com.company.test.mapping.UserTokenMap">
    <wsse:UsernameToken>
        <wsse:Username xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
          <xsl:value-of select="UserToken:getUsername()"/>
        </wsse:Username>
        <wsse:Password wsse:Type="wsse:PasswordDigest" xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
        <xsl:value-of select="UserToken:getPasswordDigest()"/>
        </wsse:Password>
        <wsse:Nonce xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
        <xsl:value-of select="UserToken:getNonce()"/>
        </wsse:Nonce>
        <wsu:Created xsi:type="soapenc:string" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
        <xsl:value-of select="UserToken:getCreateDate()"/>
    </wsu:Created>
    </wsse:UsernameToken>
    </wsse:Security>
    Thanks,
    Joe

    Hi,
    I'm getting following exception when I refer to the java class with in my XSLT mapping. Any one encountered the same problem.
    com.sap.engine.services.ejb.exceptions.BaseRemoteException:
    Exception in method transform.
         at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0.transform(MapServiceRemoteObjectImpl0.java:218)
         at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0p4_Skel.dispatch(MapServiceRemoteObjectImpl0p4_Skel.java:104)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native
    Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: java.lang.UnsupportedClassVersionError:
    com/earthlink/xi/mapping/UserTokenMap (Unsupported
    major.minor version 49.0)
         at java.lang.ClassLoader.defineClass0(Native
    Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:448)
         at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingLoader.findClass(RepMappingLoader.java:175)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at com.sap.engine.lib.xsl.xpath.JLBLibrary.<init>(JLBLibrary.java:33)
         at com.sap.engine.lib.xsl.xpath.LibraryManager.getFunction(LibraryManager.java:69)
         at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:98)
         at com.sap.engine.lib.xsl.xpath.XPathProcessor.innerProcess(XPathProcessor.java:56)
         at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:43)
         at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:51)
         at com.sap.engine.lib.xsl.xslt.XSLValueOf.process(XSLValueOf.java:76)
         at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296)
         at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248)
         at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296)
         at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248)
         at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296)
         at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248)
         at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296)
         at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248)
         at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296)
         at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248)
         at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296)
         at com.sap.engine.lib.xsl.xslt.XSLTemplate.process(XSLTemplate.java:272)
         at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:463)
         at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:431)
         at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:394)
         at com.sap.engine.lib.jaxp.TransformerImpl.transformWithStylesheet(TransformerImpl.java:398)
         at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:240)
         at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingTransformer.transform(RepMappingTransformer.java:150)
         at com.sap.aii.ibrep.server.mapping.ibrun.RepXSLTMapping.execute(RepXSLTMapping.java:81)
         at com.sap.aii.ibrep.server.mapping.ibrun.RepSequenceMapping.execute(RepSequenceMapping.java:54)
         at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingHandler.run(RepMappingHandler.java:80)
         at com.sap.aii.ibrep.server.mapping.rt.MappingHandlerAdapter.run(MappingHandlerAdapter.java:107)
         at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInterfaceMapping(ServerMapService.java:127)
         at com.sap.aii.ibrep.server.mapping.ServerMapService.transform(ServerMapService.java:104)
         at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.transform(MapServiceBean.java:40)
         at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0.transform(MapServiceRemoteObjectImpl0.java:167)
         ... 10 more
    ; nested exception is:
         java.lang.UnsupportedClassVersionError:
    com/earthlink/xi/mapping/UserTokenMap (Unsupported
    major.minor version 49.0)

  • XSLT Mapping : RFC Lookup using java helper class

    Hi All,
    I am doing RFC Lookup in xslt mapping using java helper class. I have found blog for the same (http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14) However this blog is very advanced.
    Can anybody help me with step by step approach for the same?
    My basic questions are not answered in the blog as:
    1) where to add the jar file of the java class used in xslt mapping.
    I have added zip file of XSLT mapping in imported archived and using that in mapping.
    Thanks in advace.
    Regards,
    Rohan

    Hi,
    Can u please have look at this in detail , u can easily point out yourself the problem...
    http://help.sap.com/saphelp_nw04/helpdata/en/55/7ef3003fc411d6b1f700508b5d5211/content.htm
    Please observe the line,
    xmlns:javamap="java:com.company.group.MappingClass
    in XSLT mapping..
    The packagename of class and class name and XSLT namespace should be matching...
    Babu
    Edited by: hlbabu123 on Sep 29, 2010 6:04 PM

  • Java Error in RFC Lookup in XSLT Mapping usinf Java helper class

    Hi All,
    I am doing RFC Lookup in XSLT Mapping using Java Helper class.
    The Lookup works fine when called one RFC at a time However my requirement is I want to do 2 Lookups.
    Both Lookups works when done individually however when I call both lookups in one mapping I get following error "javax.xml.transform.TransformerException: DOMSource whose Node is null."
    Following is the code I have written in XSLT for the lookup:
         <xsl:template name="Lookup_1">
              <xsl:param name="STDPN"/>
                   <rfc:RFC_READ_TABLE>
                        <QUERY_TABLE>KNA1</QUERY_TABLE>
                        <OPTIONS><item><TEXT>
                                  <xsl:value-of select="$STDPN"/>
                             </TEXT></item>
                        </OPTIONS>
                        <FIELDS>
                             <item>
                                  <FIELDNAME>KUNNR</FIELDNAME>
                             </item>
                        </FIELDS>
                   </rfc:RFC_READ_TABLE>
              </xsl:variable>
              <xsl:variable name="response" xmlns:lookup="java:urn.mt.pi" select="lookup:execute($request, 'BS_D, 'cc_RfcLookup', $inputparam)"/>
              <xsl:element name="STDPN">
                   <xsl:value-of select="$response//DATA/item/WA"/>
              </xsl:element>
         </xsl:template>
         <xsl:template name="Lookup_2">
              <xsl:param name="BELNR"/>
                   <xsl:variable name="Query">AGMNT = '<xsl:value-of select="$BELNR"/>'</xsl:variable>
                   <xsl:variable name="request1">
                        <rfc:RFC_READ_TABLE>
                             <QUERY_TABLE>ZTABLE</QUERY_TABLE>
                             <OPTIONS><item><TEXT>
                                  <xsl:value-of select="$Query"/>
                                  </TEXT></item>
                             </OPTIONS>
                             <FIELDS>
                                  <item>
                                       <FIELDNAME>KUNAG</FIELDNAME>
                                  </item>
                             </FIELDS>
                        </rfc:RFC_READ_TABLE>
                   </xsl:variable>
                   <xsl:variable name="response1" xmlns:lookup="java:urn.mt.pi" select="lookup:execute($request1, 'BS_D','cc_RfcLookup', $inputparam)"/>
                   <xsl:element name="BELNR">
                        <xsl:value-of select="$response1//DATA/item/WA"/>
                   </xsl:element>
         </xsl:template>
    My Question: Am I doing anything wrong? Or Is it possible to call multiple lookups in one XSLT?
    Thanks and Regards,
    Atul

    Hi Atul,
    I had the same problem like you had.
    The main Problem is that with the example code the request variable is created as NodeList object. In XSLT a variable is somekind of a constant and can't be changed. As the request object is empty after the first request the programm fails at the following line:
    Source source = new DOMSource(request.item(0));
    So I've created a workaround for this problem.
    In the call of the template I've put the request as a parameter object at the template call:
    <xsl:with-param name="req">
    <rfc:PLM_EXPLORE_BILL_OF_MATERIAL xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
      <APPLICATION>Z001</APPLICATION>
      <FLAG_NEW_EXPLOSION>X</FLAG_NEW_EXPLOSION>
      <MATERIALNUMBER><xsl:value-of select="value"/></MATERIALNUMBER>
      <PLANT>FSD0</PLANT>
      <VALIDFROM><xsl:value-of select="//Recordset/Row[name='DTM-031']/value"/></VALIDFROM>
      <BOMITEM_DATA/>
    </rfc:PLM_EXPLORE_BILL_OF_MATERIAL>
    </xsl:with-param>
    With this change the request will be provided as a String object and not as a NodeList object.
    Afterwards the RfcLookup.java has to be changed to the following:
    package com.franke.mappings;
    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.PrintWriter;
    import java.io.StringWriter;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Source;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import com.sap.aii.mapping.lookup.Channel;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import com.sap.aii.mapping.api.AbstractTrace;
    import com.sap.aii.mapping.lookup.RfcAccessor;
    import com.sap.aii.mapping.lookup.LookupService;
    import com.sap.aii.mapping.lookup.XmlPayload;
    * @author Thorsten Nordholm Søbirk, AppliCon A/S
    * Helper class for using the XI Lookup API with XSLT mappings for calling RFCs.
    * The class is generic in that it can be used to call any remote-enabled
    * function module in R/3. Generation of the XML request document and parsing of
    * the XML response is left to the stylesheet, where this can be done in a very
    * natural manner.
    * TD:
    * Changed the class that request is sent as String, because of IndexOutOfBound-exception
    * When sending multiple requests in one XSLT mapping.
    public class RfcLookup {
         * Execute RFC lookup.
         * @param request RFC request - TD: changed to String
         * @param service name of service
         * @param channelName name of communication channel
         * @param inputParam mapping parameters
         * @return Node containing RFC response
         public static Node execute( String request,
                 String service,
                 String channelName,
                 Map inputParam)
              AbstractTrace trace = (AbstractTrace) inputParam.get(StreamTransformationConstants.MAPPING_TRACE);
              Node responseNode = null;
              try {
                  // Get channel and accessor
                  Channel channel = LookupService.getChannel(service, channelName);
                  RfcAccessor accessor = LookupService.getRfcAccessor(channel);
                   // Serialise request NodeList - TD: Not needed anymore as request is String
                   /*TransformerFactory factory = TransformerFactory.newInstance();
                   Transformer transformer = factory.newTransformer();
                   Source source = new DOMSource(request.item(0));
                   ByteArrayOutputStream baos = new ByteArrayOutputStream();
                   StreamResult streamResult = new StreamResult(baos);
                   transformer.transform(source, streamResult);*/
                    // TD: Add xml header and remove linefeeds for the request string
                    request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+request.replaceAll("[\r\n]+", ""); 
                    // TD: Get byte Array from request String to send afterwards
                    byte[] requestBytes = request.getBytes();
                   // TD: Not used anymore as request is String
                    //byte[] requestBytes = baos.toByteArray();
                    trace.addDebugMessage("RFC Request: " + new String(requestBytes));
                    // Create input stream representing the function module request message
                    InputStream inputStream = new ByteArrayInputStream(requestBytes);
                    // Create XmlPayload
                    XmlPayload requestPayload =LookupService.getXmlPayload(inputStream);
                    // Execute lookup
                    XmlPayload responsePayload = accessor.call(requestPayload);
                    InputStream responseStream = responsePayload.getContent();
                    TeeInputStream tee = new TeeInputStream(responseStream);
                    // Create DOM tree for response
                    DocumentBuilder docBuilder =DocumentBuilderFactory.newInstance().newDocumentBuilder();
                    Document document = docBuilder.parse(tee);
                    trace.addDebugMessage("RFC Response: " + tee.getStringContent());
                    responseNode = document.getFirstChild();
              } catch (Throwable t) {
                   StringWriter sw = new StringWriter();
                   t.printStackTrace(new PrintWriter(sw));
                   trace.addWarning(sw.toString());
              return responseNode;
         * Helper class which collects stream input while reading.
         static class TeeInputStream extends InputStream {
               private ByteArrayOutputStream baos;
               private InputStream wrappedInputStream;
               TeeInputStream(InputStream inputStream) {
                    baos = new ByteArrayOutputStream();
                    wrappedInputStream = inputStream;
               * @return stream content as String
               String getStringContent() {
                    return baos.toString();
              /* (non-Javadoc)
              * @see java.io.InputStream#read()
              public int read() throws IOException {
                   int r = wrappedInputStream.read();
                   baos.write(r);
                   return r;
    Then you need to compile and upload this class and it should work.
    I hope that this helps you.
    Best regards
    Till

  • Including helper classes in java proxy jar file

    I must not be using the right header search criteria because I'm sure this question
    has been asked before. In a Web Service File (.jws) I've imported a couple of
    helper classes that function as data transfer objects. I did this to maintain
    consistency with other portions of the application. The Java Proxy jar file generated
    by Workshop does not include these files. Is there a way of including these dependencies
    or do I need to distribute another jar file with my helper classes?

    Hi Naichen,
    I was able to successfully run both the autotype and clientgen Ant task, on the
    WSDL you provided. The code behind those Ant tasks are pretty much what the WebLogic
    Web Services test page run. Are you using WLS 8.1 SP2? If not, you might want
    to try with that version.
    Regards,
    Mike Wooten
    "Naichen Liu" <[email protected]> wrote:
    >
    >
    >
    Hi,
    I am having a warning message when trying to generate java proxy jar
    file on weblogic8.1
    webservice test web app, the message is as follows:
    "Warning Failed to generate client proxy from WSDL definition for this
    service.
    Prescription Please verify the <types> section of the WSDL."
    in the mean time, on weblogic starting terminal, I saw the following
    exceptions,
    C:\DOCUME~1\u252738\LOCALS~1\Temp\wlwproxy37508.jar1533409921\com\ual\www\rcc\cb
    t\schema\modifypnr\AlphaLength4Deserializer.java:36: cannot resolve symbol
    symbol : class FacetUtils
    location: package binding
    weblogic.xml.schema.binding.FacetUtils.checkLengthFacet(__typed_obj,4L);
    ^
    C:\DOCUME~1\u252738\LOCALS~1\Temp\wlwproxy37508.jar1533409921\com\ual\www\rcc\cb
    t\schema\modifypnr\OSIFieldAnonTypeDeserializer.java:36: cannot resolve
    symbol
    symbol : class FacetUtils
    location: package binding
    weblogic.xml.schema.binding.FacetUtils.checkMaxLengthFacet(__typed_obj,69L);
    ^
    C:\DOCUME~1\u252738\LOCALS~1\Temp\wlwproxy37508.jar1533409921\com\ual\www\rcc\cb
    t\schema\modifypnr\AlphaLength2Deserializer.java:36: cannot resolve symbol
    symbol : class FacetUtils
    location: package binding
    weblogic.xml.schema.binding.FacetUtils.checkLengthFacet(__typed_obj,2L);
    ^
    C:\DOCUME~1\u252738\LOCALS~1\Temp\wlwproxy37508.jar1533409921\com\ual\www\rcc\cb
    t\schema\modifypnr\FreeFormAnonTypeDeserializer.java:36: cannot resolve
    symbol
    symbol : class FacetUtils"
    Can anybody help me about this issue? I attached WSDL file, also United
    Airlines
    got an enterprise weblogic license deal with BEA, any help will be highly
    appreciated.
    Thanks!!!
    Naichen

  • Reading files from within helper classes

    From within a servlet, I can get the servlet context to get a path to the "web" directory of my project and easily access properties files for my project. If I create another package in my project to hold helper classes that perform some specific function and want to create and/or read from a properties file, I get a path to the bin directory of my servlet container:
    Servlet Path: D:\Documents and Settings\Josh\My Documents\Josh\Projects\ServletSandBox\build\web\
    Helper Class File Path: D:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.14\bin\test
    I'd like to develop my helper packages as reusable APIs, so they're not tied directly to my project or to a servlet in general, but I'd like the properties files to stay somewhere in my project folder, preferably in the WEB-INF directory with the servlet's own specific properties file.
    I can't figure out the best way to handle this. I wanted to just be able to pass the helper class a String if somebody wanted to specify a filename other than the default filename. Does it make sense to specify a file URL instead? Is there any other way to get the calling servlet's context path without having to pass in a variable?
    Thanks

    It seems that the helper API shouldn't need to be given a path to its own config file. I would like to have code that will load the file regardless of whether or not its in a stand alone java app or a servlet. Whenever the helper API is jarred up and imported into my servlet, it can't find the config file unless it's in the "D:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.14\bin\test" directory. OR, if I use the current thread to get the loader, it will locate it in the "classes" folder, which is the only solution I can come up with that will let me write code to load the file that will work, regardless of its implementation.
    The "project" folder I'm talking about is just the NetBeans "project" folder for the servlet, or the "ServetSandBox" folder in my example. I guess that doesn't really matter in the context of the servlet though.
    So is using the current thread the appropriate way to do this? When you say that code will work if I put the resource in the WEB-INF directory, that seems to only be true if I try to load it from the servlet itself, not the helper class. The helper class doesn't find the resource in the WEB-INF directory.
    Also, I would like to be able to write the default values to a new config file if one doesn't exist. How in the heck do I get a pointer to the "classes" folder, or any other folder that I can also read from using the classloader, so I can write to a new file?

  • EJB and helper classes ...

    I have created an EJB component which uses
    some helper classes in JDeveloper 3.0 .
    The component deploys sucessfully to OAS 4.0.8.1 . When I try to run the component through an applet ( including the _client.jar
    in the archive tag) , the applet does not find the helper classes . How I do i include the helper classes in the _client.jar file ?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi,
    Try to put all the EJB's in a single package and import the package. I
    can think of this solution right now, will keep posting for updates.
    Regards
    Raj
    Daniel Westerdale wrote:
    Hi,
    I have a number of EJBs that each use a common set interfaces,
    exceptions and Value beans. If I deploy using the iasdeploy command
    line, then I must package up all these common classes within each of
    the EJB modules - leading to a lot of duplicate code.
    Is there a smarter a way of packaged the common classes so that I can
    include them in the .EAR file but only in one module.
    Note: I would prefer to only argument the IAS classpath with 3rd party
    classes that rarely change and not these common classes e.g. Jlog
    cheers
    Daniel
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • Helping class

    i'm learning how to develop one-to-many relationship software.
    The entities involved are STUDENT and RESULT. i.e I want  every
    student to main the history of his results.
    My helping class is result.java and its included in my question.
    Pls, I want to know if my helping class is correct and also if my servlet file is
    also correct. All my codes are for my helping class. I excluded that of the
    main class since I don't have problem with it.
    My main goal is to store many Results(subjects and scores) for every student
    This extract of the servlet  file shows only for result
    String[] sub = request.getParameterValues("subject");
       String[] score = request.getParameterValues("score");
           resultid.setSubject(sub);
           resultid.setScore(score);
         // This stores severa
         Vector v = resultid.getResult();
         Iterator iter =     v.iterator();
         while(iter.hasNext())
              resultid =(result)iter.next();
         String x = resultid.getSubject();
         String y = resultid.getScore();
    // The bean is for helping class
    package student;
    import java.util.*;
    public class result implements java.io.Serializable
         private String subject;
         private String score;
         private Vector v;
         public name()
         public String getSubject()
              return subject;
         public void setSubject(String subject)
              this.subject = subject;
         public String getScore()
              return score;
         public void setScore(String score)
              this.score = score;
         public void addResult()
              v.addElement(this);
         public Vector getResult()
              return v;
    }

    Pls, remember the following codes retrieve subject and score from jsp file .
    // This is the servlet that handles the result
    String[] sub = request.getParameterValues("subject");
       String[] score = request.getParameterValues("score");
           resultid.setSubject(sub);
           resultid.setScore(score);
         // This stores severa
         Vector v = resultid.getResult();
         Iterator iter =     v.iterator();
         while(iter.hasNext())
              resultid =(result)iter.next();
         String x = resultid.getSubject();
         String y = resultid.getScore();

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

  • Error in problem  class important

    Hi Gurus,
    we are facing problem while activating the transferstructure
    when are activating using the program:
    RS_TRANSTRU_ACTIVATE_ALL
    we are getting
    error in problem class important.
    All Thaughts are considered.
    Regards,
    Ajay.

    Need tyo make sure the problem is with the query/workbook are general issue with all workbooks/query.
    1. Make sure the base query of work book is still executable. RRMX/RSRT.
    2. Execute the work book in Bex/Excel and look for definition of workbook; there might be some thing in the workbook referencing other than base query.
    3. If other workbook are also not working? need to check if other users have same issue.?
    Hope this will help to narrow the problem.
    Gopi

  • Problem class important error while executing Query from favorites

    Hi Experts,
    1. I have tried execute the query from favorites it is showing the error message. " Problem class important"
        In the message text: logs showing error message [Attached the message screenshot].
    2. From "Query Designer" Execute [Ctrl+R] gives the error "500 Internal Server Error" [Attached the screenshot]
    3. Able to execute the reports from RRMX.
    No ST22 dumps. Can any one suggest about...how to rectify the errors.
    Thanks in advance...Surya

    Need tyo make sure the problem is with the query/workbook are general issue with all workbooks/query.
    1. Make sure the base query of work book is still executable. RRMX/RSRT.
    2. Execute the work book in Bex/Excel and look for definition of workbook; there might be some thing in the workbook referencing other than base query.
    3. If other workbook are also not working? need to check if other users have same issue.?
    Hope this will help to narrow the problem.
    Gopi

  • Weblogic 10.3.2 EJB3 Local Interface in POJO/Helper classes

    Hi,
    I have a jar file containing all EJB's in application & some Helper classes. I want to access Local interfaces of EJBs in those helper classes. Is there any way I can do it? I've gone through Maxence Button & Jay SenSharma 's blogs about accessing Local interface. but it doesn't help. May be these two guys can help me more here.. My requirement is very simple. Just to access local interface in POJO/Helper classes that are in same JAR file as EJB's. I can't get reference with @EJB class level annotation as Helper classes are called independently from MBean services.. not from any EJB or Servlert.
    Please if anyone can tell me how do I get reference of local interfaces, that would be really good.
    my environment is
    Weblogic 10.3.2
    EJB3
    Regards,
    Prasad

    Hi,
    Just check ...If you want something like mentioned in the below Link with a complete Example:
    [http://jaysensharma.wordpress.com/2009/08/16/weblogic-10-3-ejb3-local-lookup-sample/|http://jaysensharma.wordpress.com/2009/08/16/weblogic-10-3-ejb3-local-lookup-sample/]
    Regards
    Jay SenSharma

  • Need help to import and syncronize HCM pagelets with Interaction Hub, how can I do that?

    Hi,
    I need help to import and synchronize HCM pagelets with Interaction Hub, how can I do that? The default page "Select Remote Content" of the WorkCenter "Unified Navigation WorkCenter" is not working as well, when I run the import/sync button I get the following error message:
    Integration Gateway: General Connection Failed (158,10836)
    This error is thrown when there is no valid response.
    Possible errors include:
    Bad gateway URL
    Sync Service Timeout set and Service actually timed out.
    Java exception thrown - Check Application Server for possible Java exception

    Do you have integration configured between the two systems?  It sounds like you don't from the error.  Here is a walk-through on setting up Unified Navigation although it assumes you have integration already working.  If you haven't done that, it's documented a hundred different places.
    http://remotepsadmins.com/2013/03/04/peoplesoft-unified-navigation-with-peoplesoft-applicatations-portal-interaction-hub/

  • I need a clarification : Can I use EJBs instead of helper classes for better performance and less network traffic?

    My application was designed based on MVC Architecture. But I made some changes to HMV base on my requirements. Servlet invoke helper classes, helper class uses EJBs to communicate with the database. Jsps also uses EJBs to backtrack the results.
    I have two EJBs(Stateless), one Servlet, nearly 70 helperclasses, and nearly 800 jsps. Servlet acts as Controler and all database transactions done through EJBs only. Helper classes are having business logic. Based on the request relevant helper classed is invoked by the Servlet, and all database transactions are done through EJBs. Session scope is 'Page' only.
    Now I am planning to use EJBs(for business logic) instead on Helper Classes. But before going to do that I need some clarification regarding Network traffic and for better usage of Container resources.
    Please suggest me which method (is Helper classes or Using EJBs) is perferable
    1) to get better performance and.
    2) for less network traffic
    3) for better container resource utilization
    I thought if I use EJBs, then the network traffic will increase. Because every time it make a remote call to EJBs.
    Please give detailed explanation.
    thank you,
    sudheer

    <i>Please suggest me which method (is Helper classes or Using EJBs) is perferable :
    1) to get better performance</i>
    EJB's have quite a lot of overhead associated with them to support transactions and remoteability. A non-EJB helper class will almost always outperform an EJB. Often considerably. If you plan on making your 70 helper classes EJB's you should expect to see a dramatic decrease in maximum throughput.
    <i>2) for less network traffic</i>
    There should be no difference. Both architectures will probably make the exact same JDBC calls from the RDBMS's perspective. And since the EJB's and JSP's are co-located there won't be any other additional overhead there either. (You are co-locating your JSP's and EJB's, aren't you?)
    <i>3) for better container resource utilization</i>
    Again, the EJB version will consume a lot more container resources.

  • How to construct table in jsp for the resultset from helper class

    Hi Dudes!!!
    Want to construct table in jsp for the resultset, but the resultset are retrieved at the helper class.I constructed Table in Helper class Using StringBuffer and return it as string from the helper class.Is their any other feasible and efficient way to construct table in Jsp for the resultset from Helper class.Solution will be highly appreciated.Thanx in Advance.

    no, we can't.
    Certainly noone can with such vague specifications even if they had the intent to do so.
    "the computer", which computer?
    "attach to our current page", what is meant by that?
    And noone should ever help you if you're planning to breach security anywhere.

Maybe you are looking for