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

  • Home
  • SEARCH
  • 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 989393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:47:08+00:00 2026-05-16T05:47:08+00:00

I have a JSP page called CreateProcessGroup.jsp and I use an annotation controller to

  • 0

I have a JSP page called CreateProcessGroup.jsp and I use an annotation controller to map requests to CreateProcessGroup.htm to that page. But I’m having an interesting issue when I request the page from browser it works, when send a request using jQuery $.get method I get 404 (CreateProcessGroup.htm not found) is there a difference between two requests?

My JSP page just under WebContent dir and JS file under WEBContent/Jquery my function sending the request like below:

function SendCreateProcessGroupRequest()
{
var pid = $('#pid').val();
var description = $('#processGroupDescription').val();

var x = "/CreateProcessGroup.htm";
alert(x);

$.get(x, { pid: 62, description: description },
           function(data){
             alert("Data Loaded: " + data);
           });
}

Do I need to give the URL as ../CreateProcessGroup.htm? Indeed I tried:

  • /CreateProcessGroup.htm
  • ../CreateProcessGroup.htm
  • /../CreateProcessGroup.htm
  • ../../CreateProcessGroup.htm
  • /../../CreateProcessGroup.htm

My guess is DispatcherServlet can not map Ajax requests to Controllers but this is stupid isn’t it?

How can i get rid of the situation?

Thanks all.

  • 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-05-16T05:47:08+00:00Added an answer on May 16, 2026 at 5:47 am

    Try this instead:

    var x = "CreateProcessGroup.htm";
    

    If the page you’re requesting is beside the one making the request there’s no need for a path in front, it will (by default) make a request to the same path just with that page/handler on the end.

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

Sidebar

Related Questions

Greetings, here is the problem. I have a page called entList.jsp , that works
Right now I have a JSP page that allows to sort some items, when
I have a List variable called services in my JSP page. I need to
I have a JSP page that has 2 forms running on Tomcat 6. One
I have a JSP page that handles file downloads. I set the response header
I have a JSP page that needs to accept some info into a form,
Title pretty much says it all. I have a page called login.jsp: <f:view> <html>
I have ajax requests that come into my controller and my validation is working
I have a jsp page with two radio tags. The page contains a struts2
I have this simple Jsp page: <%@ page language=java import=java.awt.Color%> <% Color background =

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.