| | |
Using a Java Object in a JSP
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
The JSP will need to have access to the class of course. That means importing the package the class is in.
After that you can instantiate it like everything else.
BUT (and that's a very big BUT) you should really not do that. You should use a servlet for stuff like that and use the JSP (which you should build using JSTL) only for displaying results.
You should at all times strive to write JSPs without any Java code at all.
After that you can instantiate it like everything else.
BUT (and that's a very big BUT) you should really not do that. You should use a servlet for stuff like that and use the JSP (which you should build using JSTL) only for displaying results.
You should at all times strive to write JSPs without any Java code at all.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
![]() |
Similar Threads
- how can i pass a value from java script to JSP scriplet (JSP)
- JSP tutorial (JSP)
- java object file reading (Java)
- Element is undefined in a Java object of type class [Ljava.lang.String; referenced as (ColdFusion)
- Move out java code from jsp (Java)
- Adapting a Java Application to JSP/Servlets (Java)
Other Threads in the Java Forum
- Previous Thread: JDBC for Access Database
- Next Thread: Can I make a Java Image Editing Photshop-like program
| Thread Tools | Search this Thread |
actuate android api applet application applications array arrays automation balls bank binary bluetooth business chat class classes clear client code codesnippet collections component database db defaultmethod development dice dragging draw ebook eclipse error event exception formatingtextintooltipjava fractal game givemetehcodez graphics gui html ide image infinite input integer invokingapacheantprogrammatically j2me java javaprojects jni jpanel julia linux list loop looping map method methods mobile mysql netbeans newbie numbers openjavafx oracle parameter php print problem program programming project recursion repositories scanner screen scrollbar server set size sms sort sorting sql sqlserver state storm string sun superclass swing swt text-file threads time tree windows






