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 2 of 2

Thread: pass parameters from jsp to another jsp

  1. #1
    Junior Member
    Join Date
    Mar 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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
    Member
    Join Date
    Feb 2012
    Posts
    58
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default Re: pass parameters from jsp to another jsp

    Looks like you passed the "name" parameter to the viewvideo.jsp page incorrectly? How did you exactly do that?

Similar Threads

  1. Help using parameters
    By white97 in forum Object Oriented Programming
    Replies: 6
    Last Post: August 9th, 2011, 07:28 PM
  2. Can you pass parameters from one method into another method?
    By u-will-neva-no in forum Java Theory & Questions
    Replies: 2
    Last Post: April 14th, 2011, 07:46 AM
  3. Actual and Formal Parameters
    By mikec2500 in forum Object Oriented Programming
    Replies: 4
    Last Post: February 10th, 2011, 08:48 AM
  4. 'pass by value' and 'pass by reference'
    By pokuri in forum Object Oriented Programming
    Replies: 5
    Last Post: January 26th, 2011, 11:30 AM
  5. formal and actual parameters
    By gemma in forum Java Theory & Questions
    Replies: 3
    Last Post: December 7th, 2010, 11:14 AM