Using custom classes that are not beans

Hi folks,
Is it possible to use java classes that are not beans. I mean, on a page, could you say Customer cust = new Customer("Jones", 25);
if you had a Customer class with a constructor that took a name and age (String and int).
If so, how do you go about this- do you need to import the class, or put it in a standard location? I'm using Tomcat, and would guess that this would go in WEB-INF/classes?
I hope it's not a stupid question, all the literature seems to be focused on JavaBeans
Any advice on this would be great!

Beans are used as putting Java code into a JSP is generally considered bad practice. The advantage of the bean pattern is that you use things like:
<jsp:setProperty name="laBean" property="someSetter" value="someValue" />so that you aren't embedding Java directly into the JSP. I'm not very religious about this particular topic personally and will throw a line or two in here and there.
Having said that though, you can easily use any Java class in a JSP. You'll have to import it first:
<%@ page import="java.util.*" %>And then you can easily use it like in a real Java program.

Similar Messages

  • How do you add/use typekit fonts that are not edge web fonts?

    I am just trying out the new Muse CC 2014.1 (August) release and was keen to try the new font facilities.  As far as I can see that while I can now add other fonts for which I have downloaded web font files via the Self Hosted Web Fonts function, Typekit fonts that are not "Adobe Edge Web Fonts" are effectively unavailable?  Have I missed something.
    As an example I want to use the Proxima Nova web font family.  I have selected it on the type kit site, set them up to Sync via my Creative Cloud account.  So for example if I select a font in Photoshop CC or Illustrator, the Proxima Nova fonts appear. Even ok in Word for Mac.  They do not appear in Muse.
    To add them as self hosted web fonts, I would need to physically download the relevant fonts files and install them on my desktop using the OS-X font tool.  However as they are being sync'd via Creative Cloud this shouldn't be necessary should it?  Also I don't see an option for doing so on the typekit site.
    Any help or guidance would be very welcome.
    PS:  I seem to have a separate issue with the Creative Cloud app, which is not listing fonts under the Assets tab.  But I don't think that is related as they are working fine for Photoshop, etc.

    Hi David,
    I'm sorry that you ran into trouble with this. To add fonts from Typekit to your Muse website, you will want to use the web fonts path instead of desktop fonts.  (You can use a desktop font synced from Typekit in your Muse design, but it will exported as an image the same as any other system font.)
    There are a couple options for using Typekit web fonts in Muse:
    o) The Muse Insider wrote a post on how to insert the Typekit embed code from the Muse interface:
    http://museinsider.com/how-to-add-typekit-fonts-to-your-muse-site.html
    o) Or you can add the embed code to the Page Properties dialog within Muse, which will include it in the <head> of the page when you export your website. The steps are the same as this tutorial, but you will add the Typekit embed code to Muse instead of into your page directly:
    TYPEKIT | Adding fonts to your site
    Note that in either case the Typekit fonts will not be displayed in the Muse preview window. You'll need to publish your site to a server in order for the Typekit fonts to be loaded into the page.
    If those look like more coding that you are comfortable with, you might try one of the fonts which you can select from the font menu instead. Here are some that are similar to :
    https://edgewebfonts.adobe.com/fonts#/?xHeight=high&contrast=low&class=sans-serif&width=re gular
    We are also working on a more complete integration of Typekit with Muse in the future, but I can't say yet when that will be available.
    >> PS:  I seem to have a separate issue with the Creative Cloud app, which is not listing fonts under the Assets tab.  But I don't think that is related as they are working fine for Photoshop, etc.
    Do you see a "loading" icon in the tab (e.g. a blue spinner wheel)?  It sounds similar to this thread; you might try these suggestions:
    Re: Adobe Creative Cloud / Desktop App / Home Screen: Constant Spinning Wheel
    I hope that this helps; let me know if you have any other questions.  Best,
    -- liz

  • Import classes that are not part of any package

    I have this problem with the JDK1.4 compiler:
    I have a few classes that were created outside of any package for some JNI uses. When I used JDK1.3 to compile, I was able to get the compiler to find these classes by doing the following in the calling classes:
    import ClassOutSideOfPackage;
    Now that I am trying to use JDK 1.4, the compiler complains with the following error:
    "." expected
    import ClassOutSideOfPackage;
    I tried to take the import out and had no luck. The compiler complained that it can't find this class. What can I do or is the only solution to change the class to include it in a package and change all relavant JNI native calls... etc. Thank you.

    Removing the entire import statement should work. Check for a classpath problem if it
    doesn't. It is not necessary to place in a package and recompile, though.I tried your suggestion. However, it keeps complaining that it can't find the class. The class file resides in the current directory and I have "." at the beginning of my class path. I don't see anything wrong with the classpath. Did you have this working?

  • I'm getting classes that are not from JDBC Driver

    Hello
    I configured a data source connection against RAC using the oracle.jdbc.pool.OracleDataSource. When I get the connection and check what classes I'm getting I get the following:
    java.sql.Connection: com.evermind.sql.DriverManagerConnectionPoolConnection
    java.sql.PreparedStatement: com.evermind.sql.FilterPreparedStatement
    where I should be getting OraclePoolConnection and OraclePreparedStatement.
    Data Source:
    <data-source class="oracle.jdbc.pool.OracleDataSource" name="Test" locat
    ion="jdbc/Test" pooled-location="jdbc/pool/Test" username="seniat" password="seniat" url="jdbc:oracle:thin:@(DESCRIPTION = (LOAD_BALANCE = ON)(FAILOVER = ON)(ADDRESS = (PROTOCOL = TCP)(HOST = server1)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = server2)(PORT = 1521))(CONNECT_DATA = (SERVICE_NAME = service)(failover_mode=(type=select)(method=basic)" max-co
    nnections="100" min-connections="10" inactivity-timeout="30"/>

    Launch System Preferences and select the Mail, Contacts, and Calendars tab. Now select each account that's listed and see which ones have a checkmark by notes.
    Your strange notes must be coming from one of these accounts. If you have only one account with Notes checkmark it must be that one. Change the password to that account. If you have more than one account with Notes you'll have to experiment to determine which one the notes are coming from or, of course, you could change the password for all the involved accounts.
    I can't think of any other way you would be getting notes into the notepad. (Unless someone is playing a prank and actually writing them while your computer is unattended)

  • Can EJB 3.0 beans be used with tables that do not have a primary key?

    Can a EJB 3.0 persistence bean be used with tables that do not have a primary key defined? I am building a test application based on the HowTo - Building EJB 3.0 Faces App paper posted after Openworld (schalk). The issue I am running into when trying to run the application is: Exception Description: Entity class [class com.persistence.Rpthead] has no primary key specified. Note: I get a simular error when using toplink directly.
    The tables I am binding to do not have primary keys defined. They use unique constraints to manage the table integrity.
    Is it possible to use EJB 3.0 on tables without a primary key? If not, are there plans to support this in the future?

    The spec requires a primary key Id annotation. I will take your suggestion to EJB 3.0 expert group.
    Can you also send an email to [email protected] with your requirement?
    -Debu

  • My mac's launchpad is working but i am not able to use the apps that are provided in the launchpad

    my mac's launchpad is working but i am not able to use the apps that are provided in the launchpad

    Well, everything that you have bought with her Apple ID prior to getting your own Apple ID is forever hers. Apple will not transfer content from one ID to another. But in the case of the Mac, contact iTunes Customer Service and request that they send your issue to the Account Security Team and ask that the Mac be released form your mother's account so you may register it with your account. Then you can accept the iLife apps into your account for any future updates.
    iTunes Support -
    http://www.apple.com/support/itunes/

  • Imports that are not used

    Hi Everybody,
    Out of curiosity, I want to know what is the impact of the import statements that are not used in a program.
    Thanks
    Vikas

    At runtime there no impact.But at compile time it parses all the imports before compiling the class.
    Correct me if iam wrong
    Sada

  • Is there a way to create a project with custom audio settings that are NOT only "Stereo" or "Surround"?

    Is there a way to create a project with custom audio settings that are NOT only "Stereo" or "Surround"?
    Thanks!
    -Adrian

    the old apps are on my computer but they have had upgrades since they were put on the ipod originally.  you think you would get a warning about this when you restored. I was not worried about losing the progress of the apps but i would have been worried about the app it self!!!!!

  • I recently purchased a new Macbook Air and used migration to transfer old files from my old PC to the Mac, and now there are songs that I purchased through Itunes on my phone that are not on my Mac, how do I transfer these songs from the phone to the Mac?

    I recently purchased a new Macbook Air and used migration to transfer old files from my old PC to the Mac, and now there are songs that I purchased through Itunes on my phone that are not on my Mac, how do I transfer these songs from the phone to the Mac?

    dnunn wrote:
    ... how do I transfer these songs from the phone to the Mac?
    Transfer Purchases  >  http://support.apple.com/kb/HT1848
    Download Past Purchases  >  http://support.apple.com/kb/HT2519

  • What is font book used for? I read the description but still unsure. Does it contain fonts that are not already on the computer

    What can I use font book for? I read the description but still don't get it. Does it contain fonts that are not already installed on my new Mac? Thanks.

    Disabling (turning off) a font will make it unavailable for use in any font menu. You can alwasy enable the font(s) again - they're not gone permanantly. DON'T disable System fonts, though -> that's just asking for trouble.
    Here's -> https://www.youtube.com/watch?v=JdR6-4lnF5A - a good video tutorial about using Font Book.
    Clinton

  • Trying to update system on 1st generation IPAD to give to my 5 year old to use. It is saying that i have purchases on this ipad that are not in my library which is odd because everything on the ipad was purchased current ID. How do I transfer to library?

    Trying to update system on 1st generation IPAD to give to my 5 year old to use. It is saying that i have purchases on this ipad that are not in my library which is odd because everything on the ipad was purchased current ID. It is not telling me how to transfer them to library? Does anyone know?

    Hi stefe109!
    I believe this article can provide the information you are looking for:
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer
    http://support.apple.com/kb/ht1848
    Thanks for coming to the Apple Support Communities!
    Cheers,
    Braden

  • HT1766 If I fully backup my iPad using iTunes, does it backup ebooks in iBooks that are not purchased via iTunes or will restoring from that backup only showed purchased ebooks in iBooks?

    If I fully backup my iPad using iTunes, does it backup ebooks in iBooks that are not purchased via iTunes or will restoring from that backup only showed purchased ebooks in iBooks?

    Purchased content MAY be available for redownload - Music for sure.  I think books are NOT available for redownload (not sure).
    Best practice is to keep the content on a desktop computer to be able to resync when necessary (or use a cloud service like Drop Box).

  • Determining indexes that are not used in 10g

    Is there a way to identify indexes that are not utilized in 10g? We have ADDM and AWR running nightly.
    Thanks in advance...

    You can enable index monitoring with
    alter index <index_name> monitoring usage;
    When the index is used V$OBJECT_USAGE.USED column will be set to YES. If the index is not used the USED column will show NO.
    test@ORCL> alter index i_test monitoring usage;
    Index altered.
    Elapsed: 00:00:00.04
    test@ORCL> select * from v$object_usage;
    INDEX_NAME                     TABLE_NAME                     MON USE START_MONITORING    END_MONITORING
    I_TEST                         TEST                           YES NO  01/04/2007 07:52:21
    Elapsed: 00:00:00.04
    test@ORCL> explain plan for
      2  select object_id from test;
    Explained.
    Elapsed: 00:00:00.10
    test@ORCL> select * from v$object_usage;
    INDEX_NAME                     TABLE_NAME                     MON USE START_MONITORING    END_MONITORING
    I_TEST                         TEST                           YES NO  01/04/2007 07:52:21
    Elapsed: 00:00:00.00
    test@ORCL> select count(*) from test;
      COUNT(*)
         50425
    Elapsed: 00:00:00.00
    test@ORCL> select * from v$object_usage;
    INDEX_NAME                     TABLE_NAME                     MON USE START_MONITORING    END_MONITORING
    I_TEST                         TEST                           YES NO  01/04/2007 07:52:21
    Elapsed: 00:00:00.00
    test@ORCL> select * from test where object_id =1;
    no rows selected
    Elapsed: 00:00:00.07
    test@ORCL> select * from v$object_usage;
    INDEX_NAME                     TABLE_NAME                     MON USE START_MONITORING    END_MONITORING
    I_TEST                         TEST                           YES YES 01/04/2007 07:52:21
    Elapsed: 00:00:00.00
    test@ORCL>You turn of index monitoring with the following:
    alter index <index_name> nomonitoring usage;

  • Spooling out profile that are not being used

    hi guys,
    is there anyway to spool out those profile that are not in used or assigned to any username or roles?

    flaskvacuum wrote:
    hi guys,
    is there anyway to spool out those profile that are not in used or assigned to any username or roles?
    SQL> CREATE PROFILE test LIMIT
      2     FAILED_LOGIN_ATTEMPTS 5
      3     PASSWORD_LIFE_TIME 60
      4     PASSWORD_REUSE_TIME 60
      5     PASSWORD_REUSE_MAX 5
      6     PASSWORD_VERIFY_FUNCTION null
      7     PASSWORD_LOCK_TIME 1/24
      8     PASSWORD_GRACE_TIME 10;
    Profile created.
    -- Created but not assigned --
    SQL> select distinct profile from dba_profiles where profile not in (select profile from dba_users);
    PROFILE
    TEST
    SQL>

  • How do I delete places in the organizer that are not being used?

    In Elements Organizer 12, I think I accidentally created a "place" on the map that I do not want to apply to any photos.  When I try to do conduct an advanced search, the place is appearing as a checkbox.  I do not want this place to show up in the search field, as we have never been there.  How do I remove places that are not associated with any photos?

    If you are accessing emails from multiple devices, you are better off using the IMAP protocol. Then the devices sync with the server and they are all looking at the same information. With POP, you are going to get your emails spread about, some on Outlook, some on the iPad. It could get very confusing.
    By default, the iPad will not delete from a POP server. Instructions for changing this are here: http://support.apple.com/kb/HT3228

Maybe you are looking for

  • HP Photosmart Plus B210 - Driver download -

    just got new pc.  Also gOT A CABLE FOR THE ABOVE "WIRELESS" PRINTER. added the printer thru the add printer process. Tryed to download the driver from the HP website, but continually get download failure - Failed to load C:\Program Files\HP\HP Photos

  • My ipod is disabled what do I do?

    I forgot my password and now it is disabled, what should I do now?

  • Why can't i log into my iMessage

    Cant log into my imessage or facetime, server difficulties keeps appearing, anyone else having these problems

  • Object access problem...

    I am reading the demo code of the sun hp.. about the progressbar.. I use JFrame frame = new ProgressBarDemo(); frame.pack(); frame.setVisible(true); to construct the ProgressBarDemo object... however when i use the code frame.progressBar.setvalue(0);

  • Error in web application

    Hi, I have deployed one web application on Iplanet webserver 6.1 sp 7. I am receiving following error, please provide pointers to resolve this vs(https-ITLoginAutheIndia)servlet 'jsp' class = 'org.apache.jasper.servlet.JspServlet' loaded in context =