Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: why a unknown symbol is visible on a jsp page which include another html pages

  1. #1
    Junior Member
    Join Date
    Jul 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default why a unknown symbol is visible on a jsp page which include another html pages

    Please see the for audiogallary.jsp(a line is bold) :
    <%@ page contentType="text/html;charset=windows-1252"
    language="java" errorPage="/error1.jsp" %>
    <%!
    String strparam = "";
    String strfile="";
    String strquery="";
    String srccategory="";
    int flag = 0;
    %>
    <%response.setHeader("Cache-Control","no-store");
    response.setHeader("Pragma","no-cache");
    response.setDateHeader ("Expires", 0);%>
    <%
    strparam=request.getParameter("p1");
    if(strparam !=null){
    if(strparam.contains(">") || strparam.contains("<") || strparam.equals("") || strparam.contains("%3C") || strparam.contains("%3E") ){
    response.sendRedirect("audiogallery.jsp");
    }
    else if((strparam.equalsIgnoreCase("contactus")) || (strparam.equalsIgnoreCase("disclaimer")) || (strparam.equalsIgnoreCase("sitemap")) || (strparam.equalsIgnoreCase("feedback")) || (strparam.equalsIgnoreCase("overview")) || (strparam.equalsIgnoreCase("functions")) || (strparam.equalsIgnoreCase("offices")) || (strparam.equalsIgnoreCase("directors")) ){
    strfile=strparam.concat(".html");
    }else{
    strparam = null;
    }
    }
    %>

    <%@ include file="header.jsp"%>

    <div id="container">
    <!-- start of content on home page -->
    <div id="content">
    <%@ include file="leftBar.jsp"%>
    <script language='JavaScript1.2' src='images/newmenu.js'></script>
    <!-- start of rightpanel_search -->

    <!-- end of rightpanel_search -->
    <% if(strparam==null){
    strquery= request.getParameter("query");
    if(strquery==null){%>
    <%@ include file="middlelinks.html"%>
    <div id="content_middle_noright">
    <br> <%@ include file="gallery/videogallery/audio1.html"%>
    </div>

    <!-- end of middle -->
    <div class="clear"></div>
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <%}
    else{
    if(strquery.contains(">") || strquery.contains("<") || strquery.equals("") || strquery.contains("%3C") || strquery.contains("%3E") || strquery.contains("%3D") || strquery.contains("=") || strquery.contains("%27") || strquery.contains("'") || strquery.contains("%22") || strquery.contains("\"") ){
    response.sendRedirect("circulars.jsp");
    }else{%>
    <jsp:include page="rightBar.jsp">
    <jsp:param name="pagename" value="notifications.jsp"/>
    </jsp:include>
    <jsp:include page="searchresults.jsp">
    <jsp:param name="pagename" value="notifications.jsp"/>
    </jsp:include><%}
    }
    }
    else{%><jsp:include page="<%=strfile%>" /><%}%>

    </div>
    <!-- end of content on home page -->
    <div class="clear"></div>
    <%@ include file="footer.jsp"%>
    </div>
    <!-- end of page-->

    </body>
    </html>

    in the above code the line
    <%@ include file="gallery/videogallery/audio1.html"%
    includes audio1.html page

    Code for audio1.html page...

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Video1</title>
    <style type="text/css">
    #main { background: #fff; margin: 20px; text-align: center}
    a.media { display: block;}
    div.media { font-size: small; margin: 25px; width: 100% !important}
    div.media div, div.iframe_caption { font-style: italic; color: #888;}
    .navs{font-size:12px; font-family:Arial, Helvetica, sans-serif; font-weight:bold; color:#000;}
    #lr { border: 1px solid #eee; margin: auto}
    div.example { padding: 20px; margin: 15px 0px; background: #ffe; clear:left; border: 1px dashed #ccc; text-align: left}
    </style>

    <script type="text/javascript" src="gallery/videogallery/videos/jquery.min.js"></script>
    <script type="text/javascript" src="gallery/videogallery/videos/jquery.jqplugin.1.0.2.min.js"></script>
    <script type="text/javascript" src="gallery/videogallery/videos/chili-1.7.pack.js"></script>
    <script type="text/javascript" src="gallery/videogallery/videos/jquery.metadata.v2.js"></script>
    <script type="text/javascript" src="gallery/videogallery/videos/jquery.media.js?v0.92"></script>
    <script type="text/javascript" src="gallery/videogallery/videos/swfobject.js"></script>

    <script type="text/javascript">
    $(function()
    {
    if(jQuery.browser.flash==true)
    {
    $('a.media').media( {width:320, height:20});
    $.fn.media.mapFormat('mp3','quicktime');
    }
    else{
    document.getElementById('flashcontent').style.disp lay='block';
    }
    });
    </script>

    </head>
    <body style="background: url(../images/demobg.gif) center -80px no-repeat; margin: 0px;
    padding: 0px; text-align: center;">
    <h>Hello I m here</h>
    <div class="navs"><a href="publicity_campaigns.jsp"> &lt Back to Main Page</a></div>
    <h3>
    Audio Gallery
    </h3>
    <div id="flashcontent" style="width: 640px; margin: 0px auto; background: none; display: none;">
    <p>
    Please update your version of the free Adobe Flash Player by <a href="http://www.adobe.com/go/getflashplayer">
    Downloading here</a></p>
    </div>
    <div>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td align="center"><a class="media" href="gallery/videogallery/videos/TDS_11_H.mp3">TDS Radio Hindi</a> </td>
    <td align="center"><a class="media" href="gallery/videogallery/videos/tds_jan.mp3">TDS</a></td>
    </tr>
    <tr>
    <td align="center"><a class="media" href="gallery/videogallery/videos/TDS_radio_English.mp3">TDS Radio English</a> </td>
    <td align="center"><a class="media" href="gallery/videogallery/videos/20-Seconds(31 March)-Option-I.mp3">TDS Radio Hindi</a></td>
    </tr>

    </table>

    </div>
    </body>
    </html>

    Problem:

    When audiogallary.jsp (above first file) is called it shows a kind of unknown symbol (ii>>? something like this) just above '< Back to Main'
    now when the same code of file audio1.jsp is paste into another file and audio1.html is replaced by that file(suppose abc.html having the same code) then this unknown symbol
    is not seen.
    what the problem sir ...
    thanks for kind effort


  2. #2
    Member goldest's Avatar
    Join Date
    Oct 2009
    Location
    Pune, India
    Posts
    63
    Thanks
    1
    Thanked 12 Times in 10 Posts

    Cool Re: why a unknown symbol is visible on a jsp page which include another html pages

    Cross posted : a unknown symbol is visible?

    Goldest
    Java Is A Funny Language... Really!

    Sun: Java Coding Conventions

    Click on THANKS if you like the solution provided.
    Click on Star if you are really impressed with the solution.

  3. #3
    Junior Member
    Join Date
    Jul 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: why a unknown symbol is visible on a jsp page which include another html pages

    that is my question

  4. #4
    Member goldest's Avatar
    Join Date
    Oct 2009
    Location
    Pune, India
    Posts
    63
    Thanks
    1
    Thanked 12 Times in 10 Posts

    Cool Re: why a unknown symbol is visible on a jsp page which include another html pages

    Quote Originally Posted by se.anilp View Post
    that is my question
    We know that. But you should always let us know when you have already cross posted the same question on any other forum. So if it gets resolved there, people here won't waste their time trying to provide you with any solution.

    Hope that's clear enough.

    Goldest
    Java Is A Funny Language... Really!

    Sun: Java Coding Conventions

    Click on THANKS if you like the solution provided.
    Click on Star if you are really impressed with the solution.

  5. #5
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: why a unknown symbol is visible on a jsp page which include another html pages

    Thread moved to - JavaServer Pages: JSP & JSTL
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

Similar Threads

  1. Replies: 33
    Last Post: May 25th, 2011, 06:59 AM
  2. fetch HTML page content from the web ( by executing javascript ) using stand alone
    By johnyabu@gmail.com in forum Java Theory & Questions
    Replies: 7
    Last Post: February 8th, 2011, 07:25 AM
  3. [SOLVED] Unknown Character
    By aussiemcgr in forum Java Theory & Questions
    Replies: 19
    Last Post: September 1st, 2010, 05:22 PM
  4. Vectors - accessing an unknown amount of objects
    By fox in forum Loops & Control Statements
    Replies: 1
    Last Post: May 7th, 2010, 03:54 PM
  5. [SOLVED] JTextField not visible in swing
    By Sterzerkmode in forum AWT / Java Swing
    Replies: 4
    Last Post: May 21st, 2009, 07:37 AM