I am having a weird problem here, and I am really stuck, need to get this work badly.

so i have a page say index.jsp with a link say "a href=servlet?id=10". when I click on this link it will go to doGet() on my servlet and here is the code in my servlet.

```
protected void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
                 String action = request.getParameter("id");
                  // search database and create an arraylist
                        if(//user logged in)
                        address = "s/results.jsp";
                        else   
                        address = "results.jsp";
                   // set arraylist in session object
                RequestDispatcher dispatcher = request.getRequestDispatcher(address);
                dispatcher.forward(request,response);
     }

```

So the above code works fine but after request forwarding, my browser shows the url as

<http://localhost/project/servlet?id=10>. 

I don't want the above url as i am forwarding to two different jsp's based on the user login status one is in 's' folder and other is outside of that.
if user is logged in then i forward to 's/results.jsp' and if user is not logged in i am forwarding to 'results.jsp'.

in case of s/results.jsp i am accessing resources like images and scripts from outside of 's' folder by using ../ in the results.jsp.

as url is not changing to s/results.jsp , i am unable to access the resources with '../'
and as i am using jsp pagination , when i click next the url is changing to s/results.jsp
and in that case i am able to access resources using ../

one solution in my mind is to copy all resources in s folder , but that would increase 
redundancy.

one other solution in my mind is to create two different servlets for two jsp's 
but i don't know where to put the servlet so that it can access resources outside of s folder with ../

is their any other good way i can do the task..

I have tried to find information about this but haven't been able to figure it out.

Any help will be very much appreciated.