1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Attn Shawn: Java Server Pages (JSP) port - please take a look

Discussion in 'Co-op Advertising Network' started by rgeimer, Jan 5, 2005.

  1. #1
    I've completed a port of the AdNetwork to Java Server Pages, and would like someone to take a look at it to make sure the ads it serves up would pass validation. If everything looks ok, I'll post the code.

    www.xmeta.com/jspad.jsp
     
    rgeimer, Jan 5, 2005 IP
  2. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #2
    They show up fine in FireFox.

    When I disable Java and or Javascript individually or both then they still show up.

    Nice work.
     
    T0PS3O, Jan 5, 2005 IP
  3. msaad

    msaad Peon

    Messages:
    120
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Of course, because JSP runs at the server not the client... The client only sees normal HTML ;) :p
     
    msaad, Jan 5, 2005 IP
  4. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I remembered Shawn saying those were the criteria. I'm not that familiar with it (What JSP outputs) so I thought I'd check it. If it's the same principle as ASP or PHP where it's server side then yes, there should be no reason why it wouldn't work. I guess it was a rather unneccesary check, never mind!
     
    T0PS3O, Jan 5, 2005 IP
  5. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #5
    Can't really comment on the backend since I can't see it, the output though is outputting the invalid XHTML slash though, which it shouldn't be.

    Did you make sure you are doing everything defined in this thread?
     
    digitalpoint, Jan 5, 2005 IP
  6. rgeimer

    rgeimer Guest

    Messages:
    41
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    If you are refering to the /> at the end of the anchor start tag, the PHP version seems to be doing this too. Look at the ads at the bottom of the home page for xmeta.com, which is currently using PHP. They have the same thing, and this is straight digitalpoint code.
    Mostly. Here is what I have so far:
    I am doing persistance a little differently, since I wanted to cache the results to RAM to speed things up. However, it does save changes to disk so that it won't request a slew of ads everytime the server is restarted. The code will throw an error if it can't save the ads, though I will do some more checking to make sure that this always happens before the first ad is requested.
    The code uses Java's synchronization mechanism to ensure that multiple threads cannot write to the file at the same time. It works a little differently than the file locking in PHP, in that other threads simply wait in a queue to get access to the file.
    I'll have to reexamine the PHP code and mine to make sure I handled the dynamic parameters correctly. I'll take a look at it when I get home tonight. If you have a second, could you give a brief explanation on what you would like to see here?
    It currently uses whatever Sun's java default user agent is, but I'll give it something more specific. Anything in particular you would like to see here (keyphrase, etc)?
     
    rgeimer, Jan 5, 2005 IP
  7. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #7
    It's used to tell the servers things like how many ads to cache, how long to wait before expiring the oldest ad and getting a new one, the minimum time between getting ads (really just needed on the initial filling of the cache), etc.

    Also make sure those values don't get wiped out if the ad server is not available for whatever reason. The values are set by the ad server with the code on the beginning of a served ad.


    {shrug} Make something up that is unique for it.
     
    digitalpoint, Jan 5, 2005 IP
  8. rgeimer

    rgeimer Guest

    Messages:
    41
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Thanks for the info on the dynamic stuff. Any comments on the slash issue?
     
    rgeimer, Jan 5, 2005 IP
  9. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #9
    Not sure... I don't see any slash on any of the sites I know are running the updated code.
     
    digitalpoint, Jan 5, 2005 IP
  10. rgeimer

    rgeimer Guest

    Messages:
    41
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Ok, I think I fixed all the problems and made it compliant with your guidelines. The latest example plus binaries, source, and instructions are at www xmeta.com/jspad.jsp
     
    rgeimer, Jan 8, 2005 IP
  11. rgeimer

    rgeimer Guest

    Messages:
    41
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Shawn, any chance you can take one more look and see if the page serves ads that wll validate properly?
     
    rgeimer, Jan 8, 2005 IP
  12. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #12
    I don't run any JSP sites...
     
    digitalpoint, Jan 8, 2005 IP
  13. rgeimer

    rgeimer Guest

    Messages:
    41
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Sorry, I didn't mean that you should install the code, just maybe do a manual validation of the jspad.jsp page on xmeta.com to see if it would pass. I plan to switch my site over to JSP next weekend, and would like it to validate when I do.

    I understand that you are a busy guy, so if it takes you a while to get around to it, that's ok.
     
    rgeimer, Jan 9, 2005 IP
  14. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #14
    You can change the URL of your site and validate yourself.
     
    digitalpoint, Jan 9, 2005 IP
  15. rgeimer

    rgeimer Guest

    Messages:
    41
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #15
    I tried that. I changed the URL in my account settings to the following:

    http://www.xmeta.com/jspad.jsp

    However, it said that ads could not be found on the following URL:

    http://www.xmeta.com/jspad.jsp/

    Note the trailing slash, which I assume your code is adding. Anyway, I guess I will move it to a subfolder with an index page and try again later. Just thought I would mention this, since it looks like validation fails when you try to use an individual page instead of a directory URL.
     
    rgeimer, Jan 9, 2005 IP
  16. rgeimer

    rgeimer Guest

    Messages:
    41
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Ok, I moved the files to the following URL and it passed validation:

    http://www.xmeta.com/jspad/

    Looks like it is good to go. Thanks for your help Shawn, and thanks for creating such a great resource.
     
    rgeimer, Jan 9, 2005 IP
  17. Colindb

    Colindb Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #17
    Hi Reigmer

    I have spent many hours on trying to make the php version appear within the footer of my wowbb to no avail. I wondered if you would be happy to help install your javascript version. I have tried this but have not been successful in making this work either.

    Kind Regards

    Colin
    www camping-ads.co.uk
     
    Colindb, Jan 16, 2005 IP
  18. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #18
    JSP is not the same thing as JavaScript.
     
    digitalpoint, Jan 16, 2005 IP
  19. Colindb

    Colindb Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #19
    Hi rgeimer

    Please could you help me install your java version on my wowbb site footer.

    I have been trying for nearly a week to make the PHP version work.

    Kind Regards

    Colin
     
    Colindb, Jan 16, 2005 IP
  20. rgeimer

    rgeimer Guest

    Messages:
    41
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #20
    Sorry I didn't see this earlier, but I doubt if I could help anyway. My code will only work with sites that use Java Server Pages (i.e. JSP files). If you are using PHP on your site it won't work, and I'm pretty sure that wowbb is PHP only.

    If you are unsure if you are using JSPs, then you aren't, because it takes quite a bit of work to get a JSP site up and running, and very few ISPs support it.
     
    rgeimer, Feb 24, 2005 IP