Is it possible to instantiate a class and then invoke its methods between scriptlets in JSP? I am getting errors and I don't know why (java class and methods are fine). Any other way to do the same (i just want a string from a method in a class)?
相关问题
- What uses more memory in c++? An 2 ints or 2 funct
- How Does WebSphere Choose the Classloading Order i
- Store data and global variables using the Applicat
- PHP Adding stylesheets to header
- #{facesContext} EL expression not resolved at runt
相关文章
- jsp里面的画布功能,为什么会出错?求大佬找下问题
- JSP String formatting Truncate
- Forward request from servlet to jsp
- NameError: name 'self' is not defined, eve
- Comparing string and boolean in Expression languag
- .NET - how to make a class such that only one othe
- Issue creating ImmutableMap with Class<?> as
- How to return new instance of subclass while initi
You must include the page import in the header like so:
Yes of-course. You can create objects for your classes and access their methods between scriptlets in JSP like this.
Another way of doing this is using useBeans of jsp to instantiate the class and access its method in scriptlet