× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: problem in running servlet on websphere! - urgent
  • From: ashaikhhafiz@xxxxxxxxx
  • Date: Mon, 11 Jun 2001 15:50:49 +0800


Hi!
i have a problem in running a servlet on the websphere.
i have a servlet which generates a frameset containing three rows where the
content of each row or frame is generated by three different servlets. well
it works perfect on the websphere test environment which is installed as
part of the visual age for java. but when try to invoke it from the
websphere, the middle row doesn't seem to be displayed. a portion of the
code which generates the frameset is listed below. plz help me out with
this problem. i've tried all possibilites at my end. but alas, no success.
out.println("<frameset border=1 rows=32%,13%,55%>");
mytemp = "<frame name=row1 src=\"" + Servletdir + "PLDPolicyHeader?searchType=" 
+ searchType + "&searchPattern=" + searchPattern + "\">";
out.println(mytemp);
mytemp = "<frame name=row2 src=\"" + Servletdir + 
"PLDPolicyMenu?searchPattern=" + temp + "\">";
out.println(mytemp);
mytemp = "<frame name=row3 src=\"" + Servletdir + "PLDPolicyDetails\">";
out.println(mytemp);
out.println("</frameset>");

well the code of the servlet giving problems is
---->
public void doGet(HttpServletRequest req, HttpServletResponse res) throws 
javax.servlet.ServletException,java.io.IOException
{
     PrintWriter out;
     Properties props = new Properties();
     String searchPattern = req.getParameter("searchPattern");
     String temp;
     String[] tempStr;
     String lnkstr;
     String propertyFile;
     String[] linkStr;
     String[] servlet;
     String[] propFile;
     String htmlStr = "";
     String Servletdir = null;

     UITrace.trace("Inside doget of PLDPolicyMenu");
     try
     {
          props.load(new FileInputStream(FastTrackUtility.getPropsPath() + 
"LinkList.properties"));
          temp = props.getProperty("LinkList");
          linkStr = utility.FastTrackUtility.parseText(temp,",");
          temp = props.getProperty("PropertyFile");
          propFile = utility.FastTrackUtility.parseText(temp,",");
          temp = props.getProperty("Servlet");
          System.out.println("servletlist : " + temp);
          servlet = utility.FastTrackUtility.parseText(temp,",");
          String s = HttpUtils.getRequestURL(req).toString();
          s = s.substring(0,s.indexOf("inquiry")) + 
s.substring(s.indexOf("inquiry"),s.indexOf("inquiry") + "inquiry".length()) + 
".";
          System.out.println(s);
          Servletdir = s;
          res.setContentType("text/html");
          out = res.getWriter();
          htmlStr = "<html><head></head><body><h6>";

          for(int i=0;i<linkStr.length;i++)
          {
               lnkstr = "<a href=\"" + Servletdir + servlet[i] + 
"?searchPattern=" + searchPattern + "&searchType=" + propFile[i] + "\" 
target=row3>";
               lnkstr += linkStr[i];
               lnkstr += "</a>";
               if( (i > -1) && (i < ((linkStr.length) - 1)) && (linkStr.length 
> 1) )
               {
                    lnkstr += " | ";
               }
               htmlStr += lnkstr;
          }
          htmlStr += "</h6></body></html>";
          System.out.println("menu code from sysout : " + htmlStr);
          out.println(htmlStr);
     }
     catch(IOException ioex)
     {
          ioex.printStackTrace();
     }
     catch(Exception ex)
     {
          ex.printStackTrace();
     }
}

Well the viewsource of this servlet is

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type></HEAD>
<BODY></BODY></HTML>

<-----

plz help me in this.it's urgent.

thnx in advance.

have a great day!

Azeem.

+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.