Complete URL of the page
Hi All,
Does any one know how can I get the complete URL of the page using inbuilt API's.
For example, If I am on page:
http://localhost:7501/sampleportal/application?namespace=security&origin=portal.jsp&pageId=page1
Is there any way I can get this using API's.
request.getRequestURI() doesn't solve the purpose.
Any ideas?
cheers
Mark
Mark,
request.getRequestURI() gives you everything up to the query string. So
append to this reqeust.getQueryString().
russ
"Mark" <[email protected]> wrote in message
news:3ef3125e$[email protected]..
>
Hi All,
Does any one know how can I get the complete URL of the page using inbuiltAPI's.
>
For example, If I am on page:
http://localhost:7501/sampleportal/application?namespace=security&origin=portal.jsp&pageId=page1
>
>
Is there any way I can get this using API's.
request.getRequestURI() doesn't solve the purpose.
Any ideas?
cheers
Mark
Similar Messages
-
How do I find out the URL of the page a document was downloaded from?
I downloaded a PDF several months ago; I can see it in my downloads history. When I right click it there, I see the link to the PDF itself, but I need to know the actual page it came from.
I've checked my History, but cannot identify the page.
Is there a definitive way of determining the URL of the page that linked to the document?Open the Download Manager window and select that file.
Copy and paste this code in the Code field in the Error Console and click the Evaluate button.
*Firefox/Tools > Web Development > Error Console
The code adds a tooltip to the area with the file type icon at the left hand side of each entry in the DM window and shows a tooltip when you hover that area.<br />
It only works for entries that are currently visible in the DM and not for new entries that are added by downloading files and only as long as the DM window is kept open, so you need to rerun the code in the Error Console to get a tooltip.
<pre><nowiki>const Cc=Components.classes, Ci=Components.interfaces;
var enumerator=Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator).getEnumerator(null);
while(enumerator.hasMoreElements()){var win=enumerator.getNext();
if(win.location=="chrome://mozapps/content/downloads/downloads.xul"){
var i,r,R,C='';
r=win.document.getElementById("downloadView").getElementsByTagName("richlistitem");
for(i=0;R=r[i];i++){
var fP=R.getAttribute("path");
var fU=R.getAttribute("uri");
var sT=parseInt(R.getAttribute("startTime"));
var eT=parseInt(R.getAttribute("endTime"));
var cB=parseInt(R.getAttribute("currBytes"));
var mB=parseInt(R.getAttribute("maxBytes"));
var rU=R.hasAttribute("referrer")?R.getAttribute("referrer"):"<no referrer>";
var sD=cB/(eT-sT);
var tT=[];
tT.push("FILE: "+fP);
tT.push("URI: "+fU);
tT.push("REF: "+rU);
tT.push("");
tT.push("Total Time: "+((eT-sT)/1E3)+" sec.");
tT.push("Curr Bytes: "+cB+" bytes"+((cB==mB)?" (OK)":"(part)"));
tT.push("Max Bytes: "+mB+" bytes");
tT.push("Download speed: "+sD.toFixed(3)+" KB/sec");
R.setAttribute("tooltiptext",tT.join("\n"));
if(R.getAttribute("selected")=="true"){C=tT;}
if(C)prompt(C.join("\n"),C);
</nowiki></pre> -
When I open a new tab, the new tab used to show shots of 6 or so of the last sites I'd viewed, so I could easily click on one and go to it. Now it shows a blank tab and I have to type the URL of the page I want. How can I change it back?
Did you have the Google Toolbar installed?
* http://www.google.com/support/toolbar/bin/answer.py?answer=115561 Web-browsing tools : Google new tab page and most visited websites
Other extension that have a similar feature:
*Speed Dial: https://addons.mozilla.org/firefox/addon/4810
*Fast Dial: https://addons.mozilla.org/firefox/addon/5721 -
Can I capture the url of the page I am on and set it to a variable??
Hi..
I was wondering how I can capture the url of the page that I am on and then set it to a variable??? is that possible???
Thx
RichTry this.
String url =request.getRequestURI();
Hope this helps.
Fred -
The address bar is not displaying the URL of the page
When I open a tab, I cannot see the URL of the opened page in it. If I enter a new address and press enter, I go to the page. The URL displays the entered URL, but doesn't change for the new pages that load.
Also, the back/forward buttons do not work. I'm guessing it's related to the address bar issue.Found it! The "Redirect Remover" extension was causing the problem! Thanks for your help :)
-
I have a Photosmart D110 all in one and just bought a Asus Transformer tablet. I`ve downloaded the eprint app and every time I share a page from a website via email to my printers email address it only prints the URL not the actual webpage. Also when I click the share option it gives me the option to share with the eprint app, but when I do it say it can't read or support the file due to paper size not being selected.
This question was solved.
View Solution.Hi,
The HP ePrint does not support web pages printing
Printing Web pages through email is currently not supported. HP is in the process of developing solutions to support Web page printing for mobile devices.
http://h10025.www1.hp.com/ewfrf/wc/document?docname=c02881579&cc=us&dlc=en&lc=en&product=5058336#N91...
You may print web pages using the HP ePrint Home & Biz app by using its integrated web browser:
http://h10025.www1.hp.com/ewfrf/wc/document?docname=c01616126&lc=en&cc=us&dlc=en&product=3857218#N58...
Regards,
Shlomi
Say thanks by clicking the Kudos thumb up in the post.
If my post resolve your problem please mark it as an Accepted Solution -
Passing data and command in url of the page
Hi,
I have a developed a page which has material as input field on first page
now on press of button on that page ,it feteches the data related to that material in the input processing of that page and display output on other page.
now i want to display out directly ,supressing the first page.
so is there a way where i can pass data + command (button press) in the url of that page so it will execute on i/p processing of this page directly and displays the o/p on other page.
for eg... ?matnr=x.....(what to write for button click so it executes on i/p processing directly)
Remember my code for fetching the data is on the first page in input processing,so i need to call this page itself.Hi Sushi,
I wouldn't do it quite the way you are - I would only build one page.
Make MATNR an auto page attribute. Then in <i>onInitialization</i> you can test
if MATNR is not initial.
and then fetch the data.
In the layout you can either display the input field, call it MATNR, and any error messages from the fetch data code or if the data was fetched okay display the results.
Now you can call the page with <i>?matnr=X</i> and it will work.
Cheers
Graham Robbo -
Res.getPathTranslated() does not return correct URL of the page requested
Hi,
The res.getPathTranslated() statement in the below code (in doFilter method) does not return the correct URL of the requested webpage.
Whenever a web page is accessed using a return statement (eg : return "nextPage"; ) inside a button's action method or a hyperlink's action method, the res.getPathTranslated() returns the URL of the current webpage instead of returning the URL of the webpage that is actually requested.
For example if there is a button on the page http://localhost:29080/MyJaas/faces/firstPage.jsp
And the button_action() is as follows
button_action()
return "nextPage";
The res.getPageTranslaged() returns "http://localhost:29080/MyJaas/faces/firstPage.jsp" instead of "http://localhost:29080/MyJaas/faces/nextPage.jsp"
However, if the webpage is requested by populating the URL property of the hyerlink in creator IDE, the res.getPathTranslated() returns the correct (requested) web page.
How to make res.getPathTranslagted() return the correct URL when the webpage is accessed from hyperlink's / button's action method?
I know that the explation is not very clear, so please bear with me. Let me know if you need more clarificatons. Thanks in advance for showing interest in this issue.
And by the way, the code below is the same as that used in Jaas Authentication tutorial :- http://developers.sun.com/prodtech/javatools/jscreator/reference/techart/2/jaas_authentication.html
package jaasauthentication;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.http.HttpSession;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class SecurityFilter implements Filter{
/** Creates a new instance of SecurityFilter */
private final static String FILTER_APPLIED = "_security_filter_applied";
public SecurityFilter() {
public void init(FilterConfig filterConfig) {
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws java.io.IOException, ServletException{
HttpServletRequest req = (HttpServletRequest)request;
HttpServletResponse res = (HttpServletResponse)response;
HttpSession session = req.getSession();
String requestedPage = req.getPathTranslated();
String user=null;
//We dont want to filter certain pages which include the Login.jsp/Register.jsp/Help.jsp
if(request.getAttribute(FILTER_APPLIED) == null) {
//check if the page requested is the login page or register page
if((!requestedPage.endsWith("Login.jsp")) && (!requestedPage.endsWith("Register.jsp")) && (!requestedPage.endsWith("Help.jsp"))){
//Requested page is not login.jsp or register.jsp therefore check for user logged in..
//set the FILTER_APPLIED attribute to true
request.setAttribute(FILTER_APPLIED, Boolean.TRUE);
//Check that the session bean is not null and get the session bean property username.
if(((jaasauthentication.SessionBean1)session.getAttribute("SessionBean1"))!=null) {
user = ((jaasauthentication.SessionBean1)session.getAttribute("SessionBean1")).getUsername();
if((user==null)||(user.equals(""))) {
res.sendRedirect("Login.jsp");
return;
//deliver request to next filter
chain.doFilter(request, response);
public void destroy(){
}Guys any solution for the above problem?
Right answer fetches 10 duke dollars.. -
How do I create individual URL for the pages within an Adobe Muse site?
Could someone tell me how I can create separate URL addresses for each page within a site? I think it's in Page Properties, but I can't figure out how to do it.
Your website is actually hosted at http://kcronaphotography.free.fr
If you visit that URL, clicking on the other pages will change the URL displayed in the browser.
Your individual pages are available at URLs like: http://kcronaphotography.free.fr/about.html
www.karincrona.com is just a wrapper page containing a frameset that hosts your real pages in frames.
It appears that this page was generated by a tool called "ORT - Ovh Redirect Technology".
Displaying the pages inside a frame will not change the URL displayed in the web browser.
If you'd like your page to have nice URLs like www.karincrona.com/about.html, you'll need to get rid of the frame wrapper, and move the domain name to the webhost where your pages are being served.
If you want to keep the wrapper page, you may want to investigate if the ORT tool you're using provides any way of getting a URL to an individual page to show in the browser bar. -
How to get the specified serarch term from the complete url? - Help
Hello,
I have a table in which some columns. One of the column is storing the complete url for the search given by the user.
For Example:
1.
I give search like "oracle" on the Google, the column will store the complete url as
"http://www.google.com/search?hl=en&q=oracle".
I want the search word "oracle" to be returned from the column.
2.
I give search like "new + features + in + oracle + 10g", the column will store the url as
"http://www.google.com/search?hl=en&lr=&q=new+%2B+features+%2B+in+%2B+oracle+%2B+10g"
I want "new + features + in + oracle + 10g" search word to returned from the column.
Can anyone tell me how to achieve this task? I have tried for a long time also I tried the sys.utl_url.unescape() function, but could not got the desired result.
Please help, its really urgent!!!
Thanks in advance.Hi,
you can have a look into this code:SET ESCAPE ON
DECLARE
ref1 VARCHAR2(1000 CHAR) := 'http://www.google.com/search?hl=en\&q=oracle';
ref2 VARCHAR2(1000 CHAR) := 'http://www.google.com/search?hl=en\&lr=\&q=new+%2B+features+%2B+in+%2B+oracle+%2B+10g';
FUNCTION hextodec( h IN VARCHAR ) RETURN NUMBER
AS
h2 VARCHAR2( 150 );
i NUMBER( 10 );
j NUMBER( 2 );
d NUMBER;
BEGIN
h2 := LTRIM( h, '0' );
d := 0;
FOR i IN 1 .. LENGTH( h2 )
LOOP
SELECT DECODE( SUBSTR( h2, i, 1 )
, '0', 0, '1', 1, '2', 2, '3', 3, '4', 4, '5', 5
, '6', 6, '7', 7, '8', 8, '9', 9, 'A', 10
, 'B', 11, 'C', 12, 'D', 13, 'E', 14, 'F', 15 )
INTO j
FROM DUAL;
d := 16 * d + j;
END LOOP;
RETURN d;
END hextodec;
FUNCTION strip(samplevalue IN VARCHAR2) RETURN VARCHAR2
AS
finalvalue VARCHAR2(1000 CHAR) := samplevalue;
decimalvalue NUMBER(2);
pospct NUMBER;
extract VARCHAR2(2 CHAR);
BEGIN
finalvalue := SUBSTR(finalvalue ,INSTR(finalvalue ,'\&q='));
finalvalue := SUBSTR(finalvalue ,4);
if (INSTR(finalvalue ,'\&')-1 > 0) then
finalvalue := SUBSTR(finalvalue ,1,INSTR(finalvalue ,'\&')-1);
end if;
finalvalue := REPLACE(finalvalue ,'+',' ');
LOOP
pospct := INSTR(finalvalue ,'%');
EXIT WHEN pospct = 0;
extract := SUBSTR(finalvalue ,pospct+1,2);
finalvalue := SUBSTR(finalvalue ,1,pospct-1) || chr(hextodec(extract)) || SUBSTR(finalvalue ,pospct+3);
END LOOP;
RETURN finalvalue;
END;
BEGIN
DBMS_OUTPUT.PUT_LINE( hextodec('2B'));
DBMS_OUTPUT.PUT_LINE(strip(ref1));
DBMS_OUTPUT.PUT_LINE(strip(ref2));
END;
/Regards,
Yoann. -
Retrieving the whole URL of the caller page in a frameset.
I have a frameset where each frame contains a JSP page. Let's say that in one of the frames i have page1.jsp, whose URL is http://www.site.com/page1.jsp?a=1&b=2 . This JSP contains a link to page2.jsp . I click the link so now in frame A there is page2.jsp .
From page2.jsp, can i retrieve the URL of the page that called page2.jsp (that is, can i retrieve http://www.site.com/page1.jsp?a=1&b=2) ?
I know that page1.jsp could simply pass its own URL to page2.jsp as a parameter, but it would be very better if i could retrieve that URL without explicitly passing it.
I tried to read the request header "referer", which would be just what i need, but it always returns the URL of the page that created the frameset, which is useless to me.1) You can check for referrer, but the browser doesn't have to give it.
2) You can encode the referrer URL directly into your links...
href="page2.jsp?referrer=<%= URLEncoder.encode("http://www.site.com/page1.jsp?a=1&b=2") %>" -
when printing from the web on an hp4100 ,the url at the page bottom is garbled.....on the lexmark laser it is correct.....
Hi,
Please see [https://support.mozilla.org/en-US/kb/fix-printing-problems-firefox?e=sph&redirectlocale=en-US&as=s&s=printing&r=0&redirectslug=Firefox+prints+incorrectly this].
[http://kb.mozillazine.org/Problems_printing_web_pages Problems printing web pages] -
Extracting URL of the plugin opened from browser
An attachement is uploaded to the server page. Now when we open the attachement , the browser opens a Winword plugin for opeening it in a new window . Further the complete URL of the attachement along with the object-identity number is displayed in the title barof the new window. How do i get the complete URL present in the title bar??
you don't. ... If the content is not HTML and it's the only content loaded in the page, you have no way to control anything about that window. Even with Javascript from another window, you can't cuz there's no way to get a reference to the window to do anything.
-
How would I get the complete URL of my page, including all the data after the '?' ?
I've tried request.getRequestURL, but it only returns the main URL. By this I mean, if the complete URL was
http://forum.java.sun.com/post!default.jspa?forumID=45getRequestURL only returns
http://forum.java.sun.com/post!default.jspa Thanks!Check out the other methods on the request class.
The method getQueryString() will get the rest of the URL you are missing. -
How to open a URL in the default browser via CC HTML Extension?
Hi,
I'm trying to open a link via the default browser in a HTML Extension for Photoshop CC built with Extension Builder 3.
With the initial example the "/indext.html" it look like this:
<li><button class="default" id="btn_PHXS" onClick="onClickButton('PHXS')" disabled="true">Run ps code</button></li>
and I changed the code from "/ext.js" to:
...function onClickButton(ppid) { var csInterface = new CSInterface(); csInterface.openURLInDefaultBrowser('http://www.adobe.com');}...
This is what the "/lib/CSInterface-4.0.0.js" looks like:
* Opens a page in the default system browser.
* @param url The URL of the page to open. Must use HTTP or HTTPS protocol.
* @return One of these error codes:\n
* <ul>\n
* <li>NO_ERROR - 0</li>\n
* <li>ERR_UNKNOWN - 1</li>\n
* <li>ERR_INVALID_PARAMS - 2</li>\n
* <li>ERR_INVALID_URL - 201</li>\n
* </ul>\n
CSInterface.prototype.openURLInDefaultBrowser = function(url)
return cep.util.openURLInDefaultBrowser(url);
Since "util" doesn't seem to be defined I get the message:
Uncaught TypeError: Cannot call method 'openURLInDefaultBrowser' of undefined
Is the something missing?
Thx,
frankinHi Franklin,
Apologies for the delay but I have been trying to determine why this API is not been working. I have since discovered that, although this API is documented in the JS library, the behaviour has yet to be implemented into Photoshop CC. Offline I will try to determine why this API was included in the library when it was not ready but for the meantime, if you would like to open a browser, here is a workaround:
Instead of using:
//(new CSInterface).openURLInDefaultBrowser("http://www.adobe.com")
// Use the createProcess API to open a browser. The following shows a workflow in Windows to open Internet Explorer.
var csInterface = new CSInterface();
var rootDir = "/";
var isWindows = window.navigator.platform.toLowerCase().indexOf("win") > -1;
if (isWindows) {
rootDir = csInterface.getSystemPath(SystemPath.COMMON_FILES).substring(0, 3);
var processPath = "/usr/bin/open";
if (isWindows) {
processPath = rootDir + "Windows/explorer.exe";
var url = "http://www.adobe.com";
window.cep.process.createProcess(processPath, url);
Apologies for this inconvenience but we promise to keep you informed when openURLInDefaultBrowser API is fully supported.
Kind regards,
Lea
Maybe you are looking for
-
Create folder view with files and tasks
Good day to you, we want to support our software development procces with Vibe. What we are doing is, we make changes to the source code and protocol corresponding things in certain files. We think in so called "releases" and every release consists o
-
Is it really worth upgrading nForce into nF2??
posted by jand, Quote sigh... no it is not... just reflecting that my poor nForce will be considered old and it didn't even have the chance to be a 1 year old.... oh the humanity! can't a poor motherboard get the chance to grow old gracefully? must w
-
Multiple Topics/Queue for Single MDB?
Hi - Is it possible to configure single MDB to handle multiple Topic/Queue in JMS? I used two <jndi-name/> tags for two topics, but only the first one got picked up by the AS7 server. If one MDB can be configured to take multiple topics, how should I
-
If anyone has any experience with this please enlighten me. My phone nearly always exhibits a data connection when data on is not checked. How is this even possible? I have checked settings in pull down menu and in settings both are unchecked. Da
-
Adobe reader xi default printer is not current printer
I am using windows 7 64bit and adobe reader xi. The default printer listed on the pull down menu of reader is an old printer (Xerox 2015) and cannot be changed. The default printer on the system (Xerox 2205) is different to that listed in reader. I