JSTL c:import tag question

HI
I have a question about how the <c:param> tag interacts with <c:import> tag.
<c:import> tag can be used to import from relative URL's like <c:import url="target.jsp" /> , from absolute urls like <c:import url="http://www.espn.com" /> or from another web application on the same server by specifying the context attribute like <c:import context="/myotherwebapp" url="some.jsp" />
we can use <c:param> tag as an optional child tag for <c:import> to send request parameter to the page it is loading. For absolute url sending request parameters makes sense beacuse the import will be treated as new request and original request object will not be passed . but for relative urls and including the page in different web application on same web server does the jsp container treat it as part of same original request and does the target page have access to the original request object ? if this is true then how can you set additional request parameters on the request object? because once the request object is craeted by jsp container you can only add/remove attributes on it but you can never add parameters on it.
Now if the jsp container always creates new request object for each of the above included pages then these pages will not have access to original request parameters entered by the user. Is that not a limitation.
I am a little bit confused . hopefully somebody can help me out.
thanks

the c:param tag are added to the url and are not set as request parameter.
<c:import url="target.jsp">
   <c:param var="test" value="val">
</c:import>then is will do an import like
<c:import url="target.jsp?test=val"/>

Similar Messages

  • Getting img tags to work in sub page using jstl core import tag

    Am trying to bring disparate system page reports together under one web app. This means using the jstl core import tag (I dont want to redirect as I want to hide the urls, this web app provides better security than those it calls).
    Use of the import tag works to a degree but any resources (ie. img tags) don't load.
    Have created a much simplified example that demonstrates..
    So heres the jsp...
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <h3>Delivery Performance Report</h3>
    <c:url value="http://localhost/mycontext/subpage.html" var="myUrl"/>
    <c:import url="${myUrl}" />and a simple sub page (note plain html, no jsp, this mimics my project as the other systems are hidden source, non jsp)
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    <HTML>
    <HEAD>
    <TITLE>sub page</TITLE>
    </HEAD>
    <BODY>
         This is the sub page<br>
         <img src="images/banner_image.jpg" />
    </BODY>
    </HTML>While I dont get any errors what I do get is ..
    Delivery Performance Report
    This is the sub page
    ...but image fails to load.
    If I redirect instead of import it works, but as I said I need to hide the url from the user as security is an issue.
    Any help appreciated, really pulling my hair out with this final stage of something that will make a real difference to us!
    regards,
    G.

    Thanks for the answer but Im afraid thicko here doesnt get it.
    The img src is relative to the sub page, and I have tried it with an absolute address (ie. http://localhost/.....) with the same result.
    If I call the sub page direct (get with browser) the image tag works. Its just if the sub page is imported with the jstl core import tag.
    I've not tried a base tag. The real project always returns pages containing absolute urls... http://ourReportServer/reports?....plenty of params so dont belive relevant, please correct me if Im wrong here though.
    thanks, G.

  • Issue with JSTL ( c:import ) tags in Weblogic 9.2

    Hi,
    I'm trying to migrate a struts (1.2.9) application from Weblogic 8.1 to Weblogic 9.2. This application has JSPs with JSTL (1.0) tags.
    I have a JSP page that has multiple (around 7) c:import statements. When I launch my application, only the content from the last c:import statement is being displayed and rest of the c:import tags statements is simply ignored by Weblogic.
    I don't find any errors in the logs. When I comment out last c:import statement in this JSP then the content from the above c:import statement is being displayed. Only one (last one) c:import statement's content is being displayed in that whole page.
    This app worked just fine Weblogic 8.1.
    Any resolutions, hints, insights or workarounds on this issue is appreciated.
    Thanks in advance,
    Mani
    Edited by: mayyalas on Aug 10, 2009 6:13 PM

    Hello,
    You should not need to edit the wlp-light-web-lib.war weblogic.xml file. There are many places where other classes in wlp-light-web-lib are dynamically loading classes (using Class.forName()) from "higher-level" shared library modules (such as wlp-framework-full-web-lib), so I am certain that it works in general. There may just be an issue with how your shared library is set up, or how your webapp deployment descriptors are set up.
    So you mention that you have a shared library module containing your implementation of the AnalyticEventHandler; is this a .war file? And in the webapp you are trying to deploy this in, does your weblogic.xml explicitly include your shared library? If so, is your shared library being included before or after the standard WLP shared libraries?
    If you would like, posting your webapp's weblogic.xml may help to find the problem.
    Kevin

  • JSTL c:import tag exception on WAS 6.20

    Hi all,
    has anyone been able to use the c:import jstl 1.0 tag on WAS 6.20?
    Everytime we access it it throws the following error:
    Exception occurs while processing a request to the servlet: jsp.
    javax.servlet.jsp.JspTagException: Since tag handler class org.apache.taglibs.standard.tag.el.core.ImportTag implements BodyTag, it can't return Tag.EVAL_BODY_INCLUDE
    Most, if not all, other tags seem to work fine, just this one doesn't. The same testpage and jstl version works fine on other non-SAP J2EE engines we have tested it on.
    Best Regards,
    Kalle Pokkinen

    Hi,
    This answer is mostly for reference - see OSS 0371142 2004 "JSP Standard 1.2 versus 1.1" for details.
    Best regards,
    Todor

  • JSTL-c:import tag and c:param with portlets

    I am writing a JSP file in a portlet application to use the c:import JSTL tag to include a JSP file. However, I am trying to pass a parameter via c:param to this included file but the parameter is not being passed. The included JSP file gets "null" when trying to retrieve the value of this parameter, due to the fact that the parameter is not being passed. See code below:
    <c:import url="/jstltestportlet/jsp/html/test.jsp">
    <c:param name="month" value="October" />
    </c:import>
    Any ideas on why this is happening? Anybody running into this sort of a problem?
    I would appreciate any feedback.

    Here is my jsp #1: content.jsp (all the values are valid on this page)
    <c:import url="/org/j2eebuilder/view/Window.jsp">
    <c:param name="componentName" value="Home"/>
    <c:param name="componentStatus" value="None"/>
    <c:param name="windowAlias" value="/org/j2eebuilder/view/ViewControllerHelper.jsp"/>
    <c:param name="windowHeader" value="Home Management"/>
    </c:import>
    Here is my jsp #2: window.jsp (just showing various ways I have tried to get the value out)
    1. ${requestScope.componentName} 2. ${componentName} 3. ${param.componentName}
    4. <%=renderRequest.getAttribute("componentName")%>
    5. <%=renderRequest.getParameter("componentName")%>
    6. <%=request.getQueryString()%>
    7. <%= request.getParameter("componentName") %>
    8. <portlet:renderURL />
    9.<c:out value="${param.componentName}" />
    10.<c:out value="${componentName}" />
    and here is what is rendered:
    1.
    2.
    3.
    4. null
    5. null
    6. componentName=Home&componentStatus=None&windowAlias=%2forg%2fj2eebuilder%2fview%2fViewControllerHelper.jsp&windowHeader=Home+Management
    7. null
    8. /pluto/portal//Test Page
    9.
    10.

  • JSTL fmt:param tag question

    <%@taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
    <fmt:message key="result_display">
         <fmt:param value="${resultBean.sourceNumber}"/>
         <fmt:param value="${resultBean.resultValue}"/>
    </fmt:message>
    As far as I can tell, the "value" attribute of the <fmt:param> tag is capable of taking an EL. And yet, the code above does not compile. I get the error message "According to TLD or attribute directive in tag file, attribute value does not accept any expressions". If I use the <fmt_rt:param> tag, everything works fine. Am I reading the spec wrong?

    You're not reading the spec wrong, but I think you are using the wrong version of JSTL. Are you using Tomcat 5? (Or another JSP2.0 container?)
    If so, you should be using JSTL1.1
    It has a uri of "http://java.sun.com/jsp/jstl/fmt"
    Note the extra /jsp in there.
    Tomcat 5 treats ${  } as runtime expressions. To a JSP2.0 container, they ARE runtime expressions. Thus in JSTL 1.1, the fmt:param tag does accept runtime expressions.
    In JSTL1.0 because the ${  } expressions WEREN'T understood by the container, they made the tags so as not to accept runtime expressions, and called their custom evaluator.
    You are using the 1.0 uri, which specifies that it doesn't accept runtime expressions. It is complaining that ${ } is a runtime expression - so you must be using a JSP2.0 container.
    In short: You probably have a JSP2.0 container, and should be using JSTL1.1 uri: <%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
    Cheers,
    evnafets

  • Can I use https in c:import tag

    hi All,
    can anybody help me? I have a problem using c:import tag. When I write smth like this:
    <textarea style="FONT-SIZE: 8pt><c:import url="http://java.sun.com/developer/technicalArticles/javaserverpages/faster/" /></textarea>
    it's going fine. But when I want to use https an error acquires.
    Can anyone tell me which is the reason??
    Thanks, venera

    mandar74 wrote:
    The error that I get is similar to what is already posted on the current thread so it made more sense to avoid typing the whole thing again and thus avoid spamming the forum with similar items. The original topicstarter didn't post any error.
    Forums are meant to share information without been labelled/assigned to someone 'specific' so there's no harm in requesting for a solution when there was none posted for the topic in question.Most users would respond on topicstarter only and not on you. Your specific questions will likely get ignored. Start your own topic.

  • Deleting imported tags--does that apply across all catalogs?

    I'm building a brand-new catalog in Elements Organizer 12.  My first attempt turned into a hot mess with broken links, etc (I started it before I really figured out how Organizer works).
    Organizer is listing a bunch of imported keyword tags on my new catalog.  They don't appear to be attached to pictures in my new catalog, but they're listed under imported tags.  As the purpose of creating the new catalog was starting from scratch, I'd like to clean up those old tags.
    My question is: will deleting those tags also delete them from photos from the original (hot-mess) Organizer catalog?  I'm not ready to delete that old catalog yet, and I'd prefer to leave them attached to the photos in the old catalog for the time being.
    Thanks for any help!
    Julie

    If you find the tags in the 'imported tags' category are really written to the files themselves, it would be better to move those tags from the 'imported tags' category to a more suitable category. If you deleted those imported tags from the catalog, that will not delete the tags from the files themselves, which is generally a good thing. But there will be no way to get them back in the catalog afterwards. The tags in the files are recognized only at the time of import into the catalog. If the tag is in your categories by that time, no problem. If you have no corresponding tag at the time of import, the tags are imported in the default 'imported tags' category.

  • [HELP] using multiple value parameter in c:import tag

    I need to pass a multi-value parameter to a included page. e.g.
    http://myhost/MyContext/dir1/page1.jsp?abc=value1&abc=value2/dir1/page1.jsp includes /dir2/page2.jsp, and would like to pass this multi-value parameter over, but change the name to xyz, some what like
    <c:import url="/dir2/page2.jsp?xyz=value1&xyz=value2"/>The problem is that the number of values is not fix number, so I have to write some logic to iterate thru its parameter values. But the <c:import> tag body allows only simple listed <c:param> tags, it doesn't allow other logic/condition/iteration.
    <!-- gives java.io.IOException: javax.servlet.jsp.JspException: The taglib validator rejected the page: "Illegal child tag in "c_rt:import" tag: "c:forEach" tag at runtime -->
    <c:import url="/dir2/page2.jsp">
    <c:forEach var="xyz" items="${paramValues.abc}">
    <c:param name="xyz" value="${xyz}"/>
    </c:forEach>
    </c:import>{code}
    I also tried <c:url> tag. The good news is that it supports jsp logic in body:
    {code}<c:url var="url" value="/dir2/page2.jsp">
    <c:forEach var="xyz" items="${paramValues.abc}">
    <c:param name="xyz" value="${xyz}"/>
    </c:forEach>
    </c:url>
    <c:out value="${url}"/>{code}but it prefixes the url with the current context:
    {code}/MyContext/dir2/page2.jsp?xyz=value1&xyz=value2{code}
    Now I run into a dead end. It seems the only way out is to use <% %> scriptlet to do my own url composite, which is pretty similar to <c:url> but avoid the context part.
    Any suggestion?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    out.println("<html>");
    out.println("<head>");
    out.println("<script language=\"JavaScript\">");
    out.println("function altSubmit() {");
    out.println("document.MyForm.action = \"Second.html\";");
    out.println("document.MyForm.submit();");
    out.println("}");
    out.println("</script>");
    out.println("</head>");
    out.println("<body>");
    My personal suggestion is to use follow the MVC (Model View Control) pattern where in you can write all your "html" part in a JSP.
    Model -> Bean
    View -> JSP
    Control -> Servlet

  • Selectively ignore Problem Tags Dialog  while importing Tagged Text in CS5.5

    Hi
    My script imports tagged text and places it in selected frames. Due to the tag creation process used, I occasionally get a "Ignoring character level attribute termination tag "<cTracking:>" found without the corresponding character level attribute application tag "<cTracking:value>"
    Since it's not a problem I can ignore this specific error -- but I don't want to turn off ALL problem tag error checking because occasionally there are serious errors that I DO want to see.
    Is there a way to tell ID to ignore this specific error?
    Thanks
    Akiva

    UNfortunately the original ascii files uses a <D> code to return to the default settings -- and since that occasionally includes resetting the tracking to 0 I need to include the "<cTracking:>" tag.
    I could obviously fix it by adding a "<cTracking:0>" to all the codes -- but that seems like it could cause more problems.
    I can preprocess the ascii code to eliminate the excess codes -- but that increases processing time for something which happens only occasionally and is non-problematis in practice.
    Akiva

  • Import tags from another catalogue without develop settings

    How do I import tags from another catalogue but not the develop settings of each image?
    Here's whats going on:
    I started with 5000 images on a hard drive. I gave a copy to someone else working on the project.
    I physically moved images into real folders and edited all the shots.
    She left all the images where they originally were and tagged each image.
    I want to combine her tags with the edits that I've done, with the images in their new locations I've made.
    I have a copy of her catalogue file.
    I tried importing her catalogue into mine- which will pull her metadata tags, but only also with pulling her develop settings which resets all my work.
    How can I import ONLY her metadata tags?
    I can't open her catalogue and write the tags into XML sidecars because I've moved the images from where her catalogue says they are.
    I realize we should have done this differently from the beginning, but with that being said- if I could import only her metadata tags then that should work. But Lightroom 4 only gives the options of importing BOTH metadata and develop settings.
    Any ideas?

    One option (backup your catalog first):
    * Import her catalog (apply metadata and develop changes), which adds a "Paste Settings" step to the edit history.
    * Restore previous develop settings using ScrewAutoSync, to roll back the settings by one step, to pre-"Paste Settings" state. - just make sure you *don't* do this to photos that weren't changed by the catalog import. One way to do that is to apply a no-op (do nothing) preset to all photos before importing the catalog (that way if you inadvertently roll 'em back one, they'll be the same as they were). You must create a no-op preset by hand, or use this:
    http://www.robcole.com/LrForumSupport/Clear Edit History.lrtemplate
    (hint: context-click & select "save link as")
    There are probably other options.
    Rob

  • Include directive with import tags how to

    I mostly the same classes throughout many of my jsp pages. If I use the include directive to import the classes - it doesn't work. What is the proper directive / way / tag to include those tags? Sorry if I am not wording this properly. Here's an example:
    most of my classes use the following classes so I use the @import tag:
    <%@page import="web.urls.DisplayUrls"%>
    <%@page import = "web.beanObjects.display.DisplayPage"%>
    <%@page import="web.db.admin.TypesDbHandler"%>
    <%@page import="web.db.admin.CategoryDbHandler"%>
    I would like to put all of those in one file and only have one line of code so I don't have to cut & paste into every jsp page whenever there's a change:
    <%@include file="/include/imports.jsp"%>
    Unfortunately this isn't working, it's not recognizing the classes...
    Thanks!

    hi,
    since both the files are located in the same folder, why don't you try the following:
    <%@ include file="hello.jsp" %>
    hope this helps

  • Importing tags from Photoshop Album to Photoshop Elements 5

    I have had Photoshop Album 2.0.2 for several years and it currently holds the information of 13000+ tagged items. I have a detailed tagging system set up which I don't want to lose.  I also have Photoshop Elements 5 and having just discovered that Photoshop Album is now discontinued I wanted to transfer my existing information into Elements.
    I have spent some time trying varies options but cannot find the solution I want.
    If I select a photo from file to import into Elements then the tagging information does not come with it.
    If I export an image from Album to desktop and then import it into Elements no tags come with it.
    If I email a photo from Album to myself then import that image it does come with the tags into Elements.
    Obviously I can't email all 13000 images to myself to import them but can someone suggest how I can transfer this data - obviously the photos themselves don't need to move as both programmes only keep a link to the original location to the photos.
    I'm not interested in using the online storage system but wonder if one solution might be to upload all my phots to that temporarily then reimport them to Elements.
    Additionally is it possible to import my current tag structure  rather than have imported tags all appearing under a 'imported tags' tag.
    Any help grately appreciated.
    Thanks
    Gill

    Thank you so much it worked - the only thing that didn't transfer was the folder pics I'd chosen for the tags so that didn't take long to redo - many thanks - I'd never have found that. It would have been so much more obvious if it showed 'open' or 'select catalogue' rather than just the word 'catalogue' with no other options visible from the dropdown menu.
    Happy Bunny here!

  • How to quick import Tags from a xml file?

    Good morning/afternoon/night everyone.
       I have this client that want me to import something like 1000 tags from a xml file in CQ5.5. I know I can do it programatically and in dev.day.com I have already found some instructions, but, there is some easier way to do this? Or, if the only way is developing a bundle to run in a workflow (and then the client can import tags from xml files anytime he want to), do you guys have some advice or guidelines?
    Thanks!

    I would expect it should be possible using vault. If you export an existing namespace from cq using vault (checkout/update) you can see what format it should be in. Then you should convert your xml to match that format (perhaps using XSLT) and use vault in the other direction (commit).
    We are using vault all the time behind the scenes using a vault plugin for maven. This way we can export content from one developer's cq instance, put it in SVN and have another developer import it in his cq instance, all using maven (and vault). This is especially usefull for general content structures and for tags.

  • Will photoshop elements 12 import tags from photoshop elements 5

    will photoshop elements 12 import tags from photoshop elements 5?

    See:
    http://helpx.adobe.com/photoshop-elements/kb/backup-restore-move-catalog-photoshop.html
    I suppose you are using the organizer : you'll be able to recover your PSE5 catalogs either by a catalog conversion on the same computer or by the backup / restore process.

Maybe you are looking for

  • Pro Applications Update 2008-02 - Speeded up my video?

    Downloaded and installed Pro Applications Update 2008-02. Now all of my projects seem to be in fast motion and the audio is out of sync. I also have a Blackmagic Intensity Pro installed. Joe

  • Can I convert a PowerPivot database to Excel

    I used PowerPivot's import features to filter and reduce the number of fields in a very large database.  The database is now small enough to use in Excel without the aid of PowerPivot (I feel more comfortable using Excel and can take advantage of Exc

  • Printing VIA Adobe Acrobat

    Post Author: Charlene CA Forum: General I have a letter that pulls from our database for specific fields.  The report, based on critera, can produce up to 50 letters.  I have posted this on our Intranet, and when it is run, gives 1 letter per page, w

  • Dynamic arrow

    hello, i want to create a scene with an arrow and two a drag and drop objects. the idea is that each side of the arrow will point to one of the objects and when i move one of the objects the arrow would follow it (the "tail" coordinates of the arrow

  • Is there any way to attach excel insted of XML?

    Hi, is there any way to attach excel insted of XML?. i need to fetch the values from the excel sheet directly to the fields in the form. For Eg: im having 5 fields named  id,name, DOB,country,citizenship if i enter the ID, the form should get autopop