struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zahid Rahman <zahidr1...@gmail.com>
Subject Re: /struts-2.5.22-all.zip where can download
Date Tue, 26 Nov 2019 19:02:11 GMT
Here are some changes and corrections I wish to suggest for page
https://struts.apache.org/getting-started/how-to-create-a-struts2-web-application.html
.
What I mean to say is that, I wish the page had been written as follows.

STEP 1.
<!--    minimum maven directory structure and  file for struts development
-->
*-<appnamedir>*
*-<appnamedir>/pom.xml [file]*





*- <appnamedir>/src- <appnamedir>/src/main - <appnamedir>/src/main/java-
<appnamedir>/src/main/resources- <appnamedir>/src/main/webapp-
<appnamedir>/src/main/webapp/WEB-INF*

*maven jetty:run* command does helps to create file  header  of config
file  *<appnamedir>/pom.xml*  with error messages
except it does not help to create the tag <packaging>war</packaging>.
Without this tag you get build successful message, but jetty does not go
into  *server mode*.  I think this is inconsistent and is very important
because there is no error message and the desired effect is missing.

These are the error messages I am referring which assist with creating
file header of *<appnamedir>/pom.xml*




*[ERROR]   The project
[unknown-group-id]:[unknown-artifact-id]:[unknown-version]
(c:\struts2\work_dir\mvntest\pom.xml) has 4 errors[ERROR]
'modelVersion' is missing. @ line 1, column 9[ERROR]     'groupId' is
missing. @ line 1, column 9[ERROR]     'artifactId' is missing. @ line 1,
column 9[ERROR]     'version' is missing. @ line 1, column 9*

So  I think file header for the <appname>/pom.xml should be mentioned on
that page as follows.






* <!--  pom.xml header file -->    <modelVersion>4.0.0</modelVersion>
<groupId>org.apache</groupId>    <artifactId>basic-struts</artifactId>
<version>1.0</version>    <packaging>war</packaging>*

To remove  the warning of platform independent
there should be a mention to include the following tags






*<properties>    <!-- platform independent -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<struts2.version>2.5.20</struts2.version></properties>*

Later in the page the dependency TAG is mentioned , but I feel the
dependencies TAG should also be included as follows.

*<dependencies>*

*  <dependency>*



*     <groupId>org.apache.struts</groupId>
 <artifactId>struts2-core</artifactId>
 <version>${struts2.version}</version> </dependency>*


*</dependencies>*

mvn jetty:run  commands does actually inform
*/${build.finalName} deprecated to  /${project.build.finalName}*

Below is my complete pom.xml file

























































*<project><!--    minimum maven directory structure for struts development
- src- src/main - src/main/java- src/main/resources - src/main/webapp-
src/main/webapp/WEB-INF-->    <!--  pom.xml header file -->
<modelVersion>4.0.0</modelVersion>    <groupId>org.apache</groupId>
<artifactId>basic-struts</artifactId>    <version>1.0</version>
<packaging>war</packaging><properties>    <!-- platform independent -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<struts2.version>2.5.20</struts2.version></properties><dependencies>
<dependency>     <groupId>org.apache.struts</groupId>
 <artifactId>struts2-core</artifactId>
 <version>${struts2.version}</version> </dependency></dependencies><build>
  <finalName>basic-struts</finalName><plugins>        <plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.4.7.v20170914</version>            <configuration>
  <webApp>                    <!--  ${build.finalName} deprecated -->
              <contextPath>/${project.build.finalName}</contextPath>
        </webApp>                <stopKey>CTRL+C</stopKey>
<stopPort>8999</stopPort>
<scanIntervalSeconds>10</scanIntervalSeconds>                <scanTargets>
                  <scanTarget>src/main/webapp/WEB-INF/web.xml</scanTarget>
              </scanTargets>            </configuration>        </plugin>
  </plugins></build></project>*


Best Regards

zahid



On Mon, 25 Nov 2019 at 08:41, Lukasz Lenart <lukaszlenart@apache.org> wrote:

> niedz., 24 lis 2019 o 06:15 Zahid Rahman <zahidr1000@gmail.com>
> napisał(a):
> > "struts cookbook" button is unresponsive on main page
> > http://localhost:8080/struts2-showcase/index.action
> > It was unresponsive in the previous version too.
>
> Thanks, changed to point to https://github.com/apache/struts-examples
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message