Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!

Bear Bibeault

Sheriff
+ Follow
since Jan 10, 2002
Bear likes ...
Mac Mac OS X IntelliJ IDE jQuery Java
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
Cows
Total received
173
In last 30 days
0
Total given
186
Likes
Total received
4540
Received in last 30 days
3
Total given
2919
Given in last 30 days
4
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

I'm not sure why you posted this in the HTML/JavaScript forum, but I've moved this to a more appropriate location.
9 hours ago
By the way, if you are thinking that "class' is something similar to Java or even JavaScript classes... they are not. In HTML, a "class" is just a name that is associated with an HTML element; maybe think of them as "tags". They are primarily used to apply CSS styling to the elements, but can also be used for DOM retrieval. But they in no way have any similarity to the concept of a "class" in programming languages.

I just brought that up because your post seems to indicate that you are thinking about "classes" as something primary, when they are just attributes of elements.
"classes" are just attributes that are applied to the various types of HTML element, of which <div> and <form> are just a few examples. A class name or set of class names can be placed on any HTML element.

Which HTML elements you use has little bearing on whether it will possess a class attribute or not. You use the HTML element appropriate to the structure that you are creating. For example, you use a <div> when you want a semantic-less container, you use a <form> when you want to create a form, and so on...
Already answered that:

Bear Bibeault wrote:All the available values can be found by looking up the CSS properties. MDN is a good resource.

Checking for the URL is not the right way to go about this.

Rather, you can send data from the controller to the JSP that can tell the JSP that it needs to do whatever it is you want it to do.

Concept: your form submits to a servlet, the servlet determines what to do with the form data and processes it. Somewhere along the way, it determines that a popup should appear when the view is displayed (but really, a popup? what is the purpose? it's not an idea that is used much in modern design). It places a scoped variable in the session to indicate this, then redirects to the page controller for the next view. Either the page controller, or the page view (the JSP), can look into the session to see if the scoped variable indicates that the popup should be shown.

If any of the concepts are unfamiliar, please see this article for information on structuring Java web applications.
1 week ago

debs mahap wrote:can someone please tell me where i can find HTML 5 and CSS interview questions which will give me some idea what kind of questions they will ask me at an interview?


My experience over the last few years is that in-depth interview questions are a thing of the past. These days, programming exercises to show your knowledge are more prevalent. Your best preparation would be to get experience creating projects and putting the HTML and CSS knowledge you are gathering to work.

debs mahap wrote:
Can you please  answer a few questions for me  regarding the coding below:
1)  for the margin and padding does it have to be "0" or can it be any value?
2)  the coding below it says that the overflow is hidden  ... can it be anything or does it have to be hidden ?
3)  the text-decoration says its none but can i put anything if i want to or does it have to be none?


The properties would not exist if they could only take one value, right? All the available values can be found by looking up the CSS properties. MDN is a good resource.

And please be sure to UseCodeTags when posting code.
GitHub is chock full of open source projects you can contribute on.

That said, you will find that most projects do not consist of just HTML. Web apps are powered by the triad of HTML, CSS, and JavaScript. Most projects you will find will not be pure HTML.

Jim J Anderson wrote:I have not really gotten the correct flow and communication down right



Please read this article.
2 weeks ago
JSP
That's not the same message that you posted earlier.

Check that your MySQL instance is running and has the named database. A good way to debug this is to try and hit it with an external database tool (tools like Dbeaver have free versions).
3 weeks ago
The error message indicates that you are trying to find the root path, just "/". Do you have a servlet mapped to that path?
3 weeks ago

Ishan Shah wrote:you can call a jsp page2  from  jsp page1 without navigating to jsp page2 and staying on jsp page1


That post does not show how to navigate to another JSP page while staying on the same page. It re-iterttes what has already been said in the replies to this question: you can either use Ajax to get data to display on the same page, or navigate to another page passing data as a parameter.
1 month ago
JSP
Is the behavior for limited to iPads? Have you tested it elsewhere?
Not strange at all. CSS only affects how the text is displayed on the screen -- it does not actually change the case of the text data.