Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

velotity tools 3.1 example can't be running in smat-servlet #2

Open
zzsczz opened this issue May 6, 2023 · 12 comments
Open

velotity tools 3.1 example can't be running in smat-servlet #2

zzsczz opened this issue May 6, 2023 · 12 comments

Comments

@zzsczz
Copy link

zzsczz commented May 6, 2023

I build velocity-tools v3.1 and run it's example form embeded jetty by mvn , "mvn cargo:run"

i copy the war to smat-servlet v0.1.9's webapps dir ( use "mvn package to get the war"), faied to start the app ,the log is

开始解压[velocity-tools-examples-showcase-3.1.war]...
java.lang.IllegalArgumentException: illegal mapping : nolayout/*

velocity-tools-examples-showcase.tar.gz

@smthing
Copy link
Contributor

smthing commented May 6, 2023

image

image

@zzsczz
Copy link
Author

zzsczz commented May 7, 2023

thanks smthing

thesmart-selvet start modified web.xml, but most demos can't work well.

tomcat start modified web.xml and demos works well.

Java is write once and debug anywell. The api specification will not never cover every conner of all the code.

@zzsczz
Copy link
Author

zzsczz commented May 7, 2023

@smthing
Copy link
Contributor

smthing commented May 7, 2023

image
我这边显示正常,你可以试试我下面这个zip包。
我仅仅是将<url-pattern>nolayout/*</url-pattern>调整成<url-pattern>/nolayout/*</url-pattern>
并在pom.xml中加入了

<plugin>
        <groupId>org.smartboot.servlet</groupId>
        <artifactId>smart-servlet-maven-plugin</artifactId>
        <version>0.1.9</version><!--最新版本 -->
        <configuration>
          <port>8080</port>
          <path>/velocity-tools-examples-showcase-3.1</path>
        </configuration>
</plugin>

velocity-tools-examples-showcase.zip

@smthing
Copy link
Contributor

smthing commented May 7, 2023

我尝试过用tomcat启动你的工程,也是会因为url-pattern非法导致启动失败的
image

@zzsczz
Copy link
Author

zzsczz commented May 7, 2023

choose the first AlternatorTool item

p1

click the go

p2

tomcat works well

弯弯角角太多了

@zzsczz
Copy link
Author

zzsczz commented May 7, 2023

规范 到 工程之间 有距离

@smthing
Copy link
Contributor

smthing commented May 7, 2023

找到原因了,是提取端口号的时候下标存在偏差。会在0.2版本中修复一下。
ps://方便告知下你是哪里人吗?我不太会用英语进行回复。

image

@zzsczz
Copy link
Author

zzsczz commented May 7, 2023

湖北人,在魔都

@smthing
Copy link
Contributor

smthing commented May 7, 2023

😓
你可以先试试 0.2-SNAPSHOT,没啥问题的话我近期发个版本。
可以参考:https://smartboot.tech/smart-servlet/quickstart.html 中的Maven插件

@zzsczz
Copy link
Author

zzsczz commented May 7, 2023

mvn package smart-servlet:run 润不起来

apsbyoptaplanner.zip

maven

@smthing
Copy link
Contributor

smthing commented May 8, 2023

可能是你的配置不支持拉取快照包吧。
正式包 0.2.1 已经发布了,你也可以从https://gitee.com/smartboot/smart-servlet/releases/tag/v0.2.1下载程序包。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants