JSP vs ColdFusion

I'm trying to do some research on this issue, but most of what I find is very old. Can anybody provide any insight on why JSP might be better than ColdFusion? The primary focus is connecting to databases and producing web pages. Supposedly CF is awesome at rapid development of these types of pages. Is JSP really any more difficult? Is JSP more maintainable since developers don't need to learn a proprietary tag library? Any pros/cons for using one technology vs the other would be greatly appreciated.

I use both and I assume you mean JSP/Servlets vs Cold Fusion because JSP is really just the presentation part.
In Cold Fusion, anyone with little experience can create web/database applications quickly but the quality of the application is another subject. The cfquery database connection tag is very quick and user friendly compared to other server side languages. All of Cold Fusion is simpler to learn and use where it uses a tag-based language. It also provides capability to work with Java in your JRUN container for Cold Fusion. It comes with easy Report capability (see CFGraph for example). I am not a fan of its ColdFusion Components (Objects) because I like Java OO features alot better.
As far as cost you will see Adobe charges for their Cold Fusion license where JSP/Servlet container can be free if using Tomcat or JBoss for example. Cold Fusion has always cost money even in the past when other companies like Allaire and Macromedia owned it.
There is a steep curve for learning JSP/Servlets compared with simpler Server sides like Cold Fusion and PHP.
Java is more funner in my opinion compared to Cold Fusion because you get to compile and work with classes.There are alot of nice frameworks and the best part is working with Model-view-controller (MVC) architectural pattern. My Tomcat is way more stable compared to Cold Fusion. I like how it implements Connection Pooling and overall I feel better with my database connections and performance using Java compared to Cold Fusion.

Similar Messages

  • How do I connect to a SQL Server DB?

    I have a menu designed in Flash which has to pull back
    database records, how do I go about that? Every tutorial seems to
    be different and none are exactly what I am looking for.
    thanks
    Em

    Very true. This is a wide open field of decisions you have to
    make.
    First choice you have is sending via URL variable encoding or
    XML. That will define your tasks needed in ASP. As well would you
    want to simply (most beginners would) just have the ASP send the
    URL variables or XML with Response.write or are you planning a web
    service type of app.
    For Flash you will find the examples in the docs are all you
    need to get the data from the ASP and send back if necessary. Still
    the choices depend on the server (ASP) choices.
    For URL Encoding from ASP:
    LoadVars.load
    For URL Encoding to and from ASP:
    LoadVars.sendAndLoad
    For XML from ASP:
    XML.load
    For XML to and from ASP:
    XML.sendAndLoad
    For overall details on data integration
    Many folks like using the Flash 8 Pro DataGrid component for
    a quick UI to display a SQL select result. You would populate it
    using
    DataGrid.addItem.
    You can also bind the DataGrid to data providers such as an
    array so it updates when the data source changes.
    You also can use many of the Flash 8 Pro UI components in a
    data integration that binds them to a data connector component:
    FLash
    8 Pro data binding component approach. You should review
    Data
    Integration in the Flash Docs for this approach.
    If you need some decisions:
    1. Select a scripting language: ASP, PHP, ASP.Net, JSP, Perl,
    ColdFusion
    2. Select the database: mySQL, SQL Server, Oracle
    3. Decide how you want to send data to and from Flash (XML,
    Url variables, Web Services)
    4. Write a server script that can do the database work you
    want and just use html forms to prove those scripts out.
    5. Look up the docs in Flash for #3 and do the Flash UI.
    You might see from this that Flash or HTML would work with
    the same server scripts.

  • Loading of forms in web

    i want to load oracle forms on to the web. i have installed web db, and have forms and my listener is web db listener. i want to load .fmx files on to the web.. can some one help, through a step by step process. data et all are present in some other username and not the default webdb user. is it necessary to install the packages in that user also.
    any help will be of use to me ...
    regards
    sethuraman.r

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Joseph Schwertner ([email protected]):
    It is good that the Forms are developped for Forms 5. The first step is install Forms 6i and Reports
    6i. After that simply compile the forms. They will run without modifications on 6i. Nevertheless may
    be small surprises will arrise, but they are not major and soon you will have workung system in 6i.
    Now you have to enter in another world. You have to switch from 2 tier architechture to 4 tier one.
    But this is not so hard. I did this in November 2000 and 3-4 developers in the world succeed to do the
    same following the instruction.
    At first you have to download the 2 more important Oracle documents from the OTN:"Deploying Forms Applications
    to the WEB with Forms server Release 6i", "Publishing Reports". Read them carefully. After that decide
    which WEB Server will you use. You can use full functions WEB servers (OAS 9i, other) or only for your
    Forms you can simply download from the Forms Server 6i CD the WebDB listener which will act as limited
    WEB Server. I use the last option.
    The next step is to install Forms Server 6i (possibly with WEBDB listener). After that make visible
    on the Internet/Intranet the computer on which the Web listener is installed (with Forms server).
    Now you have the adjust the settings of your machine. Follow the instruction in the above mentioned
    documents. Everything is well described. After adjustment the settings you have to create your "Unternet
    access paths". This will be done in the config file of your listener. You have to map the virtual to
    the physical directories. This is the souce of most mistakes. Spo I wiil give an example:
    In the URL call: http://bigbluenew.drila.us/dev60cgi/ifcgi60.exe?config=hris
    /dev60cgi/ is virtual directory.
    The mappings to the phisical one are stored as part of the text file webdsvr.cfg:
    [DirMaps]
    D:\Forms_Home\tools\web60\html\ /dev60html/
    D:\Forms_Home\webdb\images /images/
    D:\Forms_Home\forms60\java /forms60java/
    D:\Forms_Home\forms60\java /form60code/
    D:\Forms_Home\jinit817 /jinitiator/
    D:\Forms_Home\tools\web60\temp /dev60temp/
    D:\Forms_Home\Forms60\web_reps\ /web_reps/
    D:\Forms_Home\forms60\java\oracle\ewt\laf\generic\images /f60image/
    [CGIDirMaps]
    D:\Forms_Home\tools\web60\cgi\ /dev60cgi/
    D:\Forms_Home\tools\web60\cgi\ /cgi-bin/
    The most common mistake causes the entry
    D:\Forms_Home\forms60\java /forms60java/
    This is the first steps you have to do. Alla are described in the both documents above.
    Now you have to think about the client site - the WEB browser. Oracle runs forms on browsers using an
    applet - Java programm running on the browser. This is very disapointing - the details will be given
    in the third message. To improve things from the very beginning download the Jinitiator from Forms site
    in the OTN - the latest version 1.1.8.10. It is fixed! Other have bugs. More bugs than this one :)!!!
    Now you have to prepare pshycologically to speak with boses and users. The problem is the significant
    loading time for every browser. At first run the browser will download about 10MB software (the Jinitiator
    software). After that every time one call forms has to wait 15-40 seconds (comparisons of version the
    jar files with the version on the server, loading images, etc.) The good news is they are cached on
    the browser. After this delay deliver to your users a functiuonality that is significant better then
    that one delivered by pure HTML and Java, the transfer of packets is lower, the whole Windows GUI functionality
    is abailable.
    All problems here are caused because now you will run the Forms in 4 tier architecture:
    web browser <-> web listener <-> forms server <-> Oracle server
    Also your forms will use a slower connection media - Internet/Intranet. To be well prepared read the
    discussion I post in the third me ssage.
    There are plenty of working forms applications on the web, but they aren't for public use. Companies
    use web forms as a way to let employees use the apps off-site. For these people, the overhead is not
    so great. Also, the math for the system load is not so brutal - A dual processor Unix box with 2GB of
    memory can handle about 200-400 simulataneous users. More than that and the system crawls to a stop.
    Not a good thing for a public site.
    If you want to deploy an Oracle-based app on the web for a wide audience, use a standard tool - JSP's,
    ColdFusion, ASP's or the like.
    John Alexander www.summitsoftwaredesign.com
    Joseph Schwertner
    [email protected]
    Friends,
    Let us speak about Forms on WEB. I just set in "production" the "Personell system" of my company. It
    is available only on Intranet, you cant use it. but the conclusions are interesting.
    The main conclusion is: it works. The overhead exists (too much loading time at the beginning of the
    sesion). Another disadvantages: record navigation in multirecord blocks is confusing - very often the
    form looses the control over the navigation with mouse clicks. So I put the standard button "Next record"
    on the toolbar and recommend to use it. Also there are difficulties with iconic buttons - the images
    are not available, but I know what to do.
    But there are big advantages. First at all the users have the whole Windows functionality in a WEB apllication
    - mouse clicks, tabs, multiwindows, the advanced Oracle Forms access to the Oracle DB. This is not the
    limited WEB page application, slow, stupid (from DB view of point of course). Also I would like to say
    that I succeed to make the application very fast and easy. My colleagues who make WEB apps using HTML
    and Java need as rule 5-6 men team to do the same. Of course it was not easy to learn how to deal with
    Forms Server and with Reports Server. So Forms really is a RAD.
    As Mr. Alexander said Forms of the WEB are used in the so called "Back Office" implementations - for
    supporting the infrastructure of big enterprises. They are not approprite for random user access - the
    overhead is to big.
    The next advantage of Forms on the WEB is that you escape the Forms Client instalation on every user
    station. You avoid to declare a remote directory with .fmx, to share the username/password/host with
    user. The only thing you do is to publish the URL. This is a big advantage.
    About the overhead. In "old" environment (DB listener, Forms Server in the Forms Toolkit) the application
    really runs slow 9at the beginning of the sesion). But I sow apps based on iOAS9i and the integrated
    there Forms Server. They were fantastic fast (the overhead was 5 secs in comparison with the 40 secs
    on my computer).
    I think that Oracle is doing the best to improve the functionality of Forms server. So now there are
    some disadvanteges of this technology, but I optimistically hope that in the next version there will
    be enhancements.
    Maur?cio Pacheco ([email protected])
    Joseph is right and I would like to add
    two things :
    - Although there is some overhead in starting
    Forms Server (let's say 20-40 seconds) the
    usage is much faster than any HTML
    application. Try to create in ASP a dynamic
    page to query a table in tabular form with
    page navigation (one of many examples).
    While Forms needs 2 network packets, HTML
    needs 15 (obvious because the data we see
    is only a small part of the page, the rest
    are tags, formatting information, scripts,
    etc). This comparison was made with the
    same table, showing the same columns and
    with the same records/page. WEB Forms seems
    slow but in fact is faster than HTML
    because the GUI frame runs on the client.
    - In one occasion there was an international
    competition to create a WEB application
    for product catalog (reports, queries,
    maintenances, drawings, etc). While with
    Forms we took 1 week (1 developer) the
    fastest competitor took 3+ months (3
    developers)! And worst, the user
    functionality regarding complex queries and
    reporting was far better in Forms than
    the competitor's tool (I am not going to
    give names). Perhaps this was a matter of
    training but Forms is really fast to
    develop database applications. If
    productivity, simplicity, database
    performance, data integrity and user
    functionality is not important don't use
    Forms.
    Once more, Forms was not projected for public
    sites where multimedia content and
    presentation is required. It was projected
    for authenticated database applications,
    to handle and present data and to reduce
    development and maintenance time.
    Now I hope you have enough knowledge to begin to embed your forms on the WEB. It is easy, but you have
    to obtain some new knowledge.
    <HR></BLOCKQUOTE>
    thanks joseph. will try it and let you know at the earliest.
    null

  • License exception (CF9)

    From time to time there is a license exception error in the logs though we use a paid Standard Edition 9.
    Any ideas how to check WHAT license error occured and in which template? I cannot see this in the error code and I do not use any Enterprise features...
    Tnx in advance.
    Ronald
    500
    A License exception has occurred: You tried to access a restricted feature for the Standard edition: JSP
    coldfusion.license.LicenseManager$LicenseIllegalAccessException: A License exception has occurred: You tried to access a restricted feature for the Standard edition: JSP
        at coldfusion.license.LicenseManager.byte(Unknown Source)
        at coldfusion.license.LicenseManager.checkJSP(Unknown Source)
        at coldfusion.license.JspLicenseServlet.service(Unknown Source)
        at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
        at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
        at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
        at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
        at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
        at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
        at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
        at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
        at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
        at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

    That ought to be something that you follow-up with directly at Adobe.  Make sure you have your proof-of-purchase information handy if they don't find you right away in their customer database.  They can provide you with the correct license code and the proper instructions for (re-)installing it.  They're hands-down the best folks to help you with something like this. . .

  • Even Sun MicroSystems Gets Nightmares

    Hi,
    Have a look here....
    http://developers.sun.com/prodtech/javatools/jscreator/downloads/index.jsp
    Get an advanced IDE ( JAVA CREATOR 2 ) for Java Solutions
    absolutely free. It is developed almost identical to Visual Web
    Developer ( VWD ), perhaps with more features. The only reason to
    Create and distribute this IDE is a Biggest THREAT from Microsoft.
    Even Microsoft is worried and working harder with Expression Tools
    Now...
    SUN will never wish their developers should move around to
    other community ( Language Preference), due to lack of support.
    I dont think Sun has more developers than Asp/Php put
    togather.
    Even with the little community, when compared to huge
    Community holded by AdobeMacromedia, the Sun gets
    Nightmares...................................
    WHILE....... DW8 is sleeping Silently, giving nigtmares to
    developers and old loyal community waiting for answers
    When will DW8 wake Up..... and answer once for all.? blessing
    at least a nice sleep to developers.
    Thanks
    DotNetGuys

    quote:
    Originally posted by:
    Newsgroup User
    DW is mainly aimed at website design rather than application
    development.
    Totally Agreed.
    But majority are still using DW8 as an IDE for programming
    also.
    No Doubt DW8 is great when asp, php or Cfm is concerned, and
    its perhaps the best solution around.
    Its there since when asp was at peak
    Sun has now a solution for Jsp.
    Coldfusion does not have to worry with DW8 still around.
    Asp.net 2.0 lovers are still trying to get accomodate with
    DW8 any how.
    DotNetGuys

  • Coldfusion mark up language vs jsp

    Can anyone tell me the pros and cons of developing an application using coldfusion vs jsp.
    There is very little on the web about the CONS of ColdFusion's MX release. The ColdFusion language is considered very easy to learn for people with a programming background. ColdFusion Markup Language must have some disadvantages compared with developing in Java. Any resources would be appreciated.
    Cheers
    Liz

    ColdFusion's primary purpose is rapid application development (RAD). And in this area, CFML smokes Java.
    Though, it's not like RAD is java's primary purpose. CFMX and Java are both Java languages with different purposes and really shouldn't even be compared. It's like trying to compare pure Java to JSP to EJB's... what's the point? You should instead be looking at what each technology brings to the table and how they can work together to compliment and enhance each other. Remember, it's not a competition or war between the two technologies any more... they're part of the same family now.
    For many applications, the Java language is just plain overkill. And for many applications, cfmx won't provide the scalability and power needed. And more times then not, it's not the language or technology that brings forth a better solution, rather the person writing the code and whether he/she knows how to properly use it.

  • JSP/Servlets on ColdFusion MX 7

    I have a customer that needs to run a JSP/Servlet forum
    software. I dont want to have to build a server using Apache Tomcat
    when I have a perfectly good Windows server running ColdFusion MX
    7. Just one more headache to worry about. Currently, I have
    ColdFusion MX 7 running IIS 6.0. I did not install the JRUN web
    server. Can I rerun the install to put JRUN on the server to run
    the servlets? Do I need to build another Windows server and install
    JRUN without IIS? Not sure what to do here. Any help would be
    appreciated. Thanks.
    Don Seibert
    SeiberSpace Technologies, LLC
    www.seiberspace.net

    JSPs and servlets will run directly inside CFMX7 enterprise,
    but not standard. You can use your standard webserver and do not
    need to activate the JRun webserver.

  • DW CC no _ServerBehaviorsPanel, ASP PHP jsp COLDFUSION other functions

    I come from China, I know where software piracy is very serious, but there is really a great market, there are a lot of people use genuine, and when I try DW CC after me sad, because there is no _ServerBehaviorsPanel, ASP PHP jsp COLDFUSION other functions, although now there are ways to recover, but you can see ADOBE no longer attached to these, it is difficult too many people may no longer to use this product, thank DW accompany me for so many years.

    Hello,
    At DMXzone we've already released (in Sept 2013) a full set of extension for connecting to your database(s) and managing your database content. A great replacement of the old server behaviors technology to create new dynamic web apps built the Ajax way!
    The Database Connector as well as the Database Updater feature a great Database Connection Wizard, fully visual Query Builder to make your work a breeze.
    They are available for PHP and ASP
    You can check the Database Connectivity Collections and learn more about the features of the extensions on our website:
    For PHP:  http://www.dmxzone.com/go/22151/dynamic-database-connectivity-collection-php
    For ASP:  http://www.dmxzone.com/go/22152/dynamic-database-connectivity-collection-asp

  • Calling JSP Tag Files from Coldfusion

    I am trying to call a JSP Tag file from Coldfusion. I am
    getting "Unknown Tag" error.
    Here is the code I have.
    <CFIMPORT TAGLIB="/WEB-INF/lib/mtgTags.jar"
    PREFIX="mtg">
    <mtg:chooseDate appId="1" />
    mtgTags.jar contains a chooseDate.tag file.
    I know CFIMPORT statement above is working fine. Can anyone
    please tell why am I getting "Unknown Tag: chooseDate" error.
    Thanks

    Hi,
    You get the custom tag output into a hidden variable (say 'key') and use the request.getParameter("key")
    Hope u got the answer...
    Regards
    ravi

  • Web Service is not working in COldfusion 8

    Hi,
    I am using the following code for creating the web service.
    this code was perfectly working in Coldfusion 7,
    however not working in Coldfusion 8.
    &lt;cfscript&gt;
        try {
            ws = CreateObject("webservice", CurrentURL & "IntouchDataService.cfc?wsdl");
        } catch (any e) {
            WriteOutput("Error occured while invoking the Web Service at: ");
            WriteOutput('&lt;a href="#CurrentURL#IntouchDataService.cfc?wsdl"&gt;#CurrentURL#IntouchDataService.cfc?wsdl &lt;/a&gt;');
            WriteOutput('&lt;hr /&gt;&lt;h2&gt;');
            WriteOutput(e.message);
            WriteOutput('&lt;/h2&gt;&lt;hr /&gt;');
            WriteOutput(e.detail);
            WriteOutput('&lt;hr /&gt;');
            WriteOutput(e.StackTrace);
    &lt;/cfscript&gt;
    Follwoing error i got:
    coldfusion.jsp.CompilationFailedException: Errors reported by Java compiler: Found 1 semantic error compiling "E:/ColdFusion8/stubs/WS-2123243560/coldfusion/xml/rpc/CFCInvocationException.java": < 10. public class CFCInvocationException extends org.apache.axis.AxisFault implements java.io.Serializable { . . . 88. } > *** Semantic Error: A class file was not generated for the type "coldfusion.xml.rpc.CFCInvocationException" because a library method that it depends on was not found. See system messages for more information. Found 1 semantic error compiling "E:/ColdFusion8/stubs/WS-2123243560/com/intouchsupport/www/IntouchDataService/TestWebServ iceLocator.java": < 10. public class TestWebServiceLocator extends org.apache.axis.client.Service implements com.intouchsupport.www.IntouchDataService.TestWebSe
    Also i did lot of googling to solve this issue but no luck.
    also i found following blog about this issue also and i did the give steps however problem not solved.
    http://tjordahl.blogspot.com/2007/09/coldfusion-8-getting-started-code.html
    Can somebody help me to sort out this issue?
    thanks
    Prashant Gupta

    Hi,
    I got solution to my problem of webservice is not working in CF8.
    the problem was
    we have already a "rt.jar" file in a location and we defined this location in CF Admin >> java jvm >> classpath
    so this file was conflicting.
    i simply removes this file path from CF Admin.
    and restart the CF services.
    and my web service start working.

  • ColdFusion MX7 Error When Starting Apache2Triad

    I just installed the ColdFusion MX7 trial on my local
    machine. When I try to start the Apache2Triad (uses Apache 2.2.0)
    service it fails to start and the following error is written to the
    system log file:
    quote:
    The Apache service named Apache2Triad Apache 2 Service
    reported the following error:
    >>>httpd.exe: Syntax error on line 1116 of
    C:/apache2triad/conf/httpd.conf: Cannot load
    C:/CFusionMX7/runtime/lib/wsconfig/1/mod_jrun20.so into
    server: The specified procedure could not be found.
    The following was written to the Apache conf file by
    ColdFusion when installed:
    quote:
    # JRun Settings
    LoadModule jrun_module
    "C:/CFusionMX7/runtime/lib/wsconfig/1/mod_jrun20.so"
    <IfModule mod_jrun20.c>
    JRunConfig Verbose false
    JRunConfig Apialloc false
    JRunConfig Ssl false
    JRunConfig Ignoresuffixmap false
    JRunConfig Serverstore
    "C:/CFusionMX7/runtime/lib/wsconfig/1/jrunserver.store"
    JRunConfig Bootstrap 127.0.0.1:51011
    #JRunConfig Errorurl <optionally redirect to this URL on
    errors>
    #JRunConfig ProxyRetryInterval 600
    #JRunConfig ConnectTimeout 15
    #JRunConfig RecvTimeout 300
    #JRunConfig SendTimeout 15
    AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr
    .cfswf
    </IfModule>
    My Apache service starts with the following command line (in
    case this is important):
    quote:
    "C:\apache2triad\bin\httpd.exe" -n Apache2 -k runservice
    I posted this on the Apache2Triad forum and the response was:
    quote:
    this means that apache has problems with a library needed by
    that module , it can be anything , missing file , conflicting
    version
    So, is this an Apache problem or is this something similar to
    this post:
    CFMX
    7 installation problem

    I just installed the ColdFusion MX7 trial on my local
    machine. When I try to start the Apache2Triad (uses Apache 2.2.0)
    service it fails to start and the following error is written to the
    system log file:
    quote:
    The Apache service named Apache2Triad Apache 2 Service
    reported the following error:
    >>>httpd.exe: Syntax error on line 1116 of
    C:/apache2triad/conf/httpd.conf: Cannot load
    C:/CFusionMX7/runtime/lib/wsconfig/1/mod_jrun20.so into
    server: The specified procedure could not be found.
    The following was written to the Apache conf file by
    ColdFusion when installed:
    quote:
    # JRun Settings
    LoadModule jrun_module
    "C:/CFusionMX7/runtime/lib/wsconfig/1/mod_jrun20.so"
    <IfModule mod_jrun20.c>
    JRunConfig Verbose false
    JRunConfig Apialloc false
    JRunConfig Ssl false
    JRunConfig Ignoresuffixmap false
    JRunConfig Serverstore
    "C:/CFusionMX7/runtime/lib/wsconfig/1/jrunserver.store"
    JRunConfig Bootstrap 127.0.0.1:51011
    #JRunConfig Errorurl <optionally redirect to this URL on
    errors>
    #JRunConfig ProxyRetryInterval 600
    #JRunConfig ConnectTimeout 15
    #JRunConfig RecvTimeout 300
    #JRunConfig SendTimeout 15
    AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr
    .cfswf
    </IfModule>
    My Apache service starts with the following command line (in
    case this is important):
    quote:
    "C:\apache2triad\bin\httpd.exe" -n Apache2 -k runservice
    I posted this on the Apache2Triad forum and the response was:
    quote:
    this means that apache has problems with a library needed by
    that module , it can be anything , missing file , conflicting
    version
    So, is this an Apache problem or is this something similar to
    this post:
    CFMX
    7 installation problem

  • Same variable on every JSP page

    Hi All,
    I'm just a beginner with JSP so excuse me if this is a 'stupid' question.
    I'm building an Application that uses MySQL database everything works ok, but
    I would like to know if there is a way to have a variable that I can use on every page.
    The reason is, is because I have lots of pages (and growing) where I have the
    database connect string with username password, but due to security reason
    the user/pass for the database will change every now and then.
    I'm familiar with Coldfusion and in Coldfusion you can setup an Application.cfm file. This file is called before every other .cfm file. Is there something like that
    in JSP?
    The solution I thought of is, putting the connect string into a session variable.
    Is this a could idea?
    If not, are there any other better ways of achiving this?
    Thanks for any help!
    Steven.

    Are you using Tomcat?
    Because Tomcat supports things like Application.cfm did with CF. They go in web.xml, I believe (I don't use tomcat myself).
    Your database connect (and interaction) should not be handled by individual pages. It should be in a bean, connection pooling (tomcat), JSTL, or other more scalable method (or combination of techniques that works for you). If you put it all in scriptlets, you really limit yourself later.
    I am assuming from your post that the username/pass is the same for all users. If it isn't, use a session-scoped bean to hold that info.

  • Uploading the file to server from the browser using JSP

    I have facing difficulty while uploading the file from the browser using user interface to the server or to the database. As previousy i was working in coldfusion, i find it very easy there with cffile command, but i am confused how to do that in JSP
    please reply soon, as i am stuck in my project because of that
    Sarosh

    Check out http://www.jspsmart.com , They have a nice free upload api that can be used w/ JSPs or Servlets. I hear O'Reilly has a nice one too. May as well use someone elses if they've done it already.

  • Intermittent problem in Coldfusion 9, BlazeDS with Java Service class and CFCProxy

    If that title doesn't scare you, you might be able to help.
    I believe there is a bug in Coldfusion 9's version of CFCProxy.
    Tech Stack:
    Flex Application
    BlazeDS (stock with CF9)
    Java Service class (java-amf BlazeDS endpoint)
    Coldfusion business tier, invoked by the Java Service class using CFCProxy
    Tomcat 6 on Java 1.6
    Linux or Windows servers, both exhibit same behavior
    SQL Server database
    Problem:
    When Flex calls a Java service method through BlazeDS that invokes a Coldfusion CFC through CFCProxy, and the method called in the Coldfusion CFC includes a large query (10 fields, 1000+ records returned), we intermittently (1 out of ~5 times) receive the following exception:
    java.lang.NullPointerException
        at coldfusion.runtime.NeoPageContext.popBody(NeoPageContext.java:1925)
        at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:57)
        at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
        at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
        at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
        at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
        at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
        at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491)
        at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:437)
        at coldfusion.cfc.CFCProxyFilter.invoke(CFCProxyFilter.java:56)
        at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:381)
        at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
        at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
        at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
        at coldfusion.cfc.CFCProxy.doInvoke(CFCProxy.java:281)
        at coldfusion.cfc.CFCProxy.invoke(CFCProxy.java:193)
        at com.lampo.mapping.service.MapToolWebService.makeCfcProxyCall(MapToolWebService.java:1326)
        at com.lampo.mapping.service.MapToolWebService.getTerritoryList(MapToolWebService.java:609)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at flex.messaging.services.remoting.adapters.JavaAdapter.invoke(JavaAdapter.java:418)
        at flex.messaging.services.RemotingService.serviceMessage(RemotingService.java:183)
        at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:1400)
        at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:1005)
        at flex.messaging.endpoints.amf.MessageBrokerFilter.invoke(MessageBrokerFilter.java:103)
        at flex.messaging.endpoints.amf.LegacyFilter.invoke(LegacyFilter.java:158)
        at flex.messaging.endpoints.amf.SessionFilter.invoke(SessionFilter.java:44)
        at flex.messaging.endpoints.amf.BatchProcessFilter.invoke(BatchProcessFilter.java:67)
        at flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:166)
        at flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:291)
        at flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:353)
        at coldfusion.flex.ColdfusionMessageBrokerServlet.service(ColdfusionMessageBrokerServlet.jav a:114)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at coldfusion.filter.FlashRequestControlFilter.doFilter(FlashRequestControlFilter.java:71)
        at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
        at java.lang.Thread.run(Thread.java:662)
    Attempts to diagnose:
    These things remove the problem:
    CF8 works perfectly with the identical code, never fails.
    Calling the same Coldfusion CFC method with the large query (10 fields, 1000+ records returned) from another CFC 100+ times never fails.
    Using a Coldfusion service class (a "my-cfamf" BlazeDS endpoint) never fails. However, we need to use a Java service class because we are using ~40 Java value objects (VOs) that correspond to ~40 auto-generated Actionscript VOs. BlazeDS won't correctly deserialize the Actionscript VOs into the Java VOs with a Coldfusion service class.
    If I replace the large query with a Sleep(5000) instead, it never fails.
    These things don't remove the problem:
    Using the latest Microsoft JDBC driver doesn't help.
    Even if the Coldfusion method returns an empty resultset (i.e., just calls the query and doesn't do any other work or return anything), the call still fails intermittently.
    If the Coldfusion CFC with the method in question is instantiated and stored in SERVER scope as a singleton across multiple requests with CFCProxy, doesn't help.
    Different large (1000+ record queries) all fail in the same way.
    Caching the query doesn't help
    Changes in the datasource configuration doesn't help
    Using the older version of BlazeDS doesn't help
    With all of these tests, I believe it comes down to a problem in the combination between CFCProxy and large queries. There may be more to it, but that is what we've narrowed it down to.
    Any insight would be very welcome.

    Hi Frank
    The page is ADF bound, I've added the page source and the adfc-config source below :
    Page
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1">
          <af:form id="f1">
            <af:commandButton text="commandButton 1" id="cb1"
                              actionListener="#{test.testws}"/>
          </af:form>
        </af:document>
      </f:view>
    </jsp:root>adfc-config
    <?xml version="1.0" encoding="windows-1252" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
      <view id="view1">
        <page>/view1.jspx</page>
      </view>
      <managed-bean id="__4">
        <managed-bean-name id="__3">test</managed-bean-name>
        <managed-bean-class id="__2">ch.mit.test.test</managed-bean-class>
        <managed-bean-scope id="__1">request</managed-bean-scope>
      </managed-bean>
    </adfc-config>It seems to be the same sort of problem as in Re: Error in ADF Web Service Connection
    Regards
    Paul

  • How do I get flex remoting to work with Coldfusion 11

    Hi,
    Coldfusion 11 (Developer)
    Flex 3
    Existing Flash Application works with Coldfusion 8
    Flex Integration is turned on.
    Running latest update
    CentOS 6.1 with latest updates
    I have done the following:
    http://127.0.01/flashservices/gateway  ---> Page Not found
    http://127.0.01/flashservices/gateway/  ---> Page Not found
    http://forums.adobe.com/message/5621721#5621721
    Confusion Blog » Apache + Debian + Coldfusion 10 + flex2gateway = Error 404
    https://groups.google.com/forum/#!topic/railo/6j2i6gl8Ac4
    \config\wsconfig\1\uriworkermap.properties file to include:
    /flashservices/gateway/* = cfusion
    /flashservices/gateway = cfusion
    I have modified the mod_jk.conf like so:
    # Select the timestamp log format
    JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
    # Fix para Flex2gateway
    <IfModule jk_module>
        JkMount /*.cfm ajp13
        JkMount /*.cfc ajp13
        JkMount /*.do ajp13
        JkMount /*.jsp ajp13
        JkMount /*.cfchart ajp13
        JkMount /*.cfres ajp13
        JkMount /*.cfm/* ajp13
        JkMount /*.cfml/* ajp13
        JkMountCopy all
    </IfModule>
    AddHandler jakarta-servlet .cfm .cfml .cfc .cfr .cfswf
    Alias /CFIDE "/opt/coldfusion10/cfusion/wwwroot/CFIDE"
    I uncommented the "start flex 2" section in web.xml
    Nothing has worked.
    I have searched Google and Adobe.
    I was hoping that Adobe would have the "Flex Integration Check Box" working
    by now.  It only been around since ColdFusion 8 and basically does nothing.
    Adobe could post a tutorizl on how to get this working.
    Job Security for "Tech Support".
    Any ideas.
    Brian

    Do you have internet when wired to the router?
    What exactly is the problem? What error messages do you get?
    What are the current settings on the WRT?

Maybe you are looking for