This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java and have Dr. Raoul-Gabriel Urma & Richard Warburton on-line!
See this thread for details.
Win a flower (🌹) or copy of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java (📚) this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Bear Bibeault
  • Liutauras Vilda
  • Devaka Cooray
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Struts Application not running

 
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

i have prepared a small struts application and am trying to run it via
http://localhost:8080/myproject/submit.jsp

but its not working.....

i have placed the .jar file correctly in the classpath..
foll are the paths of my files used in the application

web.xml ,struts-config.xml :C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\Myproject\WEB-INF

SubmitForm.java
SubmitAction.java : C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\Myproject\WEB-INF\classes


submit.jsp : C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\Myproject

but still its not working

Can anyone solve the problem

Regards
SONAL
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What exactly do you mean by "it's not working"?
Which HTTP error code your browser gets?
Do you get some kind of error messages in Tomcat's log files?
 
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you setup your web.xml file? The entries for strusts should look something like this:

<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>validate</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>

<!-- Standard Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
 
pioneer
Posts: 341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can start with struts-blank.war file, it provide all you need.
 
pioneer
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi SonalPSPL Bagmar ,

Please post all your code...

It's very important to solve problem.

 
I knew I would regret that burrito. But this tiny ad has never caused regrets:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!