Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

servlet on Jaguar server

2 posts in General Discussion (old) Last posting was on 2000-03-27 23:44:50.0Z
Eddie Wang Posted on 2000-03-27 22:25:03.0Z
Newsgroups: sybase.public.easerver
Date: Mon, 27 Mar 2000 16:25:03 -0600
From: eddie wang <eddiekwang@hotmail.com>
Organization: university of illinois
X-Mailer: Mozilla 4.7 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: servlet on Jaguar server
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 52
NNTP-Posting-Host: doughman.ncsa.uiuc.edu 141.142.20.140
Message-ID: <347_38DFDFBF.8CEBBF51@hotmail.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25582
Article PK: 155656

hi, i need your help on how to put a servlet on a Jaguar server. The
following servlet code works using Jserv as the servlet engine. what do
i need to modify if want to put this servlet on Jaguar? It seems
powerJ use WebJavaServerApplication class instead of HttpServlet class
for servlet, and i am really confused.

thanks in advance.
eddie

/* $Id: HelloWorldExample.java,v 1.2 1999/03/17 02:21:36 duncan Exp $
*
*/

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

/**
* The simplest possible servlet.
*
* @author James Duncan Davidson
*/

public class HelloWorldExample extends HttpServlet {

ResourceBundle rb = ResourceBundle.getBundle("LocalStrings");

public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
{
response.setContentType("text/html");
PrintWriter out = response.getWriter();

out.println("<html>");
out.println("<body bgcolor=\"white\">");
out.println("<head>");

String title = rb.getString("helloworld.title");

out.println("<title>" + title + "</title>");
out.println("</head>");
out.println("<body>");

// note that all links are created to be relative. this
// ensures that we can move the web application that this
// servlet belongs to to a different place in the url
// tree and not have any harmful side effects.

out.println("<a href=\"../servlets/helloworld.html\">");

out.println("<img src=\"../images/code.gif\" height=24 " +
"width=24 align=right border=0 alt=\"view
code\"></a>");
out.println("<a href=\"../servlets/index.html\">");

out.println("<img src=\"../images/return.gif\" height=24 " +
"width=24 align=right border=0
alt=\"return\"></a>");
out.println("<h1>" + title + "</h1>");
out.println("</body>");
out.println("</html>");
}
}


Carson Hager[Team Sybase] Posted on 2000-03-27 23:44:50.0Z
Newsgroups: sybase.public.easerver
From: chager@dyn-data.com (Carson Hager[Team Sybase])
Subject: Re: servlet on Jaguar server
Date: Mon, 27 Mar 2000 23:44:50 GMT
Organization: Dynamic Data Solutions, Inc.
X-Newsreader: Forte Free Agent 1.21/32.243
Lines: 84
NNTP-Posting-Host: charon.lifescape.com 63.86.26.130
Message-ID: <347_38dff1fd.85340212@forums.sybase.com>
References: <347_38DFDFBF.8CEBBF51@hotmail.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25575
Article PK: 155648

Don't use the PowerJ servlet wizard. It does not support the correct
version. You can either place the servlet on the file system and
register it using Jaguar Manager or you can just place it anywhere on
the Jag classpath at the correct package location. I prefer the
former as it allows you to use a URL alias.


Carson

___________________________________________________________

Carson Hager
Team Sybase
Dynamic Data Solutions, Inc.
Enterprise Application Studio 3.0 Consulting and Training
http://www.dyn-data.com

DDS is now hiring EAServer consultants
to support its exploding EAServer business!
Please submit your resume to
hr@dyn-data.com!


On Mon, 27 Mar 2000 16:25:03 -0600, eddie wang

<eddiekwang@hotmail.com> wrote:

>hi, i need your help on how to put a servlet on a Jaguar server. The
>following servlet code works using Jserv as the servlet engine. what do
>i need to modify if want to put this servlet on Jaguar? It seems
>powerJ use WebJavaServerApplication class instead of HttpServlet class
>for servlet, and i am really confused.
>
>thanks in advance.
>eddie
>
>/* $Id: HelloWorldExample.java,v 1.2 1999/03/17 02:21:36 duncan Exp $
> *
> */
>
>import java.io.*;
>import java.text.*;
>import java.util.*;
>import javax.servlet.*;
>import javax.servlet.http.*;
>
>/**
> * The simplest possible servlet.
> *
> * @author James Duncan Davidson
> */
>
>public class HelloWorldExample extends HttpServlet {
>
> ResourceBundle rb = ResourceBundle.getBundle("LocalStrings");
>
> public void doGet(HttpServletRequest request,
> HttpServletResponse response)
> throws IOException, ServletException
> {
> response.setContentType("text/html");
> PrintWriter out = response.getWriter();
>
> out.println("<html>");
> out.println("<body bgcolor=\"white\">");
> out.println("<head>");
>
> String title = rb.getString("helloworld.title");
>
> out.println("<title>" + title + "</title>");
> out.println("</head>");
> out.println("<body>");
>
> // note that all links are created to be relative. this
> // ensures that we can move the web application that this
> // servlet belongs to to a different place in the url
> // tree and not have any harmful side effects.
>
> out.println("<a href=\"../servlets/helloworld.html\">");
>
> out.println("<img src=\"../images/code.gif\" height=24 " +
> "width=24 align=right border=0 alt=\"view
>code\"></a>");
> out.println("<a href=\"../servlets/index.html\">");
>
> out.println("<img src=\"../images/return.gif\" height=24 " +
> "width=24 align=right border=0
>alt=\"return\"></a>");
> out.println("<h1>" + title + "</h1>");
> out.println("</body>");
> out.println("</html>");
> }
>}
>
>
>
>
>

___________________________________________________________

Carson Hager
Team Sybase
Dynamic Data Solutions, Inc.
Enterprise Application Studio 3.0 Consulting and Training

DDS Enterprise Application Framework
Available Now as Open Source!
http://www.dyn-data.com