зеркало из https://github.com/mono/xsp.git
2002-07-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* INSTALL: added installation instruction. * README: updated. * src/HttpServer/README: updated. * Makefile: added targets 'clean', 'install' and 'uninstall'. * src/Makefile: clean subdir. svn path=/trunk/xsp/; revision=6228
This commit is contained in:
Родитель
dfccae266c
Коммит
cdf47a89a1
|
@ -0,0 +1,24 @@
|
|||
Testing XSP
|
||||
============
|
||||
|
||||
You need to have mono and mcs installed.
|
||||
|
||||
Then run:
|
||||
|
||||
make install
|
||||
|
||||
And it will create a directory called 'rundir' and copy the needed files.
|
||||
Then:
|
||||
|
||||
cd rundir
|
||||
mono server.exe PORTNUMBER
|
||||
|
||||
where PORTNUMBER is the port you want the server to listen on (ie, 8000).
|
||||
|
||||
Finally, just point your web browser to:
|
||||
|
||||
http://127.0.0.1:PORTNUMBER/
|
||||
|
||||
and there you go!
|
||||
|
||||
|
23
Makefile
23
Makefile
|
@ -1,2 +1,25 @@
|
|||
EXES= src/xsp.exe src/HttpServer/server.exe src/HttpServer/redirector.sh
|
||||
|
||||
all:
|
||||
(cd src && make)
|
||||
|
||||
install: all
|
||||
-mkdir rundir
|
||||
-mkdir rundir/output
|
||||
cp $(EXES) rundir/
|
||||
cp test/*.aspx rundir/
|
||||
mcs --target library -o rundir/output/tabcontrol.dll \
|
||||
-r System.Web test/tabcontrol.cs
|
||||
mcs --target library -o rundir/output/tabcontrol2.dll \
|
||||
-r System.Web test/tabcontrol2.cs
|
||||
@echo ""
|
||||
@echo Now cd to rundir and run: mono server.exe 8000
|
||||
@echo Then point your web browser to http://127.0.0.1:8000/
|
||||
@echo Enjoy!
|
||||
|
||||
clean:
|
||||
(cd src && make clean)
|
||||
|
||||
uninstall:
|
||||
rm -rf rundir
|
||||
|
||||
|
|
2
README
2
README
|
@ -4,7 +4,7 @@ and code generator for running ASP Web Applications.
|
|||
Layout:
|
||||
|
||||
src/
|
||||
Source files for the parser/generator.
|
||||
Source files for the parser/generator and test server.
|
||||
|
||||
doc/
|
||||
Documentation about ASP.NET pages
|
||||
|
|
|
@ -4,94 +4,3 @@ Directory xsp/src/HttpServer
|
|||
This directory contains a web server that serves .aspx pages.
|
||||
It is intended for testing purposes only.
|
||||
|
||||
IMPORTANT: right now, it can only generate a given page once until we implement
|
||||
something that unload assemblies loaded from .dll or move the dll to some other
|
||||
place before loading them.
|
||||
|
||||
How does it work
|
||||
------------------
|
||||
Given a HTTP query in the form:
|
||||
|
||||
[GET|POST] filename.aspx HTTP/1.0
|
||||
|
||||
It generates its C# code using xsp, compiles it with csc, renders the page
|
||||
and send it back to the client. It does not use System.Web.Hosting classes
|
||||
when rendering.
|
||||
|
||||
|
||||
How to see it working (Windows)
|
||||
---------------------------------
|
||||
* Run make in xsp/src and xsp/src/HttpServer
|
||||
|
||||
* Create a directory ./testing
|
||||
|
||||
* Copy ../xsp.exe, ../MyForm.dll and server.exe to ./testing.
|
||||
|
||||
* Copy some aspx file to ./testing
|
||||
|
||||
* cd ./testing; ./server PORTNUMBER.
|
||||
Running it for the first time will create a directory called 'output'. In
|
||||
'output' you will find all the intermediate files between ASPX and HTML and the
|
||||
BAT files run from testing directory which create them.
|
||||
|
||||
* For real men:
|
||||
|
||||
- telnet 127.0.0.1 PORTNUMBER
|
||||
get yourfile.aspx http/1.0
|
||||
|
||||
* For the rest, use your browser: http://127.0.0.1:PORTNUMBER/yourfile.aspx
|
||||
|
||||
|
||||
How to help debugging mono System.Web (Windows)
|
||||
------------------------------------------------
|
||||
* Set the environment variable DEBUGMONOSW to any value.
|
||||
|
||||
* Run make in mcs/class and copy mcs/class/System.Web.dll to ./testingMono,
|
||||
xsp/src and xsp/src/HttpServer. If you run make again without the DEBUGMONOSW
|
||||
environment variable set, it will delete the local copy of System.Web.dll
|
||||
(just to avoid conflicts).
|
||||
|
||||
* Follow the steps in previous section. Now xsp.exe and server.exe
|
||||
are using mono's System.Web.
|
||||
|
||||
* In directory (folder? :) ./testingMono run './server --usemonoclasses PORT'.
|
||||
|
||||
* Now you can have ./testing/server.exe using MS System.Web serving pages on
|
||||
a port and ./testingMono./server.exe serving on another port.
|
||||
|
||||
* Don't forget to read the above IMPORTANT note. You'll have to rerun the
|
||||
server on every access to a given page.
|
||||
|
||||
* Try accesing any .aspx file you have in ./testing.
|
||||
|
||||
o You get an error saying that xxxxx.dll or one of its dependencies
|
||||
was not found.
|
||||
|
||||
-Run the file last_compilation_XXXXXX.bat and see if it
|
||||
compiles. Probably not. May be a missing class or feature?
|
||||
A bug in Xsp? Go! Implement/fix it!
|
||||
|
||||
o You get incorrect HTML rendered on the browser.
|
||||
|
||||
-Edit xxxxx.cs try to guess which class has the error when
|
||||
rendering (may be you already know because that table or
|
||||
button is not what you expected). Then try to fix the error.
|
||||
|
||||
o You get the correct HTML rendered on the browser.
|
||||
|
||||
-Congratulations! Put your sample page under xsp/tests if you
|
||||
want.
|
||||
|
||||
|
||||
How to see it working (Unix)
|
||||
-----------------------------
|
||||
|
||||
* Apart from the usual setup, you gotta copy System.Drawing.dll to the testing
|
||||
directory. Also MyForm.dll to the mono lib directory.
|
||||
|
||||
* Compile the xsp and the server using 'make MONO=1' (well, 1 or whatever).
|
||||
|
||||
* Copy redirector.sh to the directory where you run the server.
|
||||
|
||||
- Enjoy!
|
||||
|
||||
|
|
|
@ -21,5 +21,6 @@ xsp.exe: $(SOURCES)
|
|||
$(CSC) $(CSCFLAGS) /out:$@ $^
|
||||
|
||||
clean:
|
||||
(cd HttpServer && make clean)
|
||||
rm -f xsp.exe *~ *.pdb
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче