小编use*_*r19的帖子

node.js + jade - link是自闭的,不应该有内容

我在MEAN堆栈上引用了以下很棒的教程.

现在我面临一个模板(JADE)相关的问题,我无法解决:(如果可能的话,你能看看并帮助我.

http://www.ibm.com/developerworks/library/wa-nodejs-polling-app/

    doctype 5
    html(lang='en')
      head
        meta(charset='utf-8')
        meta(name='viewport', content='width=device-width, 
initial-scale=1, user-scalable=no')
        title= title
        link(rel='stylesheet', href='//netdna.bootstrapcdn.com/bootstrap/3.0.1/
css/bootstrap.min.css')
        link(rel='stylesheet', href='/stylesheets/style.css')                
      body
        nav.navbar.navbar-inverse.navbar-fixed-top(role='navigation')
          div.navbar-header
            a.navbar-brand(href='#/polls')= title
        div.container
          div
Run Code Online (Sandbox Code Playgroud)

我得到了这个例外.尝试了几个变种,但还没有解决它.

Error: C:\DevEnv\UT3_Node\HelloWorldNodeProject\views\index.jade:14
    12|         a.navbar-brand(href='#/polls')= title
    13|     div.container
  > 14|       div

**link is self closing and should not have content.**
Run Code Online (Sandbox Code Playgroud)

谢谢你.

javascript node.js pug

3
推荐指数
1
解决办法
8576
查看次数

SpringMVC-FileUpload - 客户端发送的请求在语法上是不正确的

我在同一主题上看过几个qts.但我没有找到任何关于这个错误的线索.

我正在进行POC并按照以下链接进行操作. http://spring.io/guides/gs/uploading-files/

正如上面的教程所提到的,在独立模式[spring embeded Tomcat]中,它工作得非常好.但我想将其部署为webapplication.所以,我创建了一个单独的SpringMVC项目并添加了以下控制器.

控制器文件

@Controller
public class FileUploadController {

    @RequestMapping(value="/upload", method=RequestMethod.GET)
    public @ResponseBody String provideUploadInfo() {
        return "You can upload a file by posting to this same URL.";
    }

    @RequestMapping(value="/upload", method=RequestMethod.POST)
    public @ResponseBody String handleFileUpload(@RequestParam("name") String name, 
            @RequestParam("file") MultipartFile file){
        if (!file.isEmpty()) {
            try {
                byte[] bytes = file.getBytes();
                BufferedOutputStream stream = 
                        new BufferedOutputStream(new FileOutputStream(new File(name + "-uploaded")));
                stream.write(bytes);
                stream.close();
                return "You successfully uploaded " + name + " into " + name + "-uploaded !";
            } …
Run Code Online (Sandbox Code Playgroud)

java rest spring spring-mvc

1
推荐指数
1
解决办法
5377
查看次数

标签 统计

java ×1

javascript ×1

node.js ×1

pug ×1

rest ×1

spring ×1

spring-mvc ×1