• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

pass parameters from jsp to another jsp

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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


here the cord in twovedio.jsp



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

please help i am really new to thesethings
 
Sheriff
Posts: 26770
82
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should start by producing a plain old HTML file which acts the right way. Right now your HTML has a form which does nothing and input elements inside it which are not used. Perhaps you thought the input elements would somehow be parameters of the links they are next to? No. That's not how those elements work.

Possibly it's hard to notice that because your JSP is all cluttered up with scriptlets. That's another thing you should do: get rid of those scriptlets. They haven't been professional practice for years now. All of the JDBC access should be put into a servlet, and the movie data from the database should be put into request scope. Then JSTL code in the JSP should be used to get that data and generate the HTML.
 
chathura chamida
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you for advice paul like i said i am really new. yes i have lot to learn this is my first post can you give some cording explanation about this please
 
Paul Clapham
Sheriff
Posts: 26770
82
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is this "cord" thing you keep talking about?
 
chathura chamida
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how can i do what i want?
 
Paul Clapham
Sheriff
Posts: 26770
82
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

chathura chamida wrote:how can i do what i want?



Well, you'll have to learn a little bit of HTML, so that you know how to use a URL with parameters in an <a> element, and how a <form> element works, and so on. That's just for background, although anybody who is writing code to generate HTML should really know basic things like that. But if you use JSTL instead of scriptlets (and you should, as I already said) then the <c:url> tag will take care of those details for you, if you use it right. So that's another thing on your "Have To Learn" checklist.

As for the "cord" you keep talking about, did you actually mean "code"?
 
chathura chamida
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you I really appreciate advice. yes i mean code. i jest misspell. sorry about that i have no experience in this forum things i have never done this before. and i will try to concentrate on what you said. thank you once again
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic