简体   繁体   English

如何在sclate,servlet和类之间建立连接

[英]how to make the connection between sclate,the servlet and classes

I'm new with the architecture of scalatra and devloppement scala .. i want to do a project with these new technilogies with templates but the problem that I can not understand how to realize the connection between the class or object, the servlet and Scalate.. 我是scalatra和devpalpement scala的体系结构的新手..我想用这些具有模板的新技术来做一个项目,但是我无法理解如何实现类或对象,servlet和Scalate之间的连接的问题。 。

I followed the site Scalate http://scalate.fusesource.org/ but I think it is not as easy.. I wanted to make html page and servlet with well-specified classes (like jsp,servlet and class java) but I unknown if faissable and If I to follow in this way the architecture of scalatra. 我浏览了Scalate网站http://scalate.fusesource.org/,但我认为这并不容易。我想使用明确指定的类(例如jsp,servlet和java类)制作html页面和servlet,但我不知道如果可以,并且如果我按照这种方式遵循scalatra的体系结构。

Can someone help me with documentation or explain to me how to do..I will be very grateful 有人可以帮助我提供文档或向我解释如何做。.我将非常感谢

You can follow the Getting started guide . 您可以按照入门指南进行操作 By following this guide, you create a SBT build definition which is based on the scalatra-sbt.g8 Template . 通过遵循本指南,您可以基于scalatra-sbt.g8 Template创建一个SBT构建定义。 This already includes a setup for scalatra-scalate. 这已经包括scalatra-scalate的设置。 The build definition encodes the project structure, dependencies and build characteristics. 构建定义对项目结构,依赖关系和构建特征进行编码。 It allows SBT for example to download all dependencies and compile your project. 例如,它允许SBT下载所有依赖项并编译您的项目。

Then there are SBT plugins to create IDE projects for all common IDEs: sbt-eclipse , sbt-idea . 然后有SBT插件可以为所有常见的IDE创建IDE项目: sbt-eclipsesbt-idea

Here is explained how to use them with a Scalatra project: IDE Support . 这里说明了如何在Scalatra项目中使用它们: IDE支持 Note that IDEA for example can directly import SBT or Maven projects. 注意,例如,IDEA可以直接导入SBT或Maven项目。

You can use this scalatra-http-client working example published by Scalatra in Github. 您可以使用Scalatra在Github中发布的这个scalatra-http-client工作示例。 It's the bare minimum you need and can't get any easier than this. 这是您所需的最低要求,没有比这更简单的方法了。

The next step is to take a look at the other scalatra-website-examples webapp implemented examples that demonstrate things like: authentication, file uploading, forms handling and all this nicely wrapped with Bootstrap . 下一步是查看其他scalatra-website-examples webapp实现的示例,这些示例演示诸如身份验证,文件上传,表单处理以及所有这些都很好地用Bootstrap包装的示例。

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

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