I want to store url in oracle database and when ever I click button from my html page it should navigate to that url page. Is is possible?
Store URL in oracle database and access the link from html web page on click of a but
Collapse
X
-
Thanks I have already done the programming To insert the url in the database , but I want to access the url and navigate to the page when button is clicked . The url will be stored in the oracle database ,but how to access the url on click of the button from my webpage .Comment
-
It is unfair to ask people for do your work for you.
Please attempt to solve the problem first and then if you have a particular question about the implementation you have attempted ask for help.
Start by researching the suggested solutions that have been discussed so far.
For example, the first result in a google search for "jsp response redirect" came up with this article: jsp - page redirecting. It explains how to use Java code send a redirect to the browser (which you can use after you save the URL into your database).
-FrinnyLast edited by Frinavale; Oct 25 '13, 01:34 PM.Comment
-
I think I miss read your question.
You wanted to know how to access the URL from a button click?
What URL?
As you know, your button will submit the page to the server for processing. Are you trying to store the URL of the page that the button submitted to? I'm really not sure why you would want to do this but this is possible.
First we need to cover a few things...
JSP pages and other Java hosted web applications require a web server component to handle page requests from browsers. The web server I used to use many years ago wasTomcat Apache. I'm pretty sure it is the server you are using now.
When Apache receives a request it determines what code should be executed to handle the request and then creates a context for the Java code to run under. In your Java code, you can use the PageContext you can access the requested URL through PageContext.req uest.contextPat h property.
If you are trying to store some other URL that is somehow submitted to your jsp code, then you need to explain where you are getting that URL from.
It has been a very very long time since I've developed Java applications and I don't know how much further I can help you.
I moved your question to the Java forum since your question has nothing to do with JavaScript.
-FrinnyLast edited by Frinavale; Oct 25 '13, 01:55 PM.Comment
Comment