javascript - favlang 无法解析为 eclipse 中的变量
问题描述
我无法在下面的代码中找到问题,但我收到错误“favlang 无法解析为 eclipse 中的变量”。请帮助我如何解决此问题。
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<!-- read the favourite programming langauge cookie -->
String favlang="java";
//get the cookie from the browser request
cookie[] thecookies=request.getCookies();
//Find our favourite langauage cookie
if(thecookies!=null)
{
for(cookie tempcookie:thecookies)
{
if("myApp.language".equals(tempcookie.getname()))
favlang=tempcookie.getValue();
break;
}
}
new books for **<%=favlang%**> #ERROR- favlang cannot be resolved to a variable
<ul>
<li>bbbbbbbbbbbbbbbbbbbbb</li>
<li>bbbbbbbbbbbbbbbbbbbbb</li>
</ul>
解决方案
推荐阅读
- django - Django 模型字段依赖于另一个模型字段
- java - 当应用程序被杀死时,AlarmManager 在前台服务中不起作用
- c# - 当类实现所有接口但未声明接口时,将类调整为接口
- angular - 从 ionic-select-searchable 迁移到 ionic-selectable 会引发问题
- dns - 如何更改域 CloudFlare 的 NS 服务器?
- android - Firebase 电话号码身份验证失败
- azure - 每月数百万个数据集的 Azure 服务
- sql - SQL Server - 执行时“主要”附近的语法错误
- javascript - Slack OAuth 设置步骤 1 - 使用 Postman 进行测试 - 错误:无效的 client_id 参数
- python - 是否可以有一个一致的 setup.py 文件来反映对依赖项的本地更改?