JSPs and Servlets Tutorial 02 - First Servlet Part 2

preview_player
Показать описание
Creating and running our first Servlet.
Рекомендации по теме
Комментарии
Автор

Great video.

For anyone wondering why their writer.println("<h3></h3>"); is showing exactly like <h3>hello</h3> on the page, it's probably because this video is from 2011 and the standards have changed etc.

To fix the problem just include your generic html tags as the parameters. eg:


writer.println("hello");

looksgoodhoss
Автор

I have searched many videos for jsp and servets but couldn't understand the basics of it. Your videos and explanation on each steps are simple amazing and very useful. Good job Koushik. Well done

KidsRockStar
Автор

if the html tags are also being displayed use
which tells the browser you are using html code.

Tgkay
Автор

I have seen many not so good teachers make hell a lot of money in the pretext of teaching java . .. hope you have made more than them .. because you deserve it.

marktwain
Автор

@Vingtoft1011 @shakthydoss The problem is with the content type. Firefox assumes that what it is rendering is plain text. So we need to let it know that it is actually HTML. Use the SetContentType() method of the response object to set it to HTML. I believe I cover that in one of the subsequent tutorials.

Java.Brains
Автор

Excellent tutorial... I tried a couple tutorials that I googled before, but this is putting everything together. Thanks!
I hope to see the whole series.

huasillo
Автор

hello, please i want to create a servlet what do i write in the java package name?Or should should i just write what you wrote?

blessingomobo
Автор

Very good tutorial .. thanks for explaining those small details which every other tutorial missed..

sagar
Автор

Sir you are awesome mind blowing thanks for all your efforts. God bless you sir.

amitahuja
Автор

All the comments were saying we had to add response.setContent, but no one was being clear on where to add that line. Anyway, its after the system.out.println ... line before the printWriter writer = response.getWriter():

Copy this line after your system.out line,

// additional line of code not mentioned in the video
PrintWriter writer = response.getWriter();

smittenessmee
Автор

your tutorials are great. Very well done. Helps me to lot learn all leading tech as beginner. I have only one concern that the videos are little blur. If you can post them as HD will be great. 
Thank you.

ujwalananavare
Автор

doesn't got any sysout("Hello from Get method") at 7:34

vivekmishra
Автор

Nice video!!

I have a question. While creating a servlet, should I leave Java Package blank as I dont have one.
if no, please help me in understanding which package to choose or how to choose the package that serves my purpsose.

KP-qxud
Автор

@Java Rains ;) at 6:27 write syso and CTRL+SPACE with little bit of Enter without any wait (because for what XD) - Sexclipse will willingly complete System.out.println(); and the cursor will land between brackets. It is because Eclipse does not ask - Eclipse understands :D

alexdavibe
Автор

Hi, I created the servlet as per the instructions but its giving me ClassNotFoundException. does it mea its not compiling the java file or that there is some path setting problem. please so reply.

sonalmahajan
Автор

your explanations are great . Thank you

MikeSauce
Автор

Great videos, helps me a lot...thank you!
but When I run on server with the SimpleServlet, I revieve a 404 error, and I have everything the same as this example up to that point. I have the server running, I am able to access my index.html page as well, but when I try to access 'SimpleServletPath' I recieve a
plz suggest

sanjayforvayu
Автор

How come the app calls the servlet automatically when you run it? It's supposed to start on index.html.

alexandrajohnsson
Автор

Hi, what is the difference between servlet and webservice? Does servlet play any role in webservice

pavanivadlamudi
Автор

If anyone is following this in 2017, you must put before the line PrintWriter, type in the following, that should help

blazekiller
welcome to shbcf.ru