Why do Servlet exists when there are JSP's ?

Hi !
I am wondering for quite a few days now , why do servlet exist , jsp's can do all the things which a servlet can do and JSP's are yet easier to embed HTML tags etc.
Please throw some light on the matter as i feel that i am missing a major difference.
Best Regards
Rajarshi.

beacuse servlets first came into existence and then jsp's.Exactly.
Servlets were developed first.
It was then discovered how much of a pain it was in a servlet to debug/change HTML - everything had to be in an out.println() statement();
That made it very difficult to do complex HTML - and impossible to use any tools with.
JSP turned it around so it wasn't java code creating HTML, but rather an HTML page that runs some java code. It then went too far down that path, as JSPs don't support all the syntax/type checking that a compiler provides in a servlet.
Also reading a page which is a mix between HTML and java scriptlet code is very difficult.
Enter tag libraries, which take the java code back OUT of the jsp pages, replacing it with stuff that looks like HTML tags.
Enter frameworks like Struts/Tapestry/JSF which leverage design of web applications.
This is an evolving technology. The next generation learns from the mistakes/shortcomings of the previous, and gradually becomes easier.
What will be the next step? Who knows?

Similar Messages

  • Why do duplicate albums appear on my iPod Classic screen when there are no duplicates in my iTunes Library?

    Why do duplicate albums appear on my i{Pod Classic screen when there are no duplicates in my iTunes Library?

    It's probably going to be a capitalisation error. In other words, one or more tracks on the album has a lower case letter at the beginning of the album name while all the others have a capital letter. They can be difficult to spot.
    In iTunes, examine one of your duplicated albums carefully. You should be looking for a slight difference between the album title name. Look at the screenshot below, can you see the error in the album title?
    It is there...
    The title track (Left Of The Middle). Look at the capitalisation of the album name.
    Once you find you error in your album, re-type it (or copy-and-paste from one track to all the tracks) and then SYnc your iPod to iTunes. Does that cure it? If nto, let us know.

  • LOV throws NullPointerException when there are no rows to display

    Hi,
    I have cascading LOVs in my application. I have 3 of them. I select values for the first 2 LOVs, and then I click on the 3rd LOV. The query for the third LOV returns no records from the database and so, a NullPointerException is thrown.
    When there are no rows to display in the LOV, I want the LOV to still pop up with a message saying "No rows to display".
    Is there a way I can achieve this functionality using the existing features?
    I am using JDev 11.1.1.3.0
    Thanks
    Srikanth Addanki

    <RegistrationConfigurator><handleError> Server Exception during PPR, #2
    java.lang.NullPointerException
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlLOVBinding.getSearchBinding(FacesCtrlLOVBinding.java:189)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlLOVBinding$ListOfValuesModelImpl.getSearchRegion(FacesCtrlLOVBinding.java:1536)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlLOVBinding$ListOfValuesModelImpl.getQueryModel(FacesCtrlLOVBinding.java:1163)
         at oracle.adfinternal.view.faces.renderkit.rich.SimpleInputListOfValuesRendererBase$InternalLaunchPopupListener.processLaunch(SimpleInputListOfValuesRendererBase.java:1371)
         at oracle.adf.view.rich.event.LaunchPopupEvent.processListener(LaunchPopupEvent.java:108)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcast(UIXComponentBase.java:673)
         at org.apache.myfaces.trinidad.component.UIXEditableValue.broadcast(UIXEditableValue.java:210)
         at oracle.adf.view.rich.component.UIXInputPopup.broadcast(UIXInputPopup.java:152)
         at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:812)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:292)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Please let me know if I can provide any other info that makes the issue analysis easy.
    Thanks for the quick reply.

  • Avoid marking files as modified by Git when there are no changes

    Hello,
    I am working on a project using Visual Studio 2013 Ultimate and Enterprise Architect 9.0 (a UML tool). I am using Git for Source Control in Visual Studio.
    I have set up the programs so that I can synchronize code from Enterprise Architect (EA) to Visual Studio (VS) and vice versa using MDG Link for Visual Studio (an Enterprise Architect add-in). I first synchronized all the existing code from VS to EA.
    Now I have the following workflow:
    Create UML models in EA;
    Add necessary attributes and operations to the class models;
    Synchronize models with the code, which will add the added attributes and operations to my source;
    The last step will regenerate all my source code files, but even if there are no changes Git marks the files as modified.
    How can I avoid this behaviour, because now all my files are modified when Enterprise Architect synchronizes the model with the source code.
    I only want Git to mark it as modified when there are actually things added or modified in the file.
    Any help will be appreciated.
    Marcel

    Hi,
    I think it's more VS which detect the file was modified, and by default it mark the file as modified in Git. 
    But normally when you want to commit your work these files are removed because Git detect the files are not really changed.
    Did you try to refresh the pending changes in the team explorer (F5). Perhaps Git recalculate all the differences, and then detect the real changes.
    Regards,
    Yan Grenier
    Merci de bien vouloir "Marquer comme réponse", les réponses qui ont répondues à votre question, et de noter les réponses que vous avez trouvé utiles.

  • Minimize the count of cubes when there are more number of cubes

    Hi All:
    Need your inputs on reducing the count of cubes when there are more number of cubes in any project.
    On which basis we can downsize the count of cubes? For example,if there 30 cubes in same region,I want to reduce them to ,say 20 cubes.
    Please share your thoughts.
    Regards,
    Upendra.

    You need to evaluate all of your existing cubes and see if there is any overlap in dimensionality that would allow you to combine cubes. Such as if one is actuals and another cube is budget for the same data, possibly you can combine those. Or as someone else suggested based on Business Units (If the other dimensions allow it. Perhaps conflicting Account or other structures won't allow it. )
    However you have to then balance combining cubes against larger cube size which could impact calc time and other performance issues.
    Its all a balancing act.
    Look at where it makes sense to combine them. Only you know your environment enough to state if they can be combined or not.

  • Red artifact blob shows up in the middle of my screen when there are dark colours showing

    Does anyone know what this is? Or why it is happening? There is a red blob-ish artifact that is on the middle of my screen and you can notice it when there are dark colours on the screen. It's really annoying when I'm trying to watch movies or play games that have dark scenes. (The picture quality isn't that great, but you can kinda see the red blob I'm talking about.)
    Any thoughts?

    I'm having the same problem. Only noticed it after installing OS X Lion.

  • AdminExplorer won't automatically resize when there are lots of folders

    Hello
    On one of my portal pages there is an iView based on a modified AdminExplorer layout set.  It is modified so that the folders are not displayed in the main area - only in the left hand tree area.
    The iView is set to automatically resize.  So when there are more files, the iView gets bigger instead of scrolling.
    However, when the size of the folder tree increases (e.g. by opening subfolders in the tree area), the iView does not resize.  Instead, a scroll bar appears for the tree area.
    Does anyone know how I can fix this?

    Why can't you use the Weblogic startup class to start your
    client automatically when WebLogic Server starts ?
    What version of Weblogic Server are you running ?

  • Why Synonym becomes INVALID when changes are made on the related object ?

    Hi all,
    WHY SYNONYMS becomes invalid when changes are made on related OBJECTS ?
    Is there any specific reasons for this.?
    Is there any method or procedures to make the synonym VALID as soon as the we perform any alteration on the related object.
    Thanks
    Himabala

    Synonym will be validated when it is accessed, no need to take an action.

  • What does the message "Commit can be issued only when there are no requests awaiting responses" mean ?

    Can someone explain what this message is, and what the reason could be for
              the java.lang.IllegalStateException.
              When such an error is encountered, how can I find out what the
              "RepliesOwedMe" are. The complete exception is as follows
              Any quick hint is greately appriciated
              Thanks
              asankha
              <Sep 6, 2001 12:49:18 PM GMT+06:00> <Error> <EJB> <Exception during commit
              of transaction transactio
              n=(IdHash=8297169,Name = [EJB
              CActionBeanImpl.execute()],Xid=3:c56b8ee8f6114598,Status=Active,numRep
              liesOwedMe=2,numRepliesOwedOthers=0,seconds since begin=0,seconds
              left=29,ServerResourceInfo[weblogi
              c.jdbc.jts.Connection]=(state=suspended,assigned=none),SCInfo[myserver]=(sta
              te=active),properties=({
              weblogic.transaction.name=[EJB CActionBeanImpl.execute()],
              weblogic.jdbc=t3://10.2.1.133:7001, weblo
              gic.debug.DebugContext=weblogic.utils.DebugContext@662250})):
              java.lang.IllegalStateException: Commi
              t can be issued only when there are no requests awaiting responses.
              Currently there are 2 such reque
              sts. xid = 3:c56b8ee8f6114598, status = Active
              at
              weblogic.transaction.internal.TransactionImpl.throwIllegalStateException(Tra
              nsactionImpl.
              java:1272)
              at
              weblogic.transaction.internal.TransactionImpl.checkIfCommitPossible(Transact
              ionImpl.java:
              1206)
              at
              weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransaction
              Impl.java:162
              at
              weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:201)
              at
              com.edocs.wb.web.action.CActionBeanEOImpl.execute(CActionBeanEOImpl.java:37)
              at CeaMarketMainServlet.doGet(CeaMarketMainServlet.java:185)
              at CeaMarketMainServlet.doPost(CeaMarketMainServlet.java:312)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :213)
              at
              weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
              ntext.java:12
              65)
              at
              weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
              :1631)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              >
              

              This means that the transaction initiator has not received replies for some of
              the transactional requests when the transaction commits, i.e. the checked transaction
              behavior is violated. WLS TM enforces checked transaction behavior to make sure
              that all work done in the transaction context will be completed before transaction
              is committed. If it cannot make such guarantee due to outstanding replies, it
              aborts the commit right away.
              Currently, there is no provisions for dumping the requests whose replies are still
              pending.
              I would suggest you report to BEA support: [email protected]
              Regards,
              Priscilla
              "Asankha C. Perera" <[email protected]> wrote:
              >Can someone explain what this message is, and what the reason could be
              >for
              >the java.lang.IllegalStateException.
              >
              >When such an error is encountered, how can I find out what the
              >"RepliesOwedMe" are. The complete exception is as follows
              >
              >Any quick hint is greately appriciated
              >Thanks
              >asankha
              >
              ><Sep 6, 2001 12:49:18 PM GMT+06:00> <Error> <EJB> <Exception during commit
              >of transaction transactio
              >n=(IdHash=8297169,Name = [EJB
              >CActionBeanImpl.execute()],Xid=3:c56b8ee8f6114598,Status=Active,numRep
              >liesOwedMe=2,numRepliesOwedOthers=0,seconds since begin=0,seconds
              >left=29,ServerResourceInfo[weblogi
              >c.jdbc.jts.Connection]=(state=suspended,assigned=none),SCInfo[myserver]=(sta
              >te=active),properties=({
              >weblogic.transaction.name=[EJB CActionBeanImpl.execute()],
              >weblogic.jdbc=t3://10.2.1.133:7001, weblo
              >gic.debug.DebugContext=weblogic.utils.DebugContext@662250})):
              >java.lang.IllegalStateException: Commi
              >t can be issued only when there are no requests awaiting responses.
              >Currently there are 2 such reque
              >sts. xid = 3:c56b8ee8f6114598, status = Active
              > at
              >weblogic.transaction.internal.TransactionImpl.throwIllegalStateException(Tra
              >nsactionImpl.
              >java:1272)
              > at
              >weblogic.transaction.internal.TransactionImpl.checkIfCommitPossible(Transact
              >ionImpl.java:
              >1206)
              > at
              >weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransaction
              >Impl.java:162
              >)
              > at
              >weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:201)
              > at
              >com.edocs.wb.web.action.CActionBeanEOImpl.execute(CActionBeanEOImpl.java:37)
              > at CeaMarketMainServlet.doGet(CeaMarketMainServlet.java:185)
              > at CeaMarketMainServlet.doPost(CeaMarketMainServlet.java:312)
              > at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
              > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
              > at
              >weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              >:213)
              > at
              >weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
              >ntext.java:12
              >65)
              > at
              >weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
              >:1631)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              >>
              >
              >
              

  • How to change the default JRE when there are several version of JRE in Sys

    How to change the default JRE when there are several version of JRE in System?
    i have installed j2sdk1.5.0 then installed j2ee1.4,then installed Weblogic6.1 which use jdk1.3
    Now the JRE is jdk1.3\bin
    When run class that was compiled with jdk1.5,throw:
    java.lang.UnsupportedClassVersionError
    How can i change the jre to 1.5?

    There is a workaround to move from 1.5 version to the older 1.4 version. But this could be specific to the browser setting the JRE version.
    Excerpts from sun docs:
    However, a user can still run older versions. To do so, launch the Java Plug-in Control Panel for the older version, then (re)select the browser in the Browser tab.
    Example:
    Assume you are running on Microsoft Windows with Microsoft Internet Explorer, have first installed version 1.4.2, then version 5.0, and you want to run 1.4.2.
    Go to the j2re1.4.2\bin directory where JRE 1.4.2 was installed. On a Windows default installation, this would be here: C:\Program Files\Java\j2re1.4.2\bin
    Double-click the jpicpl32.exe file located there. It will launch the control panel for 1.4.2.
    Select the Browser tab. Microsoft Internet Explorer might still appear to be set (checked). However, when 5.0 was installed, the registration of the 1.4.2 JRE with Internet Explorer was overwritten by the 5.0 JRE.
    If Microsoft Internet Explorer is shown as checked, uncheck it and click Apply. You will see a confirmation dialog stating that browser settings have changed.
    Check Microsoft Internet Explorer and click Apply. You should see a confirmation dialog.
    Restart the browser. It should now use the 1.4.2 JRE for conventional APPLET tags.
    Details are here
    http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/jcp.html
    My system (Windows XP) has the version 1.5_09 set as the default. However i just installed JRE 1.5_06 and would like to revert back to _06 as the default JRE..
    Will update if i find more information

  • Problem with XML Publisher report when there are no detail records.

    I am working on an Oracle XML Publisher procurement report (Oracle E-Business Suite R12) that starts with a budget amount that is imported from our financial system, then lists all requisitions and orders that are in process (not approved). The amounts of all those unapproved requisitions/orders are totaled using a Sum form field, to be followed by a field where the unapproved requisition/order total is subtracted from the budget amount (amount available). I am running into a problem when there are no unapproved requisitions. When I run the report for such instances, it completes with a warning -- here is what it states in the OPP log:
    oracle.xdo.parser.v2.XPathException: Extension function error: Method not found 'sum'
    I have altered my sum field on the RTF template to include an if statement in case of a null value...
    <?sum (EXTENDED_COST)?> <?xdofx:if sum (EXTENDED_COST) = " then 0 end if?>
    ...but this does not work.

    Hi,
    You are on right track. Simply put summary field in header group and remember to set reset at property to Header Group Not Child and now you can use this field in format trigger.
    Format trigger must be written on header frame.
    Cheers !
    Adinath Kamode

  • IPhone 4s has yahoo mail icon permanently on safari when there are no open pages

    My iPhone 4s using iOS7.0.2 has a Yahoo mail icon displaying permanently on the top of Safari when there are no open pages. The icon did not disappear even when I deleted my Yahoo mail account. The icon also has my Yahoo username displayed below it. Is there any way I can remove the Yahoo mail icon from permanently displaying on Safari? I cleared my history, cookies and data, but the Yahoo icon is still there.

    I have the same issue and koban4max's sugggestion doesn't work (well, it works, but you'll need to do it once a day.) I am surprised this hasn't been widely reported either as an iphone, Verizon or Yahoo issue. I tried various suggestions (deleting/re-adding account, moving messages to a new folder and changing password on computer/iphone, etc.) It will push for a while but stop pushing in a few hours or a few days. This leads me to believe somewhere in the interface corrupts the process. I would love to know if it's unique to Verizon, iphone 4S or IOS 5, or all of the above. The phone doesn't even fetch according to schedule, only when you are in the application. BTW, the Exchange push solution for Gmail works wonderfully.
    iphone 4S, IOS 5, Verizon.

  • After several years of use very satisfied with Firefox, recently loaded version (4.0.1) severely slows my browsing, and even my system, especially when there are pictures or videos. I said that this was not the case before and my system is Windows XP SP3.

    After several years of use very satisfied with Firefox, recently loaded version (4.0.1) severely slows my browsing, and even my system, especially when there are pictures or videos. I said that this was not the case before and my system is Windows XP SP3.

    I have had a similar problem with my system. I just recently (within a week of this post) built a brand new desktop. I installed Windows 7 64-bit Home and had a clean install, no problems. Using IE downloaded an anti-virus program, and then, because it was the latest version, downloaded and installed Firefox 4.0. As I began to search the internet for other programs to install after about maybe 10-15 minutes my computer crashes. Blank screen (yet monitor was still receiving a signal from computer) and completely frozen (couldn't even change the caps and num lock on keyboard). I thought I perhaps forgot to reboot after an update so I did a manual reboot and it started up fine.
    When ever I got on the internet (still using firefox) it would crash after anywhere between 5-15 minutes. Since I've had good experience with FF in the past I thought it must be either the drivers or a hardware problem. So in-between crashes I updated all the drivers. Still had the same problem. Took the computer to a friend who knows more about computers than I do, made sure all the drivers were updated, same problem. We thought that it might be a hardware problem (bad video card, chipset, overheating issues, etc.), but after my friend played around with my computer for a day he found that when he didn't start FF at all it worked fine, even after watching a movie, or going through a playlist on Youtube.
    At the time of this posting I'm going to try to uninstall FF 4.0 and download and install FF 3.6.16 which is currently on my laptop and works like a dream. Hopefully that will do the trick, because I love using FF and would hate to have to switch to another browser. Hopefully Mozilla will work out the kinks with FF 4 so I can continue to use it.
    I apologize for the lengthy post. Any feedback would be appreciated, but is not necessary. I will try and post back after I try FF 3.16.6.

  • Joining 2 related records using PL SQL in Apex - Problems when there are more than 2 related records?

    Hi
    I am combining 2 related records of legacy data together that make up a marriage record.  I am doing this in APEX using a before header process using the following code below which works well when there are only 2 related records which joins the bride and groom record together on screen in apex.  I have appended a field called principle which is set to 'Y' for the groom and 'N' for the bride to this legacy data
    However there are lots of records where in some instances there are 3, 4 , 5, 6 or even 1 record which causes the PL/SQL in APEX to not return the correct data.  The difference in these related columns is that the name of the bride or groom could be different but it is the same person, its just that from the old system if a person had another name or was formally known as they would create another duplicate record for the marriage with the different name, but the book and entry number is the same as this is unique for each couple who get married.
    How can I adapt the script below so that if there are more than 2 records that match the entry and book values then it will display a message or is there a better possible work around?  Cleaning the data would be not an option as there are thousands of rows of where these occurrences occur
    declare 
         cursor c_mar_principle(b_entry in number, b_book in varchar2) 
         is 
              select DISTINCT  id, forename, surname, marriagedate, entry, book,  formername, principle
              from   MARRIAGES mar 
              where  mar.entry   = b_entry
              and    mar.book = b_book
              order by principle desc, id asc; 
         rec c_mar_principle%rowtype;
    begin 
    open c_mar_principle(:p16_entry,:p16_book)  ;
    fetch c_mar_principle into rec;
    :P16_SURNAME_GROOM   := rec.surname; 
    :P16_FORNAME_GROOM   := rec.forename;
                   :P16_ENTRY := rec.entry; 
                   :P16_BOOK :=rec.book;
    :P16_FORMERNAME :=rec.formername;
    :P16_MARRIAGEDATE :=rec.marriagedate;
    :P16_GROOMID  := rec.id;
    fetch c_mar_principle into rec;
    :P16_SURNAME_BRIDE   := rec.surname; 
    :P16_FORNAME_BRIDE   := rec.forename;
                   :P16_ENTRY := rec.entry; 
                   :P16_BOOK :=rec.book;
    :P16_FORMERNAME :=rec.formername;
    :P16_MARRIAGEDATE :=rec.marriagedate;
    :P16_BRIDEID  := rec.id;
    close c_mar_principle;
    end;

    rambo81 wrote:
    True but that answer is not really helping this situation either?
    It's indisputably true, which is more than can be said for the results of querying this data.
    The data is from an old legacy flat file database that has been exported into a relational database.
    It should have been normalized at the time it was imported.
    Without having to redesign the data model what options do I have in changing the PL/SQL to cater for multiple occurances
    In my professional opinion, none. The actual problem is the data model, so that's what should be changed.

  • Displaying a message when there are no results from an XSL Query

    Using MM_XSLTransform.class.php
    I am querying an XML file to produce a list of places whose town name or address match a letter of the alphabet. The letter is passed as a variable in a URL.
    XSL:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <xsl:param name="letter"/>
    <xsl:output method="html" encoding="UTF-8"/>
    <xsl:template match="/">
    <xsl:for-each select="dataroot/CPINFOWEB[Town=starts-with(Town, $letter) or Name=starts-with(Name, $letter)]">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
            <td>
        <a href="detail.php?park={CostCode}"><xsl:value-of select="Name"/></a><br />
              <a href="detail.php?park={CostCode}"><xsl:value-of select="Town"/></a><br />
          <xsl:value-of select="Address"/><br />
          <br />    
          </td>
            </tr>
          </table>
          </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>
    Destination PHP file:
    setXML("../regions/CPINFOWEB-mobile.xml"); $mm_xsl->setXSL("list.xsl"); $mm_xsl->addParameter("letter",$_GET['letter']); echo $mm_xsl->Transform(); ?> 
    The result Name and Town are displayed as a URL to link to a "more details" page.
    All works fine, but when there are no results for a letter of the alphabet I obviously get a blank page.
    How do I display a "no results" message instead

    I deleted my original reply because the formatting of the XSL code was messed up by the forum. Here's trying again:
    Your current code creates a new table for each result. The opening and closing <table> tags should be outside the the <for-each> loop. To deal with the possibility of no results being found, use a conditional statement and the count() function like this:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <xsl:param name="letter"/>
    <xsl:output method="html" encoding="UTF-8"/>
    <xsl:template match="/">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <xsl:for-each select="dataroot/CPINFOWEB[Town=starts-with(Town, $letter) or Name=starts-with(Name, $letter)]">
            <tr>
            <td>
        <a href="detail.php?park={CostCode}"><xsl:value-of select="Name"/></a><br />
              <a href="detail.php?park={CostCode}"><xsl:value-of select="Town"/></a><br />
          <xsl:value-of select="Address"/><br />
          <br />    
          </td>
            </tr>
    </xsl:for-each>
    <xsl:if test="count(dataroot/CPINFOWEB/Town) &amp;lt; 1">
        <tr>
        <td>No records found</td>
        </tr>
        </xsl:if>
    </table>
    </xsl:template>
    </xsl:stylesheet>

Maybe you are looking for

  • How to connect my MAC Book Pro (2013) to a display?

    how to connect my MAC Book Pro (2013) to a display?

  • Moving from one screen to another

    Hi all, I have developed an ALV program, i have used 2 screens. when i double on one value the 2nd screen with more details should be displayed. till this point it is fine. But when i press back button it is coming to 1st screen but the screen is emp

  • Personal hotspot in iphone 4 is missing

    i updated my iphone IOS from 4.3.2 to 4.3.3 then my personal hotspot was missing... can someone help me..

  • ACE20 Modules in VSS - power disabled on switch 2

    This past weekend, we installed new ACE20 modules in switch 1 and switch 2 of a VSS pair. On switch 1, the power was enabled and there were no problems. In switch 2, however, when power enable command was issued, it was not allowed and the following

  • T41 Blckout doesnot boot

    I have a T41 thinkpad, early this month it hang up and until now it won't booth up. It has a power lights, the monitor backlight is also turned on but it does not continue to boothup.  no bios activity. I tried to re seat all the the hardware i.e har