Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8462927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:18:59+00:00 2026-06-10T14:18:59+00:00

My web app directory structure is myApp -src – filtersPackage(all my filters lie in

  • 0

My web app directory structure is

myApp
 -src
     - filtersPackage(all my filters lie in this package)
     - servletsPackage(all my controllers and models lie in this package)
 - web-content           
   - web
     - views(all my jsp files lie in this dir)
     - js(all my javascript files lie in this dir)

In login.jsp, user clicks on FB login button, inside js/FBAUth.js I collect login details and I send it to my auth.do servlet using jquery ajax POST method.

The SessionFilter allows the request to go to AuthServlet’s doPost method. In AuthServlet If the credentials are correct then do the following

url = "dashboard.jsp" 
request.getSession().setAttribute("uid", id);               
view = request.getRequestDispatcher(url);
view.forward(request, response);
return;

I have seen in debug mode that these lines execute but my browser is still stuck on login page. The values for view.requestURI -> /myApp/web/views/dashboard.jsp and
view.servletPath -> /web/views/dashboardTmp.jsp.
I also tried response.sendRedirect(url), but still the browser is stuck on login page. Nothing executes after these lines.

In web.xml, my auth servlet is mapped as follows

<servlet>
    <servlet-name>Auth</servlet-name>
    <servlet-class>servletsPackage.AuthServlet</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>Auth</servlet-name>
    <url-pattern>/web/views/auth.do</url-pattern>
</servlet-mapping>

I also tried calling doGet inside doPost, and executed this code in doGet, but all in vain.
What am I missing here ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T14:19:01+00:00Added an answer on June 10, 2026 at 2:19 pm

    This approach seems to be a bit flawed. Your forward is not working because you are using AJAX to post data. You would need to use javascript or rather jquery to handle the redirection.

    Check if your jquery AJAX function’s callback method is working. print out the responseText using alert(responseText);

    Check this link for more information about your problem. And check the first answer. It provides a solution for this problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a python web app with this directory structure: # cd /usr/local/www/myapp
I am building a web app with this directory structure: app/ __init__.py config/ __init__.py
I have a pretty standard Spring 3.0.7 web app The structure is like this
I want to copy war file to tomcat web-app directory using NSIS setup. I
I have a web app that uses the Active Directory Membership Provider and when
In this web-app, when you supply this link: http://listen.grooveshark.com/#/playlist/Mellow_Magic/15982097 , it navigates directly to
WEB APP not native, no Objective-C This is so simple it hurts. <input type=date
My directory structure looks like follows. (i'm using ext mvc ) www.mysite.com/ext/designer.js www.mysite.com/ext/app/view www.mysite.com/ext/app/store
I'd like my web app to log into files with this path: webapp/logs/ I
I have put my project in tomcat_home/webapps/ directory. The structure is : project_name/WEB-INF/classes. in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.