Direct Web Content
colinhasted
Posts: 44
Hi All,
This question will seem a little out of place, but. I was wondering if anyone can point me in the right direction for creating a module with similar functions to Virtual Keypad.
The web side of things is fine and I can handle that in plain ol' JAVA. Where I am having the issue is working out how to attempt to create something along the VKPD lines - Not so much clicking the device on the web engine (like a G4 panel), although a nice feature. Just being able to bring content up in a folder
ie: 192.168.1.1 takes you to the normal web pages of the processor and 192.168.1.1/something/mywebpage will take you to the java web page
Any pointers in the right direction would be appreciated.
Thanks in advance
Colin
This question will seem a little out of place, but. I was wondering if anyone can point me in the right direction for creating a module with similar functions to Virtual Keypad.
The web side of things is fine and I can handle that in plain ol' JAVA. Where I am having the issue is working out how to attempt to create something along the VKPD lines - Not so much clicking the device on the web engine (like a G4 panel), although a nice feature. Just being able to bring content up in a folder
ie: 192.168.1.1 takes you to the normal web pages of the processor and 192.168.1.1/something/mywebpage will take you to the java web page
Any pointers in the right direction would be appreciated.
Thanks in advance
Colin
0
Comments
http://www.amxforums.com/showthread.php?6462-AMX_Mobile
What I was interested in is being able to place content so that the AMX's port doesn't need to be changed, instead the content can be accessed as a folder/extension of the main processors IP just as in Virtual Keypad
You can't list files above the home folder, but you can write to them with ftp commands a la:
So, if you determine the path to where the standard NetLinx web pages are (by mounting an NI compact flash on a PC), you may be able to create a folder and drop your files in it via ftp.
I seem to remember there being a couple of partitions on NI compact flash cards and space on the partition that you need may be an issue.
I haven't tried it yet but you should be able to write what you need into there from a Duet or NetLinx module that handles your web interface. If you want to overwrite the standard web interface so that when the box is browsed to just overwrite default.html with your GUI. From there it should be possible to use html5 websockets API to communicate back to a module running on the master.
Kim has just given me something to go on. It appears that if I FTP into the server and add a folder, nothing happens! However - add an index.html file to that folder and it instantly appears in the Webcontrol page under the folder name.
The VKP folder has a simple redirect to /web/modules/ think with a little prodding I should be able to find how to dump files somewhere around here from DUET
Thanks again all
Edit: And for that matter, it works fine on NetLinx too:
C:\Users\Jeremy> echo "index test" > index.html
C:\Users\Jeremy> ftp 192.168.1.195
Connected to 192.168.1.195.
220 VxWorks (VxWorks5.5.1) FTP server ready
User (192.168.1.195:(none)): NetLinx
331 Password required
Password:
230 User logged in
ftp> mkdir "new folder"
200 " new folder" directory created
ftp> cd "new folder"
250 Changed directory to "doc:user/new folder"
ftp> put index.html
200 Port set okay
150 Opening ASCII mode data connection
226 Transfer complete
ftp: 24 bytes sent in 0.09 seconds 0.27Kbytes/sec.
ftp> quit
221 Bye...see you later
C:\Users\Jeremy> wget -O - http://192.168.1.195/new%20folder/index.html
index test
Sorry.
Maybe your thinking Linux not Unix? I think using double quotes work there as well?
I'm to the point where the Jetty server starts, but cannot serve up one page (that's all I have.) I don't care if it's on another port (I'd actually prefer that) - can someone lend a hand? I know I'm missing something (perhaps a brain & sleep?)