Results 1 to 2 of 2
  1. #1
    sdkrp is offline Member
    Join Date
    Sep 2013
    Posts
    4
    Rep Power
    0

    Default Call Server side servlet

    Hi Everyone,

    I am trying to call Server side servlet from servlet available is on my machine.

    please refer the attached file, that error i have received while executing the servlet.

    please do the needful.

    Following Servlet is on mine.

    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException
    {

    doGet(request, response);
    }
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException {

    try
    {
    urlipaddnew =request.getParameter("urlipaddnew");
    sys.out("coming inside urlipaddnew-------------------------------------"+urlipaddnew);
    RequestDispatcher rd = getServletContext().getRequestDispatcher("/http://server:8080/NewItemCode_07092013_UserHistoryInfo/servlet/admin.AccessRights");
    rd.forward(request,response);
    sys.out(" after forwaded-------------------------------------"+rd);


    }
    catch (Throwable t) {
    throw new ServletException(t);
    }

    JavaScript code to call this servlet is follwing

    ajax("althidden$a","../../servlet/admin.CallAccessRights?urlipaddnew="+urlipaddnew);


    what's the issue. please help me to cleared out.

    Thanks,
    Dhanushkodi
    Attached Thumbnails Attached Thumbnails Call Server  side servlet-servleterror.jpg  

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,014
    Rep Power
    20

    Default Re: Call Server side servlet

    You can only forward to something inside the same server.
    Where is this other servlet in relation to the one shown?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Replies: 1
    Last Post: 03-07-2013, 09:32 AM
  2. Client-side or server-side XML parsing?
    By noodle_variation_187-X in forum JavaServer Pages (JSP) and JSTL
    Replies: 11
    Last Post: 05-31-2012, 09:06 AM
  3. Server side project
    By tj_wolf2 in forum New To Java
    Replies: 0
    Last Post: 03-14-2011, 03:23 PM
  4. how to countdown on server side
    By BigBear in forum Java Servlet
    Replies: 3
    Last Post: 04-26-2010, 10:33 PM
  5. Replies: 1
    Last Post: 03-20-2010, 07:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •