JSTL to access url string
Hi All,
Is it possible to access the url string using jstl ? What about the equivalent to the jsp code 'request.getRequestURL()' in jstl ?
Any pointers ? Much Appreciated...
You can get at the request object through the pageContext
${pageContext.request.requestURL}
Cheers,
evnafets
Similar Messages
-
Generating Access URL with Mac OS X
OK, I'm really stumped here, and Apple Support has been completely unhelpful. For the life of me I can't generate the access URL in OS X. I can do it fine on a PC (where I had to set the class path in Java), but I can't figure out what's going on with the Mac. Here's what I've done:
% javac /pathto/ItunesU.java
% java /pathto/ItunesU.class >access.html
The resulting HTML file I get merely opens up iTunes and goes to the Music Store. There is no lengthy URL string embedded in it anywhere. My computer has all the necessary software updates, including Java. The ItunesU.java file is IDENTICAL to the one we compiled on the PC (the one that worked), so I know all the shared keys, etc. are correct. What am I doing wrong?I am with TaishoB.
Here are links to our applets. They aren't actually finished because in the middle of development we decided to use perl instead. It's a bit shoddy. Basically the Applet gets the results from the ITunesU class, creates the html file on the users HDD, and then opens that file.
Here are the links to our source (please be kind, my account onlt gets so much bandwidth per month):
http://robinson.hopto.org/ITunesU.java
http://robinson.hopto.org/ITunesUApplet.java
Look at our version of ITunesU.java also, because we added one small method to make life easier.
But that shoddy code (once you add your own information - I marked that with "YOUR OWN INFO") will only get you so far. you need to pack them into a jar file and then sign it. Then point the applet code on the html file to use the jar archive that you created.
You will find all that info at:
http://java.sun.com/docs/books/tutorial/deployment/jar/
I would show you the script that I used, but I have misplaced it.
This will hopefully give you at least the basics of how we got it to work. Like I said, the code is a bit shoddy, but you should be able to get it to work after massaging the code a bit (and working out the bugs).
NOTE: the applet itself does not work. I has textfields to get the info, but right now they are just hard-coded in there. click the button and it will trigger the action. Also, none of this will work unless you jar-it and sign it.
Let me know if you run into trouble.
xao -
Trying to capture a URL String after a redirect.
I'm trying to capture a URL string after a redirect. Is this possible? Am I going at this the wrong way?
They code below always comes back; isURLInaccessible: true
I've tried mutliple attempts of using Security.loadPolicyFile, still no luck.
Both the URLRequest domain and the redirect domain have crossdomain files with access set to *.
[CODE]
public function init():void{
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
var request:URLRequest = new URLRequest(myVideoURL);
loader.load(request);
private function progressHandler(pe:ProgressEvent):void{
var info:LoaderInfo = LoaderInfo(pe.target.loader.contentLoaderInfo)
if(info.isURLInaccessible){
trace("isURLInaccessible: " + info.isURLInaccessible);
}else{
trace(info.url);
[CODE]use an Event.COMPLETE listener and listener function to check that property.
-
Direct Access URLs in Release 2
What is the format for direct access URLs in release 2? I recall seeing somewhere that it had changed.
Thanks.I found the documentation. It is in the help file /help/sblpath.htm.
-
Flex encounters "Security error accessing url.Unable to load WSDL"
i have created a flex application which connects to SAP via web service.
when i try to run my flex application i encounter the following error.
"Security error accessing url.Unable to load WSDL"
i went through various posts relating a BSP application and crossdomain.xml
i have created the crossdomain.xml file in the application and
i tried those options and still not able to figure out the problem.
the security error is because of the absence of the crossdomain.xml file, and in which path should i be saving the file?
Kindly help me solve the problem.
Thanks in advance.Have you seen this blog
"Crossdomain.xml" in ABAP Web AS Server cache -
Security error accessing url (Unable to load WSDL)
Hi folks.
I have a Flex project that use a WCF webservice. In my localhost everything is allright, but I want to upload my flex project to a web host (http://www.dorj.ir) and upload my WCF webservice to a server that has a valid IP...
After going to http://www.dorj.ir, you can see this error
Security error accessing url
Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL (http://ip/service.svc?wsdl)
I put the crossdomain.xml file in the root of my server:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="http://www.dorj.ir" />
<allow-http-request-headers-from domain="http://www.dorj.ir" headers="SOAPAction"/>
</cross-domain-policy>
But I have the same error, yet...!
what should I do?!Have you seen this blog
"Crossdomain.xml" in ABAP Web AS Server cache -
How to use Direct Access URL in the FORM tag
I want to substitute the pageid url (/servlet/page?_pageid=161&_dad=portal30&_schema=PORTAL30) with the direct access urls (pls/portal30/url/page/my_page) to address the pageid conflict between development server and production server.
It works perfectly fine in the redirection code such as:
self.location.href="/pls/portal30/url/page/next_page". But I got "Page can not be found" error message when I use it in the <FORM> tag:
<FORM ACTION="/pls/portal30/url/page/next_page" METHOD="POST" NAME="my_form">
Does anyone out there know how to use the direct access url inside the <FORM> tag? I am trying not to write a bunch of code just to retrieve and insert the pageid at the run time.
Thanks in advance.
ArthurUse condition. If you are validating a record, just out the desired check in the condition field for that specific item.
Thanks
Nagamohan -
I'm having some trouble getting coldfusion to see japanese
characters in the URL string.
To clarify, if I have something like this:
http://my.domain.com/index.cfm?categorylevel0=Search&categorylevel1=%E3%82%A2%E3%82%B8%E3% 82%A2%E3%83%BB%E3%83%93%E3%82%B8%E3%83%8D%E3%82%B9%E9%96%8B%E7%99%BA
All of my code works correctly and the server is able to pass
the japanese characters to the database and retrieve the correct
data.
If I have this instead:
http://my.domain.com/index.cfm/Search/%E3%82%A2%E3%82%B8%E3%82%A2%E3%83%BB%E3%83%93%E3%82% B8%E3%83%8D%E3%82%B9%E9%96%8B%E7%99%BA
My script (which works fine with English characters) parses
CGI variables and converts these to the same URL parameters that I
had in the first URL using a loop and a CFSET url.etc..
In the first example, looking at the CF debug info shows me
what I expect to see:
URL Parameters:
CATEGORYLEVEL0=Search
CATEGORYLEVEL1=アジア・ビジネス開発
In the second example it shows me this:
URL Parameters:
CATEGORYLEVEL0=Search
CATEGORYLEVEL1=???·??????
Can anyone suggest means for debugging this? I'm not sure if
this is a CF problem, an IIS problem, a JRUN problem or something
else altogether that causes it to lose the characters if they are
in the URL string but NOT as a parameter.My suggestion was that you test with the
first url, not the second. However, I can see a source of
confusion. I overlooked your delimiter, "/". It should be "?" and
"=" in this case. With these modifications, we get
<cfif Len(cgi.query_string) neq 0>
<cfset i = 1>
<cfloop list="#cgi.query_string#" delimiters="&"
index="currentcatname">
<cfoutput>categorylevel#i# =
#ListGetAt(currentcatname,2,"=")#</cfoutput><br>
<cfset i = i + 1>
</cfloop>
If it is a failing of Coldfusion, the above test should fail,
too.
Now, an adaptation of the same test to your second url.
<cfset url2 = "
http://my.domain.com/index.cfm/Search/%E3%82%A2%E3%82%B8%E3%82%A2%E3%83%BB%E3%83%93%E3%82% B8%E3%83%8D%E3%82%B9%E9%96%8B%E7%99%BA">
<cfset query_str =
ListGetAt(replacenocase(url2,".cfm/","?"),2,"?")>
<cfif Len(query_str) neq 0>
<cfset i = 1>
<cfloop list="#query_str#" delimiters="/"
index="currentcatname">
<cfoutput>categorylevel#i# =
#currentcatname#</cfoutput><br>
<cfset i = i + 1>
</cfloop> -
Urgent requirement : security error accessing url and http error: standalone flex
Hi,
I have a requirement to create record from standalone flex. I am using Flex builder 3.
I used Flex-force toolkit to login to salesforce. The swf file generated when used internal to salesforce it works great.
But my requirement is to run it from public sites page / standalone pages. How will I configure it? I am getting error 'security error accessing url', default HTTP
The requirement is on priority, please help me to resolve this issue.
The login code is also furnished below. please help.
Full error details:
(com.salesforce.events::ApexFaultEvent)#0
bubbles = false
cancelable = true
context = (null)
currentTarget = (null)
eventPhase = 2
fault = (mx.rpc::Fault)#1
content = (null)
errorID = 0
faultCode = "Channel.Security.Error"
faultDetail = "Destination: DefaultHTTP"
faultString = "Security error accessing url"
message = "faultCode:Channel.Security.Error faultString:'Security error accessing url' faultDetail:'Destination: DefaultHTTP'"
name = "Error"
rootCause = (flash.events::SecurityErrorEvent)#2
bubbles = false
cancelable = false
currentTarget = (flash.net::URLLoader)#3
bytesLoaded = 0
bytesTotal = 0
data = (null)
dataFormat = "text"
eventPhase = 2
target = (flash.net::URLLoader)#3
text = "Error #2170: Security sandbox violation: file:///C|/Users/R/DOCUME%7E1/FLEXBU%7E1/TESTLO%7E1/BIN%2DRE%7E1/TESTLO%7E1.SWF cannot send HTTP headers to https://login.salesforce.com/services/Soap/u/14.0?1000.1153011256829."
type = "securityError"
headers = (null)
message = (mx.messaging.messages::ErrorMessage)#4
body = (null)
clientId = "DirectHTTPChannel0"
correlationId = "B8A1B02E-CE17-DCBA-4894-F2E4CBEB7C04"
destination = ""
extendedData = (null)
faultCode = "Channel.Security.Error"
faultDetail = "Destination: DefaultHTTP"
faultString = "Security error accessing url"
headers = (Object)#5
DSStatusCode = 0
messageId = "41F6A90D-ECAE-EA2D-7C84-F2E4DABD72F3"
rootCause = (flash.events::SecurityErrorEvent)#2
timestamp = 0
timeToLive = 0
messageId = "41F6A90D-ECAE-EA2D-7C84-F2E4DABD72F3"
statusCode = 0
target = (null)
token = (mx.rpc::AsyncToken)#6
message = (mx.messaging.messages::HTTPRequestMessage)#7
body = "<se:Envelope xmlns:se="http://schemas.xmlsoap.org/soap/envelope/"><se:Header xmlns:sfns="urn:partner.soap.sforce.com"/><se:Body><login xmlns="urn:partner.soap.sforce.com" xmlns:ns1="sobject.partner.soap.sforce.com"><username>uname</username><password>pwdandsec token</password></login></se:Body></se:Envelope>"
clientId = (null)
contentType = "text/xml; charset=UTF-8"
destination = "DefaultHTTP"
headers = (Object)#8
DSEndpoint = "direct_http_channel"
httpHeaders = (Object)#9
Accept = "text/xml"
SOAPAction = """"
X-Salesforce-No-500-SC = "true"
messageId = "B8A1B02E-CE17-DCBA-4894-F2E4CBEB7C04"
method = "POST"
recordHeaders = false
timestamp = 0
timeToLive = 0
url = "https://login.salesforce.com/services/Soap/u/14.0?1000.1153011256829"
responders = (Array)#10
[0] (::SalesForceResponder)#11
result = (null)
type = "fault"
Login code:
[Bindable] public var sfdc:Connection = new Connection();
private function login():void {
Security.loadPolicyFile("http://salesforce.com/services/crossdomain.xml");
var lr:LoginRequest = new LoginRequest();
lr.username = "uname";
lr.password = "pwdtoken";
sfdc.protocol = "https";
sfdc.serverUrl = "https://login.salesforce.com/services/Soap/u/14.0";
lr.callback = new AsyncResponder(loginSuccess, loginFault);
sfdc.login(lr);This is resolved.
I have copied the crossdomain.xml file to tomcat Root folder
and the issue is resolved. -
Can I pass variables in the URL string?
I am trying to get some variables into a loaded swf at
runtime. The variables will carry information so the swf can load
the correct xml file. I thought we could pass them through the URL
string like so:
new URLRequest("testing.swf?myVar=varOne
but it just throws an URL cannot be found error. How can I
get variables into my swf at runtime?What you are doing is fine. But you will always get that
error when testing
the movie (Ctrl+Enter). Try it in a browser and it should
work.
BTW, another way of doing the same is to use a URLVariables
object, like so:
var req:URLRequest = new URLRequest("testing.swf");
var vars:URLVariables = new
URLVariables("myVar=varOne&myVar2=varTwo");
req.data = vars; -
URL String works for weeks, then decides to give up on life.
I have a game that uses the twitter API to call 20 recent tweets from the accoun the URL string is set up to, iot has been working for weeks no problems untill todya, when it just shouted at me! saying:
Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: file:////http://search.twitter.com/search.json?lang=en&q=Lady%20Gaga&rpp=100
at DocumentMain()[F:\Documents and Settings\Scott Mitchell\Desktop\Comb Over Charlie Style Game\DocumentMain.as:88]
Sometimes i get another error, but thats if i change the url to: https://api.twitter.com/1/statuses/user_timeline.json?screen_name=LadyGaga
The code i have now to get the tweets is:
var loader:URLLoader = new URLLoader(new URLRequest("//http://search.twitter.com/search.json?lang=en&q=Lady%20Gaga&rpp=100"));
loader.addEventListener(Event.COMPLETE, loadComplete);
public function loadComplete(e:Event):void
processData(e.target.data);
public function processData(data:String):void
var tweets:Array = JSON.decode(data) as Array;
for (var i:int=0; i<21; i++)
TweetHolder.tweet1.text = tweets[1].text;
TweetHolder.tweet2.text = tweets[2].text;
TweetHolder.tweet3.text = tweets[3].text;
TweetHolder.tweet4.text = tweets[4].text;
TweetHolder.tweet5.text = tweets[5].text;
TweetHolder.tweet6.text = tweets[6].text;
TweetHolder.tweet7.text = tweets[7].text;
TweetHolder.tweet8.text = tweets[8].text;
TweetHolder.tweet9.text = tweets[9].text;
TweetHolder.tweet10.text = tweets[10].text;
TweetHolder.tweet11.text = tweets[11].text;
TweetHolder.tweet12.text = tweets[12].text;
TweetHolder.tweet13.text = tweets[13].text;
TweetHolder.tweet14.text = tweets[14].text;
TweetHolder.tweet15.text = tweets[15].text;
TweetHolder.tweet16.text = tweets[16].text;
TweetHolder.tweet17.text = tweets[17].text;
TweetHolder.tweet18.text = tweets[18].text;
TweetHolder.tweet19.text = tweets[19].text;
TweetHolder.tweet20.text = tweets[20].text;
TweetHolder.tweet21.text = tweets[21].text;haha thanks your a genius. But i removed it and its still not working, I get this error now:
But it seems it does not like this function:
private function loadComplete(e:Event):void
processData(e.target.data);
its saying:
at DocumentMain/loadComplete()[F:\Documents and Settings\Scott Mitchell\Desktop\Comb Over Charlie Style Game\DocumentMain.as:539]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete() -
Can set charset in jdbc url string?
can set charset in jdbc url string
like mysql
?China,
As far as I know, you cannot set the charset in the JDBC URL string. However, there are ways to set it. Although I have no experience with setting the charset, I believe the "Oracle JDBC User's Guide and Reference" contains this information. The guide is available from:
http://tahiti.oracle.com
Allow me to give you some advice. Each DBMS does things differently. Oracle's JDBC driver does not work exactly the same way as the JDBC driver for "mySQL". You need to learn how Oracle's JDBC driver does things. In my opinion, the "Oracle JDBC User's Guide nad Reference" is very good for learning how to use Oracle's JDBC driver.
Good Luck,
Avi. -
this is frustrating-- our server is getting pounded (and so
running JRUN up to 100%) with some hacker changing the URL to
different things. I'm running CFMX 6.1 on Windows 2003. Here's a
sample of query strings that have been changed:
Fuseaction=events&amp;amp;section=events&amp;View=http%3A%2F%2Fwww.vacacionalhouse .com%2Fen%2Fimg%2Fvohe%2Fseyon%2F
Fuseaction=http%3A%2F%2Fwww.psikolojikyardim.org%2Fetkinlik%2Finclude%2Feto%2Fnixaz%2F
Fuseaction=Day&amp;amp;amp;amp;amp;sm=2&amp;amp;amp;amp;amp;sy=http%3A%2F%2Fwww.so easywebsite.com%2Fsoeasycasino%2Fixu%2Fxotem%2F&amp;amp;amp;amp;amp;sd=27&amp;amp; amp;amp;View=all&amp;amp;amp;View=all&amp;amp;View=all&amp;View=all
-->I've added a catch for these where it redirects
them to the main page, but this doesn't seem to stop them
-->notice the ;amp;amp;amp;amp; in that last one....
None are the same IPs and hail from Russia, Portugal, etc. so
I can't block the offending IP, and they're using a normal browser
so I can't block by user-agent
Any ideas?quote:
Originally posted by:
SilentBob'secretfusion
This is what I do. I pass the variable twice in the url
string. The first unencrypted, the second encrypted. I compare the
two on the next page and if the don't match, I know I am dealing
with an asshat.
Great idea! (And appropriate name too) -
How can i get getwayed url string using pluggable nav in news portlet?
hi.
How can i get getwayed url string using pluggable nav in news portlet?
A code just like below is what I want.
<param value="param=http://.../portal/server.pt/gateway/PTARGS_.../http/...">
I tryed the following, but didn't work as I wanted.
1.<param value="<pcs:valueexpr='var'/>">
-> transformed. but I want the prefix 'param=' in the enquoted string's too.
2. <param value="param=<pcs:valueexpr='var'/>">
-> not transformed.
Any idea?
HiroyukiHi all,
We have HPROF functionality in our latest roadmap, so you will see that feature in our next major release called JRockit R28.
I recommend, above from the MemLeak documentation suggested by Makiey, the following information on how to use JRockit tools.
Performance Tuning & Profiling:
http://download.oracle.com/docs/cd/E13150_01/jrockit_jvm/jrockit/geninfo/diagnos/part_02.html
Using JRockit tools:
http://download.oracle.com/docs/cd/E13150_01/jrockit_jvm/jrockit/geninfo/diagnos/part_03.html
Diagnostics & Troubleshooting
http://download.oracle.com/docs/cd/E13150_01/jrockit_jvm/jrockit/geninfo/diagnos/part_04.html
Best Regards,
Tuva
JRockit PM -
Passing variables through the URL String
I have a template and outside the basic html - all the content is grabbed from a db. I want to use 1 template to generate all of the other pages for the site. So basically, the only way to identify the page would be through the URL string.
So, something like -
www.mysite.com/template.jsp?page_section=aboutus&pageID=1
That string would query the database and output the content for page 1 of the about section.
Does this make sense and where would I start to learn how this is done?.
Again, I appreciate your help.
Marksince database connections are costly affair i better use
jsp include tag ratter then getting dadta from database
assumming that u can devide your comman pages in 4 parts
just assume
top - logo
bottom - common links
center - data
left - menu
my jsp page would look like this (aboutus.jsp)
<%@ include file="top.html" %>
<%@ include file="left.html" %>
<%@ include file="aboustus.html" %>
<%@ include file="bottom.html" %>
2) disclaimer.jsp
<%@ include file="top.html" %>
<%@ include file="left.html" %>
<%@ include file="disclaimer.html" %>
<%@ include file="bottom.html" %>
this would reduce ur maintainnce as if u want to change top logo only top.html needs to be changed and it would affect in all pages
regards
[email protected]
Maybe you are looking for
-
Migration problem. Suicide becoming a viable option.
The old computer was Windows 7, the new computer is Windows 7. Watched the recommended video. Moved everything but the pictures: Catalog, settings, presets, everything I could find. Then I tried to import the pictures. They came, but without developm
-
I need a flash player for my ipad for homeschool,how do i get one without buying
IM doing homeschool and my ipad wont let me open my lessons due to i have to have a flash player. Is there one for the ipad that i can use for free...i have downloaded the adobe reader,is this the same as a flash player. Why are ipads not equipped wi
-
NWDI SCA to local development SC
Hi, I try to import a SCA, that I exported from the assembly state in NWDI, in my local development in the NWDS to test some things. When I go to the component browser in the NWDS and import the SC, the SC is not modifiable, it appears as an archive
-
Trying to transfer purchases from iPod crashes iTunes
My laptop was recently stolen along with my backup, so my iPod (Classic, 120 GB) is the only copy of my digital music. I'm trying to transfer my iTunes purchases from the iPod to the new computer's hard drive, but it crashes iTunes every time I try t
-
How to connect COEP-ESLH tables - duplicated records
Dear All, I'd like to ask you to please give a hand in this issue: I connected COEP and ESLH tables in SQVI. The tables are connected through fields EBELN & EBELP. The problem is that I get duplicated records and I till now I haven't been able to fig