pravin venkat

Greenhorn
+ Follow
since Mar 30, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
3
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by pravin venkat

Sachin Kadian wrote:if i click on item1 image its item code should go to the servlet and if i click on item2 image its item code should go to the serlvet and so on. how i can do so in html page??



you can have a hyperlink tag with id attribute having item code
10 years ago

Lakshmi Priya Gopal wrote:Pat Farrell
It is for a class project, that I need to implement using RMI. I am able to understand how it works now, after referring to documentation on the internet.
Thank you for the help guys!



Well, join the club.. even i had the same for my class project.. learn them in an conceptual way.. they have less regard these days..
10 years ago

Sudhanshu Mishra wrote:Thanks Pravin,
So may i conclue that the servlet is created after the servlet context has been created,and hence a listener class(ContextLoaderListener) will run before a servlet(DispatcherServlet)?

Thanks.



Yes
10 years ago
get head first book jsp and servlets.. it is best for starters..
10 years ago

Piyush Mangal wrote:Hi Pravin, Please find below the sample code. Please note that this is not complete code and is only for your understanding.

JSP




Servlet







thank you, Piyush :thumbup:
10 years ago
JSP

Piyush Mangal wrote:

All I am saying is that the above code is incorrect and redundant. You can always set attributes in session scope through your controller and dispatch the request to JSP.



thank you, i understand it now :)
10 years ago
JSP

Bear Bibeault wrote:

pravin venkat wrote:if possible will you be able to example code?



If the scoped variable Name is present in request scope, it can be displayed with one of:

${Name}

or

<c:out value="${Name}"/>

depending upon whether HTML-encoding is needed or not (to protect against XSS attacks).

No <c:set> tags are needed.



thank you. now i understand :)
10 years ago
JSP

Piyush Mangal wrote:

All I am saying is that the above code is incorrect and redundant. You can always set attributes in session scope through your controller and dispatch the request to JSP.



if possible will you be able to example code?
10 years ago
JSP

Piyush Mangal wrote:

pravin venkat wrote:then, i think these two code abstracts will do the job..








Ideally Servlet should be responsible for setting the attribute in Request or Session scope based on the use case and forward the request to jsp.
JSP should only use EL to display them on screen.



would you be able to come up with other ways of doing this?
10 years ago
JSP
then, i think these two code abstracts will do the job..






10 years ago
JSP
I think this would suffice. :)

10 years ago
JSP