Java Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingJava Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 21st, 2012, 01:41 AM
chathura.chamid chathura.chamid is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2012
Posts: 3 chathura.chamid User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 41 m 37 sec
Reputation 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) {
%>

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

please help i am really new to thesethings

Reply With Quote
  #2  
Old April 10th, 2012, 02:16 PM
kevinsatya kevinsatya is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Posts: 3 kevinsatya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 27 m 37 sec
Reputation Power: 0
Re:Pass parameters from jsp to another jsp

Iterating the resultset in jsp is not the best practice !!!
Instead pass a parameter which is video_id to a controller or servlet which in turn trigger DB call i.e. sql

The output of SQL should be passed to jsp..Just check out with your technical architect....

Reply With Quote
  #3  
Old April 10th, 2012, 09:29 PM
David166 David166 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Posts: 7 David166 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 22 sec
Reputation Power: 0
it says 'i' needs to be a constant.

THeres no reason i start at 1, its just a good number to start at with player id's i guess :P

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJava Development > Pass parameters from jsp to another jsp


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap