• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

servlet init parameters

 
Greenhorn
Posts: 15
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i want to know the use of following in web appl develepment without any framework
1. web.xml
2. context.xml
i need help.please
 
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
web.xml: see the servlet specification - it explains everything that's in that file

context.xml: see the Tomcat documentation
 
sourabh kanoongo
Greenhorn
Posts: 15
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you
 
sourabh kanoongo
Greenhorn
Posts: 15
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
actually i am using NetBeans 6.5 IDE in my web based projects. whatever i make (servlet or jsp ), in my web.xml there i found a new entry for servlet.
but i still confused that what is the actual use of this two xml files.how can i utilize these files?, can we customize these files?if yes then why and how???
please guide me...
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In a nutshell:
The web.xml is for application configuration. The context.xml is for environment configuration.
 
Ranch Hand
Posts: 119
Oracle Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jeanne Boyarsky wrote:In a nutshell:
The web.xml is for application configuration. The context.xml is for environment configuration.




context.xml is the environment file made by the Netbeans IDE and varies from project to project, basically it has all links and configuration needed for eachtime you reload the project in netBeans
 
sourabh kanoongo
Greenhorn
Posts: 15
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Atul
 
sourabh kanoongo
Greenhorn
Posts: 15
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am developing a small simple project in struts framework.
in which a accept a roll no from user and display result..
for displaying i have two jsp(pass.jsp and fail.jsp)
one struts action (ResultGenAction.java)
one strutsformBean(ResultGenBean.java)
bean fetches marks from database acctording to rollno given be user and sends a boolean value true and false showing pass or fail.
if pass then view should be pass.jsp.
if fail then view should be fail.jsp.
i have made forward entries in struts-config file..
as:-
<action input="/" name="ResultGenBean" path="/EnterRoll.jsp" scope="request" type="Result.ResultGenAction" validate="false">
<forward name="p" path="/WEB-INF/pass.jsp"/>
<forward name="f" path="/WEB-INF/fail.jsp"/>
</action>

when i enter roll no for example 101 which is available in database and it is pass,but i get a blank response instead of a full marksheet through pass.jsp
same for all roll nos....it is not working

please help me in sorting out this problem..
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

sourabh kanoongo wrote:
<forward name="p" path="/WEB-INF/pass.jsp"/>
<forward name="f" path="/WEB-INF/fail.jsp"/>



Any path under WEB-INF is inaccessible to external web browsers. This is why it is a secure place for us to put our configuration files, class files and library dependencies.
 
sourabh kanoongo
Greenhorn
Posts: 15
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
it was my mistake,i will take care of choosing the proper forum in future ...
sorry
 
Note to self: don't get into a fist fight with a cactus. Command this tiny ad to do it:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic