Forwarding requests with JServ

I have written a servlet that I would like to forward a request to a new page after doing some processing. However, I get ClassNotFound/MethodNotFound exceptions from JServ. I checked the documentation and found that JServ only supports the 2.0 Servlet Specification and I figure the RequestDispatcher interfaces I am trying to use are part of the Servlet 2.1 or 2.2 specification. I tried to set up Apache to run Tomcat, but I must have done something wrong in the setup because when I try to start Tomcat/Apache, Apache bails. Is there another way to get around this, so that my JSPs and servlet do what I want them to do. Also, does anyone know what/where mod_ose is and where/how to get it and make it run with Apache.
Any help will be greatly appreciated.

Hi you can use Odyssy calasses(cos.jar) to call the Servlet/Jsp from servlet. Thease classes are build on top of Servlet API 2.0. This is just for now. In the upcomming version Apache Jserv comming with servlet API 2.2.
mod_oes is having Oeacle build servlet engine support fully Servlet API 2.2.

Similar Messages

  • Forward a request with post data to another webApp

    Hello,
    I have a servlet that recieves data by post. I need to forward that request with the same info it recieves to another webApp in a different EAR
    I know it is possible to forward that request to another servlet in the same webapp, how to do that but to a different webApp in post method (No get method, do no sendRedirect)?
    Thanks.
    Jean-Philippe

    ServletContext otherContext =
    context.getContext("/otherWebApp");
    RequestDispatcher dispatcher =
    otherContext.getRequestDispatcher("/otherServlet");
    dispatcher.forward(request, response);Interesting. If I read this correctly you CAN actually use RequestDispatcher.forward() to redirect a user after they've contacted the web-server? i.e. Using the otherContext will cause the response that the web-server generates to come from /otherWebApp? That's cool...
    Brian

  • Forwarding a request with a EFFECT

    can anyone help me on how to forward a request to a jsp from a servlet. I wanna the jsp file name to be seen on the web address bar and not the servlet name.
    this is how i do the forwarding inside the servlet
    request.setAttribute("jCustomer", custBean);
    request.getRequestDispatcher("CreateAccount.jsp").forward(request, response);and this will appears on my address bar"http://localhost:8000/createAccountApp/JunYong'sServlet"
    but can i have something like this "http://localhost:8000/createAccountApp/CreateAccount.jsp"
    to make things clearly, when i clicks on Post New Question, i will be brought to this webaddress
    "http://forum.java.sun.com/post.jsp" then i put in my queries. After i finsihed writing and clicks on Preview button, I am brought to another webaddress
    "http://forum.java.sun.com/preview.jsp". Therefore, I as a user can see clearly where i am brought to and this is the effect i want to achieve.
    So anyone want to help me on this?
    Thanks sincerely

    i tried your method and it works, the jsp name is displayed on the web address. but i think you get me wrong perhaps i didn't elaborate well enough.
    1--> In simple words, the client first came to this jsp named "CreateAccount.jsp".
    2--> He/she then enters their particulars and later clicks on the submit button when they are done.
    3--> This jsp will follws the form action and came to this servlet.
    4--> The servlet will do some processing on the data and lastly passed the results back to the client on the same jsp, "CreateAccount.jsp".
    5--> Before sending, the servlet will set a javabean as an attribute req.setAttribute("jCustomer", custBean) and forwards it. req.getRequestDispatcher("CreateAccount.jsp").forward(req, res)6--> Back to the jsp, on the lower potion, the results are retrieved and displayed from that same javabean passed by the servlet.
    I did use this method as suggested by jackychow "res.sendRedirect("CreateAccount.jsp")". It works as the jsp name are displayed on the web address bar. However, the javabean, "jCustomer" were not set because HttpResponse have no setAttribute() like the HttpRequest. This causes the result not to be displayed on "CreateAccount.jsp".
    My ideal scenario is to dispaly the jsp name onto the webaddress bar and to retrieve information from the same javebean set by the servlet. Is is possible for this to be done on the same jsp???? :-]

  • Libproxy.so eat out the last past of my request with space in the name

    Hi,
    I used the following 2 configurations:
    1. Solaris: iPlanet Web Server WebLogic 6.1
    2. W2000: IIS WebLogic 6.1
    Both of the web server just work as a gateway. All static and dynamic pages (images, JavaScript file, CSS file) are served by the WebLogic Server. (This sounds a little bit wierd. So we dropped this kind of configuration already.)
    I configured both the Web server to forward all requests with "*/portal/*" to WebLogic server. It works fine except the requests with space inside. For example:
    http://localhost:8080/portal/abc def.html
    (I encode space to when I type it in browser).
    And I got a 404 error. (The file is really there.) And I checked both web server's access log, I saw the request for "abc def.html", but when I checked WebLogic's access log, I saw the request for "abc". So I think Weblogic's proxy eats out the last part of my request: "def.html". Of course, WebLogic server could not find a file called "abc" in that directory.
    And finally, in order to test my observation, I created a file called "abc" in that directory. And then the browser shows the content of the file "abc".
    Does anyone see this kind of problem before? I think this is a bug in weblogic's proxy program.

    Hi.
    Are you seeing this in both configurations (ie both iPlanet and IIS)?
    Does the problem go away entirely when you hit the servers directly (ie iPlanet and IIS aren't involved)?
    Are you running any service packs? You should be using service pack 2. If you are not please upgrade and use the plugin from this latest service pack.
    Regards,
    Michael
    Xin Liu wrote:
    Hi,
    I used the following 2 configurations:
    1. Solaris: iPlanet Web Server WebLogic 6.1
    2. W2000: IIS WebLogic 6.1
    Both of the web server just work as a gateway. All static and dynamic pages (images, JavaScript file, CSS file) are served by the WebLogic Server. (This sounds a little bit wierd. So we dropped this kind of configuration already.)
    I configured both the Web server to forward all requests with "*/portal/*" to WebLogic server. It works fine except the requests with space inside. For example:
    http://localhost:8080/portal/abc def.html
    (I encode space to when I type it in browser).
    And I got a 404 error. (The file is really there.) And I checked both web server's access log, I saw the request for "abc def.html", but when I checked WebLogic's access log, I saw the request for "abc". So I think Weblogic's proxy eats out the last part of my request: "def.html". Of course, WebLogic server could not find a file called "abc" in that directory.
    And finally, in order to test my observation, I created a file called "abc" in that directory. And then the browser shows the content of the file "abc".
    Does anyone see this kind of problem before? I think this is a bug in weblogic's proxy program.--
    Michael Young
    Developer Relations Engineer
    BEA Support

  • Forwarding requests to multiple weblogic servers

    Hi,
    I have two applications running on two different Weblogic servers and wish to
    use one Apache web server as a front end interface. I can forward the requests
    from apache to one weblogic server using apache-weblogic bridge.
    Is it possible to forward requests to either one of the weblogic servers based
    on some conditions?
    How do we put IF/ELSE IF type constructs in apache configuration file so that
    it can get requests for both the weblogic servers and then forward the request
    to one of the weblogic servers ? Conditions can be anything like some particular
    path, some data in request header, some constant in apache conf file etc
    Thanks in advance.
    Mandar

    Issue:
    How can IIS 4 or IIS 5 be setup to proxy from one IIS server to
    multiple WLS servers.
    For example:
    http://iisserver/myapp --> proxy http://wls1:7001/test
    http://iisserver/myapp2 --> proxy http://wls2:7001/test
    Resolution:
    Proxying to different weblogic instances with one IIS Server can be
    accomplished by using IIS Virtual Directories.
    a) Create a Web site and two virtual directories for it.
    b) Create two directories for the two virtual directories and copy
    iisproxy.dll to each of the directories.
    c) Create iisproxy.ini files in each directory created at step b. One
    for proxying to WebLogic Server A and another for WebLogic Server B.
    d) Register each iisproxy.dll to each of the virtual directories with
    IIS by specifying the appropriate mime-type. If you want to proxy everything
    for that virtual directory, then you will specify a mime-type of *.
    Please note that specifying a mime-type of * will not work with IIS 4.
    e) Make sure you set the Application Protection to HIGH for each
    Virtual Directory.
    Attachments:
    No Attachments Available
    "PacoG" <[email protected]> wrote in message
    news:40c6eb20$1@mktnews1...
    >
    try {
    NewsRefresh nrefresh=NewsRefreshFactory.getInstance("Please");
    nrefresh.execute("HELP");
    } catch (Exception allexceptions) {
    throw new IKnowIKnowException("Linux+Apache");

  • Using forward(request, response) in Java Servlet

    Hi
    I need help on how to use the forward() method in a java servlet passing a List object and riderecting to another jsp.
    when I use the following code;
    request.getRequestDispatcher(path).forward(request, response);
    I'm getting this message:
    Content modified /content...
    Status
    200
    Message
    OK
    Location
    /content...
    Parent Location
    /content
    Path
    /content...
    Referer
    Thanks,

    Looking at your traces seems like you are forwarding during POST. Seems like issue with your component implementation missing with POST & proxy scripts. Please eloborate more on the exact steps you are following. Alternatively See if this helps.
    org.apache.sling.api.wrappers.SlingHttpServletRequestWrapper req =
    new org.apache.sling.api.wrappers.SlingHttpServletRequestWrapper(slingRequest) {
    public String getMethod() {
    return "GET";
    String path = "/content/.../test.html";
    javax.servlet.RequestDispatcher dispatcher = slingRequest.getRequestDispatcher(path);
    dispatcher.include(req, slingResponse);

  • Parameter passing and forwarding issues with 10.1.4 JSR 168 portlets

    Hi,
    I'm using version 10.1.4 version of Oracle Portal Server, and am trying to move a JSP web application to a JSR 168 compliant portlet.
    I am experiencing these issues:
    1. There are <form> tags in my JSPs. I've set the action attribute to "<portlet:actionURL>". This works okay and I can see the parameters in my processAction properly. However, if I modify the action attribute to "<portlet:renderURL>", I do not see any parameters in my doView(). Is this expected or a known bug?
    2. As a workaround of the issue #1, in my processAction, I'm using response.setRenderParameter(). This works but has a serious side effect: the first set of values set are set permanently for the session. Subsequent submissions of my JSP fail to alter the values. Is this expected? This problem is not there if setRenderParameter() is not used.
    3. My JSPs use request.setAttribute() and request.getSession().setAttribute(). I don't see these attributes in my processAction using request.getAttributeNames(). Is there another way of retrieving them?
    4. In my JSP, I have this code in a method declaration:
    String forwardPage = "hello.jsp";
    RequestDispatcher forwarder = request.getSession().getServletContext().getRequestDispatcher(forwardPage);
    forwarder.forward(request, response);
    This results in an exception on the server:
         06/05/07 00:25:10 AnupamPortlets: JspServlet: unable to dispatch to requested page: java.lang.NullPointerException
         at com.evermind.server.http.HttpApplication.isLegalFileSystemPath(HttpApplication.java:1298)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:502)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:253)
         at opportunity_detail____contacts__view._Controller.processRequest(_Controller.java:2516)
         at opportunity_detail____contacts__view._Controller._jspService(_Controller.java:2592)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
         at com.evermind.server.http.ServletRequestDispatcher.include(ServletRequestDispatcher.java:121)
         at oracle.webdb.wsrp.server.RequestDispatcherImpl.include(Unknown Source)
         at mypackage1.Portlet1.doView(Portlet1.java:158)
    I've tried moving the page around and using request.getContextPath() and getNamedDispatcher(), but same error.
    This is supported, right? I saw some old messages about this being a bug on the PDK side.
    Actually, using forwarder.include() works, but causes other issues
    Any ideas what I can try of any of these will be greatly appreciated. Thanks.

    Hi Anupam,
    I can help you with question #2.
    2. As a workaround of the issue #1, in my processAction, I'm using response.setRenderParameter(). This works but has a serious side effect: the first set of values set are set permanently for the session. Subsequent submissions of my JSP fail to alter the values. Is this expected? This problem is not there if setRenderParameter() is not used.
    I believe that the issue is an artifact of the interpretation of the JSR-168 specification by Oracle. I discovered that the setRenderParameter basically ends up sending a redirect back to the browser with the render parameters in the URL. This raised security concerns as you may have wanted to pass some sort of internal data from your action to your render request. The parameters in the url "hang around" once they are there so your portlet keeps recieving them. Based on this behavior I have decided to not use setRenderParameter in Oracle portal.
    -sean
    Solutions Architect
    www.sagelogix.com

  • Servlets and forward(request, response)

    I have a Servlet that is forwarding the request and response objects to one of two JSP's based upon a parameter in the request object. When opening a browser session and entering my servlet with the first parameter (opCorp=MBSUB) the /criteriaRM.jsp is displayed correctly. However, while still in the same browser session when re-entering the servlet with the parameter changed to opCorp=NEW the second JSP /criteriaPL.jsp is never called correctly - ie the page does not load. However, entering the application with a new browser session works fine (opCorp=NEW loads /criteriaPL.jsp in a brand new browser session) - so I know the second JSP is good and the forward syntax OK. Is there something I am missing? I am using the following code in my servlet
                   if (request.getParameter("opCorp").compareTo("MBSUB")==0) {
                        getServletConfig().getServletContext().getRequestDispatcher("/criteriaRM.jsp").forward(request, response);
                   } else {
                        getServletConfig().getServletContext().getRequestDispatcher("/criteriaPL.jsp").forward(request, response);                    
    Any ideas would be much appreciated. Thanks!!

    Ok, your jsp isn't loded but what else does happen then ? Any exception thrown ? Page not found message ?...

  • Unable to forward requests from webserver

    I am trying to set-up iWS 6.0sp4 to forward requests to the application server but I always get not found as the webserver is just looking at its own document root. I have deployed the fortune ear (from 6.5) and can access that via the application servers own http server perfectly well. I have added the plugin package to the webserver and added the following into the magnus.conf
    Init fn="load-modules" shlib="<install_dir>/lib/webserver-plugin/solaris/iws/libpassthrough.so" funcs="init-passthrough,auth-passthrough,check-passthrough,service-passthrough" NativeThread="no"
    Init fn="init-passthrough"
    and to the obj.conf
    NameTrans fn="assign-name" from="(fortune/fortune/*)" name="passthrough"
    NameTrans fn="assign-name" from="(fortune/*)" name="passthrough"
    ObjectType fn="force-type" type="magnus-internal/passthrough"
    Service type="magnus-internal/passthrough" fn="service-passthrough" servers="http://<application server http listener>"
    Error reason="Bad Gateway" fn="send-error" uri="$docroot/badgateway.html"
    </Object>
    The webserver starts up without any errors but never forwards any requests what might I be doing wrong?

    I followed the instructions found in the App Server 7 documentation and everything worked fine.
    The instructions I followed are in the document found at this link:
    http://docs.sun.com/source/816-7156-10/agplugin.html#17655
    Just FYI...
    I also checked with Sun about why this process is now necessary and I asked about what happened to the web connector from 6.x. Sun had this reply:
    The Web Server Plug-in is the new web connector. It just hasn't been wrapped with an installation yet ... which is why it is tedious. The old Plug-in for 6.5 would ultimately have the same type of obj.conf entries. I'm not sure if there will be an installation wrapper for it once the Enterprise Edition is released.
    The Web Server Plug-in is different right now in that it doesn't 'know' about multiple instances yet. These are capabilities that will be introduced in the Enterprise Edition in March. Of course, that doesn't stop you from having multiple instances of the web server talking to multiple instances of the app server. It just means that the web server instances have to be directed to the app server instances rather than discovering them.

  • Does DNS server cache forwarded request responses?

    Hi,
    Please excuse my ignorance.  I am new to OSX Server and DNS.  I setup OSX Server on my Mountain Lion system and configured the DNS server.  It forwards requests which it cannot resolve to my service provider's DNS.
    I am wondering if the responses to those forwarded requests are cached by the OSX Server so that the next time a request comes through they can be handled locally?
    If they are, is there a way I can see what the DNS server has cached?
    Thanks.

    There are caches all over.
    OS X client caches DNS responses.
    See the command-line dscacheutil tool for poking around with that. 
    OS X Server DNS server also caches responses. 
    The BIND9 rndc tool is used for poking around in the ISC BIND9 DNS server, as is included with OS X Server.
    sudo rndc -p 54 dumpdb -all
    TCP port 54 is the management port used by default in the OS X Server version I've checked, where other installations of BIND9 will use TCP port 953 for that.  To confirm the port, go have a look at the named.conf file for the "control" declaration.  That file is usually either in /etc/named.conf, or it can be stored in /library/server/named in some OS X Server versions.  Once the rndc command completes, go look in the directory where named.conf resides for the file named named_dump.db.  That's a text file with the dump.
    If you want to learn the innards of DNS as implemented by recent ISC BIND servers, acquire a copy of Cricket Liu's DNS and BIND book.  The 5th edition was current, when last I checked.
    Barring cases where the upstream provider offers DNS-based filtering or such, forwarding requests is usually an extra hop in the DNS translations that — unless you're hitting the same domains as other folks on your server — might not pay off.  If the translation isn't in the ISP's DNS caches, then the usual series of queries of other root and authoritative DNS servers will ensue; you've added a hop. 
    If you do want to use a gonzo-scale DNS server as a forwarding server — I'd expect higher-scale and larger caches and likely also higher-availability than what most any other ISP is likely running — then Google DNS servers are available at 8.8.8.8 and 8.8.4.4.
    Or just eliminate the forwarding servers.

  • Forward request in administration mode

    Dear Experts,
    I'm facing issue regarding forward request in administration mode i.e when i try to forward any request in administration mode to other user, it is giving me following errors.
    This operation is not allowed in admin mode; use regular Forward instead
    Request approval failed; error in MSMP approval method
    PFB the error snapshot.
    Can any one let me know why in admin mode i cannot forward request and as an approver i  can forward request?
    Need some justifications
    Thanks
    KH

    Hi,
    Issue resolved by Ref SAP Note #1741165 .
    PS : By default, we have made forward with return = X in standard component.
    Thanks
    KH

  • Match downpayment request with payments through F-53

    Hello,
    Our client makes downpayment request in F-47 and then makes payment (invoice-based) through F-53 or F110.
    How can we match the downpayment request with the payment made if it is not through F-48?
    Thanks in advance....

    Hi,
    Request is as good as maintaining our communication to the vendor.
    Its only when the actual payment is done, that a down payment is posted.
    Only then it would affect the accounts. Hence until its posted thru F-48, its not affected.
    You can post F-47 and do a F110 run which would do a posting in F-48.
    Later a payment run can be done again thru F110.
    Caio
    Raghu

  • How to add a new parameter to a forwarded request?

    Hi all,
    I have a RequestDispatcher that forwards my request into a servlet. However, if some processing error happens I would like to include another parameter (an error message) in my request being forwarded. Oh, yes, I don't want it to be via GET, but via POST.
    So, this
    getServletContext().getRequestDispatcher("/ProcServlet?message=nonononononon").forward(request, response);will not serve for my purposes. Also, I don't want to go into directly writing my new parameter into the outputstream... is there another way to do that via the Servlet/JSP API?
    Thank you all in advance,
    Filipe Fedalto

    ???

  • Message V1478 - Credit memo request with reference to an invoice

    Dear all,
    Creating a credit memo request with reference to an invoice, I get the following message "Material in item 000060 does not exist in plant/storage location".
    Of course, this material exists in the plant and the storage location, as we could create the invoice without any problem.
    Any idea?
    Best regards,
    Iné

    Hello
    Generally, these errors may appear due to:
    - The plant is marked for deletion.
    - The plant should be copied from the referenced item.
    So, I would suggest you to
    - Check copying control for Invoice to Credit memo request, particularly, item.
    - Try and create Credit Memo Request with reference to sales order.
    - Or if you want rectify a invoice, then use invoice coreection request.
    Thanks & Regards
    JP

  • Creating a debit memo request with reference to an invoice

    Hi,
    An invoice shows wrong MWST value because of incorrect customer tax classification as Tax exempt. I corrected the cust tax classification to "Liable for Tax". Then I tried to create a debit memo request with reference to the incorrect invoice. Thats a requirement by the customer. Invoices with incorrect VAT are not to be cancelled. A specially created VAT only sales order (Debit memo request) is used to create a sales order with 0 net value and correct MWST . But while trying to create the debit memo request, the system picks up the same old condition record for the MWST. How to overcome this situation ?
    The copy control for the item category from billing doc to debit memo request is set to "B" that is  new pricing. I even tried to update pricing. But it does not work. Changing the Service rendered date or the pricing date to current date also does not help.
    Please help.
    Regards.

    This is working fine. What I did was
    1: create a new pricing procedure
    2: made the PR00 condition statistical
    3: using a routine calculate the MWST based on the PR00. But PR00 itself does not contribute to the net value. This part is working fine. I could create debit memos successfully.
    The problem is if we change either the customer or the material tax classification after creating the invoice, and then create a debit request with reference to the incorrect invoice, the system still considers the old tax classfication and therefore the old MWST rate. If I create a debit request without reference, the new rate is applicable.
    I hope I have made clear.
    Regards.

Maybe you are looking for