JSP pages not working

I installed Apache 2.0.47, JSDK 2.0, and JServ 1.1.2 and copied all my JSP files in the htdocs directory in the Apacche installed folder. When I accessed one of my JSP page using IE 6.0, the file contents are loading, not the page! what is wrong with me? where I have to copy the .class files?
On replying for this doubt, you are doing a great job. Thank you.

You probably have to do something special to tell Apache to forward servlet/JSP requests to JServ.
I've done such a thing with Tomcat. Look at the docs for JServ to see what they expect you to do.
Why JServ? Why not Tomcat? It's free, and there's lots of on-line docs and books to help you get started.
It's obvious that you're just starting with servlets and JSPs, Sunil. Go download Tomcat, get a couple of good books, and start reading and programming. You're not going to get your project off the ground by posting ill-posed questions to these forums every time you run into difficulty. Just some advice. - MOD

Similar Messages

  • JSP pages not working on app server but works locally

    Hello,
    My application uses java, struts and jsps. When I try to access JSP page like http://appServer:7778/app/login.jsp, it says page not found exception. But when I access http://appServer:7778/app/login.do, it displays login.jsp page (success url for login action is login.jsp). How come I am not able to access jsp pages directly? Am I missing any settings?
    And when I run the application using embedded OC4J of Jdeveloper, I could access jsp pages directly.
    Thanks.

    The method getTextContent() is DOM Level 3, and was introduced with Java1.5
    Tomcat 5.5 runs on Java1.5, but by default uses the JDT compiler for JSPs, which is only Java1.4 compliant - might possibly be that.
    See the [url http://tomcat.apache.org/tomcat-5.5-doc/RELEASE-NOTES.txt] release notes and
    [url http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html]how to fix (see the section on configuration)
    >
    The Java compiler from Eclipse JDT in included as the default compiler. It is an advanced Java compiler which will load all dependencies from the Tomcat class loader, which will help tremendously when compiling on large installations with tens of JARs. On fast servers, this will allow sub-second recompilation cycles for even large JSP pages. This new compiler will be updated to support the Java 5 syntax as soon as possible.
    Apache Ant, which was used in previous Tomcat releases, can be used instead instead of the new compiler by simply removing the common/lib/jasper-compiler-jdt.jar file, and placing the ant.jar file from the latest Ant distribution in the common/lib folder. If you do this, you also need to use the "javac" argument to catalina.sh.

  • Href link in JSP page not working?

    Hi All,
    I am creating a web app that at various points accesses various files from a local repository (the app will be installed on WAS instances on local servers and the repository will be on the server with a WAS variable pointing to its location - so the web app knows where it is)
    On my web page I am trying to have a list of links to generated reports that will be stored in the repository:
            <td><a href="<%out.println(stubHome + "\\reports\\");
                      out.println(serviceArray);
         %>.html">View results</a>
    </td>where stubHome is the location of the root of the repository and serviceArray is a list of the specific report names.
    When I view the site the "View results" link appears as normal (blue/underlined) and when I hover the mouse over the link I see in the bottom left of the IE window "file:///D:/stubRepo/reports/Service1.html"  - which is the correct the name/location of the stored report - and if i just paste that link into my address bar on teh browser then the file opens.
    However, if i try to click on the link directly on my web page nothing happens and there are no signs of anything happening... any ideas what might be wrong?
    Thanks in advance guys!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    rmh1 wrote:
            <td><a href="<%out.println(stubHome + "\\reports\\");
              out.println(serviceArray);
         %>.html">View results</a>
    </td>
    This is a bad approach. Use JSTL/EL.
    "file:///D:/stubRepo/reports/Service1.html" - which is the correct the name/location of the stored reportDo you realize that this path refers to the local filesystem? Do you also realize that this file must be available at every client who is visiting your website?
    However, if i try to click on the link directly on my web page nothing happens and there are no signs of anything happening... any ideas what might be wrong?I have no idea, it might even be browser dependent, but you should be using URL's rather than local files.

  • OC4J JSP Debugging not working for all the jsps

    Hi,
    Initially I was not able to debug jsps using Eclipse and OC4J. The jsp debugging started working once I made the below changes:
    1) global-web-application.xml is modified
    Changed the attribute development="true" in orion-web-app
    Added the below init param for the JspServlet
    <init-param>
    <param-name>debug</param-name>
    <param-value>class</param-value>
    </init-param>
    If the jsps are present in a sub directory under the webcontent none of the breakpoints are working. I am still be able to view the jsp pages on the browser.
    Tools: Oracle 10g Application Server Standalone version(10.1.3.5.0), JDK5, Windows XP, Eclipse Indigo
    Project Structure:
    Test (Eclipse Dynamic Web Project)
    -WebContent
    Sample.jsp ( Breakpoints are working)
    -subF (Folder)
    SubSample.jsp (Breakpoints are not working)
    -WEB-INF
    web.xml
    Debugging worked for http://localhost:8888/Test/Sample.jsp
    Debugging not working for http://localhost:8888/Test/subF/SubSample.jsp
    Any help is highly appreciated.
    Regards
    Danny

    This tells there is not enough main memory (not disk space) for the program to run.
    - You can look the dump in ST22, it will have suggestions on increasing the ROLLAREA??, you can forward that to Basis.
    - Most likely you will not have any more memory to assign so the above may not be feasible. Try to rework your query so it works with less data.

  • Response.sendRedirect("abc.jsp") is not  working

    Hello,
    I deployed my web application(jsp with business components) on AS 902.
    Web cache is running on port 80.
    Apache is running on 7778.
    To pass request i use,
    mod_proxy.c in http.conf. and
    <virtual host> for my application, to get required url.
    It is running fine, But response.sendRedirect("abc.jsp") is not working properly. It redirects the request to apache directly and skips web-cache. Also it changes url for the page given in method.
    While the same application was running ok on v 10222a. That version handle this method properly.
    how to remove this error ???
    Plz hurry up. Our product is ready for launching on 9iAS. It is final testing.
    Thnx.

    Tahir,
    What is the exact error message you are hitting.
    Are you able to use web-cache with other examples.
    Can you try testing it the the webcache demos that are part of ojspdemos.ear under /j2ee/home/demo.
    -Prasad

  • Login page not working in EBS R12 after autoconfig.

    Hi,
    We are using EBS R12 on windows 2003 server 32 on a test machine. As we were making some changes using autoconfig,
    as the Login page not working in EBS R12 after running autoconfig.
    Kindly help us.
    Thanks in advance.

    Hi,
    Rollback the changes and run AutoConfig, see if you get the same error or not then -- See (Note: 387859.1 - Using AutoConfig to Manage System Configurations in Oracle E-Business Suite Release 12) for details "2.5. Rolling Back an AutoConfig Session".
    Regards,
    Hussein

  • Jsp:useBean  not work when I install aplication!!

    Hi
    I developing an application with UIX JSP on Jdeveloper 9.0.2 and i using something like this:
    <jsp:useBean id="cbean" class="oracle.jsp.dbutil.ConnBean" scope="session" />
    <jsp:setProperty name="cbean" property="dataSource" value="jdbc/BiblosConnectionCoreDS" />
    </jsp:useBean>
    <%
    try{
    cbean.connect();
    This code work fine in standalone mode, but when i install this application on 9IAS, with an archive War, the code <jsp:useBean, not work.
    What is missing for? o What is the reason for this situation
    Thanks for some help?

    many thanks for your reply, and I have download new updates driver from your website (http://consumersupport.lenovo.com/en/DriversDownloads/drivers_show_890.html) and Installer it on my Y410 but it still does not work!!!
    the firstly: when I star up with win7, I can see a speaker icon right down near the clock, when I click mouse on it, I can see: Volume Mixer - Speaker with Device(Speaker Hight definition Audio Device, Digital Audio(S/PDIF) ( Hight definition Audio Device) ).
    Look in devicemanger I can see "Sound , video and game controll " has already installer with 'Hight definition Audio Device ' & 'Unimodem Hafl-Duplex Audio Device' below... but I cannot hear the sound when I play music, video, games...etc...
    the second: when laptop wakeup after 'sleep' mode, I can hear sound on speaker! but headphone jack does not work when I plug my headphone jack into it (I cannot hear sound with headphone), however I still hear sound from speaker, in this case!  
    Can you help me or tell me how I can do ?!
    Thanks and Best Regards,
    jupitervn

  • Adobe CC Education Eligibility Page Not Working!

    I work for a university and bought the educational version of CC.  When I clicked the link in the email provided by Adobe to upload verification of my employment... I filled out the form and when I click the button at the bottom that says "Review and Submit" I get a page not found error.  Someone at Adobe please help!

    Different regions may have slightly different processes. Take a look at the following document: http://helpx.adobe.com/x-productkb/policy-pricing/education-faq.html
    I hope that this will help you get going.
    If you still get that Page Not Working error, try the same with a different browser and check.

  • I'm having constant problems with pages not working. I.E.: I cannot fill in writeable fields, click on buttons... or anything... nothing on the page works. And, this is not exclusive to a particular site. I can, however, work well in Explorer.

    For the last few weeks I have had constant problems with pages not working. I.E.: I cannot fill in writeable fields, click on buttons... or anything... nothing on the page works. And, this is not exclusive to a particular site. It does seem to be a browser issue, because I can work well in Explorer.

    Both the Yahoo! Toolbar extension and the Babylon extension have been reported to cause an issue like that. Disable or uninstall those add-ons.
    * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Is the update page not working for  of our devices.

    Is the update page not working for apps? I cannot get it to load with any of our devices. iPhones or iPads?

    There have been numerous reports on the forum today regarding this issue. It seems to be an issue at Apple, but no information has been posted on the status site.
    http://www.apple.com/support/systemstatus/

  • ::.jsp page is working But .java file is not working::

    Hi,
    I have made a jsp page in that i am able to fetch data from Oracle 10g XE,Using jboss-4.0.4.GA .Its working fine.
    Problem: But when i made the same file in .java. i am able to compile the file but not able to run the file.
    Evnironment setting are like:
    User Variable::
    JAVA_HOME
    C:\Program Files\Java\jdk1.5.0_03
    CLASSPATH
    C:\Program Files\Java\jdk1.5.0_03\bin
    C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib;
    C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.zip;
    C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jar;
    C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14_g.jar;
    C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib\orai18n.jar;
    System Variable::
    PATH
    C:\oraclexe\app\oracle\product\10.2.0\server\BIN
    Here is my Code:
    package com;
    import java.sql.*;
    import oracle.jdbc.pool.OracleDataSource;
    import java.io.*;
    class GroupedData
         public static void main(String []args) throws Exception
              OracleDataSource ods = new OracleDataSource();
              ods.setUser("system");
              ods.setPassword("shekhar");
              ods.setURL("jdbc:oracle:oci:@");
              Connection conn = ods.getConnection();
              Statement stmt1 = conn.createStatement();
              ResultSet rs1 = stmt1.executeQuery("SELECT * FROM TEST");
              //Loop through results of query.
              while(rs1.next())
              System.out.print(" |" + rs1.getString("C_IMSI") + " |");
              System.out.print( rs1.getString("C_SIM") + " |");
              System.out.print(" " + rs1.getString("C_NAME") + " |");
              System.out.print(" " + rs1.getString("C_ADDRESS") + " |");
              System.out.print(" " + rs1.getString("C_CITY") + " |");
              System.out.print(" " + rs1.getString("C_STATE") + " |");
              System.out.print(" " + rs1.getString("ASPLDESC") + " |\n");
              Statement stmt = conn.createStatement();
              ResultSet rs = stmt.executeQuery("SELECT ASPLDESC, COUNT(ID) AS OCCURANCE from TEST GROUP BY ASPLDESC");
              //Print start of table and column headers
              System.out.println("| ASPLDESC | Total Occurance |");
              // Loop through results of query.
              while(rs.next())
                   System.out.println("| " + rs.getString("ASPLDESC") + " | " + rs.getString("OCCURANCE") + " |");
    Here is my jsp file which is working fine with JBOSS:
    <%@ page import="java.sql.*" %>
    <%@ page import="oracle.jdbc.pool.OracleDataSource" %>
    <HTML>
    <HEAD><TITLE>Simple Oracle Example</TITLE></HEAD>
    <BODY BGCOLOR="#FFFFFF">
    <CENTER>
    <B>XID Report generation</B>
    <BR><BR>
    <%
    OracleDataSource ods = new OracleDataSource();
    ods.setUser("system");
    ods.setPassword("shekhar");
    ods.setURL("jdbc:oracle:oci:@");
    Connection conn = ods.getConnection();
    Statement stmt1 = conn.createStatement();
    ResultSet rs1 = stmt1.executeQuery("SELECT * FROM TEST");
    //Print start of table and column headers
    out.println("<TABLE CELLSPACING=\"0\" CELLPADDING=\"3\" BORDER=\"1\">");
    out.println("<TR><TH>C_IMSI</TH><TH>C_SIM</TH><TH>C_NAME</TH><TH>C_ADDRESS</TH><TH>C_CITY</TH><TH>C_STATE</TH><TH>ASPLDESC</TH></TR>");
    //Loop through results of query.
    while(rs1.next())
    out.println("<TR>");
    out.println(" <TD>" + rs1.getString("C_IMSI") + "</TD>");
    out.println(" <TD>" + rs1.getString("C_SIM") + "</TD>");
    out.println(" <TD>" + rs1.getString("C_NAME") + "</TD>");
    out.println(" <TD>" + rs1.getString("C_ADDRESS") + "</TD>");
    out.println(" <TD>" + rs1.getString("C_CITY") + "</TD>");
    out.println(" <TD>" + rs1.getString("C_STATE") + "</TD>");
    out.println(" <TD>" + rs1.getString("ASPLDESC") + "</TD>");
    out.println("</TR>");
    out.println("</TABLE>");
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery("SELECT ASPLDESC, COUNT(ID) AS OCCURANCE from TEST GROUP BY ASPLDESC");
    //Print start of table and column headers
    out.println("<BR><BR><TABLE CELLSPACING=\"0\" CELLPADDING=\"3\" BORDER=\"1\">");
    out.println("<TR><TH>ASPLDESC</TH><TH>Total Occurance</TH></TR>");
    //Loop through results of query.
    while(rs.next())
    out.println("<TR>");
    //out.println(" <TD>" + rs.getString("ID") + "</TD>");
    out.println(" <TD>" + rs.getString("ASPLDESC") + "</TD>");
    out.println(" <TD ALIGN='RIGHT'>" + rs.getString("OCCURANCE") + "</TD>");
    out.println("</TR>");
    out.println("</TABLE>");
    %>
    </CENTER>
    </BODY>
    </HTML>

    user552380,
    You don't need three different JDBC drivers in your CLASSPATH, only one.
    Are you getting an error message?
    If you are then please post the entire error message and stack trace you are getting.
    Note that you can use the [ code ] and [ /code ] tags (without the spaces) to format
    your code.
    Good Luck,
    Avi.

  • Jsp sriplets not working in properly in ojsp

    Hi every one i have this ADF application develped in jdevelper 11.1.1.0.2 and deployed in to weblogic server version 10.3.0 and it worked fine.plese note i have used
    ADF for the presentaion layer.We had to migrate in to weblogic server version 10.3.2.for this i used jdevelper version 11.1.1.2.0 and open the project from this and i click yes for the migration.
    then i have deployed the new war file in to the new server.but the thing is it doesnt work the expected way.for my knowldge the issue is something to do with ojsp.when it tries to read jsp scriplets in the jsp page it throws an error.it is as followes
    **JspServlet error: Servlet unable to dispatch to the following requested page: The following exception occurred:oracle.jsp.parse.JavaCodeException:  Line # 13, oracle.jsp.parse.JspParseTagScriptlet@3f673160***
    **Error: Java code in jsp source files is not allowed in ojsp.next mode.>**
    any solution to this.????can i disable the ojsp compiler and go to normal jsp compliser?if so how to do it?
    thanks in advance every one :)
    Umesh

    Extracted from Note 1067696.1:
    You need to either adapt your code to remove the scriptlets in your JSP page,
    or you can use the following Java option to disable OJSP:
    -Dadfvdt.disableOjspDeployment=true
    You can add this option -Dadfvdt.disableOjspDeployment=true in your file "ide.conf" in the directory "<Middleware_Home>\jdeveloper\ide\bin"
    For your Production environment, you can have your Managed WLS ignoring the OJSP mode by adding the Java Option -Dadfvdt.disableOjspDeployment=true
    * in the "startManagedWebLogic" (if you want to limit it to a specific Managed Server)
    * or "setDomainEnv" (for all managed servers in a domain).

  • Jsp code not working

    hello
    we have some class files that are in a zip file that the nw admin has included in the CLASSPATH.
    The code works on Windows w/Tomcat but not the remote Sun Web Server, we cannot get the connection to database due to the code not reading the class files.
    Has anyone come up against anything of this nature. Any thoughts are appreciated.

    yeah we're not getting the str replace error any more - heres index.jsp
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
    <%@ include file="admin/include/db.jsp" %>
    <html>
    <head>
    <title>Toshiba Industrial Systems</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link href="common/css/master.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" language="Javascript" src="common/js/master.js"></script>
    <script>
    var strBCLink1 = "placeholder.html";
    var strBCLink2 = "index_oc.jsp";
    var strBCLink3 = "prod_100.jsp";
    var strBCText1 = "Industrial Systems";  
    var strBCText2 = "Uninterruptible Power Systems";
    var strBCText3 = "1000 Series";
    </script>
    <script language="JavaScript" type="text/JavaScript">
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;
    function MM_preloadImages() { //v3.0
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function MM_findObj(n, d) { //v4.01
    var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
    if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_swapImage() { //v3.0
    var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    //-->
    </script>
    <style type="text/css">
    </style>
    </head>
    <body>
    <table height="100%" width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td height="87">
    <%@ include file="_header.jsp" %>
    </td>
    </tr>
    <tr>
    <td align="left" class="backGlobalNav" valign="top" height="21" >
    <%@ include file="_nav_global.jsp" %>
    </td>
    </tr>
    <tr>
    <td align="left" valign="top" height="23">
    <%@ include file="_breadcrumb.jsp" %>
    </td>
    </tr>
    <tr>
    <td align="left" valign="top">
    <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="160">
    <%@ include file="_nav_side_ups.jsp" %>
    </td>
    <td width="8" align="center" valign="middle"><img src="common/images/spacer.gif" alt="" width="1" height="1"></td>
    <td width="605" align="left" valign="top">
              <TABLE cellSpacing=0 cellPadding=0 width="100%"
    border=0>
    <TBODY>
                   <tr><td height="5"></td></tr>
                        <%
                        if(((request.getParameter("id3")==null))){
                        %>
    <TR>
    <TD width=605 align="left" valign="top">
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="605" height="250">
    <param name="movie" value="admin/index_images/index.swf">
    <param name="quality" value="high">
    <embed src="admin/index_images/index.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="605" height="250"></embed></object>                                        
                        </TD>
    </TR>
                        <%}
                        else{
                        str1="";
                        Statement smt4l = conn.createStatement();
                        str1 ="select * from tbl_item where int_parent_id=" + request.getParameter("id3");
                        ResultSet rs_4l=smt4l.executeQuery(str1);
                        %>
    <TR>
    <TD width=605 align="left" height="250" valign="middle" bgcolor="#F0F0F0">
                             <table border="0" width="100%">
                                  <%while (rs_4l.next()){ %>
                                  <tr>
                                       <td>
                                            <a href="./<%=rs_4l.getString(str_link")%">?id1=<%=request.getParameter("id1")%>&id2=<%=request.getParameter("id2")%>&id3=<%=request.getParameter("id3")%>&id4=<%=rs_4l.getInt("int_item_id")%>" class="nav2ndOff">
                                            <%=rs_4l.getString("str_title")%>
                                            </a>
                                       </td>
                                  </tr>
                                  <%}%>
                             </table>
                        </TD>
    </TR>
                        <%
                        }%>
    <TR>
    <TD vAlign=top align=left></TD>
    </TR>
    <TR>
    <TD vAlign=top align=left height=5><IMG height=1
    alt=""
    src="Hard Drives & Optical Drives_files/spacer.gif"
    width=1></TD>
    </TR>
    <TR>
    <TD vAlign=top align=left> <TABLE cellSpacing=0 cellPadding=0 border=0>
    <TBODY>
    <TR>
    <TD vAlign=top align=left> <TABLE cellSpacing=0 cellPadding=0 width=605
    border=0>
    <TBODY>
    <TR>
    <TD class=backGrayMed height=17 align="left" valign="middle"><SPAN
    class=contentBoxOC> Featured Products</SPAN> </TD>
    <TD class=backWhite width=1><IMG height=1 alt=""
    src="Hard Drives & Optical Drives_files/spacer.gif"
    width=1></TD>
    <TD class=backGrayMed align="left" valign="middle"><SPAN
    class=contentBoxOC> News</SPAN></TD>
    </TR>
    <TR>
    <TD vAlign=top align=left width=399><IMG
    height=1 alt=""
    src="Hard Drives & Optical Drives_files/spacer.gif"
    width=1></TD>
    <TD class=backGrayLight vAlign=top align=left
    width=1 rowSpan=2><IMG height=1 alt=""
    src="Hard Drives & Optical Drives_files/spacer.gif"
    width=1></TD>
    <TD vAlign=top align=left width=200 height=10>
    <!-- LiveEdit marker DO NOT REMOVE -->
    <IMG
    height=1 alt=""
    src="Hard Drives & Optical Drives_files/spacer.gif"
    width=1></TD>
    </TR>
    <TR>
    <TD vAlign=top align=left><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td height="237" align="left" valign="top">
    <table width="405" border="0" cellspacing="0" cellpadding="0">
    <!---->
                                                           <!---->
    <%
                                                                Statement smt_featured = conn.createStatement() ;
                                                                ResultSet rs_featured=smt_featured.executeQuery("select * from tbl_item where int_parent_id= 0 and bit_featured=1");
                                                           %>
    <tr>
    <%
                                                           int i=0;
                                                           while(rs_featured.next()){
                                                           i++;
                                                           Statement smt_featured1 = conn.createStatement() ;
                                                           ResultSet rs_featured1=smt_featured1.executeQuery("select * from tbl_item where int_item_id= "+rs_featured.getInt("int_item_id"));
                                                           rs_featured1.next();
                                                           %>
    <td width="1"></td>
    <td width="190" height="190" align="left" valign="top" style="cursor:hand">
    <table width="100%" height="190" border="0" background="common/images/featured/back_box.gif" cellpadding="0" cellspacing="0">
                                                                <a href="<%=rs_featured1.getString("str_link")%>?<%=current_url_paramenters%>&<%=next_url_paramenter%>=<%=rs_featured.getInt("int_item_id")%>">
    <tr>
    <td height="18" colspan="2" align="left" valign="bottom" class="headerMainProdFeature">
                                                                     <a href="<%=rs_featured1.getString("str_link")%>?<%=current_url_paramenters%>&<%=next_url_paramenter%>=<%=rs_featured.getInt("int_item_id")%>" class="headerMainProdFeature" >
                                                                     <%
                                                                     if((rs_featured.getString("str_title").length() )>20){
                                                                          out.print(rs_featured.getString("str_title").substring(0,20));
                                                                     else{
                                                                          out.print(rs_featured.getString("str_title"));
                                                                     %>
                                                                     </td>
    </tr></a>
    </a>
                                                                <a href="<%=rs_featured1.getString("str_link")%>?<%=current_url_paramenters%>&<%=next_url_paramenter%>=<%=rs_featured.getInt("int_item_id")%>">
    <tr>
    <td height="10" colspan="2" align="left" valign="bottom" ><a href="#" class="navfeat"><%=rs_featured.getString("str_subtitle")%></td></tr></a>
    </a>
                                                                <a href="<%=rs_featured1.getString("str_link")%>?<%=current_url_paramenters%>&<%=next_url_paramenter%>=<%=rs_featured.getInt("int_item_id")%>">
    <tr>
    <td height="94" colspan="2" align="center" valign="middle"><a href="<%=rs_featured1.getString("str_link")%>?<%=current_url_paramenters%>&<%=next_url_paramenter%>=<%=rs_featured.getInt("int_item_id")%>"><img src="admin/product_images/<%=rs_featured.getString("str_image")%>" border="0"></td></tr></a>
    </a>
                                                                <a href="<%=rs_featured1.getString("str_link")%>?<%=current_url_paramenters%>&<%=next_url_paramenter%>=<%=rs_featured.getInt("int_item_id")%>">
    <tr>
    <td width="100%" height="16" align="right" valign="middle"><img src="common/images/featured/arrow.gif" width="17" height="18">  </td>
    </tr></a>
    </table>
                                                                </td>
    <td width="9"></td>
    <%if((i%2)==0){%>
    </tr>
    <tr>
    <td height="9"></td>
    </tr>
    <tr>
    <%}
                                                                }%>
    <td></td>
    </tr>
    <tr>
    <td height="8"></td>
    </tr>
    <tr>
    <td height="8"></td>
    </tr>
    </table> </td>
    </tr>
    </table> </TD>
    <TD vAlign=top align=middle> <TABLE cellSpacing=0 cellPadding=0 width="95%"
    border=0>
    <TBODY>
    <%
                                                      Statement smt_news = conn.createStatement() ;
                                                      ResultSet rs_news=smt_news.executeQuery("select * from tbl_news where bit_active=1 and bit_featured=1");
                                                      while(rs_news.next()){
                                                      %>
    <TR>
    <TD vAlign=top align=center><IMG
    src="common/images/featured/82.gif" alt="" width="3" height="5"
    border=0></TD>
    <TD vAlign=top align=left> <A class="pr" href="./admin/news/<%=rs_news.getString("str_link")%>" target="_blank">
    <%=rs_news.getString("str_title")%>
    </A> </TD>
    </TR>
    <TR>
    <TD vAlign=top align=left><IMG height=1 alt=""
    src="Hard Drives & Optical Drives_files/spacer.gif"
    width=1></TD>
    <TD vAlign=top align=left height=6>
    <!-- LiveEdit marker DO NOT REMOVE -->
    <IMG
    height=1 alt=""
    src="Hard Drives & Optical Drives_files/spacer.gif"
    width=1></TD>
    </TR>
    <%}%>
    <TR>
    <TD vAlign=top
    align=left></TD>
    </TR>
    </TBODY>
    </TABLE></TD>
    </TR>
    </TBODY>
    </TABLE>
                                       </TD>
    </TR>
    </TBODY>
    </TABLE></TD>
    </TR>
    </TBODY>
    </TABLE></td>
    <td align="left" valign="top"> </td>
    </tr><tr>
    <td height="5" colspan="4"><img src="common/images/spacer.gif" width="1" height="1"></td>
    </tr>
    <tr>
    <td height="30" align="left" valign="top" colspan="4">
    <%@ include file="_footer.jsp" %>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </body>
    and here is db.jsp
    <%@ page import="com.oreilly.servlet.MultipartRequest,java.io.*;"%>
    <%!
    String nl2br(String str){
         str=blanknull(str);
         return str.replaceAll("\n", "<br>");
    String addslashes(String str){
         str = str.replaceAll("'", "''");
         return str;     
    String getExtention(String str){
         int pos = str.indexOf(".");
         return str.substring(pos,str.length());
    String getExtention1(String str){
         int pos = str.indexOf(".");
         return str.substring(pos+1,str.length());
    String convertFileSize(long size) {
         int divisor = 1;
         String unit = "b";
         if (size >= 1024 * 1024) {
              divisor = 1024 * 1024;
              unit = "M";
         else if (size >= 1024) {
              divisor = 1024;
              unit = "K";
         if (divisor == 1) return size / divisor + " " + unit;
         String aftercomma = "" + 100 * (size % divisor) / divisor;
         if (aftercomma.length() == 1) aftercomma = "0" + aftercomma;
         return size / divisor +  " " + unit;
    String highlight_key(String str, String key,String color){
         //str = str.replaceAll("(?i)"+key, "<font color='"+color+"'><b>"+key+"</b></font>");
         return str;
    String first_sentence(String str, String key){
         int pos = str.indexOf(".");
         if(pos==-1){
              pos=str.length();
              return str;
         String str1=str.substring(0,pos);
         int pos1 = str1.indexOf(key);
         if(pos1==-1 && pos!=str.length()){
              str=str.substring(pos+1,str.length());
              return first_sentence(str,key);
         else{
              return str1;
    String blanknull(String s) {
    return (s == null) ? "" : s;
    String removeslashes(String str){
         str = str.replaceAll("''", "'");
         return str;     
    void sendmail(String to,String from, String subject, String message){
    //String from="[email protected]";
    //String to="[email protected]";
    try{
         SmtpClient client = new SmtpClient("mail.xxxxx.xxx");
         client.from(from);
         client.to(to);
         PrintStream message = client.startMessage();
         message.println("To: " + to);
         message.println("Subject:  "+subject+"!");
         message.println(message);
         message.println();
         message.println();
         client.closeServer();
      catch (IOException e){     
         System.out.println("ERROR SENDING EMAIL:"+e);
    %>
    <%
    Connection conn = null;
    //String dbUrl = new String("jdbc:mysql://localhost/toshiba?user=root&password=");
    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    conn = DriverManager.getConnection("jdbc:oracle:thin:@10.0.112.92:1524:cweb","mhunter","chester");
    Statement smt = conn.createStatement() ;
    String path=getServletConfig().getServletContext().getRealPath("admin");
    String imagepath=path+"/product_images";
    String tagpath=path+"/tag_files";
    String newspath=path+"/news";
    String envpath=path+"/env_images";
    String resumepath=path+"/resume_files";
    String pagepath=path+"/pages_files";
    String downloadpath=path+"/download_files";
    %></a>

  • Jsp:root not working

    I have the page below where I am trying to follow the jspx way(this file has a jsp extension but I hear that is okay too). the page works in firefox, but nothing shows up in IE. Upon further investigation, I select show source in IE and it shows me the xml declaration, the jsp:root element and everything(which I think it is not supposed to do especially since omit-xml-declaration is true!!!) What in the world is going on?
    I am using the url http://localhost:8080/Test.jsf and the file name is Test.jsp because I have my *.jsf filter set up. I have no idea what is going on? Anyone have a simple jspx page working that I can also try?
    thanks,
    dean
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core">
    <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
    doctype-system="http://www.w3.org/TR/html4/loose.dtd"
    doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
    <html xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core">
         <head>
              <title></title>
         </head>
         <body>
              <f:view>
                   <h:form id="inputForm">
                   <h:outputText value="some more text"/>
                        Some kind of test <h:inputText id="prop" value="#{backingTest.prop}"/>
                        hello there
                        <h:commandButton id="submit" action="sayhello" value="Say Hello" />
                   </h:form>
              </f:view>
         </body>     
    </html>
    </jsp:root>

    I got it working now. One of the problems was the Sun RI. I don't know if it was an old version or not, but I switched to MyFaces and it now works, yeah! It was probably an old version of Sun's RI anyways and that is probably why.

  • JSP compenent not working in mozilla and firefox

    Hi Experts,
    We have made a portal component with JSPs. And assigned it to anonymous page on our portal.
    Same is working fine with IE. However, with Mozilla and Firefox it gets distorted.
    Anyone knows whether mozilla supports JSP pages or not?
    Is there problem with Support pack?
    I am using EP 7.1 and SP 10 for the Mozilla Browser version (3.6.25 and 8.0.1).
    Your helps will be appriciated.
    Regards,
    Chitra

    Dear Chitra
    Please check Product Availability Matrix in service market place to verify the compatibility for accessing JSP in mozilla,
    I think it should work in 3.6.25 but not sure about 8.0.1, please check and verify in SMP
    Best Regards
    Arun Jaiswal

Maybe you are looking for

  • Issues with External Hard Drives

    I hope this is the right forum for this one - please give me a steer if not! I've also posted it in 'Dock and Finder', but this forum seems equally appropriate, if not more so. I'm getting repeated issues with External Hard Drives, including ones tha

  • Why my macbook pro is very slow?

    why my macbook pro has became so slowly?

  • IPod over heating for no apparent reason?

    I've had a 4G 20GB iPod for about three months, it was bought used but since then it has been running absolutely fine with no real problems aside from I think one reset after it seemingly hung. The other day however, it wasn't connected to my iBook a

  • Webtemplate in 7.0

    Hi All, 1) Can we  open 3.x webtemplate in 7.0 version after migration? 2) Which things are added newly  for web templated in 7.0 version ? Regards, Deepak Chavan.

  • I lost my Wi-Fi, mac says no hardware installed?

    I lost my Wi-Fi, mac says no hardware installed?