Can you place a include directive within an if statement?

I am attempting to include one jsp file if one criteria is met and another jsp file otherwise. Does this work? I can't get it to. My code is below....
<%@ page import="control.ScreenNames, control.ScreenFlowManager, java.util.*" %>
<% ScreenFlowManager screenManager = new ScreenFlowManager();
int screenNum = screenManager.getCurrentScreen(request);
if (screenNum < 46) {
     System.out.println("< 46");
%>
     <%@ include file="ScreenDefinitions1.jsp" %>
<% } else {
     System.out.println("46 or >");
%>
     <%@ include file="ScreenDefinitions2.jsp" %>
<% }
     System.out.println("after if");
     request.getSession().setAttribute("screenNum", String.valueOf(screenNum));
%>

There are no error messages in the log.
My main jsp code is as follows:
<%@ page import="control.ScreenNames, control.ScreenFlowManager, java.util.*" %>
<%@ taglib uri="WEB-INF/tlds/taglib.tld" prefix="j2ee" %>
<% ScreenFlowManager screenManager = new ScreenFlowManager();
int screenNum = screenManager.getCurrentScreen(request);
request.getSession().setAttribute("screenNum", String.valueOf(screenNum));
if (screenNum < 46) {
     System.out.println("< 46");
%>
     <jsp:include page="ScreenDefinitions1.jsp" flush="true" />
<% } else {
     System.out.println("46 or >");
%>
     <jsp:include page="ScreenDefinitions2.jsp" flush="true" />
<% }
     System.out.println("after if");
%>
<%@ include file="WEB-INF/window.js" %>
<html>
<table border=0 cellPadding=0 cellSpacing=0 height="10%" width="100%">
<tr align="center">
<td width="100%"><j2ee:insert template="template" parameter="HtmlTopIndex" /></td></tr></table>
<table border=0 cellPadding=0 cellSpacing=0 height="80%" width="100%">
<tr align="center">
<td width="100%"><j2ee:insert template="template" parameter="HtmlBody" /></td></tr></table>
<table border=0 cellPadding=0 cellSpacing=0 height="10%" width="100%">
<tr align="center" valign="bottom">
<td width="100%"><j2ee:insert template="template" parameter="HtmlFooter" /></td></tr></table></html>
The included file code is as follows:
<%@ page import="control.ScreenNames" %>
<%@ page import="control.ScreenFlowManager" %>
<% String str_screen = (String)request.getSession().getAttribute("screenNum");
System.out.println("screen str = " + str_screen);
int screen = Integer.parseInt(str_screen);
System.out.println("screen int = " + screen);
%>
<j2ee:CreateTemplate template="template" screen="<%=screen%>">
<j2ee:Screen screen="<%=ScreenNames.SUPPORT_LOGIN_SCREEN%>">
<j2ee:Parameter parameter="HtmlTitle" value="eMoneyMail Support Sign In" direct="true"/>
<j2ee:Parameter parameter="HtmlTopIndex" value="/login.jsp" direct="false"/>
</j2ee:Screen>
<j2ee:Screen screen="<%=ScreenNames.SUPPORT_MAIN_SCREEN%>">
<j2ee:Parameter parameter="HtmlTitle" value="Welcome to eMoneyMail Support!" direct="true"/>
<j2ee:Parameter parameter="HtmlTopIndex" value="/head.jsp" direct="false"/>
<j2ee:Parameter parameter="HtmlBody" value="/SupportMain.jsp" direct="false"/>
<j2ee:Parameter parameter="HtmlFooter" value="/foot.jsp" direct="false"/>
</j2ee:Screen>
My log file is as follows:
< 46
screen str = 1
screen int = 1
after if
Thanks.

Similar Messages

  • Can you share a PowerPivot Model within Excel 2013?

    Hi,
    Can you share a PowerPivot Model within Excel 2013?
    Is it essential that you have either SharePoint or Power BI subscription to share a PowerPivot Model created within Excel 2013?
    Kind Regards,
    Kieran.
    Kieran Patrick Wood http://www.innovativebusinessintelligence.com http://uk.linkedin.com/in/kieranpatrickwood http://kieranwood.wordpress.com/

    I am afraid you need SharePoint at some point for this scenario
    what SharePoint basically does it extracts the datamodel, hosts it on an interanl SSAS Tabular Server and redirects users connections that are initially connecting to the workbook to the SSAS Tabular Server
    so the model needs to be hosted somewhere - which is SharePoint with SSAS integration in this scenario
    SharePoint online does all this automatically for you
    an other option would be to host the model directly on a SSAS Tabular Server and let users connect to the SSAS instance instead of the Power Pivot model - Note that you can simply import your Power Pivot Model to SSAS
    hth,
    -gerhard
    Gerhard Brueckl
    blogging @ http://blog.gbrueckl.at
    working @ http://www.pmOne.com

  • Can you transfer hd video directly from an ipod and then EDIT that video in imovie? I will be on the road and wont have a mac, just an ipad 2 and ipod touch. I want to shoot video on the touch and edit it on the ipad. Thanks!

    Can you transfer hd video directly from an ipod touch to the ipad 2 and then EDIT that video in imovie? I will be on the road and wont have a mac, just an ipad 2 and ipod touch. I want to shoot video on the touch and edit it on the ipad. Thanks!

    Thanks Tgara.
    Its funny. So far the responses have been 50/50 on this question. I even asked two seperate Apple Store employees here in NYC, and got two different answers! One said yes, the other no.
    Argh!
    I know from watching the keynote speech about icloud and iOS 5 that you will be able to cut the cord between the pc and ios devices like the ipad. No more need to sync them via a cord. So will that mean i would then be able to load video directly to the ipad via tha cam kit connector from my ipod? Also i wonder if/when Apple will allow HD video from on Apple devices like a canon dslr to be able to transfer to the ipad via the cam kit connector AND be able to EDIT that footage in imovie for the ipad. Speaking of imovie for the ipad...i hope it gets an update soon as well.
    Anyway....with the macbook airs getting updated next week with thunderbolt and new sandy bridge chips....i may just get one of them instead of the ipad 2 for editing video on the road. Still...i prefer surfing the web experience on the ipad. Grrrrrrr. **** youuuuuuu Apple!!! Lol

  • Can you still open URL's within QuickTime and Lion ?

    Can you still open URL's within QuickTime and Lion ? the URL opening seems to have gone.
    I'm running Lion now and just noticed

    I actually tried that but it came up an error and movie could not be found (or words to that effect) I'll try again
    In case it still doesn't work for you, try this URL:
    http://idisk.me.com/jrwalker4-Public/Intro_2.mov
    It is a sample file posted yesterday fixing a Lion playback problem (Lion/QT X v10.1 doesn't seem to like having 2 active MP3 audio tracks present) which I just tested and is playing for me right now.

  • HT1277 Can you place a heather on all your outgoing emails?

    Can you place a heather on all your outgoing emails?

    A header!!! Of course.
    I was going to suggest this, but I didn't think that was what the OP had in mind:

  • I want to buy iPhone 5 64 gb The problem I'm in Saudi Arabia  Can you pay the money directly from MasterCard to Apple Then send the iPhone by Aramex or dhl directly to Saudi Arabia

    I want to buy iPhone 5 64 gb
    The problem I'm in Saudi Arabia
    Apple UK site can not be shipping outside the uk
     Can you pay the money directly from MasterCard to Apple
    Then send the iPhone by Aramex or dhl directly to Saudi Arabia
    Thanks

    However many people contact Apple support for there is nothing that either they or you can do.
    Apple stores online do NOT provide international shipping, end of story.
    If you want an unlocked iPhone 5, you will either have to wait until they are available nearer to you or you need to physically travel to the UK and purchase an unlocked iPhone 5 there.  Rememeber though about warranty issues - not international so it means you'll have to physically return to the UK if anything goes wrong with the phone.
    If you have a friend travelling to the UK, then they could purchase one for you and then you could put a local Saudi nano sim card in the phone when they become available over there.
    Other than that, just be patient and wait until they become available.

  • Can you access i store directly via app TV

    can you access i store directly via app TV

    Welcome to the Apple Community.
    Yes, you can rent and purchase content directly from the Apple TV.

  • HT201209 can you redeem a itunes card purchased in the states in canada

    Can you redeem an itunes card purchased in the states in canada?

    No. You can use a gift certificate only in the iTunes Store for the same country in which the certificate was purchased.

  • Can you tell the output type within template?

    Hi all,
    we're using Oracle apps 11.5.10 and we have the usual leading zero problem when exporting to Excel.
    From what I've read, Excel uses the 'TypeGuessRows' registry setting to read through a specify number of rows to decide whether a column is numeric and then drops the leading zeros. I've also seen the proposed solution of putting a quote mark to trick Excel. We have a requirement to display the right numbers including leading zeroes in both PDF and Excel. So now I'm down to 2 choices.
    1) create a separate template for PDF without the quote or my question
    - Within a template, can you tell what the runtime output type is? Does the XML Publisher engine provide a way to obtain this value within a template?

    Hi Mike,
    I used
    <fo:bidi-override direction="ltr" unicode-bidi="bidi-override"><?D_INVOICE_NUM?></fo:bidi-override>
    and it still didn't work. The invoice number is alphanumeric an sometimes just contains numbers with leading zeroes which is what I'm testing with.
    Cheers
    Kofi

  • Can you add new Page layouts within an Indesign Document like you can in QuarkXpress using tabs

    I am slowly switching to Indesign from QuarkXpress but have encountered my first hurdle. I have grown up with QuarkXpress and want to change to Indesign. I work as a graphic designer and do large POS projects. These projects require many different size leaflets, posters etc but are all under one job/project. I currently use the tab system in QuarkXpress enabling multiple layouts in one file, I then can switch quickly to whatever layout i need to work on within that file. Is there a feature in Indesign which is similar to QuarkXpress as I find this a very valuable time saving feature. I am using Indesign CS 3.0.1

    >What do you mean Sandee?<br /><br />Robert,<br /><br />Sandee's comment did come across as a bit strong, eh. InDesign is better than Quark  for the most part. (Hey,even Quark has it's good points. <g>) But they are different and preconceptions of how to do certain things can hinder a user from using the program to it's best advantage. This goes both ways, but long time Quark users will almost certainly have developed some bad habits that should be broken if using InDesign. [check out theInDesigner.com podcasts. the first few are audio only but the first one in particular deals with this idea, and others reinforce it with specifics.]<br /><br />Your concern about Quark Project files does not fit into this catagory though. You will not find a comparable feature in ID. But I don't think you'll miss it as much as you think.<br /><br />I can't answer your questions about Bridge and Version Cue. I have no experience with them. [there are videocasts on Adobe TV that may give you an idea of how useful Bridge can be. Cafe Fibonacci Ep1, touches on it, Lazy Designer has a couple of episodes that show some not so obvious features.] Essentially Bridge is a common repository for all your files, and that can include your colleagues. But it's more than a way to catalogue and codify your files, you can access the rest of the suite from Bridge, you can even access specific functions of the other applications directly within Bridge.<br /><br />Version Cue manages projects. It keeps track of who did what to where and what version is current. It also allows you to submit different versions for consideration and revert specific items of your layout to previous versions  or is that Bridge? Hopefully someone with a better grasp of Bridge and Version Cue will come to your rescue. But it's obvious that there is a lot of work group functionality built in to CS.

  • Can you Launch External Applications From Within InDesign Ebook?

    Hi all,
    I was wondering if it is possible to open an external application from within an ebook (created with InDesign) e.g. click on a link and have an external ssh client open up for instance?
    Thanks in advance for any advice.
    Regards,
    RG

    It's possible to include hyperlinks in an InDesign file and export them in an EPUB file. Since I'm not familiar with working with SSH clients (in fact, I just had to Google it to have a clue what you're talking about), is this something that can be invoked in a standard URL format? If so, you could probably include it.
    The next issue is whether the link would work. The link couldn't be used directly in any eBook reader I know of, but at least the iBook on an iPad or iPhone would switch to to Safari to let you follow a URL to its destination. But I don't think that's possible on most eBooks.

  • Can you place linked files into Photoshop CS4?

    If you place a .psd or .tif file into an InDesign file, you are alerted if any changes are made to that file (as I'm sure most of you know). Is there any way to do this within Photoshop? I have several dozen carpet sample .tif files that are to be used in several hundred "montage" type "carpet sample groups" layered .psd files that will then be saved as images for the web (does that make sense?). Is there any way to do this so that if there's a change in the original .tif file it will automatically change any .psd file in which it's being used? I know the easiest way to do this is in InDesign, but I have two problems: 1) the conversion from InDesign to a web image is laborious, and 2) the person doing the work does not know InDesign at all. I can show him how to use it, but that's a small part of the battle.
    Any suggestions? I'm using CS4 for Windows.
    Thanks,
    Lloyd

    Thanks for your comments. The problem arises because we have to create that intermediate Photoshop step.
    We have, say, a dozen individual carpet swatches that are used to create hundreds of combinations (which are all separate layered .psd files). If one swatch changes (color, for example), then we have to open every .psd file in which that swatch appears and change it (or place the changed one). I'd love to be able to change the original and have it update every layered file in which it appears, just like InDesign does with placed/linked files.
    Maybe there's a plug-in (wishful thinking)?
    Also, I'd really like to have it changed in the web development end of things, but we're working with a company that is (obviously) using templates and we can only give them single images, hence the need to create the intermediate Photoshop files.

  • Can you connect the TC directly to a Mac Book Pro thru either USB or Ethernet?

    Can you hook a Time Capsule directly to a Mac Book Pro thru USB Port or Ethernet or?
    So that you can speed up the transfer time??
    It's so slow compared to directly connected FW800 and Thunderbolt Drives...
    It's painful...
    Thanks

    Ethernet, yes. Connect the Ethernet cable from your Mac to one of the LAN <-> ports on the Time Capsule. This should be 4-5 times faster than wireless. Be sure to turn off wireless on the Mac.
    USB,no.

  • Can you really update two tables in one SQL statement

    Ok a post in the forum has got me awefully curious:
    Can you update two tables in one update statement i.e something like this
    update table a , b
    set b.<column> = something
    a.<column> = something
    Something to this effect.
    If you are curious to know what post I am talking about it is called "updating a single row"

    No. You can only update one table in one SQL statement.

  • Some of the tabs I click on within websites will no longer respond in Firefox. They will respond in Internet Explorer. Can you givwe me some direction as to how to fix this.

    The tabs that will not respond are usually at the top of the page that give access to different sections in the website. It often will include the log in and log off tabs.

    Both the Yahoo! Toolbar extension and the Babylon extension have been reported to cause this issue. Disable or uninstall those add-ons.
    * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

Maybe you are looking for

  • Mail Hangs after 10.5.6 update

    After installing the 10.5.6 update via Software Update Mail started to Hang. Odd, it worked for about a day then turned south, very south. I have no 3rd party add-ons. Simple set up to SBC global DSL via yahoo. I can't even create a new account becau

  • BAPI for Posting with clearing

    Hi all, Is there any BAPI which can do posting with clearing?Generally we can acheive this through a transaction F-04.BAPI required which can acheive the functionality of F-04.Any Inputs will be highly appreciated with points. Thanks and Regards Kira

  • Apache keeps crashing on windows NT ... help

    Hi, I would like to know why apache is crashing about 10 times a day? I am using Portal 3.0.8 on win NT. I aslo found in other topics that I am not the only one that has problems with apache on NT. Currently there are working 2 users on Portal to dev

  • Rescue and Recovery will not open

    I wanted to back up my system to an external hard drive after finding out that it hasn't been backed up in over 200 days even though when prompted periodically , I select the option to "back up now." However, it seems that neved did back up. When I t

  • Wlconsole with weblogic 5.1 sp9

    Hello everyone. I have installed Weblogic 5.1 SP9. Now wlconsolew doesn't work as it is looking for the old registry key. How does one make wlconsolew work with a service packed Weblogic? Thanks. Andrew Horton Open Business Exchange [email protected]