hi
this is Akash , i need help in adding java code to jsp. i have a class called JTree , which displays a tree structure menu. now i want to include this code in jsp. i am using websphere to design my GUI. i trying this but i am not able to run this code.

this is what i did
<%@ import ="java.io.*"
...
...

<html>
.......

<%
public class JTree extends JInternalFrame {


code......

%>

</html>

if this is not correct please give me an alternate.please help me. i am new to this environment. it is very very urgent.


Regards
akash

Recommended Answers

All 6 Replies

hi this is akash, i need an sample jsp code which contains an java class or java program.
please help me na, i am u r friend.

Regards
akash

you don't need anything like that. You need either a good book on JSP to tell you what you do need or a good spanking if you have that good book and choose to ignore its teachings.

You do NOT use scriptlets in JSP.

Writing a whole class is JSP file is a total nightmare...

and using Swing GUI components in that class is even worse...

hi,
can any one tell me , how to import packages in to websphere.
is it posiible to import an applet in to jsp.

>import an applet in to jsp
Applet is just object inserted into HTML, jsp is just enhanced HTML(with some little coding related to JAVA). So what the link between this two?
H T M L

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.