Question: pagecontext.include("url")
Hi
I am using a custom tag that implements BodyTagSupport class. Inside the for
loop I have call to pagecontext.include("");
<xyz:for>
<h3>This is the outer tag.</h3>
<% pagecontext.include("xyz.jsp"); %>
</xyz:for>
Inside xyz.jsp I have
<h4>This is the inner tag </h4>
Logically one would assume that "This is the outer tag" is printed first
followed by "This is the outer tag ". But the output is as follows
This is the inner tag
This is the outer tag
What is with respect to the behavior of the pagecontext.include....
How can I get the order correct?
thanks a bunch - Sri
This sounds to me like its a buffering issue. It could well be a bug in
WebLogic. (Heresy I hear you say ;-)
Have you tried adding the following line before your include...
pagecontext.getOut().flush();
pagecontext.include( "foo.jsp" );
According to the javadoc of the PageContext.include() method, the getOut()
JspWriter should be explicitly flushed before the include is processed. Did
the explicit flush work around your problem?
Regards
James
James Strachan
=============
email: [email protected]
web: http://www.metastuff.com
"Sri Haridasa" <[email protected]> wrote in message
news:[email protected]...
>
> Hi
> I am using a custom tag that implements BodyTagSupport class. Inside the
for
> loop I have call to pagecontext.include("");
>
> <xyz:for>
> <h3>This is the outer tag.</h3>
> <% pagecontext.include("xyz.jsp"); %>
> </xyz:for>
>
> Inside xyz.jsp I have
>
> <h4>This is the inner tag </h4>
>
> Logically one would assume that "This is the outer tag" is printed first
> followed by "This is the outer tag ". But the output is as follows
>
> This is the inner tag
> This is the outer tag
>
>
> What is with respect to the behavior of the pagecontext.include....
>
> How can I get the order correct?
>
> thanks a bunch - Sri
>
>
>
>
Similar Messages
-
Question on Passing URL Parameters
Thanks in advance for any responses to this question!
I have a dynamic table (in a master page using javascript and
asp) that links to a detail page, passing a parameter (the ID of a
product) to identify the correct row to display in the detail
page's recordset. Everything works great.
I decided I wanted to have this detail page be a "popup" in
which I control the window properties with javascript.
The problem I'm having is this: when I put the javascript
code (for the popup window's properties) in the href of the dynamic
table cell that links to the detail page, it's no longer passing
the parameter properly.
Here's the code BEFORE the javascript was entered:
<td width="95" class="product_cell"><div
align="center"><a href="detail_container.asp?<%=
Server.HTMLEncode(MM_keepNone) + ((MM_keepNone!="")?"&":"") +
"ID=" + rsHDPE.Fields.Item("ID").Value
%>"><%=(rsHDPE.Fields.Item("image").Value)%></a></div></td>
As you can see, detail_container.asp is the detail page, and
?<%= Server.HTMLEncode(MM_keepNone) +
((MM_keepNone!="")?"&":"") + "ID=" +
rsHDPE.Fields.Item("ID").Value %> is the asp code that
dreamweaver included to pass the parameter.
Now, if I WAS NOT passing a parameter, here's the line
including javascript code - which I have tested with success - to
open the popup window to my specifications:
<td width="95" class="product_cell"><div
align="center"><a
href="javascript:poptastic('detail_container.asp');"><%=(rsHDPE.Fields.Item("image").Valu e)%></a></div></td>
(yeah, poptastic is a silly name for a function, isn't it?)
But how do I combine these to get the parameter to pass AND
control the window properties?
Because this doesn't work:
<td width="95" class="product_cell"><div
align="center"><a
href="javascript:poptastic('detail_container.asp');?<%=
Server.HTMLEncode(MM_keepNone) + ((MM_keepNone!="")?"&":"") +
"ID=" + rsHDPE.Fields.Item("ID").Value
%>"><%=(rsHDPE.Fields.Item("image").Value)%></a></div></td>
How can I pull this off? Is my syntax wrong?Of course, if you look at the linked URL, you won't see any
of this code,
right?
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"Deaf Web Designer" <[email protected]>
wrote in message
news:eh9hi9$sv8$[email protected]..
> It is very confusing to see different partial HTML/js
code. If you please
> post
> a URL link to your example page you are working on. It
is easier that way,
> where you will get some help more effective and
productive way.
>
> Cheers, DWD
> -
Good day! I am a beginner developer CF. I have created a
site, 10 points in the navigation menu (About, News, Articles,
contacts, etc.). I have created a template, then cut a cap, levle
menu, to include the basement and first save Includes. Then I for
each page (on menu items) created a folder and put into each file
folder index.cfm ...
I have a question - Home page I have also kept in a folder
Home (that is, there is a file index.cfm). At localhost: 8500 I
have everything works, but if I index.cfm page of the Home folder
moved to the root of the site, it will not connect Include and
images do not appear. Is it possible to spread the files on
hosting, if I file page Home index.cfm is in the folder Home,
rather than the root site? Help please?I'm sorry if I am not correctly following your story, it is
challenging.
But it is important to note that <cfinclude...> will
have absolutely no
bearing on what path would be used in an <img...> tag.
ColdFusion does
not request the image, the browser does. The browser needs to
know
where the image is in relation to the URL that requests it.
An attempt at an example.
/wwwroot/includes/my_include.cfm
/wwwroot/images/an_image.jpg
/wwwroot/index.cfm
/wwwroot/subDir/index.cfm.
Any code in wwwroot/index.cfm, even code included from
my_include.cfm,
would need to find the image in the subdirectory
wwwroot/images.
Relative Path:
<img src="images/an_image.jpg"/>
Absolute Path:
<img src="/images/an_image.jpg"/>
Any code in wwwroot/sbDir/index.cfm, even code included from
my_include.cfm, would need to find the image up one directory
in
wwwroot/images.
Relative Path:
<img src="../images/an_image.jpg"/>
Absolute Path:
<img src="/images/an_image.jpg"/>
As you can see the absolute path version is the only one that
is the
same if the my_include.cfm file is going to be used in
different
locations within the site. -
Simple question on @import url
If I want to change from importing a style sheet from my server to included in the site direcory what changes do I need to make to:
<!--
@import url("mystylesheet.css");
-->
</style>
Thanks, TimI don't use @import. Let's say you want to keep all your stylesheets ordered inside a sitefolder like so:
Site - yoursite.com (C:\yoursite)
+Styles
mystyle.css
print.css
mobile.css
index.html
about.html
Place this between the <head> and </head> tags
<link href="Styles/mystyle.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="Styles/print.css" rel="stylesheet" type="text/css" media="print"/>
<link href="Styles/mobile.css" rel="stylesheet" type="text/css" media="handheld"/>
Does this answer your question?
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
www.alt-web.com/
www.twitter.com/altweb -
Hello,
I have a load testing app that I'm adapting to work with BSPs and I have a question about the mangled URLs that are used.
If I record a URL that is mangled, can I save that URL and reuse it during the playback of a session? From what I understand it includes things like theme, language and such. But obviously if it includes a session ID, it won't work.
Session ID seems to be stored in a cookie. Can it also be stored in a mangled URL and if so, why the duplication?
Any help greatly appreciated!
Thanks!!!Those parameters are there for a reason; to pass along information to the page so that the dynamic content can be manipulated based on them. So your question really is: "Can I pass along this information to the page in another way than URL parameters?"
There are always options, but most of them require work. For example:
1) use a POST to generate the page
In a POST request the parameters are part of the request body, so you don't see them. The trouble is that a POST request cannot be created just like that; it requires some sort of form submission behind it. This can be facilitated with javascript (output a form and let the link submit it through an onclick handler), but it is far from a clean solution.
Added pain: form submits behave badly in combination with the browser back/forward buttons. Also, bookmarking cannot work like this.
2) "web 2.0". Using Ajax it is possible to do page updates in the background, so you could do the request (with parameters) asynchronously and update the page accordingly.
Added pain: again back/forward buttons and bookmarking will be broken unless you take very specific steps (that I don't know of myself).
3) conversation scope technology. Some APIs provide a so called "conversation" scope, which allows you to hold on to certain values across requests until you end the conversation. You could use this to push certain values into the conversation and reuse them in different pages without having to pass along the values as request parameters or in a form. Even without a conversation scope, you could simply abuse the session for this purpose.
I hope this has given you some idea how to go about implementing your requirement. -
Include URL in the Alert message in Sitescope Alert
Hi,
I am trying to include the URL int he Evetn mapping but unable to fidn the Attribute to include the URL in the alert. Please suggest.Hi,
If this is a static URL then you can include it in alert by modifing the alert templates under templates.mail in installed directory. In case of dynamic URL's put them under group/monitor description feild nad include it in alert using the tag like "Monitor: <groupID>:<name> <groupDescription>" in alert template.
Regards,
Sujith -
CSS11500 SSL handling question for multiple url/FQDNs with the same ip address
I know that it's possible on the CSS to handle multiple incoming HTTP requests that terminate on the same IP address and port and balance them to various servers based on the url. For instance, I can set up www.cats.com and www.dogs.com at the same 192.168.35.12 address in DNS, and set up two different content rules:
content cats
vip address 192.168.35.12
port 80
url "//www.cats.com/*"
add server cats1
add server cats2
active
content dogs
vip 192.168.35.12
port 80
url "//www.dogs.com/*"
add server dogs1
add server dogs2
active.
Easy and straightforward.
But what if I want to add SSL handling for https://www.cats.com and https://www.dogs.com?
I'm not sure how to create the ssl-proxy-list where one content rule (ip address/port) combination needs to pass through the ssl module and get matched with the proper ssl certificate.
Can this be done? Can one associate multiple certs and keys with a single ssl-server entry and a single ssl accelerator service? Or do I have to create multiple ssl-proxy-lists for cats and dogs and build multiple ssl services each referring to a unique ssl-proxy-list, and then use the url parameter in the https content rule to determine which ssl service (and therefore which key/cert pair) gets the traffic?
Thanks in advance for any insights.Hi Tim,
Unfortunately this is not possible; you can't associate multiple certificates to a single proxy list due to the fact that SSL handshake is done first with no visibility of the URL being requested, so the CSS won't know which public server to use in order to perform the traffic decryption.
But there are a couple of options that you may want to look at (depending on the URL string)
If your URLs are subdomains and you hold a wildcard SSL certficate to match multiple requests, i.e your domain being "pets.com" you can have a certficate that will match request for dogs.pets.com or cats.pets.com because the cert will be in the form *.pets.com
The second option is SAN (Subject alternative names) certificates; which give you the option to include up to 4 flavors of the domain within the same file, such as pets.com, pets.net, www.1pets.com.
I hope this helps.
Pablo -
In reading previous questions on this I am not understanding why my code isn't working.
I have
editnews.jsp and within it I am including xt_editnews.jsp.
In editnews I cannot call a variable that I defined in xt_editnews.jsp.
Please help.
Code follows:
editnews.jsp
<%@ page language = "java" import="java.sql.*, java.io.*, java.util.*, dbo.*" %>
<%@ include file="../includes/top.jsp" %>
<%@ include file="xt_editnews.jsp" %>
<%
out.print(vNewsTitle);
%>
<form action="news_action.jsp" method="post" name="editnews">
<input type="text" name="fnewstitle" value="">
</form>
xt_editnews.jsp
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql_rt" %>
<jsp:useBean id="news" class="dbo.cnews" />
<%
int vnewsid = Integer.parseInt(request.getParameter("newsid"));
out.print(vnewsid);
news.connect();
ResultSet rsSingleNews1 = news.getSingleNews(vnewsid);
while (rsSingleNews1.next())
String vNewsTitle = rsSingleNews1.getString("NewsTitle");
out.print(vNewsTitle);
%>
If I do not do the out.print in editnews.jsp it works fine.
When I do, I get:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: -1 in the jsp file: null
Generated servlet error:
[javac] Since fork is true, ignoring compiler setting.
[javac] Compiling 1 source file
[javac] Since fork is true, ignoring compiler setting.
[javac] C:\tomcat5\jakarta-tomcat-5\dist\temp\org\apache\jsp\manager\editnews_jsp.java:161: cannot resolve symbol
[javac] symbol : variable vNewsTitle
[javac] location: class org.apache.jsp.manager.editnews_jsp
[javac] out.print(vNewsTitle);
[javac] ^
[javac] 1 errorHello,
I think you need to have a declration block in xt_editnews.jsp, where you can declare vNewsTitle e.g
xt_editnews.jsp
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql_rt" %>
<jsp:useBean id="news" class="dbo.cnews" />
<!-- Declarations -->
<%!
private String vNewsTitle = "";
private ResultSet rsSingleNews1 = null;
%>
<%
int vnewsid = Integer.parseInt(request.getParameter("newsid"));
out.print(vnewsid);
news.connect();
rsSingleNews1 = news.getSingleNews(vnewsid);
while (rsSingleNews1.next())
vNewsTitle = rsSingleNews1.getString("NewsTitle");
out.print(vNewsTitle);
%>
This will mean when you include this JSP in editnews.jsp the rest of your code will have access to these variables. -
I have a site www.mydomain.org that also has the .com and .net registered and pointing to the same site. What we would like to do is when someone goes to www.mydomain.com, have the url in the browsers address bar change to www.mydomain.org. We don't want to use redirects, but just have the url change in the browser, because redirects will mess with our web stats. Any ideas?
Thank you very much. It's very helpful to know the
cache is based on the complete URL including
querystring. Is there any docs about it?
so if I add 3 meta tag to my jsp, proxy or browser
should not cache?Well, not really. I'm sorta making an assumption here, honestly. The reason is that any caching proxy server can do whatever it wants to associate a cached page with a URL. IF it wants to ignore the query string part of a URL, it could simply trim that. But from the ones I've seen, the full URL was used.
If you use those response headers, it shouldn't cache in the proxy or browser.
then the only thing I am worry now is that the
sessionID is in url, is it easy stolen by someone
else? I used session very heavy in my app. so if the
sessionID is not secure enough, it's very dangerous.It doesn't matter if the session ID is in the URL or a cookie. Someone could "steal" it from either place easily enough. It'd still be in the request from the browser, and it has to be because of how the HTTP protocol works. The only way to make it secure is to use SSL.
The session should always timeout anyway so that the session ID isn't good forever. -
Newbie question about deployment URL
I created a web service using Web Logic 9's service gen. I then successfully deployed it. When I tried calling it, I get a 404. I'm not sure I'm calling the correct URL and failing, or if I'm not even calling the correct URL.
My URL is
localhost:7001/<contextURI>/<serviceURI>?WSDL (values in angle brackets taken from the service gen).
I always seem to have this trouble when deploying... knowing what the URL should be.
Any suggestions?Answering my own question... whilst I deployed the web service, I had not deployed the context. Doing so sorted out my problem.
-
Question about (HttpURLConnection)url.openConnection();
Greetings Java Experts.
I have a question about the following code snippet.
As you can see below this snippet will establish a connection.
Question how long will it allow for the connection to be established - for example if the web traffic is taking an unusually long period of time can I set it to a higher value ?
connection = (HttpURLConnection)url.openConnection();
HttpURLConnection.setFollowRedirects(true);
connection.setInstanceFollowRedirects(true);
connection.setUseCaches(false);
stevforever, unless you set SO_TIMEOUT
-
Hi,
I have 2 questions
1.I wanted to know if it was possible to do this. So this is my first pages
http://www.clementhernandez.com/Clement_Hernandez.html
Would it be possible for my first page to be under this URL
http://www.clementhernandez.com/
2. Why do all the URL pages have to end .HTML
Example: http://www.clementhernandez.com/News.html
why cant it be like
http://www.clementhernandez.com/News
I have seen all these 2 things in other websites.
THANK YOU!
Clementok, first see if name you file index in iWeb then uploading it will allow you to go straight to yoursite.com instead of yoursite.com/yourfirstpage.html if it
If that works find your HTML file, it will be located both here and here. Depending on where you choose to get the file from you may need to download it. After downloading it right-click the file and open it in your HTML file editor (like Coda or Espresso), if you don't have an HTML file editor Dashcode will work just fine. change the text between <title>index</title> to whatever you like and your good to go!
Let me know if you have any questions or if that doesn't work
- Zyber -
Hey everyone, new here so Im probably doing this completely wrong but please bare with me! I was randomly directed here whilst trying to find out if theres a way of changing my Facebook URL (its already been changed once - not by me)
I have no idea why the adobe forum section would be interested in that, but the link provided sent me here. I also had no idea what thread to post this in either, so I apologise in advance for probably making a mistake.
Any help would be greatly appreciated. Thanks guysAs has been mentioned, this forum is for discussion of the Adobe fora.
However, very near-by, the Lounge might get some comments on your question. It's for broad-source discussions, not about things Adobe-specific. Lot of people there know FB, so might have some useful thoughts for you.
Good luck,
Hunt -
Question about friendly urls?
greetings all
i want to ask about if the following is possible:
i have a link that look like this:
http://somewebsite.com/page?param1=value1¶m2=value2¶m3=value3
is it possible to make the link that appears in the browser like
http://something.com/page ,and the parameter values is still there in the browser
something like the urlrewrite or a filter or somehow i don't know?
any ideas if it's possible?Those parameters are there for a reason; to pass along information to the page so that the dynamic content can be manipulated based on them. So your question really is: "Can I pass along this information to the page in another way than URL parameters?"
There are always options, but most of them require work. For example:
1) use a POST to generate the page
In a POST request the parameters are part of the request body, so you don't see them. The trouble is that a POST request cannot be created just like that; it requires some sort of form submission behind it. This can be facilitated with javascript (output a form and let the link submit it through an onclick handler), but it is far from a clean solution.
Added pain: form submits behave badly in combination with the browser back/forward buttons. Also, bookmarking cannot work like this.
2) "web 2.0". Using Ajax it is possible to do page updates in the background, so you could do the request (with parameters) asynchronously and update the page accordingly.
Added pain: again back/forward buttons and bookmarking will be broken unless you take very specific steps (that I don't know of myself).
3) conversation scope technology. Some APIs provide a so called "conversation" scope, which allows you to hold on to certain values across requests until you end the conversation. You could use this to push certain values into the conversation and reuse them in different pages without having to pass along the values as request parameters or in a form. Even without a conversation scope, you could simply abuse the session for this purpose.
I hope this has given you some idea how to go about implementing your requirement. -
I am unable to type anything or use keyboard to type in Firefox. I am using Firefox 18.0 installed on Windows 7.
I am able to Paste into the URL bar and also the Search bar but absolutely not able to type in it.
I have already tried the "reset" option but still unable to type.
Also tried Firefox in safe mode with disabled addons but still unable to type.
Installed a fresh copy of firefox after uninstalling Firefox and deleting the old folder "Mozilla Firefox" from windows. but still unable to type.
Please tell me a solution to this.I'm not on a laptop so I don't have a FN key. But on my desktop F9 + Windows key appears to have resolved the issue for me. Thanks for the help!
Maybe you are looking for
-
Portraits and Spreads in a Folio
Is it possible, when building a folio for iPad to have single pages display in portrait and speads display in landscape? I've seen some magazines do this - Saveur for example, but have been unable to find any reference on how to do this with DPS.
-
Hello Experts, I have issue with BRS, In uploadable file fields are taken Transaction Type, Value date, Amount, Bank Reference, Profit center and Business Area. I have taken check number is the Bank reference key for all the transactions and for few
-
Hi My requirement is if we want to procure material of 1000 kgs . It need to be distributed 50% of the order between two vendors. I came to know that this can be done through Quota arrangement. Could you please guide how system generates 2 orders for
-
Accessing the Product Model in PME
Hi All, I am facing an issue related to PME, I have created a configurable product in CRM. The issue is when i clicked on create button in the configuration tab of commpr01 , PME starts and establishes connection with the respective client but it i
-
Does anyone know what on earth possessed the designers at Apple to come up with the Magsafe 2 connector on their new power adapters? There has been a trend for Apple connectors to become smaller over time, but the Magsafe 2 has bucked this trend and