aspose file tools*
The moose likes JSP and the fly likes pass parameters from jsp to another jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "pass parameters from jsp to another jsp" Watch "pass parameters from jsp to another jsp" New topic
Author

pass parameters from jsp to another jsp

chathura chamida
Greenhorn

Joined: Mar 20, 2012
Posts: 8
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
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18135
    
    8

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

Joined: Mar 20, 2012
Posts: 8
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
Bartender

Joined: Oct 14, 2005
Posts: 18135
    
    8

What is this "cord" thing you keep talking about?
chathura chamida
Greenhorn

Joined: Mar 20, 2012
Posts: 8
how can i do what i want?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18135
    
    8

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

Joined: Mar 20, 2012
Posts: 8
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: pass parameters from jsp to another jsp
 
Similar Threads
class file is not loading while running JSP file
Doubts in jsp
JSP with Jdbc
Edit/Delete values in database using jsp
Only for one data in the text box