IntelliJ IDEA的jsp中request等对象无法被解析的解决办法

用IDEA写jsp时,输入request然后点一下,不能弹出方法。

是没有导入依赖包的缘故。

(Ctrl + Alt + Shift + S) → Libraries → 绿色的加号 → 到tomcat\lib目录下。

然而网上的人都说导入servlet-api.jar和jsp-api.jar,但是这样以后还是不能解析。
试了很久才发现,其实还要导入tomcat-api.jar。。。

问题解决╮(╯▽╰)╭

  • 6
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 16
    评论
大家都知道,有很多方法可以进行标记解析,今天我们就带来利用轻量级的标记来解析的PHP库,一起来看一下。 <?php namespace Decoda; use Decoda\Decoda; use Decoda\Loader\FileLoader; use Decoda\Test\TestCase; use Decoda\Test\TestComponent; class ComponentTest extends TestCase {     protected function setUp() {         parent::setUp();         $this->object = new TestComponent(array('key' => 'value'));     }     public function testAddGetLoaders() {         $this->assertEquals(0, count($this->object->getLoaders()));         $this->object->addLoader(new FileLoader(TEST_DIR . '/config/test.php'));         $this->assertEquals(1, count($this->object->getLoaders()));     }     public function testGetSetConfig() {         $this->assertEquals('value', $this->object->getConfig('key'));         $this->assertEquals(null, $this->object->getConfig('foobar'));         $this->object->setConfig(array('key' => 'foo'));         $this->assertEquals('foo', $this->object->getConfig('key'));     }     public function testGetSetParser() {         $this->assertEquals(null, $this->object->getParser());         $this->object->setParser(new Decoda());         $this->assertInstanceOf('Decoda\Decoda', $this->object->getParser());     }     public function testMessage() {         $this->object->setParser(new Decoda());         $this->assertEquals('Quote by {author}', $this->object->message('quoteBy'));     } }

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 16
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值