SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Customizations

Notices

SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-23-2008, 08:00 PM
jreichen's Avatar
jreichen jreichen is offline
Sage Icon
 
Join Date: Jul 2004
Posts: 1,192
Arrow Plugin: Jetty Starter 1.6

The Jetty Starter plugin provides integration of the Jetty web server within SageTV. It enables running one web server engine inside the SageTV process that can host multiple web applications.

The first application written to run in Jetty was the mobile web interface. Early support for this plugin was provided in the thread that requested the mobile web interface. A separate thread is now being created here to support developers who are writing other applications to run in Jetty. See the download page and wiki for more information including installation instructions. Source code is available on SourceForge.

Please Note: any questions regarding the upgrade of the Jetty plugin from SageTV V6 to SageTV V7 should be posted in the thread over in the SageTV V7 Customizations forum. Questions regarding Jetty 2.0, which adopts the SageTV V7 Plugin Manager, should be posted to its thread, also in the SageTV V7 Customizations forum.
__________________
Server: Intel Core i5 760 Quad, Gigabyte GA-H57M-USB3, 4GB RAM, Gigabyte GeForce 210, 120GB SSD (OS), 1TB SATA, HD HomeRun.
Extender: STP-HD300, Harmony 550 Remote,
Netgear MCA1001 Ethernet over Coax.
SageTV: SageTV Server 7.1.8 on Ubuntu Linux 11.04, SageTV Placeshifter for Mac 6.6.2, SageTV Client 7.0.15 for Windows, Linux Placeshifter 7.1.8 on Server and Client
, Java 1.6.
Plugins: Jetty, Nielm's Web Server, Mobile Web Interface.


Last edited by jreichen; 05-28-2010 at 10:31 PM.
Reply With Quote
  #2  
Old 11-23-2008, 08:57 PM
geogecko geogecko is offline
Sage Icon
 
Join Date: Dec 2004
Location: North Oklahoma
Posts: 2,273
Linky for download has an extra http...

Thanks again for your work on this!
__________________
-Jason
Reply With Quote
  #3  
Old 11-23-2008, 08:59 PM
jreichen's Avatar
jreichen jreichen is offline
Sage Icon
 
Join Date: Jul 2004
Posts: 1,192
Fixed. Thanks!
__________________
Server: Intel Core i5 760 Quad, Gigabyte GA-H57M-USB3, 4GB RAM, Gigabyte GeForce 210, 120GB SSD (OS), 1TB SATA, HD HomeRun.
Extender: STP-HD300, Harmony 550 Remote,
Netgear MCA1001 Ethernet over Coax.
SageTV: SageTV Server 7.1.8 on Ubuntu Linux 11.04, SageTV Placeshifter for Mac 6.6.2, SageTV Client 7.0.15 for Windows, Linux Placeshifter 7.1.8 on Server and Client
, Java 1.6.
Plugins: Jetty, Nielm's Web Server, Mobile Web Interface.

Reply With Quote
  #4  
Old 11-29-2008, 06:46 PM
jreichen's Avatar
jreichen jreichen is offline
Sage Icon
 
Join Date: Jul 2004
Posts: 1,192
Since each application must have a unique context root, I created a wiki page to track them.
__________________
Server: Intel Core i5 760 Quad, Gigabyte GA-H57M-USB3, 4GB RAM, Gigabyte GeForce 210, 120GB SSD (OS), 1TB SATA, HD HomeRun.
Extender: STP-HD300, Harmony 550 Remote,
Netgear MCA1001 Ethernet over Coax.
SageTV: SageTV Server 7.1.8 on Ubuntu Linux 11.04, SageTV Placeshifter for Mac 6.6.2, SageTV Client 7.0.15 for Windows, Linux Placeshifter 7.1.8 on Server and Client
, Java 1.6.
Plugins: Jetty, Nielm's Web Server, Mobile Web Interface.

Reply With Quote
  #5  
Old 11-29-2008, 08:09 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,541
Quote:
Since each application must have a unique context root, I created a wiki page to track them.
I just added /smt (Sage Media Tools - Web Front End for Batch Metadata Tools). And thanks for adding the /sagex for me
Reply With Quote
  #6  
Old 12-06-2008, 02:05 PM
beerandt beerandt is offline
Sage User
 
Join Date: Dec 2008
Posts: 11
text/properties files have no line breaks

Hi- I'm fairly new to the world of sagetv and was playing around trying to install jetty starter. I'm not sure if this is something I'm doing wrong or not, so I figured I ask.

The JettyStarter.properties file and realm.properties files that I downloaded don't seem to have any line breaks in them. I also checked the license text files, and it seem to be the same thing.

Is there something wrong with the files, or am I doing something wrong?

Thanks
Reply With Quote
  #7  
Old 05-27-2009, 12:32 PM
iolaus iolaus is offline
Sage Advanced User
 
Join Date: Jan 2008
Posts: 83
jreichen,

Thanks for the awesome Jetty SageTV plugin. Quick question for you... is there an easy way to enable HTTP compression with the plug-in? I looked around for some documentation but wasn't knowledgeable enough about Jetty to easily piece together a solution from what I found.

The main motivation for this is that I'm using Stuckless's SageX APIs (hosted by Jetty) and I would like to test compression of the API call results to see if it would provide any speed increase.

Thanks!
Reply With Quote
  #8  
Old 05-27-2009, 09:22 PM
jreichen's Avatar
jreichen jreichen is offline
Sage Icon
 
Join Date: Jul 2004
Posts: 1,192
You're welcome The only way I know of is to add the GzipFilter as a filter to the web application's web.xml file. You can look at the mobile web interface's web.xml file to see how I did it there.

Unfortunately stuckless doesn't deliver a web.xml, just a context xml file and I don't think it can be set in there.

If you're familiar with web applications you could use the mobile web interface as an example and create a war file for the remote apis that would only need a web.xml file (all the class files are in the sagex.jar file in the JARs folder so those don't need to be included in the war file). The context xml file would also need to be modified to deploy the war file (again, look at the mobile web interface for an example). Or maybe stuckless could do this for you but from what I understand he's very busy with the Phoenix project.

There might be a way to set it up at the server level but I haven't found a way to do it. It might require some more custom programming in the plugin. Even if it is possible, it might be better to leave it up to each app's developer to decide whether to support compression.

If you do manage to get the filter set up, remember that the HTTP request header 'Accept-Encoding' must include 'gzip'.
__________________
Server: Intel Core i5 760 Quad, Gigabyte GA-H57M-USB3, 4GB RAM, Gigabyte GeForce 210, 120GB SSD (OS), 1TB SATA, HD HomeRun.
Extender: STP-HD300, Harmony 550 Remote,
Netgear MCA1001 Ethernet over Coax.
SageTV: SageTV Server 7.1.8 on Ubuntu Linux 11.04, SageTV Placeshifter for Mac 6.6.2, SageTV Client 7.0.15 for Windows, Linux Placeshifter 7.1.8 on Server and Client
, Java 1.6.
Plugins: Jetty, Nielm's Web Server, Mobile Web Interface.

Reply With Quote
  #9  
Old 06-11-2009, 09:01 PM
kfontenot kfontenot is offline
Sage User
 
Join Date: Jul 2008
Location: Texas
Posts: 25
Can someone please help me get this plugin working. I'm trying to install it so that I can use Sage Job Queue. How can I test that I have installed it correctly? When I try to access SJQ though IE8 I cannot get a connection. Should I use a different browser? I'm running Vista 64 bit and Sage 6.5.16
Reply With Quote
  #10  
Old 06-11-2009, 11:04 PM
jreichen's Avatar
jreichen jreichen is offline
Sage Icon
 
Join Date: Jul 2004
Posts: 1,192
I don't run IE8 so I can't test this myself. Here are some things to try:
  1. Does the sagetv_0.txt log have any clues? On Windows, I think you have to set debug_logging=TRUE in Sage.properties before it will write to that file.
  2. Check the jetty/logs folder in the SageTV directory for any info in there.
  3. Do you have an extension like ieHTTPHeaders installed? That will print out the HTTP requests and responses between client and server. That might help track down the problem.
  4. Does IE8 muck with firewall or proxy settings?
The Jetty wiki has a page with some debugging and logging info that might be helpful for #1 and #2.
__________________
Server: Intel Core i5 760 Quad, Gigabyte GA-H57M-USB3, 4GB RAM, Gigabyte GeForce 210, 120GB SSD (OS), 1TB SATA, HD HomeRun.
Extender: STP-HD300, Harmony 550 Remote,
Netgear MCA1001 Ethernet over Coax.
SageTV: SageTV Server 7.1.8 on Ubuntu Linux 11.04, SageTV Placeshifter for Mac 6.6.2, SageTV Client 7.0.15 for Windows, Linux Placeshifter 7.1.8 on Server and Client
, Java 1.6.
Plugins: Jetty, Nielm's Web Server, Mobile Web Interface.


Last edited by jreichen; 10-24-2009 at 09:07 AM. Reason: Change debug to debug_logging
Reply With Quote
  #11  
Old 06-12-2009, 07:10 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Also be sure you didn't download the ssl version of SJQ. Or if you did, then make sure you've installed SSL support into Jetty properly. If you didn't setup SSL in Jetty then you can't use the ssl package of SJQ. You can tell if you've installed the SSL version by checking the browser's address bar - if it's always forwarding you to https://... even when trying to connect to http://... then you've installed the ssl version of SJQ.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...

Last edited by Slugger; 06-12-2009 at 07:12 AM. Reason: Explain how to check for ssl ver of sjq
Reply With Quote
  #12  
Old 07-26-2009, 02:53 PM
jreichen's Avatar
jreichen jreichen is offline
Sage Icon
 
Join Date: Jul 2004
Posts: 1,192
Arrow Jetty Starter Version 1.6

The Jetty Starter plugin version 1.6 has been released and can be downloaded here. This mainly has changes that can be adopted in future releases of web applications.
  • Upgrade Jetty from 6.1.11 to 6.1.19 - please be sure to follow the upgrade instructions in order to remove the 6.1.11 files or you will have problems.
  • Support user-specified mime types. Plugin developers: you need to modify your app before users can customize mime types.
  • Deliver jetty-ajp.xml and jetty-ajp.jar for Apache integration (unsupported). These were packaged with 6.1.19 so I included them for those of you who are interested in running Jetty behind Apache. I haven't worked with AJP so I will not be supporting it. If you use it feel free to post your instructions to the wiki.
Jason
__________________
Server: Intel Core i5 760 Quad, Gigabyte GA-H57M-USB3, 4GB RAM, Gigabyte GeForce 210, 120GB SSD (OS), 1TB SATA, HD HomeRun.
Extender: STP-HD300, Harmony 550 Remote,
Netgear MCA1001 Ethernet over Coax.
SageTV: SageTV Server 7.1.8 on Ubuntu Linux 11.04, SageTV Placeshifter for Mac 6.6.2, SageTV Client 7.0.15 for Windows, Linux Placeshifter 7.1.8 on Server and Client
, Java 1.6.
Plugins: Jetty, Nielm's Web Server, Mobile Web Interface.

Reply With Quote
  #13  
Old 08-16-2009, 12:00 AM
darcilicious's Avatar
darcilicious darcilicious is offline
Sage Icon
 
Join Date: Jul 2009
Location: Venus
Posts: 1,306
For my setup, I have a Vista HTPC with SageTV installed as a service and do all my recordings. I also watch recordings and occasionally watch live tv or video files (from the media center) on what must be the "local client" (if I have that right).

I also have the SageTV client software installed on my Vista laptop for remote viewing over the network (my "remote client").

I have got Jetty 1.6 installed and working for the mobile web app and for the sagetweet plugin on the HTPC. However, I have noticed that neither of these plugins seem to be aware of the "local client" activities on the HTPC and certainly not aware of the "remote client".

I have been told by that I need to install Jetty on both my local and remote clients and then add the plugins to those Jetty installations.

However, I'm a little confused on how to do a separate installation on the "local client" since there can only be one jetty directory (I think) and one JettyStarter.properties in the SageTV directory. And even more confused on how to do one on the remote client where there isn't even a SageClient.properties file.

Is it even possible to have separate Jetty installs? If so, would you be able to point me the right direction? Thanks!

Last edited by darcilicious; 08-16-2009 at 01:54 AM.
Reply With Quote
  #14  
Old 08-16-2009, 10:07 PM
jreichen's Avatar
jreichen jreichen is offline
Sage Icon
 
Join Date: Jul 2004
Posts: 1,192
It's been probably 3 years since I ran client and server on the same machine and I forgot about that setup when I created the Jetty plugin.

If I remember correctly, the client and server are installed in the same directory on Windows. If so, then right now it's not possible to run Jetty under both client and server from the same directory. I could change it to call a Sage API to check to see if Jetty is running in a client. If it is then I could do one of two things:
  1. Look for a JettyStarterClient.properties file rather than JettyStarter.properties and start it from there.
  2. Or, look for some client-specific properties in JettyStarter.properties.
The first one would be easier to implement.

I don't think you'll need to worry about client and server both using the same SAGE_HOME/jetty folder. You can test that for me when I have it fixed

You shouldn't have a problem running Jetty on your laptop. Just follow all the installation instructions on the wiki, except modify the load_at_startup_runnable_classes line in SageClient.properties not Sage.properties.
__________________
Server: Intel Core i5 760 Quad, Gigabyte GA-H57M-USB3, 4GB RAM, Gigabyte GeForce 210, 120GB SSD (OS), 1TB SATA, HD HomeRun.
Extender: STP-HD300, Harmony 550 Remote,
Netgear MCA1001 Ethernet over Coax.
SageTV: SageTV Server 7.1.8 on Ubuntu Linux 11.04, SageTV Placeshifter for Mac 6.6.2, SageTV Client 7.0.15 for Windows, Linux Placeshifter 7.1.8 on Server and Client
, Java 1.6.
Plugins: Jetty, Nielm's Web Server, Mobile Web Interface.

Reply With Quote
  #15  
Old 08-22-2009, 09:55 AM
jreichen's Avatar
jreichen jreichen is offline
Sage Icon
 
Join Date: Jul 2004
Posts: 1,192
darcilicious, I created a build of the Jetty plugin to allow it to run under both the client and server on the same machine. Would you mind testing it out? I don't have a client installation.

Follow the normal installation steps to get it running in the server. To run it in the client, modify the load_at_startup_runnable classes in SageClient.properties, then make a copy of JettyStarter.properties, name it JettyStarterClient.properties, and change the port in that file to something other than the existing port and nielm's web server's port.

Download it from here.
__________________
Server: Intel Core i5 760 Quad, Gigabyte GA-H57M-USB3, 4GB RAM, Gigabyte GeForce 210, 120GB SSD (OS), 1TB SATA, HD HomeRun.
Extender: STP-HD300, Harmony 550 Remote,
Netgear MCA1001 Ethernet over Coax.
SageTV: SageTV Server 7.1.8 on Ubuntu Linux 11.04, SageTV Placeshifter for Mac 6.6.2, SageTV Client 7.0.15 for Windows, Linux Placeshifter 7.1.8 on Server and Client
, Java 1.6.
Plugins: Jetty, Nielm's Web Server, Mobile Web Interface.

Reply With Quote
  #16  
Old 12-11-2009, 01:01 PM
steambuilder steambuilder is offline
Sage User
 
Join Date: Nov 2008
Location: Battle Creek, MI
Posts: 36
Are there dumbed down instructions for creating Certificates and SSL

I have Jetty installed with BMT and Mobile Webserver working well but would like to take the next step and use SSL. I have stared at the wiki for days now trying to figure out how to make a certificate and use ssl for secure remote access but apparently I don't have it in me. Is there a simple set of instructions somewhere that I am missing that would help me figure this out?

thanks
Doug
__________________
Server(headless): Gigabyte MB, Core2Duo E8500, 4G 1066 RAM, WinXP Pro SP3,OTA antenna only
Capture: 2-HVR-1600 Haupaugee, 1-HDHomeRun - Clients: 1-HD200 in Extender Mode
SageTV 7, Comskip w/ Dirmon2, TiSageTV
Reply With Quote
  #17  
Old 12-11-2009, 07:48 PM
jreichen's Avatar
jreichen jreichen is offline
Sage Icon
 
Join Date: Jul 2004
Posts: 1,192
Doug, I was also lost the first time I tried to set up SSL. There are two parts to setting it up: generating a certificate and configuring Jetty. Let's just look at the first one for now.

Generate a certificate
The browser and server use a certificate to encrypt your data. You can generate a certificate by running the keytool command that comes with Java. When you run the keytool command in step 1 on the wiki, it will step you through the prompts as shown in step 2. For personal use, you can use the same password for the key and keystore. The example uses the value 123456 for both passwords. Don't forget the password you choose, you'll need it a little later on. You can leave most of the fields blank except first and last name. If you don't have a domain name, I think you'll still be ok, just enter something else. After finishing the command, a file named .keystore will be created in your home directory.

Try to see if you can get that far. Ask questions if you're stuck. Once you get past this part, we'll move on to configuring SSL in the Jetty server.
__________________
Server: Intel Core i5 760 Quad, Gigabyte GA-H57M-USB3, 4GB RAM, Gigabyte GeForce 210, 120GB SSD (OS), 1TB SATA, HD HomeRun.
Extender: STP-HD300, Harmony 550 Remote,
Netgear MCA1001 Ethernet over Coax.
SageTV: SageTV Server 7.1.8 on Ubuntu Linux 11.04, SageTV Placeshifter for Mac 6.6.2, SageTV Client 7.0.15 for Windows, Linux Placeshifter 7.1.8 on Server and Client
, Java 1.6.
Plugins: Jetty, Nielm's Web Server, Mobile Web Interface.

Reply With Quote
  #18  
Old 12-12-2009, 12:34 PM
steambuilder steambuilder is offline
Sage User
 
Join Date: Nov 2008
Location: Battle Creek, MI
Posts: 36
Thanks jreichen for the hand holding. I have attached the message that I get when trying to create a certificate from the Sagetv home directory in a command prompt. Any suggestions as to what I am doing wrong? Can I put anything in as a password or numerals only?

Thanks for your help
Doug
Attached Files
File Type: txt certresponse.txt (368 Bytes, 217 views)
__________________
Server(headless): Gigabyte MB, Core2Duo E8500, 4G 1066 RAM, WinXP Pro SP3,OTA antenna only
Capture: 2-HVR-1600 Haupaugee, 1-HDHomeRun - Clients: 1-HD200 in Extender Mode
SageTV 7, Comskip w/ Dirmon2, TiSageTV
Reply With Quote
  #19  
Old 12-12-2009, 06:55 PM
jreichen's Avatar
jreichen jreichen is offline
Sage Icon
 
Join Date: Jul 2004
Posts: 1,192
It can't find Java's keytool program. I'm not positive if it comes in the Java Runtime Edition (the one for end-users) download or if it only comes in the Java Development Kit (the one for developers with the compiler and other tools, also includes the JRE). If you let SageTV install Java, then it installed the Java Runtime Edition. Take a look under C:\Program Files\Java and find out what folders are there and post that list here. Also look in each of those folders for a bin and/or jre\bin folder and see if the keytool program is there. If it is then specify the full path to the program. If not you probably need to install the JDK to get the tool.
__________________
Server: Intel Core i5 760 Quad, Gigabyte GA-H57M-USB3, 4GB RAM, Gigabyte GeForce 210, 120GB SSD (OS), 1TB SATA, HD HomeRun.
Extender: STP-HD300, Harmony 550 Remote,
Netgear MCA1001 Ethernet over Coax.
SageTV: SageTV Server 7.1.8 on Ubuntu Linux 11.04, SageTV Placeshifter for Mac 6.6.2, SageTV Client 7.0.15 for Windows, Linux Placeshifter 7.1.8 on Server and Client
, Java 1.6.
Plugins: Jetty, Nielm's Web Server, Mobile Web Interface.

Reply With Quote
Reply

Tags
web


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Plugin: MizookLCD (Alternate SageTV LCDSmartie Plugin) cslatt SageTV Customizations 48 06-11-2012 10:44 AM
MediaPlayer Plugin/STV Import: Winamp Media Player Plugin deria SageTV Customizations 447 12-11-2010 07:38 PM
Hulu: Possible to Use XBMC Hulu Plugin to create SageTV Plugin? Brent SageTV Customizations 8 02-24-2009 04:16 PM
Plugin: MizookLCD spook SageTV Customizations 2 08-12-2008 11:31 AM
Caller ID Plugin computer33 SageTV Customizations 1 04-20-2005 09:02 PM


All times are GMT -6. The time now is 12:12 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.