简体   繁体   English

在 Eclipse 我怎样才能让 sysout 在 JSP scriplet 中工作

[英]In Eclipse how can I make sysout work inside a JSP scriplet

In Eclipse (version 2021-09) I woudl like to use the sysout tempalte in teh scriplet area of a JSP page.在 Eclipse(版本 2021-09)中,我想在 JSP 页面的脚本区域中使用 sysout 模板。

So, in my JSP editor I have:所以,在我的 JSP 编辑器中,我有:

...

<%
...
[cursor here]
...
%>
...

When I now type sysout how can I make it expand to System.out.println("[cursor here]");当我现在输入sysout时,我怎样才能让它扩展到System.out.println("[cursor here]"); ?

I tried a new JSP template like this:我尝试了一个新的 JSP 模板,如下所示:

Eclipse 中用于 sysout 的新 Tpl

But it does not work inside the scriplet tags.但它在 scriplet 标签不起作用。


PS: I saw the question sysout in JSP eclipse - Stack Overflow , but the answers do not cover the case inside the scriplet tags. PS:我在 JSP eclipse - Stack Overflow 中看到了系统输出问题,但答案并未涵盖 scriplet 标签的情况。 * *

go to the preferences --> Java --> Editor --> Content Assist at the bottom: "auto activation triggers for Java" put in: go 到首选项 --> Java --> 编辑器 --> 底部的内容辅助:“Java 的自动激活触发器”输入:

abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM