UrbanPro
true

Ask a Pro

UrbanPro has lakhs of Expert Tutors and Trainers to answer your Questions.

?

Questions Guidelines

  • Start your question with simple statements like "what", "when", "where", or "how".
  • Ensure your question or answer is not offensive or insensitive - it may be voted down or banned.
  • Please provide as much detail as possible as this will allow our members to better understand and respond to your question.
  • Take some time to categorize your question. This will greatly help other users find the question.

You can add upto 6 Images

How it works?

Trending Discussions

S

Subhash 30/05/2024 in  IT Courses/Java/JSP (Java Server Pages)

What are the methods in Java Server Page (JSP) and Servlets?

0 0

Balmukund replied | 4 days ago

Servlet methods

  • init(): runs once when the servlet is first loaded, for setup.
  • service(): runs for every request and decides which doXxx() method to call.
  • doGet() and doPost(): handle GET and POST requests. There are also doPut(), doDelete(), doHead() and doOptions().
  • destroy(): runs once when the servlet is removed, for cleanup.

JSP methods
A JSP is converted into a servlet, so it has similar methods:

  • jspInit(): runs once at the start.
  • _jspService(): handles each request. The container generates it, so you don’t write it yourself.
  • jspDestroy(): runs once at the end.

S

Satish 13/01/2025 in  IT Courses/Scala Training

Is Scala hard to learn?

0 0

Sadiq replied | 5 days ago

Yes, Scala is considered moderately to very challenging to learn, depending on your background and how deep you go into its advanced paradigms.

Why Scala Has a Learning Curve

• Dual Paradigms: Scala combines Object-Oriented Programming (OOP) and Functional Programming (FP). If you are only used to imperative or standard OOP languages like Java or C++, shifting to concepts like immutability, pure functions, and recursion requires a major mental shift.
• Complex Type System & Features: Features such as implicits, macros, higher-kinded types, and advanced type-level programming can quickly become dense and difficult to read or debug.
• Over-Engineering Risk: Teams sometimes struggle because developers write overly complex, academic code (like monad transformers and custom operators) that the rest of the team finds hard to maintain

D

Dhiraj 01 Nov in  Cambridge IGCSE-Class 9/Computer Science (0478)/Software, Cambridge A Level-Class 12/Computer Science (9618)/Programming, Programming Expert, More... IBPS SO/IBPS SO Professional Paper/IT IT Courses/Computer Course/Software Programming

How Does a Website Remember Your Login Even After You Close and Reopen the Browser?

0 0

Show previous answers

Lata replied | 2 days ago

A website can remember your login even after you close and reopen your browser because of cookies and sometimes local storage — small pieces of data saved on your computer by the site.

Here’s how it works 👇

🧠 1. Cookies

  • When you log in, the website sends a session cookie to your browser.

  • If you check “Remember Me,” it also sends a persistent cookie that stays even after closing the browser.

  • This cookie contains a unique token (not your password) that identifies you when you return.

  • When you reopen the site, your browser sends that cookie back, and the server recognizes you.

💾 2. Local Storage or IndexedDB

  • Modern websites may store login tokens or preferences in local storage or IndexedDB, which remain until you clear them manually.

  • This helps keep you logged in or remember settings like language or theme.

🔐 3. Secure Tokens

  • Instead of storing passwords, sites use authentication tokens (like JWTs).

  • These tokens verify your identity securely and expire after a set time for safety.

⚙️ 4. Auto Login Process

  1. You log in → server creates a token → browser saves it.

  2. You close the browser → token remains.

  3. You reopen → browser sends token → server verifies → you’re logged in automatically.

⚠️ Security Tip

If you’re on a shared or public computer, avoid “Remember Me” — anyone could access your account later.

Pulkit replied | 23 hrs ago

When you log in to a website, it often saves a small piece of information in your browser called a cookie. Think of it as a small digital ID card.

The next time you visit, your browser sends that ID back to the website, and the website recognises you.

That's why you don't have to enter your password every single time.

And no, your password isn't usually stored in that cookie. The website uses something called a session ID or token to verify that it's really you.

Of course, this depends on the website and how it manages your login.

So basically, the website isn't remembering you like a friend does. It's just using a clever little system to recognise you!

S

Srihari 30/05/2024 in  IT Courses/Java/JSP (Java Server Pages)

What is the future of JavaServer Pages (JSP) in Java Enterprise Edition (Java EE)?

0 0

Balmukund replied | 02 Nov

JSP is still supported but is considered legacy, with little new development.

  • Renamed: Java EE moved to the Eclipse Foundation and became Jakarta EE. JSP is now Jakarta Server Pages, with the package namespace changed from javax.* to jakarta.*. It still ships in Jakarta EE and in servlet containers like Tomcat.
  • Maintained, not growing: It gets compatibility and cleanup updates (for example, removal of old features), but no major new capabilities.
  • Replaced for new projects: Newer Jakarta EE work favours Jakarta Faces (JSF), Jakarta MVC, REST APIs with a JavaScript front end (React, Angular), and template engines like Thymeleaf or Freemarker (often with Spring Boot).
  • Still in use: Many large existing enterprise applications run on JSP, so it will be around for a long time in maintenance work.

In short, JSP won’t disappear soon, but you wouldn’t choose it for a new project. Knowing it is still useful for legacy systems and interviews.

A

Anubhav 30/05/2024 in  IT Courses/Java/JSP (Java Server Pages)

Is it possible to write JSP's in Java? Why are Servlets used within an MVC pattern?

0 0

Balmukund replied | 02 Nov

Yes, JSPs can contain Java (scriptlets <% %>), and they’re compiled into servlets. But embedding Java in them is discouraged; use EL/JSTL instead.

Servlets act as the controller in MVC: they handle requests, call the model (business logic), and forward the result to a JSP (the view). This keeps logic separate from presentation.

Sadiq replied | 5 days ago

Yes, it is absolutely possible to write Java code within a JSP (JavaServer Pages) file. In fact, JSP is built on top of Java technology. 
You can embed Java code into a JSP page using special tags known as scriptlets (<% ... %>), expressions (<%= ... %>), and declarations (<%! ... %>). When a user requests a JSP page, the web server's container automatically translates that JSP file into a regular Java Servlet, compiles it, and executes it to return standard HTML to the browser.

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more