Eclipse 上的 Java Struts Hibernate Web 应用程序

发布于 2024-09-28 10:55:44 字数 1065 浏览 2 评论 0原文

我刚刚开始在 Eclipse 上开发基于 Java Struts HibernateWeb 应用程序

我已经为 Linux 安装了Eclipse (Helios) 面向 Java EE 开发人员

在查看操作类 SampleProjectAction.java 时,我发现单词 ActionForward、ActionMapping、ActionForm、HttpServletRequest、HttpServletResponse、Exception不同字体中未突出显示 /颜色。

public class SampleProjectAction 扩展 Action {

  public ActionForwardexecute(ActionMapping映射,ActionForm表单,
                                 HttpServletRequest 请求, 
                                   HttpServletResponse 响应)抛出异常 {

这是否意味着 Eclipse 无法识别我的 Web 应用程序项目

我需要安装任何其他 Java、Struts、Hibernate 插件

需要任何附加 jar 文件吗?

-

@hvgotcodes 我下载的只是面向 Java EE 开发人员的 Eclipse IDE,仅此而已。我没有下载任何 Struts、Hibernate 等的 jar 文件并添加到类路径中。 我该怎么做

I am just getting started working on a Java Struts Hibernate based Web App on Eclipse.

I have installed Eclipse (Helios) for Java EE developers for linux.

While going through an Action Class SampleProjectAction.java, I find that that words ActionForward, ActionMapping, ActionForm, HttpServletRequest, HttpServletResponse, Exception are not highlighted in a different font/color.

public class SampleProjectAction extends Action {

  public ActionForward execute(ActionMapping mapping, ActionForm form,
                                 HttpServletRequest request, 
                                   HttpServletResponse response) throws Exception {

Does that mean Eclipse is not able to recognize my Web App project?

Do I need to install any additional plugins for Java, Struts, Hibernate OR

any additonal jar files are needed?

-

@hvgotcodes All I have downloaded is Eclipse IDE for Java EE developers, nothing more. I have not downloaded any jar files for Struts, Hibernate, etc. and added to classpath. How do I do that?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

暗藏城府 2024-10-05 10:55:44

语法高亮仅基于Java解析语法,与公认的框架或jar无关。如果 jar 丢失,您将遇到编译错误,因为编译器将无法找到类(例如 ActionMapping )

顺便说一句:“Exception”不是 Struts 类,它来自核心 Java。

BTW2:这不是Struts2,而是Struts(1),它们是完全不同的框架。

Syntax highlighting is only based on Java parsed syntax, it has nothing to do with recognized frameworks or jars. If the jar is missing, you'll have a compilation error because the compiler won't be able to find a class (example ActionMapping )

BTW: "Exception" is not a Struts class, it's from core Java.

BTW2: This is not Struts2, but Struts (1), they are totally different frameworks.

做个少女永远怀春 2024-10-05 10:55:44

我非常喜欢 struts 作为 mvc 框架,最近我发布了一个使用 spring 框架的 struts 2 教程,我上传了压缩的 Web 应用程序(war),它包含运行 struts 2 Web 应用程序所需的所有依赖项,我想获取您应该访问的应用程序 http:// asotto.blogspot.com/2010/08/vistazo-spring-framework-un-ejemplo-del.html 并下载它。我希望它能帮助你...

man i like so much struts as a mvc framework, recently i post a struts 2 tutorial using spring framework, i uploaded the compressed web app (war) it includes all the depencies you need to run a struts 2 web app, i you want to get the app you should go to http://asotto.blogspot.com/2010/08/vistazo-spring-framework-un-ejemplo-del.html and download it. I hope it help you...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文