Writing /home/infogasy/domains/wiki.infogasy.net/public_html/data/cache/0/03b3f92d1c0d2833d2e4c5795dd43b3a.xhtml failed

JSP

Tamin’ny voalohany moa dia Servlet no nampiasaina nanehoana takelaka web.Taty aoriana anefa dia hita fa manahirana ny manoratra tanana foana ireo Balise HTML sy ny karazany hanehoana ireo takelaka. Dia teraka ny JSP avy eo. Izay azo ampiasaina avy hatrany anaty rakitra HTML. Ity misy ohatra kely toy ny mahazatra natao tamin’ny JSP.

 <HTML>
<HTML><HEAD><TITLE>Akory</TITLE></HEAD>
<BODY>
<%!
  String strAkory = "Akory";
  String strNyTany = "Ny Tany";
%>
<H1>
<%=
  strAkory + " " + strNyTany
%></H1>
</BODY>
<HTML>

Ohatra an’izay kosa izy raha amin’ny Servlet


import java.io.*;

import javax.servlet.*;

import javax.servlet.http.*;

 

public class AkoryServlet extends HttpServlet {
 

protected void doGet(HttpServletRequest request, HttpServletResponse response)

	throws ServletException, IOException {

		PrintWriter out ;


		response.setContentType("text/html");

		out = response.getWriter();


		String header = "<HTML><HEAD><TITLE>Akory</TITLE></HEAD>";

		out.println(header + "<body>");

		out.println("<h1>Akory ny Tany</h1>");

		out.println("</BODY></HTML>");

		out.close();

    }




}

Azo hatao ny miantso Servlet anaty JSP na ny mifamadika amin’izay koa, izany hoe miantso jsp anaty Servlet.

Ny Framework Struts izay manaraka ny fenitra MVC no anisan’ny malaza eo amin’ny fanamboarana tranonkala amin’ny alalan’ny Java. mampiasa JSP sy Servlet izy io.

Ny fomba ahafahana mianatra azy haingana dia tsy misy hafatry ny fampiharana. Tomcat zao anisan’ny ahazaina azy haingana indrindra, satria efa misy ohatra JSP sy Servlet ao anatiny. No sady mora hapetraka izy io (na Windows na Linux zany na hafa ihany koa)no maimaipoana. ity ny rohy raha hatsaka an’izany ianao Tomcat

Rohy samihafa

Nandray anjara

 

jsp.txt · Novaina farany:: 2008/09/11 12:43