Is there any PHP print_r($_REQUEST) equivalent in Servlet??

Hi friends,
Is there any PHP print_r($_REQUEST) equivalent in Servlet??

The system.out calls will print to the server logs, just read them. It's somewhere in a straightforward named folder in the appserver root folder, like /logs. I thought it were for debugging purposes.
At least, Servlets are not meant to output HTML. Use JSP for that. It's a view technology providing a template for HTML.
Replace your servlet's code by:public void doPost(HttpServletRequest request,HttpServletResponse response)throws ServletException, IOException {
    // Do some preprocessing logic here?
    // Forward request to page.jsp.
    request.getRequestDispatcher("page.jsp").forward(request, response);
}and create a `page.jsp` which look like this:<!doctype html>
<html lang="en">
    <head>
        <title>Show post key-value</title>
        <style>
            body { background: #fdf5e6; }
            h1 { text-align: center; }
        </style>
    </head>
    <body>
        <h1>Show post key-value</h1>
        <ul>
            <li><strong>param1</strong>: ${param.param1}</li>
            <li><strong>param2</strong>: ${param.param2}</li>
            <li><strong>param3</strong>: ${param.param3}</li>
        </ul>
    </body>
</html>Or if you don't know the parameter names beforehand, then make use of [JSTL's c:forEach|http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/c/forEach.html] (to install JSTL, just drop [jstl-1.2.jar|http://download.java.net/maven/1/jstl/jars/jstl-1.2.jar] in /WEB-INF/lib):<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!doctype html>
<html lang="en">
    <head>
        <title>Show post key-value</title>
        <style>
            body { background: #fdf5e6; }
            h1 { text-align: center; }
        </style>
    </head>
    <body>
        <h1>Show post key-value</h1>
        <ul>
            <c:forEach items="${param}" var="p">
                <li><strong>${p.key}</strong>: ${p.value}</li>
            </c:forEach>
        </ul>
    </body>
</html>That said, please throw away the ancient HTML/CSS/JSP/Servlet tutorials/books you're reading and go get a more recent one. The coding practices you're showing off are discouraged over a decade.

Similar Messages

  • Is there any Mac App store equivalent to the jail-broken Locktopus app?

    I don't want to jail-break my ipad - but I really need the functionality of this app.

    Yes. There were numerous opportunities to create new accounts but I didn't want to do that. There isn't even an Apple Feedback option to complain about the lack of feedback for the Mac App Store.
    You can't rid the world of criminals. But imagine if you called 911 and they told you that if you weren't the victim, then you couldn't call to report something.

  • Are there any loggin capabilities in the xsql servlet??

    Hi,
    I would like to log things like query results, errors etc on the file system when using the xsql servlet.
    Is there facility in say XSQLConfig.xml, that will allow me secify a file name that will be subsequently used by the xsql servelet to do this.
    Note I know this can be done using standard Java methods, when using the XSQLRequest object. I am trying to avoid doing this, if the xsql servlet itself can be used.
    Thanks,
    - Manish

    Hello Michael,
    You may use Java callouts with Oracle B2B for transformation purpose but it is not recommended to do heavy transformations in that. For light transformations you may use this. TP facing callouts are also supported.
    Please refer -
    http://download.oracle.com/docs/cd/E14571_01/integration.1111/e10229/callouts.htm#CHDEFBDG
    Does the EDIFECS XEngine, used by the Oracle SOA Suite 11g B2B at runtime, have hooks that can be used to configure custom transformation logic and associate it with specific trading partner agreements or channels?No. EDIFECS Xengine is used for translation purpose only. It uses ecs file for translation and validation. In short, it is for translation support.
    Regards,
    Anuj

  • Is there any possibilities to call external servlets?

    hi,
    i put my all servlet files to outside of the root directory of application. Is there any possiblities to access the external servlets? when i call a servlet file through a jsp, 404-file not found exception was rised.
    Thanks in advance........
    Murali

    crossposted.

  • Are there any ready made PHP scripts/tutorials for suage with FLASH?

    Hello, I want to have in my FLASH website a members area,
    where the user will register (giving full name and other details)
    then this will be saved to a database in server, and then the
    user will be able to have a big list of some data where he will be
    able to check (using many checkboxes) some of them. and odf course
    i wnat to these choises to be saved in the database.
    I saw the tutorials in flash help about loadvars,
    xmlconnector etc.
    So i think the flash part i can do it.
    But i know nothing about Databases and Php
    As i figured out, i can create a database using visual tools.
    So i have to have a php sript. but i know nothing about php
    Are there any ready made? or any tutorial similar to my
    project so i can change it a little bit.
    thank you

    hi dalamag,
    You can go through this link
    http://www.actionscript.org/resources/articles/141/1/Introduction-to-Flash-and-PHP/Page1.h tml
    Thanks,
    Kunjan.

  • Is there any Java API equivalent to Javascript eval() method?

    Is there any Java API equivalent to Javascript eval() method?
    Regards
    Rakesh

    No there isn't however you can use Jython (or another scripting language of your choice) to reproduce this functionality.

  • HT4967 Mobile Me was so handy. I pushed the little sync button and everything updated. Is there any equivalent for I Cloud?

    Mobile Me was so handy. I pushed the little sync button and everything updated. Is there any equivalent for I Cloud?

    Welcome to the Apple Community.
    Unfortunately, iCloud does not offer equivalents to Mobile Me’s iDisk, Gallery or Web Hosting services. You will need to find a third party solution to replace these services. You might consider DropBox, SugarSync, MediaFire or any other service that offers online storage. (not all these alternatives offer all the services previously provided by iDisk)

  • Is there any way to use the bundled PHP compiler without web sharing on?

    Is there any way to use the bundled PHP compiler without Web Sharing on? Is there a way to make sure Web Sharing only allows local access so others on the network cannot access it? Any other easy way to get a PHP compiler on a Mac? I currently run Mac OS X 10.7.4. Any other security issues that might pop up from leaving Web Sharing on? Basically I just want a local PHP compiler so I can do some coding.

    You can use another router as an 'extender' (I know that this will work seemlessly with AirPort Extemes and AirPort Express's - you'll have to check with your router manufacturer to determine what they recommend for range extenders).
    You may also want to take a look at this link - http://www.wi-fiplanet.com/tutorials/7-tips-to-increase-wi-fi-performance.html - it may offer some tips.
    Clinton

  • PHP 5.5.15: Are there any current drivers, or will the 5.3 and 5.4 drivers work?

    Title says it all. I am running PHP 5.5.15, but the latest drivers I could find for SQL Server, at http://www.microsoft.com/en-us/download/details.aspx?id=20098, only includes drivers for 5.3 and 5.4. Arethese drivers fine for 5.5? If not, are there
    any 5.5 drivers anywhere for SQL Server? 5.5 is over a year old, so there should be something out there?
    Thanks, best regards,
    Chris

    Well, you could trade it in for a white one! 
    First, try a system reset.  It cures many ills and it's quick, easy and harmless...
    Hold down the on/off switch and the Home button simultaneously until the screen blacks out or you see the Apple logo.  Ignore the "Slide to power off" text if it appears.  You will not lose any apps, data, music, movies, settings, etc.
    If the Reset doesn't work, try a Restore.  Note that it's nowhere near as quick as a Reset.  From iTunes, select the iPad/iPod and then select the Summary tab.  Follow directions for Restore and be sure to say "yes" to the backup.  You will be warned that all data (apps, music, movies, etc.) will be erased but, as the Restore finishes, you will be asked if you wish the contents of the backup to be copied to the iPad/iPod.  Again, say "yes."

  • Is there any LIKE query equivalent in XML?

    Is there any LIKE query equivalent in XML?
    I would like the display words starts with 'A' in flex list, vice versa. I send A as a input.
    Any ideas?

    Hi,
    I don't know that one - but with slight modification I can filter nodes values also - not onlyl attributes:
    var people:XML = <people>
       <person>
                        <firstName>Peter</firstName>
              </person>
       <person>
                        <firstName>Auguste</firstName>
              </person>
       <person>
                        <firstName>Gregory</firstName>
              </person>
       <person>
                        <firstName>Andy</firstName>
              </person>
    </people>
    (so we have nodes that have values - not attributtes)
    and then e.g.:
    var peopleList:XMLList = people.person.(firstName.charAt(0) == "A");
    trace(peopleList);
    (this is dynamic statement - you could replace "A" with variable reference, etc)
    Edit;
    I've googled interesting article you could read on that subject here:
    http://www.senocular.com/flash/tutorials/as3withflashcs3/?page=4
    hth,
    regards,
    Peter
    Message was edited by: Peter Blazejewicz

  • Are there any web-based products out there for client project and interaction...

    Dear Web Designers,
    Is there any open source, free, php software packages out there (or web products - a doc com tool) that allows a web designer freelancer (like me) who has their own business to take in client requests or new project request descriptions and requests from anyone and allow me to respond back with an answer, a timeline, status on the project etc etc. (besides just a standard contact us form - is there any project managment tool for web designers that works well for that?)
    Andrew

    Sure.  There are lots & lots of them.  It depends on your coding skills, which scripts and databases your server supports, and how many bells & whistles you want.
    osTicket ~
    open source (free), requires PHP & MySql on your server
    http://osticket.com/features.php
    Zendesk ~
    commercial help desk system.  30 Day free trial available.
    http://www.zendesk.com/pricing
    You'll find many others on Google
    http://www.google.com/search?q=web+site+help+desk+system&ie=utf-8&oe=utf-8&aq=t&rls=org.mo zilla:en-US:official&client=firefox-a
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • Is there any functionality for AVERAGE in ALV, like do_sum, subtot?

    Hi Experts,
    In my_alv report, am doing sub/totals for prices, by using do_sum, subtot functions.........fine. But, I need to do/display the AVERAGE value for Discount % column?
    Is there any functionality for AVERAGE in ALV, like do_sum, subtot?
    thanq

    hi
    check these links out
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    regards
    vijay
    reward points if helpful

  • I just bought an new ipad mini with wifi and cellular. Is there any way to send text messages to people and contacts that do not have iphones such as friends with blackberrys or a samsung galaxy smartphone.

    I just bought an new ipad mini with wifi and cellular. Is there any way to send text messages to people and contacts that do not have iphones such as friends with blackberrys or a samsung galaxy smartphone from this ipad. Everytime I try to send a message to a person that does not have an Apple product ( Iphone or Ipad ) it comes up saying contact is not registered for iMessage and wont send it. I can only send them a message from my iPhone 4 instead. Do I have to install a new App from the App store to send these non iMessage cell users a message?

    FYI
    Complete guide to using iOS 6
    http://howto.cnet.com/ios-6-complete-guide/
    Guide to Built-In Apps on iOS
    https://sites.google.com/site/appleclubfhs/support/advice-and-articles/guide-to- built-in-apps-ios
    You can download a complete iOS 5 iPad User Guide and iOS 6 iPad User Guide here: http://support.apple.com/manuals/ipad/
    Also, Good Instructions http://www.tcgeeks.com/how-to-use-ipad-2/
    Apple - iPad - Guided Tours
    http://www.apple.com/ipad/videos/
    Apple iPad Guided Tours - Watch the videos see all the amazing iPad apps in action. Learn how to use FaceTime, Mail, Safari, Videos, Maps, iBooks, App Store, and more.
    http://www.youtube.com/watch?v=YT2bD0-OqBM
    http://www.youtube.com/watch?v=ROY4tLyNlsg&feature=relmfu
    http://www.youtube.com/watch?v=QSPXXhmwYf4&feature=relmfu
    How to - Articles & User Guides & Tutorials
    http://www.iphone-mac.com/index.php/Index/howto/id/4/type/select
    iPad How-Tos  http://ipod.about.com/lr/ipad_how-tos/903396/1/
    You can download this guide to your iPad.
    iPad User Guide for iOS 5
    http://itunes.apple.com/us/book/ipad-user-guide-for-ios-5/id470308101?mt=11
     Cheers, Tom

  • Hi at the moment my ipod is on manual sync mode. Is there any way of changing this to auto-sync without losing the music on my ipod or library? Possibly more importantly is there a way I can transfer the ratings from my ipod onto my i-tunes?

    Hi at the moment my ipod is on manual sync mode. Is there any way of changing this to auto-sync without losing the music on my ipod or library? Possibly more importantly is there a way I can transfer the ratings from my ipod onto my i-tunes?
    This is so I can delete music from my ipod knowing its rated on my i-tunes so I can then see later if I want to re-add it based on its rating
    Thanks

    Is there any way of changing this to auto-sync without losing the music on my ipod or library?
    Unfortunately there is not.
    Possibly more importantly is there a way I can transfer the ratings from my ipod onto my i-tunes?
    Not without the help of third party software such as this one:
    http://www.copytrans.net/copytrans.php
    B-rock

  • Is there any way to get more than 99 tracks on a DVD?

    I am limited to 99 tracks in my iDVD project. is there any way to add a new Title so that i can add more? I know that there are DVDs with multiple titles, each title holding up to 99 tracks. anybody know how?

    Sounds like you may need the storage capacity of a Blueray burner and disc to meet your objectives as outlined above. Unfortunately there is very little to no support on most macs for burning such a disc (short of using DVDSP) and then only with limited success.
    Assuming you must use a mac and consumer software plus standard 4.7 GB DVD-R media (Verbatim or Maxell for example)I think Roxio Toast may be able to help you but I'm still looking at the exact procedure/s in which to accomplish the above objectives of adding about a dozen movies per menu. Here a few links I have reviewed so far:
    http://www.amug.org/amug-web/html/amug/reviews/articles/roxio/7/
    http://www.roxio.com/enu/products/toast/titanium/overview.html
    http://forums.support.roxio.com/lofiversion/index.php/t21466.html
    http://forums.support.roxio.com/lofiversion/index.php/t26939.html
    I'll also post back later with more info.

Maybe you are looking for

  • Passed 1Z0-051 -- is the score final?

    Hi All, I'm pursuing 'Oracle PL/SQL Developer Certified Associate' certification. Just finished ONLINE '1Z0-051 Oracle Database 11g: SQL Fundamentals I'. After exam, I get a summary containing e.g. 'Passing Score 60%' and my actual score, which is 'P

  • No Default ACL when using Windows Explorer?

    No matter what Default ACL I specify on any user's account, adding new documents using Windows Explorer causes an initial ACL of "Published". Also, when I right-click on the iFS network drive and select "iFS User Profile", it shows the Default ACL as

  • To correct a great quantity of  G/L entries generated by stock I/E

    Hello, Following an error of parameters settings for stock accounts in Business One 2005A (due to Bo vendor incompetence ), inventory transactions caused many incorrect entries in G/L. State of inventory binds the articles in stock on accounts which

  • In Listcube tcode User specific Option disable for Save as Layout

    In Listcube tcode User specific Option disable for Save as Layout

  • Java and Word Docs

    Few weeks ago I posted a question about: Word document and Java. Is there anyway that a Java application can access a Word Document. I need to create a template in word and then fill the document a run time. Thank you for your help.