Very generic question. As such I can only give a very generic answer
You're not sure you have chosen the right path. Nobody ever is.
But where are you right now, and where do you want to go?
Yes you can make a website with servlets and JSP.
You can do the same with PHP. Or Perl. Or C# or asp.net. Each have positives and negatives. There is a broad common base though that won't hurt to learn in whatever language.
My understanding now is the industry is moving more and more to "Full Page applications" - controlled mainly through javascript.
As such I would say that JSP/PHP etc are currently trending downwards - for web browser client side things anyway. If making dynamic websites is your goal, then I would recommend you go learn HTML, Javascript and a framework like
Angular or React.
The server role is trending more and more to just delivering data (JSON) for a client to render in HTML. As such it can be anything you want. But Java isn't a bad choice.
Java on the server isn't going to disappear by any means. I would focus these days more on providing functionality through webservices and REST APIs than JSP. Of course they can be implemented in any language you like.
What I think is important is you understand the fundamental building blocks of web services/APIs, how they are used from the client side, and how you can implement them on the server side.
Then you can chop and change as necessary
Thats just my 2 cents for what its worth,
good luck,
Stefan