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

Access project or peoject UI display blank out, request page like "http://localhost:8080/lamp_demo/c1" #12

Open
wisdomleo opened this issue Nov 29, 2024 · 8 comments

Comments

@wisdomleo
Copy link

wisdomleo commented Nov 29, 2024

Dear Bambooww,

When I access peoject, it will open new window in browser, request url like "http://localhost:8080/lamp_demo/c1", but display blank out, see below:
image
image

I checked the released web request, shows that it redirected to ".../hmi_ajax.jsp?op=load&path=test/hmi1", I tried to debug it and find what's wrong with it, but nothing was found.
image
image
image

I don't know how it will go while requesting "localhost:8080/ ui_of_proj_path", is it will request "web/ROOT/index.jsp" at first ? then redirected to the special page? or ? I don't know.

Best Regards,
Leo Ma

@bambooww
Copy link
Owner

org.iottree.core.util.web.PrjFilter

@wisdomleo
Copy link
Author

I checked the logic of PrjFilter.java, still don't know how to fix it and have no idea about it. Coule you please finger out what does it happen when I access the project path? Thanks a lot!!!

@bambooww
Copy link
Owner

Filter intercepts the request and redirects it to the specific JSP path for execution. Please refer to the directory hierarchy of the release version.

Also, let's first understand the Java web filter mechanism

@bambooww
Copy link
Owner

"I don't know how it will go while requesting "localhost:8080/ ui_of_proj_path", is it will request "web/ROOT/index.jsp" at first ? then redirected to the special page? or ? I don't know."

--
Because this URL is usually accessed in application scenarios such as HMI display and RESTful interface. And /web/admin/ webapp has its own permission checker.

For ROOT, relevant customized permissions can be used for external use

@wisdomleo
Copy link
Author

-- Because this URL is usually accessed in application scenarios such as HMI display and RESTful interface. And /web/admin/ webapp has its own permission checker.

For ROOT, relevant customized permissions can be used for external use

Looks like the required access token or others is missing, while checking PlugAuth, it returns blank page and only shows "no read permission 333" which I configured in the file "config.xml", see below:
image

Now I am confused about two:
1. the PlugAuth, why display "no read permission 333" while copying all the data folder from "*.zip" to source code folder:
image
2. If passed the auth check, which java file parse the config peoject( 组态项目 ), and response the UI access page?
image

@bambooww
Copy link
Owner

Please do not run IoT-Tree under Tomcat, this is not a web app. On the contrary, Tomcat is just an internal basic web container.

@wisdomleo
Copy link
Author

Please do not run IoT-Tree under Tomcat, this is not a web app. On the contrary, Tomcat is just an internal basic web container.

I knew it, the executable file "iottree_win_panel.exe" could start one backstage service, and access the url "localhost:9090/admin" in browser is fine.

But how to build project & artifacts, how to change the source code and debugging? Cause I use IDEA as the java developement environment, I configurated the "Tomcate Server" as Run/Debug component, and deploy the webapps to apache tomcat install path "%tomcat_path%\bin". I also deployed the iottree server to one "personal server", and could upgrade my changes and access by ip address.

I'd like to develope personalized function base on iottree. Thas's all.

By the way, I am curious about that how many developers have maintained or are maintaining the iottree since the begining? I noticed the first commit is "bamboowwcommitted
on May 11, 2021".

@bambooww
Copy link
Owner

MAIN_CLASS=org.iottree.server.Server

You can refer to the iot-tree.bat in the release version and configure the IDE environment in reverse

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