Results 1 to 3 of 3
- 03-21-2012, 06:58 AM #1
Member
- Join Date
- Mar 2012
- Posts
- 2
- Rep Power
- 0
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
- 03-21-2012, 09:40 AM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
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.
- 03-21-2012, 10:37 AM #3
Member
- Join Date
- Mar 2012
- Posts
- 2
- Rep Power
- 0
Similar Threads
-
Java from console with parameters... with inetrnal parameters
By metoda in forum New To JavaReplies: 10Last Post: 01-24-2012, 10:02 PM -
How to pass parameters to frames
By nino23 in forum AWT / SwingReplies: 1Last Post: 06-29-2011, 09:39 PM -
Confirm dialog+pass parameters
By barcelonax in forum JavaServer Faces (JSF)Replies: 0Last Post: 12-21-2010, 08:20 AM -
how to pass parameters from a method to another which accepts to parameters?possible?
By amrmb09 in forum Advanced JavaReplies: 5Last Post: 11-21-2010, 02:08 PM -
how to use picturebox and pass parameters to a url
By Nubkadiya in forum New To JavaReplies: 5Last Post: 06-02-2010, 02:00 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks