Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2006

Tip: Looking for answers? Try searching our database.

sample jsp servlet application required

Thread view: 
ramiz - 16 Jul 2006 15:56 GMT
Hi geeks,
I'm a beginner in jsp and servlets, i want a sample JSP-SERVLET
applicaton with source code. Can you please tell me where can i get the
sample applications.
Thanks in advance...
dimebt@gmail.com - 16 Jul 2006 17:25 GMT
Here is the simplest :))

=======================================================
index.jsp :

<html>
<body>
<jsp:useBean id="myBean" class="MyServlet" scope="session"/>
Here is the value of the String from the Servlet:
<%= myBean.getMyString() %>

</body>
</html>

=======================================================
MyServlet.java

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;

public class MyServlet {

public String getMyString(){

return "This is my return String";

}

}

=======================================================

And that should be it. :))
ramiz - 17 Jul 2006 04:31 GMT
> Here is the simplest :))
>
[quoted text clipped - 30 lines]
>
> And that should be it. :))

thanks for ur reply

regards,
ramiz
Mark Space - 16 Jul 2006 17:49 GMT
> Hi geeks,
> I'm a beginner in jsp and servlets, i want a sample JSP-SERVLET
> applicaton with source code. Can you please tell me where can i get the
> sample applications.
> Thanks in advance...

Doesn't Tomcat install a default application?  I'm sure it does,
although I'm not certain that it installs any JSP servlets.  I think it
does because you can self test Tomcat with some of the default servlets.

Anyhoo, check your default app, probably some good examples there.
ramiz - 17 Jul 2006 04:33 GMT
> > Hi geeks,
> > I'm a beginner in jsp and servlets, i want a sample JSP-SERVLET
[quoted text clipped - 7 lines]
>
> Anyhoo, check your default app, probably some good examples there.

thanks for ur reply
regards,
ramiz


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.