Hello,

Iam new to programming.Can someone please help me out
how can i read URL process it and return the number to browser in jsp.
    Actually I have a URL which returns an integer now what i want is I have to write a program to take the URL as input and return that result back to browser in jsp(or servlet).

To get a URL parameter (E.G. http://hostname.com/mywebapp/mypage.jsp?name=John+Smith) where "name" is the requested parameter, you would use...

<%= request.getParameter("name") %>

This would pull out the "John+Smith" after the "name" attribute. you could then nest it into any code.

(front-end example)...

<p>Hello <%= request.getParameter("name") %></p>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.