NullPointerException by Servlets Calls

if I call a Servlet "http://www.myhost.ch:8080/testing/Hello", I receive the follwoing Errormessage:
Error: 500
Location: /testing/Hello
Internal Servlet Error:java.lang.NullPointerException at java.lang.ClassLoader.resolveClass(ClassLoader.java)
Hello is a Servlet in Subfolder /testing/WEB-INF/classes
Web.xml:
<servlet-name>Hello</servlet-name>
<servlet-class>com.msi.servlet.HelloWorld</servlet-class>
<servlet-mapping>
<servlet-name>Hello</servlet-name>
<url-pattern>/Hello</url-pattern>
</servlet-mapping>
The JSP-Site "http://www.myhost.ch/testing/test.jsp", works fine.
Can anyone help?

From my experince the resource does not receive the right parameter from the client (HTML) so if u tried to set a parameter inside your receiving server side resource ,it will throw a NullPointerException
for example:
String param=request.getParameter("parameter_in_HTML_form");
param will throw a NullPointerException if it does not get a clean value.
Could you check.
Also your web.xml file seems to be in good shape i wouldnt go there lokking for an error.
good luck

Similar Messages

  • Servlets calls another servlet

    servlets calls another servlet ...how to do it ? whats the efficient way ?
    class myservlet extends HttpServlet
    // i want to call a servlet situated at another machine in the LAN whose, IP // 123.123.45.66 (say)
    the servlet which is situated in another machine
    remoteservlet extends HttpServlet
    doPost(...)
    how do i call ?
    few of the way i found by searching the forum.
    but i would like to know the good way in my situation.

    res.sendRedirect("LoginServlet?="+req.getRequestURI())
    i tested this. it does not work.
    my servlet wants to call another servlet which is
    active on IP xxx.ddd.ffff.zzz in the LAN .
    whats the way ?
    res.sendRedirect("http://xxx.ddd.ffff.zzz:<portnumber>/<context_name>/<servlet_regd_name">);The request and response objects are generated anew for that Servlet. There's no two ways about it, IMO.
    cheers,
    ram.

  • HTTP Servlet call

    Hi all,
    I have a BPM scenario where i have several conditional branches, and in one of the branch i have to make a HTTP Servlet call via HTTP adapter and pass some values from the incoming message in the HTTP post.
    Is this just like a normal HTTP adapter call or HTTP servlet is something diffrent from a normal adapter call?
    anybody has done similar HTTP servlet calls ? aplease share your thoughts.
    Thanks

    Hi,
    Its same to the normal HTTP Call but at the BPM you meight need to give conditions as you indicated...you give conditions in the Control step of BPM
    Amaresh

  • Servlet calling a BAPI Web Service...

    Hi everyone,
    I downloaded the wsdl file for the BAPI_USER_GETLIST.
    I created a Deployable Proxy that points to this wsdl file.
    I created a Web modul project with a servlet.
    I also created an Enterprise application project that contains my Web modul project.
    In the Web modul project, I created  a servlet :
    Here is the code of the servlet :
    <b>try {               
         InitialContext ic = new InitialContext();                    
         BAPI_USER_GETLISTService sampleWS = (BAPI_USER_GETLISTService)ic.lookup("java:comp/env/SampleWSProxy");
         BAPI_USER_GETLISTPortType vi = sampleWS.getLogicalPort();
         BAPI_USER_GETLIST importParams  = new BAPI_USER_GETLIST();
         ArrayList list = new ArrayList();
         BAPIUSNAME structure = new BAPIUSNAME();
         structure.setUSERNAME(new String());
         structure.setFIRSTNAME(new String());
         structure.setLASTNAME(new String());
         structure.setFULLNAME(new String());
         list.add(structure);
         BAPIUSNAME[] rows = new BAPIUSNAME[list.size()];
         list.toArray(rows);
         importParams.setUSERLIST(rows);
         importParams.setWITH_USERNAME("X");
         BAPI_USER_GETLISTResponse exportParams = null;
              BAPIUSNAME[] res = vi.BAPI_USER_GETLIST(rows,"");
              for(int i=0;i<res.length;i++)
                   response.getWriter().write(res<i>.getFIRSTNAME());
    } catch(Exception e)
              response.getWriter().write("ERROR!!!" + e.getMessage());
    </b>
    The exception is :
    <b>ERROR!!!Service call exception; nested exception is: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (401) Unauthorized.</b>
    Can someone help with this security problem ?
    Is the code OK except the security problem ?
    Thanks a lot.

    Hi David,
    Before calling a BAPI, we have to make a connection to
    R/3. Try following code...
    import com.sap.mw.jco.*;
    public class TutorialConnect1 extends Object {
       JCO.Client mConnection;
       public Connect1() {
         try {
           // Change the logon information to your own system/user
           mConnection =
              JCO.createClient("001", // SAP client
                "<userid>", // userid
                "****", // password
                null, // language
                "<hostname>", // application server host name
                "00"); // system number
           mConnection.connect();
           System.out.println(mConnection.getAttributes());
           mConnection.disconnect();
        catch (Exception ex) {
          ex.printStackTrace();
          System.exit(1);
      public static void main (String args[]) {
        Connect1 app = new Connect1();
    This code from sap help, for details visit this link..
    http://help.sap.com/saphelp_erp2004/helpdata/en/bc/42e13d82fcfb34e10000000a114084/frameset.htm
    Hope this helps.
    Regards,
    Narinder Hartala

  • Error: java.lang.NullPointerException in servlet deployment

    Hi!!!
    Im trying to deploy a servlet created in Jdeveloper on OC4J, but got the Error: java.lang.NullPointerException when the Jdeveloper is deploying the servlet.
    The containers are running, so I don't know what is the problem....
    Thanks

    If you could give a little more info it would help. The web.xml for example, if your mapping it correctly, etc...

  • Java.lang.NullPointerException in Servlet

    Hello Friends,
    I am getting java.lang.NullPointerException line 28
    I m enclosing the code
    Please check and let me know asap
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.sql.*;
    public class ForwardServlet extends HttpServlet
    public void service(HttpServletRequest request,HttpServletResponse response)throws ServletException,IOException
    try
    response.setContentType("text/html");
    PrintWriter out=response.getWriter();
    String viewURL=response.encodeURL("/EmployeeTimesheetServlet"); String addURL=response.encodeURL("/Login.jsp");
    String loginURL=response.encodeURL("/ProjectServlet");
    RequestDispatcher rd=null;
    if(request.getParameter("view")!=null)
    request.getRequestDispatcher(viewURL);
    else if(request.getParameter("add")!=null)
    request.getRequestDispatcher(addURL);
    else if(request.getParameter("default")!=null)
    request.getRequestDispatcher(loginURL);
    rd.forward(request,response);---------------------->Line28
    catch(Exception e)
    e.printStackTrace();
    i have checked all servlets
    what could be the probelm?
    Thanx
    Pooja

    RequestDispatcher rd=null;
    if(request.getParameter("view")!=null)
    rd = request.getRequestDispatcher(viewURL);
    else if(request.getParameter("add")!=null)
    rd = request.getRequestDispatcher(addURL);
    else if(request.getParameter("default")!=null)
    rd = request.getRequestDispatcher(loginURL);
    rd.forward(request,response)

  • Colors are not recognized by solaris,when gif created by servlet called in Java server pages--

    hi,
    i am trying to create Gif by calling servlet in a JSP page.when the
    same process done in Sun Java WebServer ,the gif is created with full
    display of all colours.when run under solaris the same code,OS not
    able to recognise the colors.can anybody let me know what are
    the settings to be changed.

    Hey forum i fixed it by my own.
    cheers

  • Problem with servlet call within servlet

    I have already a servlet that generates a jpeg images that works fine.
    a second servlet generates an pdf document via the iText library and works also fine.
    the problem or question is how to call the first servlet to insert an
    image into the generated pdf??
    tia
    marky

    Have a look to HttpURLConnection object (in java.net package). A example of the code :
    URL url = "http://myServer/myJpegServlet";
    HttpURLConnection uc = (HttpURLConnection) url.openConnection();
    uc.setDoInput(true);
    uc.setUseCaches(false);
    uc.setAllowUserInteraction(false);
    InputStream dataIn = uc.getInputStream();
    byte[] buf = new byte[512];
    while( (dataIn.read(buf)) != -1 ) {
    //Do what you want with the data
    datain.close();
    uc.close;
    Hope this helps!
    Simon Pierre NOLIN

  • How to pass a object of JSP to a servlet called from JSP

    Hi,
    I am trying to display an image in the JSP through html image tag. I am using Struts Action class to get the image data from the database through a Session EJB. I am getting a byte array for the image retrieved from the database.
    To display the image I need to call a servlet from the JSP from the image tag like this.
    <html:img src="imageservlet" border="0"/>
    But I need to send the image byte [] array data which is available with the JSP to the servlet to build image. I have a bean object with the JSP which holds the image byte []. The servlet should receive the bean object and will use the byte [] and build the image to be displayed.
    My query here is how to send this bean object to the servlet which is getting called from the JSP as shown above.
    Thanks in advance.

    Hi,
    Thanks for your response. I knew it is possible with session objects. But I want to perform this operation with out using session objects. Is there a way to accomplish this with out using Session objects.
    Please help.
    Thanks

  • Write HTML to Proper Page - Always writes to page - where servlet called

    I call a servlet from a second window(thirdWin) that was created/opened by the first window(window) in HTML. The servlet writes out HTML to the browser using the following code(note HTML$ is a java class that contains methods of HTML code lines):
    PrintWriter out=response.getWriter();
    HTML$.pageBegin();
    HTML$.tableHeader("Murph");
    The problem is that the servlet writes/ outputs the HTML code to the third window(thirdWin). I want to call the servlet from the third window and write/output the new HTML to the first window. There must be a way of accomplishing this. One, by setting the browser window directory to the original window(first window) before the servlet is called so that the new HTML gets written to that page, or two, by setting the brower window to the proper window in the servlet before writing the HTML out to the window.
    The following is the code in the servlet that opens the thirdWin. It is a javascript function whose body is a Servlet that has been written it out to the browser page. Do not get confused with me calling it the thirdWin it is acually a second window opened by the opener, I have just called it thirdWin.
    out.println("thirdWin = open('', 'UserName', 'height=300, width=500 scrollbars=yes');");
         out.println("thirdWin.document.write(\"<TITLE>Enter UserName</TITLE>\");");
    out.println("thirdWin.document.write(\"<BODY BGCOLOR=white>\");");
    out.println("thirdWin.document.write(\"<FORM name='showEdit' method='post' action='showEditProfile'>\");");
    out.println("thirdWin.document.write(\"<table><tr><td width=120>User Name :</td><td width=300><input type='text' class='listRow' name='user_name'></td></tr></table>\");");
    out.println("thirdWin.document.write(\"<table><tr><td width=120>Password :</td><td width=300><input type='text' class='listRow' name='user_name'></td></tr></table>\");");
    out.println("thirdWin.document.write(\"<table><tr><td width=120>Search :</td><td width=300><input type='submit' name='showEdit' value='Show Profile'/></td></tr></table>\");");
    /**out.println("thirdWin.document.write(\"<table><input id =\"subfds\" type=\"button\" name=\"Submit5\" value=\"Enter Information\" onclick=\"\"/></table>\");");**/
    out.println("thirdWin.document.write(\"</FORM>\");");
    out.println("thirdWin.document.write(\"</BODY>\");");
    out.println("thirdWin.document.write(\"</HTML>\");");
         out.println("thirdWin.document.close()");

    Since you want your function to write directly onto the page,
    the only way would be to pass the "out" variable to your function
    So your function would be
    ==============
    public void pageFooter(JspWriter out, boolean bolEndBanner)
    jspout.println( "<table width=\"100%\" align=\"center\" cellpadding=0 cellspacing=0 bgcolor=\"#FFFFFF\">" );
    jspout.println( "<tr>" );
    jspout.println( "</tr>" );
    jspout.println( "</table>" );
    // D�but de la Fin de page Normale
    jspout.println( "</body>" );
    jspout.println( "</head>" );
    jspout.println( "</html>" );
    ==============

  • NullPointerException when mouselistener calls method

    Good Evening,
    I get a java.lang.NullPointerException when a mouselistener calls a method "populatethedatafields()" contained within the class. The populatethedatafields method tries to set the values of text fields and it is at this point the exception occurs. I have tried being more explict in identifying the fields using myclassname.this.textfieldname and this.textfieldname without success. When I moved the settext to within the mouselistener scope, I was able to make the changes.
    Why does this occur?
    I know that I can fix it by putting the settext into the listeners, but that does not seem to be good coding practice. Any suggestions for a good coding practice to solve this type of issue?
    Many thanks for your time.
    Some code removed for clarity and brevity.......
    package EMSBeta1;
    public class ContactInfoViewTEST2 extends JPanel {
    private JTextField textFieldFirstName, textFieldLastName;
    private JPanel custDetails;
    /** Creates new ContactInfoView */
    public ContactInfoViewTEST2(PowerSourceRacingModel model) {
    mod = model;
    cqm = mod.getContactQuery();
    cdt = mod.getContactDetails();
    initComponents();
    public void initComponents() {
    JPanel panel1 = new JPanel();
    JPanel panel2 = new JPanel();
    JPanel detailsPanel = new JPanel();
    double size[][] =
    {{10, -1.0, -1.0, -1.0, -1.0, TableLayout.PREFERRED, 10}, // Columns
    {10, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 10}}; // Rows
    panel1.setBorder(BorderFactory.createTitledBorder("This is a title"));
    BoxLayout layout = new BoxLayout(panel1, BoxLayout.Y_AXIS);
    panel1.setLayout(layout);
    // panel2.setBorder(BorderFactory.createTitledBorder("This is a title"));
    BoxLayout layout2 = new BoxLayout(panel2, BoxLayout.X_AXIS);
    panel2.setLayout(layout2);
    detailsPanel.setBorder(BorderFactory.createTitledBorder("This is a title"));
    detailsPanel.setLayout(new TableLayout(size));
    JLabel labelLastName = new JLabel("Last Name") ;
    final JTextField textFieldLastName = new JTextField("Enter LastName",10);
    JLabel labelFirstName = new JLabel("First Name") ;
    final JTextField textFieldFirstName = new JTextField("FirstName",5);
    textFieldLastName.setNextFocusableComponent(textFieldMembershipNum);
    textFieldMembershipNum.setNextFocusableComponent(textFieldAddress);
    textFieldAddress.setNextFocusableComponent(textFieldEmerContactPhone);
    detailsPanel.add(labelLastName, "1, 1, L, C");
    detailsPanel.add(textFieldLastName, "1, 2, L, T");
    detailsPanel.add(labelFirstName, "3, 1, L, C");
    detailsPanel.add(textFieldFirstName, "3, 2, L, T");
    panel1.add(contactListPane);
    this.setLayout(new BorderLayout());
    add(panel1,BorderLayout.WEST);
    add(panel2,BorderLayout.SOUTH);
    add(detailsPanel,BorderLayout.CENTER);
    MouseListener listMouseListener = new MouseListener() {
    public void mouseClicked(MouseEvent e) {
    public void mouseEntered(MouseEvent e) {
    public void mouseExited(MouseEvent e) {
    public void mousePressed(MouseEvent e) {
    public void mouseReleased(MouseEvent e) {
    createNewContact.setEnabled(true);
    updateButton.setEnabled(true);
    insertNewDataButton.setEnabled(false);
    clearButton.setEnabled(false);
    JList theList = (JList)e.getSource();
    int indexValue = theList.getSelectedIndex();
    System.out.println("This is the selected index from the JList: " + indexValue);
    ContactIdName selectedItem = (ContactIdName)list.getSelectedValue();
    int selectedKey = selectedItem.getKey();
    contactInfo = cdt.getContactDetails(selectedKey);
    populateTheDataFields();
    list.addKeyListener(listKeyListener);
    list.addMouseListener(listMouseListener);
    public void clearFields() {
    textFieldFirstName.setText(null);
    textFieldLastName.setText(null);
    public void populateTheDataFields() {
    String first = (String)contactInfo.get("FIRSTNAME");
    String last = (String)contactInfo.get("LASTNAME");
    this.textFieldFirstName.setText(first);
    this.textFieldLastName.setText(last);
    }

    Ah Ha, Discovered the solution/problem.
    Note that I declared textFieldFirstName and textFieldLastName as class objects with private scope. Then in the initComponents METHOD, I created NEW textFieldFirstName and textFieldLastName objects whose scope is limited only to the method. By prefixing the objects with type, I was creating new instances of the objects rather than "re-using" the class objects. Class objects with appropriate scope are accessible by methods and inner classes. Objects created within a method are not unless the method returns the object.
    Subtle, but basic OO stuff that was a painful lesson. Whew!

  • Nullpointerexception on webservice call with J2SE1.5

    the following code:
            D2DServices service = new D2DServicesLocator();
            D2D = service.getD2DServicesSoap();
            this.logger.debug("conn: "+ D2D.testConnection());Stub classes are generated by WSDL2Java from axis. Webservice is .Net, I have it running on the same machine as the Java client. Should return a 'true'.
    I can access the webservice from my browser, I can successfully call the method.
    I'm sure the classes I use aren't Null.
    Same exception occurs if I set an endpoint.
    It DID work before, which is what frustrates me most.
    I use J2SE1.5 (Well, not anymore! but I'd like to!). I did not get the same error with JDK1.4.2_04
    Also the 'signed namespace.jar' problem does NOT occur with J2SE1.5
    gives me the following exception (abbreviated, original is quite long and repetetive):
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: java.lang.NullPointerException
    faultActor:
    faultNode:
    faultDetail:
         {http://xml.apache.org/axis/}stackTrace: java.lang.NullPointerException
         at java.util.Hashtable.put(Unknown Source)
         at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.setProperty(Unknown Source)
         at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:246)
         at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
         at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
         at org.apache.axis.client.Call.invoke(Call.java:2553)
         at org.apache.axis.client.Call.invoke(Call.java:2248)
         at org.apache.axis.client.Call.invoke(Call.java:2171)
         at org.apache.axis.client.Call.invoke(Call.java:1691)
         at org.tempuri.D2DServicesSoapStub.testConnection(D2DServicesSoapStub.java:2197)
         at com.response.xuware.container.D2DContainer.connectToD2D(D2DContainer.java:76)
    ....[CUT]....
    java.lang.NullPointerException
         at org.apache.axis.AxisFault.makeFault(AxisFault.java:129)
         at org.apache.axis.client.Call.invoke(Call.java:2251)
         at org.apache.axis.client.Call.invoke(Call.java:2171)
         at org.apache.axis.client.Call.invoke(Call.java:1691)
         at org.tempuri.D2DServicesSoapStub.testConnection(D2DServicesSoapStub.java:2197)
    ....[CUT]....
    Caused by: java.lang.NullPointerException
         at java.util.Hashtable.put(Unknown Source)
         at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.setProperty(Unknown Source)
         at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:246)
         at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
         at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
         at org.apache.axis.client.Call.invoke(Call.java:2553)
         at org.apache.axis.client.Call.invoke(Call.java:2248)
         ... 38 more
    Who can tell me what I'm doing wrong?

    I�ve tried:
    JDK 1.4.1 with AXIS 1.1
    JDK 1.4.2_06 with AXIS 1.1
    JDK 1.4.2_06 with AXIS 1.2
    And I�ve got the same error:
    Exception in thread "main" AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: java.lang.NullPointerException
    faultActor:
    faultNode:
    faultDetail:
    {http://xml.apache.org/axis/}stackTrace: AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: java.lang.NullPointerException
    faultActor:
    faultNode:
    faultDetail:
    java.lang.NullPointerException
    at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder
    .java:260)
    at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.
    java:169)
    at org.apache.axis.encoding.DeserializationContextImpl.endElement(Deseri
    alizationContextImpl.java:1015)
    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknow
    n Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
    Dispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
    known Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at javax.xml.parsers.SAXParser.parse(Unknown Source)
    at org.apache.axis.encoding.DeserializationContextImpl.parse(Deserializa
    tionContextImpl.java:242)
    at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
    at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
    at org.apache.axis.client.Call.invoke(Call.java:2553)
    at org.apache.axis.client.Call.invoke(Call.java:2248)
    at org.apache.axis.client.Call.invoke(Call.java:2171)
    at org.apache.axis.client.Call.invoke(Call.java:1691)
    at testearray01.ws.Testearray01SoapBindingStub.getClientes(Testearray01S
    oapBindingStub.java:142)
    at TesteClient01.main(TesteClient01.java:11)
    Can someone help me?

  • A servlet calling another servlet on diff machine

    plzzzz help me on how i will call a servlet which is running
    on different machine from one machine. and how i will call a servlet
    which is running in different context on the same machine

    To call a servlet on a different machine you can use the HttpURLConnection class. Search the forum for details on how to do this.
    Or you can use the JSTL c:include tag. (or is it c:import?)
    To call a servlet on the same machine in a different context you use
    getServletContext().getServletContext(url)
    where url is the url to the servlet in the other context. Then you can use the RequestDispatcher to forward the request to the other servlet.

  • "Exausted resultSet" error in servlet calling SQLJ

    I've got a servlet wich calls a sqlj methode; the sqlj opens an iterator, converts it as a resultset, and sends it to the servlet.
    Then, the servlet browses this ResultSet (with rs.next()) and output the data to screen.
    I don't know why, but sometimes, all data appears on the screen, and sometimes i get an error message "Exausted resultSet", and sometimes i get an other error message "Closed ResultSet".
    I use the same program, i just run it many times, and sometimes it crashes, and sometimes not. (and it don't crashe in the same moment)
    i use Tomkat 3.2.1 with apache
    where does this bug come from ? Tomkat or SQLj ??
    i've notice that the error appears when the garbage collector runs. If i run it manualy in the "while(rs.next())", it crashes immediately
    if i run the garbage collector before the "while" statement, for small resulset, it never crashes, but for bigger resultset it do ! (as if the problem appears when the garbage collector runs)
    it causes big problems to continue developping our application, so any help would be very appreciated...

    Are you using JDK 1.2.1? If yes, then try to use JDK 1.2.2 instead. We have seen JDK 1.2.1 garbage collecting things that are still in scope (very unsafe).
    If wiggling your configuration does not help, you'll need to provide more info about your environment and it would be best to get a reproducible test case.
    One other note: make sure to finally close the SQLJ iterator not the result set that is being returned. Otherwise you can start leaking cursor handles and/or statement cleanup will not be properly performed.

  • Servlet calls java function

    hi
    is there any way we can call a normal java function directly from a servlet? here's what i meant:
    public void service(ServletRequest request, ServletResponse response)throws IOException{
    some statements....
    pw.println("<input type=button action='call javafunc(arg1,arg2)'>"); //something like this
    int javafunc(arg1,arg2){
    do some processing here..
    if anyone does get what i'm trying to do, how do I actually get them working? because i know the code above won't work..
    any help are greatly appreciated. thanks in advance.

    If you are asking whether you can call a Java method from a servlet, sure you can. Servlets are written in Java themselves. Of course you can't have a method inside a method, if that's the problem you are referring to. Just put your javafunc method outside your service method.
    However you can't have an action on the client side call that method. In fact an action on the client side can't use Java code at all. Javascript, yes, but not Java.

Maybe you are looking for

  • Schedule Lines

    Hi All, I have my main servers in the USA and my German Client is creating the orders, howcome the system is proposing tommorrow's date in the Schedule Lines. BTW how are Schedule lines determined? I know that it is thru MRP Type + Item category. Reg

  • SAP CRM 6.0 UI transaction EEWB extension type ADD_NEW_ATTRIBUTES_TABLE

    I need help on the following two issues. ADD_NEW_ATTRIBUTES_TABLE When doing an enhancement to the case management EEW Business Object: CRM_CASE the extension type ADD_NEW_ATTRIBUTES_TABLE is not available, why? Search help In CRM 6.0 UI how can one

  • Issue with PO output types.

    Hi All, Please note that for the STOs with document type NB the same PO output has been processed twice with out any manual intervention (with some time gap). The first output idoc has been processed successfully and the second one went into error. P

  • IMovie doesn't allow the Import option when selecting a movie to import

    I am just starting to use iMovie '08. There is a movie that I made (of my dog) in 2001. It is in my external hard drive. When I am in iMovie '08 and click the Import button I browse to that external hard drive and select that movie with its component

  • ICal defaults to all-day

    Migrated to Mountain Lion and now I find that iCal always defaults to All-Day for new events. I've seen discussions here about using the Cmd-N keys to start a new event which you can then modify, but is there not a setting we can change in Terminal t