Java Help - Servlets

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rose Girl

    Java Help - Servlets

    Hi

    I am using the response.sendRe direct(url) method. url is path to
    another servlet. Example:

    response.sendRe direct(response .encodeRedirect URL
    ("/EcBugManager/servlet/bugmanager.bugm anager.gui.Bugs heetPage?
    type="+bugsheet Type+"&page="+p age);

    I am using the response.encode RedirectURL to encode the url as i dont
    want the parameters to be seen in the explorer - address bar.

    ?? But nothing happens, it just returns the same string with all the
    paramteers without being encoded.

    Am i using the correct way to encode the url, or is there another way
    to do it.

    Please, help me on this
    Thanks for your time

    Rose.
  • PerfectDayToChaseTornados

    #2
    Re: Java Help - Servlets


    "Rose Girl" <rosheni9999@ho tmail.com> wrote in message
    news:f57cc465.0 406082028.10a2a 890@posting.goo gle.com...
    | Hi
    |
    | I am using the response.sendRe direct(url) method. url is path to
    | another servlet. Example:
    |
    | response.sendRe direct(response .encodeRedirect URL
    | ("/EcBugManager/servlet/bugmanager.bugm anager.gui.Bugs heetPage?
    | type="+bugsheet Type+"&page="+p age);
    |
    | I am using the response.encode RedirectURL to encode the url as i dont
    | want the parameters to be seen in the explorer - address bar.
    |
    | ?? But nothing happens, it just returns the same string with all the
    | paramteers without being encoded.
    |
    | Am i using the correct way to encode the url, or is there another way
    | to do it.
    |
    | Please, help me on this
    | Thanks for your time
    |
    | Rose.

    Hi Rose, URLEncoding just changes certain characters in the url string a
    space for example becomes %20, see here for a list of codes

    If you don't want the query string to be seen you need to post the data
    (typically from a browser). If you are wanting to pass the data from one
    Servlet to another Servlet check out the RequestDispatch er in the api & (set
    attributes in the HttpSession, ServletRequest or ServletContext) . A
    RequestDispatch er can be obtained from the ServletContext or from the
    ServletRequest & HttpServletRequ est. The RequestDispatch er obtained from the
    ServletRequest can take a relative path. See
    ServletRequest. getNamedDispatc her() also.


    HTH :-)
    --
    -P
    "Much as some folks hate to lose their way, me, I pray to God that I will."


    Comment

    Working...