File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
JavaRanch » Java Forums » Java » JSP
Bookmark "Using script variables in JSP" Watch "Using script variables in JSP" New topic
Author

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?

Thanks!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61006
    
  65

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
Sheriff

Joined: Dec 11, 2004
Posts: 13410

vivek,

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using script variables in JSP