Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
JSP - A mailing list about Java Server Pages specification and reference
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Subject: Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Subject: Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
servlet quest

servlet quest

2004-10-21       - By Deepak A L

 Back
Reply:     1     2  

hi i have a servlet below
how do i call it from my jsp page


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

public class MyServlet extends HttpServlet{

public String getUrl(HttpServletRequest req){
 String reqUrl= req.getRequestURL().toString();
 String queryString = req.QueryString();
 if(queryString != null){
   reqUrl += "?" + queryString;
 }
 return reqUrl;
}
}


__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __
To unsubscribe, send email to listserv@(protected) and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=661323606-21102004><FONT face=Arial size=2>hi i have a servlet
below </FONT></SPAN></DIV>
<DIV><SPAN class=661323606-21102004><FONT face=Arial size=2>how do i call it
from my jsp page </FONT></SPAN></DIV>
<DIV><SPAN class=661323606-21102004><FONT face=Arial
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=661323606-21102004><FONT face=Arial size=2>import
java.util.*;<BR>import java.lang.*;<BR>import javax.servlet.*;<BR>import
java.servlet.http.*;<BR>import java.io.*;</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=661323606-21102004><FONT face=Arial size=2>public class
MyServlet extends HttpServlet{</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=661323606-21102004><FONT face=Arial size=2>&nbsp;public String
getUrl(HttpServletRequest req){<BR>&nbsp;&nbsp;String reqUrl=
req.getRequestURL().toString();<BR>&nbsp;&nbsp;String queryString =
req.QueryString();<BR>&nbsp;&nbsp;if(queryString !=
null){<BR>&nbsp;&nbsp;&nbsp;&nbsp;reqUrl += "?" +
queryString;<BR>&nbsp;&nbsp;}<BR>&nbsp;&nbsp;return
reqUrl;<BR>&nbsp;}<BR>}</FONT></SPAN></DIV>
<DIV><SPAN class=661323606-21102004></SPAN>&nbsp;</DIV></BODY></HTML>
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __
To unsubscribe, send email to listserv@(protected) and include in the body
of the message "signoff SERVLET-INTEREST".
<p>
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
<p>

©2008 junlu.com - Jax Systems, LLC, U.S.A.