RequestDispatcher.include() transfers control to servlet

I have a servlet that calls a second servlet to include additional HTML output to the browser. The first servlet does some setup, writes some HTML to the output, and then calls the second servlet via the RequestDispatcher.include() method. After the second servlet is done doing it's work, the first servlet does some final HTML output to the browser and we're done.
The problem is, after the second servlet writes it's HTML output to the browser, it doesn't return control to the calling servlet. Therefore, the calling servlet doesn't do any of the final processing that I need.
This isn't the correct behaviour is it? What can I do to accomplish what I'm looking for.
Thanks!!!

rk43:
The scenario you describe should work according to the Java Servlet Specification. So if you didn't do anything wrong, it might be the problem of you servlet container. Since I don't have you code, I'd like to post my test case. You can test it in your environment.
package com.test;
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class FirstServlet extends HttpServlet {
     public void init(ServletConfig servletConfig) throws ServletException {
          super.init(servletConfig);
     public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
          PrintWriter out = response.getWriter();
          out.println("<html>");
          out.println("<head></head>");
          out.println("<body>hello, world");
          RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/servlet/com.test.SecondServlet");
          dispatcher.include(request, response);
          out.println("ok, let's finish");
          out.println("</body>");
          out.println("</html>");
          out.close();
package com.test;
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class SecondServlet extends HttpServlet {
     public void init(ServletConfig servletConfig) throws ServletException {
          super.init(servletConfig);
     public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
          PrintWriter out = response.getWriter();
          out.println("go, go, go");
}     Song xiaofei
Developer Technical Support
Sun Microsystems
http://www.sun.com/developers/support

Similar Messages

  • RequestDispatcher.include - can I read the included data ?

    Hi,
    I want to call RequestDispatcher.include inside my Servlet and I want to
    access the data that was included. Is this possible?
    Also, why cannot I use response.getOutputStream() when I use
    RequestDispatcher.include() afterwards, but can use response.getWriter() ?
    Thanks,
    Nik

    First, thanks for response. Second, does anybody know why I see those
    funky <br> when viewing messages???
    And back to the original topic: I believe now that I did not realize at first that whatever the other (included) servlet submits, might actually be written to the client by the time original servlet receives control back from call to include() .
    That's how J2EE is engineered. Thus it does not make sense to get a hold
    of the actual stream of data that is going to the client.
    So now I do not think it is worth doing what I planned originally.
    But the idea was to get the HTML portion of the page for which that included
    servlet is responsible and use this HTML for other needs.
    This can easily be done using HttpClient instead, but I was going to
    save some trouble instantiating this HttpClient by using include().
    Well, no such luck !!!
    Thanks,
    Nik

  • RequestDispatcher.include and "server-side" include

    I have the following code in a servletA. It will dispatch a servletB within the same webapp. As a result, response content of servletB is included to a original servlet's response. Then servletA can add more data to a response before data is sent back to a client.
    servletB is called from client-side as normal, and then inside the servletA.
    Problem and Question to You:
    If I call servletB within servletA, then responses of these two servlets are merged together. This is a problem here.
    How can I dispatch servletB >>but then do not want to include<< that response data, but skip it. Only the response of servletA should be sent back to a client?
    RequestDispatcher dispatcher =
      getServletContext().getRequestDispatcher("/servlet/testServlet?id=AA");
    dispatcher.include(
      new HttpServletRequestWrapper(env.getRequest()),
      new HttpServletResponseWrapper(env.getResponse())
    );

    Thx and yes, you got it right. Due to a (bad) design, I cannot separate a logic to a standalone bean from servletB and then use that bean. So, I must call it through a url-dispatcher.
    If I'm right, I cannot take a reference to servlets from SessionContext object due to a deprecated-and-not-implemented getServlet method.
    I was hoping, that using a WrapperXXXX class would solve my problem but it did not. I am not sure about why and when should one use that WrapperXXX classes anyway in a dispatcher calls.
    Anyone has a good ideas?

  • Where should RequestDispatcher.include() be used ?

    Hello again,
    I could not get the expected result from RequestDispatcher.include().
    First, I cannot use it to include static content; second, it does not include the dynamic contents in proper order.
    Now my question is, where can I use RequestDispatcher.include(), or should I use it at all ?
    The following are the source files and result on SunOne WebServer6.1 and Tomcat 5.5.12.
    IncludeDynamic.jsp
    <%@ page import="javax.servlet.RequestDispatcher" %>
    <html>
    <body>
         <h1>First partition</h1>
         <hr />
         <h2>
    <%
         RequestDispatcher rd = application.getRequestDispatcher("/jsp/IncludeHidden.jsp");
         rd.include(request, response);
    %>
         </h2>
    </body>
    </html>
    IncludeHidden.jsp
    Dynamic Inlcude Content
    The following is the HTML I get from the browser,
    Dynamic Inlcude Content
    <html>
    <body>
         <h1>First partition</h1>
         <hr />
         <h2>
         </h2>
    </body>
    </html>
    ----------------------------------------------------------------------------------------

    Try using
    <%@ include file="/jsp/IncludeHidden.jsp" %>
    instead of
    <% RequestDispatcher rd = application.getRequestDispatcher("/jsp/IncludeHidden.jsp"); rd.include(request, response); %>

  • Including JSPFs from Java Servlets[Solved]

    EDIT:
    After reading up a bit more on JSP Fragments I realized that they don't work from a Servlet environment. I should have researched a bit more before posting. By switching the files to JSPs, everything works perfectly.
    Original:
    Hopefully I can make this post make sense because there is very little code I can post in a public environment like this. Here goes nothing...
    I have a Servlet, that includes a JSP file using RequestDispatcher.include(). This JSP works fine, and it gets compiled and shown properly. In this "wrapper" jsp, there are multiple calls to various methods in a class which do things such as printing, and including more jspfs, based on the data stored in an XML file.
    For some reason, when including JSPFs from the java methods, the raw JSPF's content is being displayed, rather than a compiled version of the content.
    Here is an example JSPF:
    <%= "Content Coming from a JSPF" %>Here is the code that includes the JSPF:
    this.request.getRequestDispatcher(path).include(this.request, this.response);The JSPF shows up in the right spot and everything, but it's the raw JSPF content, not what it should be showing.
    Am I doing something wrong?
    Thanks,
    -Nivek98
    Message was edited by:
    nivek98

    Hi,
    I dont think you can directly do this
    tagLT %@ include file="/irj/go/km/docs/etc/public/mimes/PMIS/Static%20Contents/sample.html"% tagGT
    check what happens if you directly paste this URL in browser.
    Instead, you can create a KM Document iView from the HTML and paste the URL of the iView in the JSP. Or the best way is to create a page, assign the iViwe to the page and generate a short URL for the page and have this short URL in your include.
    You can check this for short URLs
    http://help.sap.com/saphelp_nw70/helpdata/EN/b3/7b8163404448e7aad7899c0b30313e/content.htm
    Srini
    Edited by: Sinivasan Rajamani on Feb 18, 2010 5:38 AM
    Edited by: Sinivasan Rajamani on Feb 18, 2010 5:36 PM

  • RequestDispatcher.include() silently ignores non-existent files?

              Hello there,
              I have a servlet that calls RequestDispatcher.include() to include another jsp.
              <pre>
              RequestDispatcher dispatcher = myServlet
              .getServletConfig().getServletContext()
              .getRequestDispatcher(jspName);
              // dispatch the jsp
              dispatcher.include(fRequest, fResponse);
              </pre>
              However, if the JSP is non-existent (not found in the file system), I get no exceptions
              and WL6.1sp2 seems to silently ignore it. I also do not see any errors in the WL
              log files. If the JSP does exist, then it loads up, and then if I subsequently
              delete it, I get an Exception as expected.
              Can anyone help with this? Is this a bug? Any help is appreciated!
              Thanks
              ravi
              SP - Please remove the 2 "##NO_SPAM##" strings in my address before replying, thanks!
              

    Check if SUNWhea (SunOS header files) package is in fact installed on your Solaris 9 machine.

  • RequestDispatcher.include causing some problem in Weblogic 9.1?

    I am migrating my application from web7.1. to 9.1.
              In some servlets, i am using the RequestDispatcher.include method to paste a relevant JSP content.
              When I access the servlets parameters values only after the requestDispatcherObject.include(req,res), the parameter values are returned as null.
              For eg.
              consider 2 parameter values , status,mode are present in a servlet, project.java.
              I am including project.jsp file inside this servlet.
              When I access the parameters only after the include statement, the values are returned as null, but when i access any one parameters before this statement, both the original parameter values are retained.
              i.e.
              /Project?status=disp&mode=true
              Inside <b>doGet</b> method of <b>Project .java</b>:
              <b>String mode=HttpServletRequest.getParameter("mode");
              RequestDispatcher reqdis=getServletConfig().getServletContext().getRequestDispatcher("/project.jsp");
              reqdis.include(req,res);
              String status=HttpServletRequest.getParameter("status");
              System.out.println("status "+status+"\nmode "+mode);</b>
              The above code prints the value
              <i>status</i> <b>disp</b>
              <i>mode</i> <b>true</b>
              However when we change the code as ,
              <b>RequestDispatcher reqdis=getServletConfig().getServletContext().getRequestDispatcher("/project.jsp");
              reqdis.include(req,res);
              String status=HttpServletRequest.getParameter("status");
              String mode=HttpServletRequest.getParameter("mode");
              System.out.println("status "+status+"\nmode "+mode);</b>
              the output is
              prints the value
              <i>status</i> <b>null</b>
              <i>mode</i> <b>null</b>
              Thsi problem occurs in weblogic 9.1, and is otherwise working fine in weblogic 7.
              Do I have to make code change in all instances where this problem occurs , or is there any common solution.
              Kindly help me solve this issue at the earliest

    I tried reproducing this, and I don't observe the same behavior. I get the same values (those specified in the URL) regardless of whether I retrieve them before or after the include (or mixed as in your example).
              There is only one way I can think this might happen. If you are using HTTP POST and using getInputStream() or getReader() to read the body of the request, you could affect things. This is mentioned in the servlet spec. This would fit with your behavior. If your servlet reads a parameter, WLS will parse the all the parameters and they stay read-only (you can't set parameters, only attributes). WLS will only parse on demand for performance reasons (no point if one isn't requested). Nothing the included page can do will affect the parameters, so you'd see both be set. If the servlet includes the JSP first and the JSP calls getInputStream() and reads all the data, then when the servlet gets a parameter and WLS attempts to parse the POST body, there is no data left to be read (because the JSP already read it). Thus, everything will be null.
              But, in your example, it appears you are using GET. It shouldn't be possible if the parameters are set as part of the URL. And indeed, I don't see it.
              Perhaps your example is a simplification? What is your include doing?

  • Do Apple have any plans to include Parental controls within Safari

    I was wondering if Apple have any plans to include parental controls withing Safari on the iPad going forward.
    It would be particularly useful if you could create a whitelist of websites that could be accessed without a PIN, and then beyond that you would need to enter your PIN to get to any websites not on the white list.
    So many kids games have click through's to YouTube videos, and they access YouTube via Safari rather than using the YouTube app so disabling the YouTube app doesn't help, and disabling Safari is overkill.
    Anyone heard anything?
    Cheers,
    Jocky

    Thanks OM. For what it's worth my son is only 5 so he's not really looking for mischief online quite yet - let alone hack past barriers I put up (I'm an IT security professional so he nights find he has a bigger challenge against his Dad than most kids when he gets a bit older / more inquisitive anyway ;)) . It's more to stop game click-throughs onto YouTube where he could suddenly find himself seeing something he can't 'unsee'.
    I've just disabled Safari for now and left my thoughts and suggestions with Apple via their feedback page :)
    Cheers,
    Jocky

  • Java Controls, JSPs, Servlets and Filters

    Hi, everybody.
    How can i invoke a custom java control from a JSP ?
    How can i invoke a custom java control from a Servlet or Filter ?
    I've tried using WlwProxy.create(controlInterfaceClass, request) but i don't know if this is the "official and recommended" way of do it. By the way, invocation is falling because Workshop is trying to find a .jcx file (i have only a .jcs).
    Thanks in advance.

    Hi Vimala.
    All the business logic of my project will be implemented as Java Controls (that's the reason of my questions about Controls' accessibility):
    1. From a JSP
    A) I can use netui tag <netui-data:callControl>
    B) I can call a page flow to execute Java Control and to populate http request (or session) within some Java Beans. After this, the JSP will "consume" these Java Beans.
    2. From init method of a startup Servlet
    I can't call a Java Control from here. Can i implement analogous feature using Builtin Timer Control ?
    3. From service (doGet/doPost) method of a "ordinary" Servlet
    I can call a page flow to execute Java Control and to populate http request (or session) within some Java Beans. After this, the Servlet will "consume" these Java Beans.
    4. From filter method of a Servlet Filter
    This is the "trickest" one, but i really need to access business logic from here.
    I've found an way (and i'm not proud of how i'm doing this):
    i) The filter will populate a request attribute within information about which method of which control will be executed. Method parameters values will be stored too;
    ii) The filter will "forward" request to a Page Flow, using a HttpServletRequestWrapper and a "dummy/empty" HttpServletResponseWrapper. This is really odd. I'm not sure if a filter should try to "forward" or to "include" another webapp resources. When doing this, you should be aware about issues like "recursion" and configurations like filter-dispatched-requests-enabled (http://edocs.bea.com/wls/docs90/webapp/progservlet.html#160016);
    iii) The Page Flow will receive the new request, "unpack" invocation data, execute appropriate Java Control, "pack" the result in the http request and forward to an "empty" JSP;
    iv) The "execution control" will be returned to the filter. This filter will "discard" the contents of HttpServletResponseWrapper, "unpack" the result data out of the http request and use it.
    To "hide" all this mess of my filters and Page Flows, the filters will use a "dynamic proxy" to act as "Page Flow clients" (this proxy will look like as an ordinary Java Control to my filters). The Page Flows will use an helper class to store Java Controls (at onCreate lifecycle method), to use them (at begin method) and to discard/release them (at onDestroy lifecycle method).
    I've tested this and it has worked. I'm not sure about performance and multithread behaviour of this solution.
    I'm accepting any suggestion (official or "unofficial") about how to make this easier.
    Thanks !!!
    Sample code:
    == JavaControlClientProxy.java ==
    public Object invoke(Object proxy, Method method, Object[] parameters)
        throws Throwable {
        Object result = null;
        if (LOG.isDebugEnabled()) {
            LOG.debug("before: " + method.getName());
        try {
            HttpServletRequestWrapper newRequest =
                 new HttpServletRequestWrapper(this.request);
            HttpServletResponseWrapper newResponse =
                 new HttpServletResponseWrapper(this.response);
            InvocationData invocationData = new InvocationData();
            invocationData.setCaller(this.javaControlCaller);
            invocationData.setTarget(this.javaControlInterface);
            invocationData.setTargetMethod(method);
            invocationData.setParameters(parameters);
            newRequest.setAttribute(InvocationData.ATT_NAME, invocationData);
            try {
                RequestDispatcher dispatcher = this.request
                    .getRequestDispatcher(this.javaControlServerPath);
                /* include doesn't work (.jpf ?) */
                dispatcher.forward(newRequest, newResponse);
                invocationData = (InvocationData) newRequest
                    .getAttribute(InvocationData.ATT_NAME);
                if (invocationData.getException() != null) {
                    throw invocationData.getException();
                } else {
                    if (invocationData.getReturnValue() != null) {
                        result = invocationData.getReturnValue();
            } finally {
                newResponse.getWriter().close();
                newResponse.getOutputStream().close();
            return result;
        } finally {
            if (LOG.isDebugEnabled()) {
                LOG.debug("after: " + method.getName());
    }== ControlCallController.jpf ==
    * This method represents the point of entry into the pageflow
    * @jpf:action
    * @jpf:forward name="success" path="empty.jsp"
    protected Forward begin()
        try {
            this.controlServer.execute(getRequest());
        } catch (IllegalArgumentException e) {
            try {
                /* Avoid external access to this resource. */
                getResponse().sendError(HttpServletResponse.SC_NOT_FOUND);
            } catch (IOException e1) {
                throw new UnhandledException(e1);
            throw e;
        return new Forward("success");
    protected void onCreate() throws Exception {
        super.onCreate();
        this.controlServer = new JavaControlServer();
        this.controlServer.addControl(MyControl1.class, this.myControl1);
        this.controlServer.addControl(MyControl2.class, this.myControl2);
    protected void onDestroy(HttpSession arg0) {
        this.controlServer = null;
        super.onDestroy(arg0);
    }== JavaControlServer.java ==
    public void execute(final HttpServletRequest request)
        throws IllegalArgumentException {
        InvocationData invocationData = (InvocationData) request
            .getAttribute(InvocationData.ATT_NAME);
        if (LOG.isDebugEnabled()) {
            LOG.debug("InvocationData " + invocationData + ".");
        if (invocationData == null) {
            throw new IllegalArgumentException("Http request doesn't contain "
                                               + InvocationData.ATT_NAME + ".");
        Control targetControl = (Control) this.controlMap.get(invocationData
                                                              .getTarget());
        if (targetControl == null) {
            throw new IllegalArgumentException("Missing control "
                                               + invocationData.getTarget() + ".");
        Method method = invocationData.getTargetMethod();
        try {
            Object returnValue = method.invoke(targetControl, invocationData
                                               .getParameters());
            invocationData.setReturnValue(returnValue);
        } catch (IllegalArgumentException e) {
            LOG.error("Could not invoke method", e);
            throw new UnhandledException(e);
        } catch (IllegalAccessException e) {
            LOG.error("Could not invoke method", e);
            throw new UnhandledException(e);
        } catch (InvocationTargetException e) {
            LOG.debug("An error has ocurred when invoking method", e);
            invocationData.setException(e.getCause());
        request.setAttribute(InvocationData.ATT_NAME, invocationData);
    }

  • Include jsp page within servlet

    Hi,
    How an external jsp or html page can be included within a servlet.
    like, One servlet is including different pages within it's body based
    different condition and arggument passed to it.
    Hope for your help.
    Thank you.

    Thank You for your help.
    I have sucessfully slove the problem. I am awarding you full 10 duke
    dollors for it. I have anthoer problem about applets is listed in
    Applet devlopment under 'Applet to access html controll' title.Please
    visit that if you like to participate.
    For ee8prt, i had same problem as i was using jsdk2.0 which dont have the despatcher class. user higher jsdk.
    Happy coding.

  • How to "include" another page or servlet in a standard servlet

    How can I achieve a "include" in a servlet?
    From what I see... the include() method is on the PageContext class, which is in org.apache.somewhere... right??
    Or am I missing something?
    thanks

    How can I achieve a "include" in a servlet?
    From what I see... the include() method is on the
    PageContext class, which is in org.apache.somewhere...
    right??
    Or am I missing something?
    thankshttp://java.sun.com/webservices/docs/1.0/api/javax/servlet/RequestDispatcher.html#include(javax.servlet.ServletRequest,%20javax.servlet.ServletResponse)

  • Include html file into servlet

    Hi.
    I try to include an static html into my servlet application.
    example.
    booolean var=false
    HttpServletResponse resp;
    if(var)resp.print("head.html");
    else resp.print("other.html")is there anyway to do it??
    thaks...

    String target = "";
    if(var)
    target = "head.html";
    else
    target = "other.html";
    RequestDispatcher rd;
    rd = getServletContext().getRequestDispatcher(target);
    rd.forward(_req, _res);                                                                                                                                                                                                                                                                                                                                                                                                           

  • RequestDispatcher.include (Sorry for double-post)

    My apologies for the double-post, but the original subject was badly named.
    My goal is to process a JSP as an include, within a portlet, but not render it as part of the portlet page.
    With Tomcat and Struts I can perform an include and easily view the HTML that was generated via my HttpServletResponseWrapper. Here is some sample code:
    RequestDispatcher dispatcher = request.getRequestDispatcher("/portlets/test/test.jsp");
    if (dispatcher != null) {
    StringWrapper wrapper = new StringWrapper(response);
    dispatcher.include(request, wrapper);
    response.setContentType("text/html; charset=UTF-8");
    response.setHeader("Content-disposition", "attachment;filename=include.html");
    response.setHeader("Cache-Control,", "no-cache");
    PrintWriter pw = wrapper.getWriter();
    pw.write(wrapper.toString());
    pw.close();
    I'm calling this from a Struts DispatchAction that was initiated by a pageflow action so I do not have to return a forward. This has worked perfectly in the Tomcat environment and I'm trying to figure out a clean way to do the same under Weblogic.
    If Weblogic insists on rendering the entire response, I can deal with that, provided I have some way to get at and modify the HTML prior to leaving the DispatchAction method.
    Any ideas?
    Thanks.

    Your use case is not very clear to me -
    a. What do you mean by "but not render it as part of the portlet page"?
    Are you trying to render this with out the portal aggregating it? If so,
    you should use a redirect.
    b. Secondly, your sample code below may not work correctly (even in
    Tomcat). You are setting content-type, content-disposition etc after
    doing an include. You should be doing before, so that the headers will
    get written to it.
    My guess is that you are trying to provide a download link. The easiest
    way to accomplish this is to do it outside a portlet (like a stand-alone
    struts action), and just create a link to that from your portlet.
    HTH.
    Subbu
    Christopher DeBracy wrote:
    My apologies for the double-post, but the original subject was badly named.
    My goal is to process a JSP as an include, within a portlet, but not render it as part of the portlet page.
    With Tomcat and Struts I can perform an include and easily view the HTML that was generated via my HttpServletResponseWrapper. Here is some sample code:
    RequestDispatcher dispatcher = request.getRequestDispatcher("/portlets/test/test.jsp");
    if (dispatcher != null) {
    StringWrapper wrapper = new StringWrapper(response);
    dispatcher.include(request, wrapper);
    response.setContentType("text/html; charset=UTF-8");
    response.setHeader("Content-disposition", "attachment;filename=include.html");
    response.setHeader("Cache-Control,", "no-cache");
    PrintWriter pw = wrapper.getWriter();
    pw.write(wrapper.toString());
    pw.close();
    I'm calling this from a Struts DispatchAction that was initiated by a pageflow action so I do not have to return a forward. This has worked perfectly in the Tomcat environment and I'm trying to figure out a clean way to do the same under Weblogic.
    If Weblogic insists on rendering the entire response, I can deal with that, provided I have some way to get at and modify the HTML prior to leaving the DispatchAction method.
    Any ideas?
    Thanks.

  • How can we pass the control from servlet to portlet ?

    Hi,
    we use PortletRequestDispatcher.include method to call the servlet.
    In my servlet, I have the following form information.
    out.println("<form method=\"post\" action=\"http://abc 40acce5.3a.com/portal/dt?display=Command\">");
    out.println("Enter value: ");
    out.println("<input type=\"text\" name=\"UserName\" value=\"\">");
    out.println("<center> "); out.println("<input type=\"submit\" value=\"Go Back Portlet\"> ");
    out.println("</center> ");
    out.println("</form>");
    When user click the submit button, the servlet will go to portlet first, then go to another page.
    is the url (action="http://abc40acce5.3a.com/portal/dt?display=Command) correct ?
    if not, what url we should use ?
    Can you help ?
    Thanks!

    Oh I thought that you have selection-screen and again you are working on dialog programming.
    if you want to use select-option directly in module pool then it is not possible.
    but you can do other way.
    create two varaiables
    data : v_kun_low like kna1-kunnr,
             v_kun_high like kna1-kunnr.
    use these two variables in layout ,let user knows that he can not give options like gt,lt,eq ,it will be always BT.
    and also when you see normal report program,you can use multiple values in either low or high,but here it is not possibel.
    use can enter only low value and high value.
    when you come to program point of view
    declare one range
    ranges r_kunnr for kna1-kunnr.
    do the coding like
    r_kunnr-low = v_kun_low.
    r_kunnr-high = v_kun_high.
    r_kunnr-options = 'BT'.
    r_kunnr-sign = 'I'.
    append r_kunnr.
    now you can use r_kunnr in select query ,it will work like select-option.
    other than this there is no option.
    Thanks
    Seshu

  • Code include from database through servlet into jsp

    Hi all,
    Im alittle stuck at the moment. I need to store code in a database that will be retrieved and displayed on a webpage. I know how to retrieve the information and display it if it is just normal data. The data in the database will be html along with java code that has to be included into the jsp page. Im doing the retrieve in a java bean and the servlet uses that bean to pass the information to the jsp.
    How can i include to code into the jsp so that it doesnt show as text but is included into the jsp?? Is this possible??
    Niall

    Hi,
    If you are storing Java code in your database (a Java class file), perhaps you could use class loader and 1) retrieve your code as regular file, 2) use class loader to load it, 3) run methods from your newly created class.
    Maybe you can write some sample code that loads any class from a file and calls methods on it, then you could modify that code and fit it in your servlet/JSP code.
    Mark

Maybe you are looking for

  • Error in printing a standard smartform (LE_SHP_DELNOTE)

    Hi, I'm supposed to copy a standard form for delivery note (LE_SHP_DELNOTE), the problem is, I'm trying to print preview the standard form but it's resulting in an error :  <b> Exception       FORMATTING_ERROR Message ID:          SSFCOMPOSER Message

  • How do I make my wireless internet password protected?

    I set up my wireless router and went to the 192.168.1.1 to set up everything. But how do I make it password protected, so unwanted people can't access my wireless internet? I did it before but can't figure it out again, haha. I went to Wireless>>>Wir

  • A way of making window look transparent

    I'm using the following method to make a window look transparent: whenever a frame is moved, it makes a screenshot of the underliying area and displays it as its background but, unfortunately, this doen't work in this example ???? public class MyFram

  • How to, add new lines under 'Phrase' in keyboard shortcuts

    Hi, new owner of a 4s and need to be able to add several lines such as an address to the 'phrase' box in keyboard shortcuts.  If i hit return it takes me to the 'Shortcut' box. I need to create many of these shortcuts so using signature is not going

  • Compilation error: Package not found

    HI, My question is : In my class I import these packages: import borland.jbcl.control.*; import com.sun.java.swing.*; When I compile the class from jbuilder it compile successfully , but when I compile it from ms-dos I get errors in the compile procc