Can I deploy pages with DB params stored elsewhere?

Hello,
Trying to get up to speed with JSP's. So far, all is well. Can go into, out, etc. of a DB, which is fine.
Question is this. The pages that have all of the JDBC connection params in them, is it possible to put all of the DB params into a module page, and just import it, so I don't have a ton of duplicate code floating around the web site? If so, what's the best? Almost like a .h file in C++, but in Java, what are they called?
Thanks,
10k

http://java.sun.com/products/jsp/syntax/1.2/syntaxref12.html
You can use the <%@ include %> which is the equivalent of a .h file in c++
It is a static include at page translation time, which effectively just "pastes" the code into your jsp.
This way you can have a common header on all of your JSPs.
However it is preferable NOT to do SQL queries/scriptlet code in JSP.
Write a java bean that handles database connection, and call db.getConnection() on it.
Or use JSTL sql tags
Even better, don't have any SQL statements on your JSP pages - put it all into java beans as a data access layer.
Cheers,
evnafets

Similar Messages

  • I bought an iPad and an iTunes card, I want to buy an application from the Apps store but it only gives me the option of credit card.  How can I buy Pages with my iTunes card to my iPad? thank you

    I bought an iPad and an iTunes card, I want to buy an application from the Apps store but it only gives me the option of credit card.  How can I buy Pages with my iTunes card to my iPad? thank you

    Have you redeemed your iTunes card to an account associated with an Apple ID?
    Once you have your iPad associated with an Apple ID AND you have an account with a credit card associated with the same Apple ID AND you have some 'store credit' (from redeeming your iTunes card) then purchases use the store credit before they charge the credit card, so you should be ok!
    Personally, I use 'store credit' as a way to monitor whether or not there have been any 'unauthorised' purchases because as soon as the store credit is zero, the security code from the credit card is needed for further purchases!  It does mean that I have sometimes to top up store credit before making a purchase, but 'better safe than sorry'! 

  • How can I extract page with showing the e-sign signatures?

    How can I extract page with showing the e-sign signatures? When I extract pages, the e-sign signatures are all disappear.  Or can I save the documents without verify the signatures?  When I open the documents, it need verify the signatures and then open it now.

    Hi Ada,
    The thing you have to realize is when using Acrobat or Reader to create a digital signature you are signing the whole document (all of the bytes in the document). You are not signing just the page where the signature appearance resides.
    Another thing to realize is the signature appearance (what you see on the page in the signature field) is not the signature itself. The signature proper is a block of hex encoded bytes written into the PDF file and not something you see (unless you open the file in a text editor). What you see on the page is just a graphical representation of the actual signature, but it's not the actual signature.
    When you extract a page (even if it had the signature appearance on it) it is just a sub-set of the signed bytes, and if the signature were to be extracted as well it would be invalid because the bytes in the extracted file would not match the bytes in the signature. Because the signature in the extracted document would always be invalid we just remove it.
    Steve

  • Can I open pages with another id apple?

    Hi,
      can i open pages with another id apple? I have macbook pro and is registrated with one id apple, but I want open pages with another id apple, it's possible? And if yes what i do?
    Thank you!
    p.s.  I'm sorry for my english, I'm italian.... :-)

    Proceed with what? You CAN'T merge them.
    This is from that link:
    Apple IDs cannot be merged. You should use your preferred Apple ID from now on, but you can still access your purchased items such as music, movies, or software using your other Apple IDs.

  • Can I use Pages with more than one user?

    Hi,
    I recently purchased Pages and want to be able to use it with two different users (one personal, one business). Is this possible? If so, how? I have no problem using it with the user I purchased it with, but my business user does not the option for Pages in the launchpad. How can I use Pages across users?
    Thank you,
    Britta

    Pages should be installed in the Applications folder at the top level of your hard drive to be available to all users of that Mac. By default, if you are logged in as an administrator, applications are installed in this folder. I haven't done it, but I understand that if you are not an administrator, applications are installed only in that user's applications folder.
    My installation of iWork is from the retail disc from more than three years ago but I did check for an app purchased from the Mac App Store in another user account on my Mac & had no problems finding it or launching it from Launchpad. Launchpad can be very cluttered &, unless you take the time to organize it, it can be very difficult to find a particular application. I would suggest trying to launch Pages from a Finder window or with a Spotlight search. And keep the Pages icon in the Dock for easy access the next time.

  • Reload the same page with multiple param id

    Hi dude,
    i create review.jsp and include the displayproduct.jsp.. when i add review for the particular product,value added succesfully in db and successurl method will call and reload the displayproduct.jsp as blank page.. because param id not passing in url..
    how to pass the previous navactionid,navcountid and productid to SuccessURL with same jsp..
    pls clarify my doubt..

    hi MishraI need to pass the param in button
    <dsp:input type="submit" bean="MyReviewFormHandler.addReview" value="Submit Review">
    <dsp:input bean="MyReviewFormHandler.ProductReviewSuccessURL" type="hidden" value="displayCategory.jsp" />
    >
    It should work.
    I'm using below same way and working fine.
    <%/* URL to go to if user's session expires while he is filling out this form */%>
         <dsp:input bean="ShoppingCartModifier.sessionExpirationURL" type="hidden" value="../../common/SessionExpired.jsp"/>
         <%/* ADD TO CART BUTTON: Adds this SKU to the Order*/%>
         <dsp:input bean="ShoppingCartModifier.addItemToOrder" type="submit" value="Add to Cart "/>
         <%/* Goto this URL if NO errors are found during the ADD TO CART button  processing:*/%>
         <dsp:input bean="ShoppingCartModifier.addItemToOrderSuccessURL" type="hidden"  value="../checkout/cart.jsp"/>-RMishra

  • Can't Load Pages - Proxy PAC file stored locally

    Hi folks,
    I was using last Safari 2 version and recently updated to Safari 3.0.4 and 3.1 and then it was impossible to connect using my corporate VPN solution. We use Juniper Network Connect 5.5.0 solution and during connection, this software changes IE7 proxy configuration by editing PAC URL (proto=http://, when connected on corporate network) to a PAC path of a file stored locally in "...\Application Data\Juniper Networks\Network Connect 5.5.0\instantproxy.pac" (proto=file://, when abroad). When I disconnect it, it reverts the changes back to an URL address.
    When I found out this, I tried to copy and paste the proxy path stored in IE7 to the Safari address bar and tried to load the file.
    IE7:
    +file://C:\Documents and Settings\MyName\Application Data\Juniper Networks\Network Connect 5.5.0\instantproxy.pac+
    Safari transform the pasted address to:
    +file:///C:/Documents%2520and%2520Settings/MyName/Application%2520Data/Juniper%25 20Networks/Network%2520Connect%25205.5.0/instantproxy.pac+
    And tries to load but then I have a "Safari Can't find the file." error.
    Looking back to Safari transformed address, I saw that there is "%2520" code that represents the spaces. But wait..."%20" isn't the space representative code? I think, we have a small bug here...
    So I replaced "%2520" codes by "%20" and tried to load the file. As expected the file loads!!!
    I reported this as a bug but I hope that someone can share some experience with Safari and|or Juniper Network Connect in order to find a workaround!!

    Well without any explanation from Apple, it appears that this bug was fixed. I tested it again on Safari 5.0.4 and it's working great now.

  • How can I create pages with different backgrounds

    Hello,
    I'm creating flash site which will have different backgrounds for each page. I'll load the individual pages with "MovieClipLoader." My understanding about MovieClipLoaders is that, it doesn't matter the background of your mc, the page to which you are loading will maintain it's background.
    How do I achieve that?
    Thank you!

    Hello,
    Thanks for the reply, I think it's a very good suggestion. I'm going to try it out and I hope to fill you in.
    Thanks once again.

  • Can load the page with McAfee VirusScan Enterprise 8.5.0i turn on

    I need help on this, my problem is when I enable McAfee VirusScan Enterprise 8.5.0i's Access Protection on and Safari doesn't loads, but when I disable it, it load perfectly, so what i'm asking is, how can I surf the internet with Access Protection is enable for McAfee VirusScan Enterprise 8.5.0i, I hope that the full version of Safari 3 doesn't do this, and yes, my computer have met the requirements.
    Thanks for your support.
      Windows XP Pro   Custom Made
      Windows XP Pro   Custom Made

    Dominique,
    Thank you for the detailed problem description. Although you posted it some ten hours ago I have just now finished reading it.
    Form pages must be built so they can operate correctly when inline validation errors are displayed. The assumption (by the engine) is that session state (and package state) as it exists at the point the validations are performed is sufficient (and correct) to support the redisplay of the page without the need to fire on-load processes or computations. Session state or package state changes made by after-submit computations or after-submit/before computations/validations processes that prevent correct page behavior on the "validation redisplay" must be avoided.
    The condition types Inline Validation Errors Displayed/No Inline Validation Errors Displayed can be used for on-load events/controls (processes, computations, regions, items, ...) for which you need finer control over this behavior.
    Also, you can forgo the use of after-submit computations when the resulting alteration of session state would be inimical to proper "validation redisplay" behavior and use On Submit - After Computations and Validations processes instead.
    I hope I have understood your situation and that this answer adequately answers your questions.
    Scott

  • Can I start Pages with full width zoom and hide inspector?

    I'm a journalist, sometimes when I fire up Pages I need to get typing as quickly as possible.
    I created a template with full width zoom and hid the inspector - that's how I'd like things to start. But when the template loads it reverts to a narrower wdith and the inspector is back. Can I force things to start the way I want?

    I've got the same problem. My preference is to have a plain screen with the toolbar and rulers hidden and the inspector closed. The toolbar and rulers are no problem, but how do I set a default to keep the inspector closed?

  • ImageIO encode split page with original params?

    Hey all,
    I'm working with TIFF's and the ImageIO library. I split out a single page from a TIFF and then re-encode it, but I can not figure out how to re-encode with the exact same configuration of the original TIFF (i.e. compression, resolution, white/black, etc.).
    Is there some way to do this please? Attached is my working code if this helps!
    -D
         Iterator writers = javax.imageio.ImageIO.getImageWritersByFormatName("tiff");
         javax.imageio.ImageWriter writer = (javax.imageio.ImageWriter)writers.next();
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         javax.imageio.stream.ImageOutputStream ios = javax.imageio.ImageIO.createImageOutputStream(out);
         ImageReadParam rparam = imageReader.getDefaultReadParam();
         TIFFImageWriteParam writeParam = (TIFFImageWriteParam)writer.getDefaultWriteParam();
         writer.setOutput(ios);
         writer.write(iiometadata,iioimage,writeParam);
         ios.flush();
         return out.toByteArray();

    I'll answer my own question. Key is to copy and/or edit the Node object representing the image's metadata. This is an XML representation of the TIFF tags.
    In this example, all the input images properties are encoding in the output image.
                ImageReader reader ...
                ImageWriter writer ...
                BufferedImage bi = reader.read(0);
                IIOMetadata metaData = reader.getImageMetadata(0);
                Node node = metaData.getAsTree("com_sun_media_imageio_plugins_tiff_image_1.0");
                ImageOutputStream ios = ImageIO.createImageOutputStream(target);
                writer.setOutput(ios);
                IIOMetadata imageMetadata = writer.getDefaultImageMetadata(null, writeParam);
                imageMetadata.setFromTree("com_sun_media_imageio_plugins_tiff_image_1.0", node);
                IIOImage img = new IIOImage(bi, null, imageMetadata);
                writer.write(null, img, writeParam);

  • Can I use log4j with a java stored procedure

    I have code that resides on the middle tier and on the database. Our company is using log4j for debugging purposes. In order to get my code to work on the database, I have had to remove all the log4j stuff. Has anyone tried to get code that has log4j messages to run on the database? I am not concerned with actual debugging, I just don't want to have to strip this code out if I can avoid it.

    Hi Laura,
    As far as I know, you have two choices:
    1. Load the log4j classes into the database (using the "loadjava" tool).
    2. Enable remote invocation of log4j classes via RMI (or similar).
    Hope this helps.
    Good Luck,
    Avi.

  • Is it possible to create a page with a signature, that can be then applied to other pages?

    I want to know if I can create a page, with a place for an ink signature, and that signature can be then copied onto other pages within the pdf where the same person's signature is needed.

    I would like to invite you to take a look at my Nugget on Action Engines.
    Since you have a data value that must be available for live updates in more than one place in the code, an Action Engine will provide a reliable method to share that value. You will update the Action Engine any time the control changes. All other function that require that information can read the the value form the Action Engine.
    That method has been in use since LV version 2 and provided the AE is implemented correctly (see Nugget) it gives good performance and helps keep code modular.
    I hope that help,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Welcome page with out  any password pop up

    Hi All,
      I have one req. that we have to make one BSP page in page with flow logic. And that page should not ask for any user id and password. Can you please  help me out?
    Thanks and regards,
    Kuldeep Verma

    Hello Kuldeep,
    If the BSP application contains the Welcome page as well as other pages, you can achieve the goal through dividing the application into two parts: public part and protected part.
    For example, for the Welcome page, you can create a page with name "public/welcome.htm", and for other pages that must be accessed with user authorization, you may create each page with name "protected/xxxx.htm".
    In addition to the above, you need to create two independent services under SICF relevant node for the BSP application. As in example, one independent service is named "public", and the other is named "protected". For "public" serive, you need to specify a user that has limited rights; for "protected" service, you do not need to specify any users.
    Please reward points if helpful!
    Best regards!
    Gordon

  • I can't connect to facebook. Keeps saying cannot connect to the internet but I am on the internet and can access web pages etc.

    I can't connect to facebook. It keeps saying cannot connect to the internet but I am connected as I can access we pages with no problem

    Hello there, Patrick.
    The following Knowledge Base article offers up some great steps to try when troubleshooting issues with an app you've downloaded to your iOS device:
    iOS: An app you installed unexpectedly quits, stops responding, or won’t open
    http://support.apple.com/kb/ts1702
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

Maybe you are looking for

  • How to Dene a Data Link Between Queries: Bind Variables

    This is an interesting topic and I cannot get it to work using Bind Variables. I have 2 queries: Q1 and Q2. Q2 needs c_id, account_code and account_type from Q1. Whe I run the data template below, I get only the data for Q1. Now people may argue that

  • How to Migrate SSIS packages from 32 bit to 64 bit environment

    Hi, We developed many SSIS packages in 32 bit environment using SQL 2008 on windows 2003 server 32 bit OS. In order to utilize the 64 bit features we wish to migrate these packages into a 64 bit. Wanted to know. 1. Whether we can execute these packag

  • F110-idoc-not-generated-rffoedi1

    hi expert, I am running a payment program F110 and the IDOC is not getting genrated for the payment program. In the payment log i see the infomation IDOcs were generated for the following entries.... but when i chekc the idoc by we05 i can't find any

  • Quality problems when burning a dvd with Premier Elements 11

    I purchased a while ago, but just recently installed Premier Elements 11.  I previously had 9 and 10.  11 was great until I burned to a disc.  The quality is very substandard. Have you come up with a fix for this?  I have read many other complaints a

  • Non-Arch screenshots on these forums

    I am getting tired of people lurking on the forums, not running Arch yet posting their screenshots in the appropriate (well I should rather say inappropriate) topics. There is no point - and no honour - on posting Arch screenshots on Ubuntu. That goe