Win a copy of Get Programming with Java (MEAP only) this week in the Beginning Java forum!

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

localhost always resolves to the system that the browser is running upon. So your URL is instructing the browser to look on the users' computer for the image, which of course isn't going to be found.

You should be using a server-relative URL that starts with the context path. See the JspFaq for more information on properly formatting resource URLs in Java web applications.
13 hours ago
No. It's just a standard URL like any other.
You are making this much harder than it has to be.

First you check to see if the candidates are the same type, if so you simply compare them against one another and return the result of the comparison. If they differ in type, you return the result that makes numbers higher in order than strings. That's pretty much it.
An exception in a filter usually means a bug in the program, so I don't think your approach is the best course. The best curse would be to figure out why the exception is happening and make sure that out doesn't.

If the web app can operate without the filter being applied, why is the filter there in the fist place?
4 days ago
He didn't say that the user would get to the page. He said that it would result in a 500 error.
1 week ago
Answering my own question after looking more closely to the code.

Ah, you have the forms in separate modals. Can you explain how they interact? How do users use the two modals? At what point is the data actually submitted?

It seems really weird to have two modals, if the data from both gets submitted at the same time. Is that what you are trying to do?
1 week ago

Andrey Dmitriev wrote:
  I use two forms, because its a structure of web-page. Page consists of 2 parts.

This still doesn't explain the two forms. The style of the page isn't usually relevant. Even if it has two sections, why cannot a single form encompass the two sections?

Each part is used for sending different kinds of data to different tables in DB.

This in no way requires there to be two forms. What you do with the data once it gets to the servlet and is passed down to the data layer has nothing at all to do with the layout of the page.

As has been pointed out: one form per request. If the data from both sections of the page need to be submitted at the same time to a single request, there should be only one form.

Is there something other than the above that is preventing you from creating a single form?
1 week ago
You never really adequately explained why you are using two forms in the first place.

That is highly irregular. And when something is highly irregular, its a good bet that it's not the best approach.

So why the two forms?
1 week ago
In which IDE are you attempting to debug?
1 week ago
The responsive grid of Bootstrap just applies CSS to the elements, it cannot move them around the DOM. If you want to move things around in the DOM, you need to use JavaScript.

But I don't really think that's what you want to do.

Perhaps it would be best to just show us what layouts you want to achieve without trying to predict what the structure should be until the layout is understood.

Typically a single instance of a container, such as Tomcat, runs not only multiple servlets, but multiple web applications (called "contexts" before you get confused by things you may read).
1 week ago