Removing Login Page and Changing URL Path in MapStore Application

16 views
Skip to first unread message
Assigned to lorenzo...@geosolutionsgroup.com by me

Mabuela Ngulube

unread,
Jun 27, 2024, 10:35:53 AMJun 27
to mapstore-developers

I have created a WAR file that runs in Tomcat using Docker on a remote server. When accessing the application via http://{base_url}:{port}/mapstore/#, it directs me to the login page. How can I remove the need for authentication and bypass the login page, so the map URL (http://{base_url}:{port}/mapstore/#/viewer/new) directly loads as http://{base_url}:{port}/mapstore/#?

Additionally, if I wanted to change the path "mapstore" to another pathname, such as "ui" (resulting in http://{base_url}:{port}/ui/#), how can I achieve this?

Lorenzo Natali

unread,
Jul 1, 2024, 5:47:23 AMJul 1
to mapstore-developers
Hi,
for doing this you have to create a MapStore project. 
This will create a web/pom.xml, where you can customize the name of the war file ( finalName if I remember well) ans so the main application path.
The project will give you the possibility to customize all the JS parts you need, included all the constraints about login and so on.

Mabuela Ngulube

unread,
Jul 2, 2024, 10:43:06 AMJul 2
to mapstore-developers
Hi Lorenzo

I tried changing the name inside the web/pom.xml (finalName). it does not recognize the path after building. I get the following message: "The origin server did not find a current representation for the target resource or is not willing to disclose that one exists". If the solution is isolated inside the pom.xml file, I'll eventually find it I guess.

With regards to the login aspect, I want to know the directory of the js files responsible for routing inside the Mapstore application. Maybe my logic is incorrect, but what I want to be able to do, is to remove all the routes (including the current home page where users log in) I do not have any use for in my application and only have the route that shows the map view (along with making the map view my home page).

Lorenzo Natali

unread,
Jul 10, 2024, 4:10:19 AM (7 days ago) Jul 10
to mapstore-...@googlegroups.com
Hi,
I think in the web/pom.xml you will have to replace also all paths like this:
<outputDirectory>${basedir}/target/mapstore</outputDirectory>

with new name's ones
<outputDirectory>${basedir}/target/MyNewNameApp</outputDirectory>

There are several paths like this in the pom.xml (e.g. <outputDirectory>${basedir}/target/mapstore/WEB-INF/lib</outputDirectory>
and in all cases you should replace the path.

Also the context in cargo should be replaced if you want to start it using npm start

<deployables>
                        <deployable>
                            <groupId>${project.groupId}</groupId>
                            <artifactId>${project.artifactId}</artifactId>
                            <type>war</type>
                            <properties>
                                <context>/mapstore</context>
                            </properties>
                        </deployable>

--
You received this message because you are subscribed to the Google Groups "mapstore-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-develo...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/mapstore-developers/cc94f12f-3e7c-4a38-841d-3a4571456613n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages