Bear Bibeault

+ Follow
since Jan 10, 2002
Bear likes ...
IntelliJ IDE Java jQuery Mac Mac OS X
Author of:
Secrets of the JavaScript Ninja, 1st and 2nd editions,
jQuery in Action, 1st, 2nd and 3rd editions,
Ajax in Practice, and
Prototype and Scriptaculous in Action
Austin, TX
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt Green check
expand Greenhorn Scavenger Hunt Green check

Recent posts by Bear Bibeault

Everyone here, staff included, is a volunteer. If someone has an answer to your question, they will post it.
5 hours ago
The docs for HttpSession explain when an IllegalStateException will occur.
5 days ago
Please add the additional information as a reply. Post editing was disabled mostly because too many members were erasing their questions after getting an answer.
6 days ago
Also, ccxt is a package that is supported in Python and JavaScript, but not Java. If you want to use Java, you'll need to find another package that supports Java.
6 days ago
As pointed out, despite the unfortunate naming, Java and JavaScript have absolutely nothing to do with each other.

JavaScript started as a language for scripting in the browser, but it has since grown far beyond that. JavaScript can also be executed outside the browser in run-time environments (kind of the same way that Java runs in a JVM). The most popular of these environments is NodeJS.
6 days ago
Why the response wrapper? Just use a straight-forward servlet filter.
1 week ago
Had you worked through the troubleshooting list in the ServletsFaq for resource 404 errors?

[Edit: link ]
1 week ago
What else could your system be running that could be sitting on 8080 already? If you're not running something explicitly, it's likely a runaway Tomcat instance that you should kill.

If some other server is legitimately using 8080 (unlikely? other servers usually have their own conventional port other than Tomcat's 8080) then using another port is ok, but not optimum.

What happens when you hit localhost:8080?
1 week ago

Daniel Russell wrote:Yes, I'm using port 8081, because 8080 gives me problem. If I use 8080 the Bowser show me the message: "The requested resource is not available." and I have also problem with tomcat,
because tomcat say that 8080 is already in use, or something like that.

Then this is the first thing to fix rather than side-step around.

The resource not available error likely means a configuration issue. There's a checklist in the ServletsFaq to help find out what the issue is.

If something else is running on 8080, likely a runaway instance of tomcat, you need to know about it.
1 week ago
You are running tomcat on port 8081?  

What we also need to see is your web.xml. Posted as text and using code tags (see UseCodeTags).
1 week ago
Welcome to the Ranch!

Two things about your Ajax call:
  • You've hard-coded the URL to use localhost. That means it cannot work anywhere else but your local machine. You should be using a URL that works everywhere. In order to help you figure out what that is, we need some more context. Since you mention Servlets, I assume that this is a Java web application in which the view is provided by a JSP in the same web app? If so, see below. If not, tell us what you've got going on.
  • The data is malformed. It cannot just be a string. See the description of the expected data format in the jQuery documentation for the $.ajax function.

  • In a Java web application, URLs into the same app should be server-relative, starting with the context path. See the JspFaq on resource URLs to learn how to create such URLs in JSPs.

    Roland Mueller wrote:I think SpringBoot does not provide such a compiler.

    I think you are not correct.
    1 week ago