wood burning stoves 2.0*
The moose likes JSP and the fly likes Using script variables in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Using script variables in JSP" Watch "Using script variables in JSP" New topic

Using script variables in JSP

vivek ja
Ranch Hand

Joined: Feb 24, 2005
Posts: 80
I am setting a boolean variable using javascript.
Based on that variable, I want to instantiate a class in JSP.
Is it possible to do that?

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60804

It is not. Javascript executes on the client long after the JSP has been executed on the server and the resulting HTML page has been sent to the browser.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ben Souther

Joined: Dec 11, 2004
Posts: 13410


Maybe if you can describe what it is you're trying to do, someone could recommend an approach that would help you.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Don't get me started about those stupid light bulbs.
subject: Using script variables in JSP
Similar Threads
including jsp in servlet
tag file doubt
how to use jsp expression language?
session problem in tomcat 5.0.30
Passing the data between the site through URL