Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2012
    Posts
    2
    Rep Power
    0

    Default pass parameters from jsp to another jsp

    i have few video filepath in db and have load them to jsp call viewvideo.jsp each video as links. i wanna play the video which i click jest using java and html

    here the cord in viewvideo.jsp
    <%
    try {
    ResultSet resulset = jdbc.getdata("select * from video");

    %>
    <form >
    <table >

    <%
    while (resulset.next()) {
    %>
    <tr>
    <td><input type="hidden" value="play" name="<%=resulset.getString(3)%>" ><a href="twovedio.jsp"><%=resulset.getString(3)%></a></td>
    </tr>
    <%}%>
    </table>
    </form>
    <%} catch (Exception e) {
    }%>

    here the cord in twovedio.jsp
    <% String video_path = request.getParameter("name");
    if (video_path != null) {
    %>
    <object
    width="545"
    height="350"
    data="http://releases.flowplayer.org/swf/flowplayer-3.1.5.swf"
    type="application/x-shockwave-flash"
    >
    <param
    name="movie"
    value="http://releases.flowplayer.org/swf/flowplayer-3.1.5.swf"
    />
    <param
    name="allowfullscreen"
    value="true" />
    <param
    name="allowscriptaccess"
    value="always"
    />
    <param
    name="flashvars"
    value='config={"plugins":{"pseudo":{"url":"flowpla yer.pseudostreaming-3.1.3.swf"},"controls":{"backgroundColor":"#000000 ","backgroundGradient":"low"}},"clip":{"provid er": "pseudo","url":"Upload_video/<%= video_path%>"},"playlist":[{"provider":"pseudo","url":"Upload_video/<%= video_path%>"}]}' />
    </object>
    <%} else {

    %>

    <h1>[[[redacted]]]</h1>

    <%}%>


    error says String video_path = request.getParameter("name"); parameter value is null video doesn't play

    please help i am really new to thesethings

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,750
    Rep Power
    19

    Default Re: pass parameters from jsp to another jsp

    All that code there should be in a servlet, or even better in a DAO accessed by a servlet.
    That will allow you to debug it and see what's going on.
    The servlet would then forward to the JSP, supplying a List of data to display.
    You shouldn't muck up your JSPs with code like that, as they're a sod to debug.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    Join Date
    Mar 2012
    Posts
    2
    Rep Power
    0

    Default Re: pass parameters from jsp to another jsp

    Thank you for reply Tolls

Similar Threads

  1. Replies: 10
    Last Post: 01-24-2012, 10:02 PM
  2. How to pass parameters to frames
    By nino23 in forum AWT / Swing
    Replies: 1
    Last Post: 06-29-2011, 09:39 PM
  3. Confirm dialog+pass parameters
    By barcelonax in forum JavaServer Faces (JSF)
    Replies: 0
    Last Post: 12-21-2010, 08:20 AM
  4. Replies: 5
    Last Post: 11-21-2010, 02:08 PM
  5. how to use picturebox and pass parameters to a url
    By Nubkadiya in forum New To Java
    Replies: 5
    Last Post: 06-02-2010, 02:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •