當前位置:首頁 » 網頁前端 » web應用實例
擴展閱讀
webinf下怎麼引入js 2023-08-31 21:54:13
堡壘機怎麼打開web 2023-08-31 21:54:11

web應用實例

發布時間: 2022-08-06 22:48:04

㈠ 如何簡單描述java web技術使用實例

public class AddDeviceServlet extends HttpServlet {
private static final long serialVersionUID = 1L;

@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doPost(request, response);
}

public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

String licensePlate = request.getParameter("licensePlate"); //獲取車牌號
String tel = request.getParameter("tel"); //獲取手機號
MyDevice device = new MyDevice(licensePlate, tel); //將請求參數封裝成一個對象
save(device); //保存數據
response.getWriter().print(true); //向客戶端返回一個成功標識

response.setContentType("text/html;charset=utf-8");
response.setCharacterEncoding("utf-8");
response.getWriter().println("你的車牌號: " + licensePlate); //向客戶端返回一個成功標識
response.getWriter().println("你的手機號: " + tel); //向客戶端返回一個成功標識

}

㈡ 啟動tomcat時報錯: Illegal access: this web application instance has been stopped already

異常信息:Illegal access: this web application instance has been stopped already.Could not load java.net.BindException.The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.

非法訪問:此Web應用程序實例已停止了。無法載入java.net.BindException。最終是由下面的堆棧跟蹤調試目的,以及試圖終止線程從而導致非法訪問拋出一個錯誤造成的,並沒有功能的影響。

原因:這個是在關閉應用伺服器或重新部署裝載項目失敗會發生。當應用程序卸載時,並不會關閉所有的線程。當tomcat已經關閉了其類載入器後,一些線程依然會繼續運行,這樣就導致出錯,這些錯誤就會被到日誌文件里。

解決方法是:修改tomcat目錄下conf文件夾下的server.xml,在<Host>標簽添加子元素找到<Context>標簽,把reloadble的屬性值設為:reloadable="false"。

㈢ 設那麼是手機WEB應用可否舉個例子

用手機上網路,不安裝程序,你接觸到的就是web應用。相對程序來說就是很方便,只要是有瀏覽器就都可以用,不用在商店下載程序

㈣ 急求!!web service 的應用實例 ,wed service !!!

wed
service
項目
為什麼還要在項目名稱後面加一個service呢
才能顯示出裡面的方法來呢???高手指點下!!

㈤ Web 有哪些 Erlang 語言應用的例子

Mochiweb
一句話介紹: MochiWeb is an Erlang library for building lightweight HTTP servers.
Mochiweb在Erlang項目中被當做一個Web組件被廣泛使用(比如RabbitMQ的plug-in),它的設計相當收斂,除了基礎的Web請求處理沒有提供特別復雜的功能集(後面會提到其它Web Server).目前我已經在兩個項目中使用了Mochiweb,得心應手.
Mochiweb項目代碼有很多值得學習的地方,比如 mochiglobal [ 鏈接 ],Parameterized mole [鏈接]今年夏天我把Mochiweb代碼列印了一份,看得很是過癮.這里有一篇實戰風格的入門文章:A practical introction to MochiWeb - Alex Marandon[鏈接]
使用Rebar很容易編譯運行,裡面自帶一個簡單的Echo demo,你可以使用Rebar快速建立起來自己的站點框架,動手試試吧
項目地址:mochi/mochiweb · GitHub

Cowboy
一句話介紹: Cowboy is a small, fast and molar HTTP server written in Erlang.
使用Cowboy需要通過編寫Handler來定製如何處理Web請求.這是它設計上的一大特色.項目源碼自帶了N種版本的hello_world,也是可以非常快上手.編譯運行依然是rebar搞定,這個項目現在保持更新,每天都能收到github推送的代碼變更郵件.
項目地址:extend/cowboy 路 GitHub

YAWS
一句話介紹:Yaws is a HTTP high perfomance 1.1 webserver particularly well suited for dynamic-content web applications.
這個略顯怪異的名字是Yet another Webserver的縮寫.其提供的已經不是簡單的腳手架了,而是支持動態內容輸出,REST,文件上傳SOAP等等.在其官網上有豐富的文檔和樣例代碼.O'Reilly在2012年6月出版的 Building Web Applications with Erlang 一書中使用的就是YAWS.這本不足150頁的小冊子是很好的YAWS入門教程.估計國內出版社不會引進這樣一本冷冷的書,自己找電子版讀吧,很容易找到.
項目地址:Yaws

Misultin [停止更新]
一句話介紹: Misultin development has been discontinued.
是的,這個項目已經不再繼續更新了;停止更新的原因是作者認為各個Web server項目有"too much plication of efforts".作者在項目介紹中倒是簡單評價了Mochiweb和Cowboy:

Mochiweb has been around the block for a while and it's proven solid in proction, I can only recommend it for all basic webserver needs you might have. Cowboy has a very interesting approach since it allows to use multiple TCP and UDP protocols on top of a common acceptor pool. It is a very modern approach, is very actively maintained and many projects are starting to be built around it.
項目地址:ostinelli/misultin ¡ GitHub
看過Misultin作者的一番評論,其實可以回答不少人關於"用Mochiweb做Web項目很痛苦"的問題:如果你要做一個豐富多彩的Web站點,在Mochiweb提供的腳手架上,你要完成很多工作,顯然你需要其它選擇,呃,或許你需要選擇一個Web Framework了.對於大多數框架來說,其設計的總要目標就是開發效率和常見應用場景的支持.我們看看有哪些Erlang Web Framework可用吧!
Elrang Web Frameworks
除了http://Asp.net MVC,RoR之外,其實還有很多Web Framework可用,看看Erlang世界裡面的解決方案吧:

ChicagoBoss
一句話介紹:Chicago Boss is a server framework inspired by Rails and written in Erlang.
ChicagoBoss是現在非常活躍的Erlang Web Framework,在各種細節上都為新手准備的相當周到比如60秒快速上手教程什麼的.甚至它說自己區別於其它Erlang Web Framework的就是" it is easy to set up and use."它之間Web Server是選擇的Misultin現在已經遷移到Cowboy.前端MVC架構,內置消息隊列BOSSMQ,數據存儲方面選擇性也比較多:Mnesia MongoDB Mysql PostgreSQL Riak ,Tokyo Tyrant;模板方案依然是使用ErlyDTL.
另外,我覺得ChicagoBoss的文案是這些項目裡面寫的最棒的,直接命中你最想知道的兩個問題:
"Chicago Boss is a server framework inspired by Rails and written in Erlang. It offers all the conveniences of modern web development, including Comet. What sets Chicago Boss apart from other non-Erlang frameworks is that it can handle large amounts of traffic without any drop in performance. What sets Chicago Boss apart from other Erlang frameworks is that it is easy to set up and use."
項目地址:ChicagoBoss/ChicagoBoss 路 GitHub
入門PDF: http://www.evanmiller.org/chicago-boss-tutorial.pdf

Nitrogen

一句話介紹:Nitrogen Web Framework is the fastest way to develop interactive web applications in full-stack Erlang.
看群裡面討論,採用Nitrogen的項目也不在少數,這個項目動態模板方案不是採用ErlyDTL,而是自己有一套解決方案Nitrogen records [鏈接].網站上的常式和Step by Step教程足夠詳細,入門應該比較快.
項目地址:Nitrogen - Nitrogen Web Framework for Erlang

Zotontic
一句話介紹:Zotonic is the open source, high speed, real-time web framework and content management system, built with Erlang.
應該說Zotontic和其它框架的差異更多是在業務定位上了,提供了很多CMS直接可用的功能,查看其features列表能夠看到詳細介紹,注意:"Typically 10 times (and much more) faster than PHP content management systems." [鏈接]
Zotontic構建在Mochiweb和PostgreSQL之上.
項目地址:http://zotonic.com/

BeepBeep
一句話介紹: BeepBeep is a simple web application framework for Mochiweb inspired by Rails and Merb
BeepBeep 構建在 MochiWeb 和 ErlyDTL (後面會介紹) 基礎之上. 沿襲了mochiweb的優良傳統一鍵建站,基於ErlyDTL提供Django 模板的視圖展現.
這個項目已經09年之後就沒有實質性的更新,最近一次更新是2010年更新了一下README,慎重選擇吧.
還有一個項目ErlyWeb同樣是

㈥ 求C#.net開發的web應用實例

www.51aspx.com下載源碼,你要什麼樣的就下什麼樣的。

㈦ 什麼是web伺服器,舉個例子

用來儲存網頁文件的伺服器,舉例那就只能說,你看到的網頁都是由網頁伺服器支援的

㈧ 舉幾個web2.0網路的例子

Web2.0包含了我們經常使用到的服務,例如博客、播客、維基、P2P下載、社區、分享服務等等.