Home > Back-end >  Novice [question] on the JSP: param value error from other pages
Novice [question] on the JSP: param value error from other pages

Time:03-21

Recently started learning JSP, look for half a day is not a problem, feel this code which is no problem, others don't same code error, other pages are able to run normally, shows that environment configuration that's right,



Example2_11. JSP code:
<% @ page language="Java" contentType="text/HTML. GBK charset="
PageEncoding="GBK" % & gt;



<meta charset="GBK" & gt;
Insert the title here

<body>




Trangle. JSP code:
<% @ page language="Java" contentType="text/HTML. GBK charset="
PageEncoding="GBK" % & gt;



<meta charset="GBK" & gt;
Insert the title here

<body>
<%
String sideA=request. The getParameter (" sideA ");
String sideB=request. The getParameter (" sideB ");
String sideC=request. The getParameter (" sideC ");
Double a=double. ParseDouble (sideA);
Double b=double. ParseDouble (sideB);
Double c=double. ParseDouble (sideC);
% & gt;


CodePudding user response:

<% % & gt; Add the Java code fragments, can't write a Java method content, can call a Java method
<%! % & gt; Add the content of the Java method, can be classified as statement
<%=% & gt; The variable or expression value output to the page
  • Related