Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

connecting to java class  RSS feed

 
marco ries
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dear all,

I want to create a jsp file that contain 1 textbox and 1 button, in which if the button is pressed, then the input in textbox will be proccessed in the java file and then directed automatically to one new jsp page. How to make it done? i am really a noob in dealing with these things. one more thing, do i need a web-inf to connect all those 3 files? if yes what will be the content of the web-inf? thank you very much.

Thank you in advance for helping me out.

best regards,

Marcories
[ June 01, 2007: Message edited by: Bear Bibeault ]
 
Srikkanth Mohanasundaram
Ranch Hand
Posts: 243
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
then the input in textbox will be proccessed in the java file and then directed automatically to one new jsp page


In context of web applications,the servlet is a web component that is used for
dynamic content generation.So in your case you have to forward the action to
a Servlet and then may be you can delegate the processing work to a separate java method(called a model).You can set the results of your processing as attributes and forward it to your jsp.This flow should be described in a deployment descriptor called web.xml.
This web.xml file should go inside your WEB-INF(it's not web-inf case sensitive)
All your class files must go inside WEB-INF/classes or you can jar them up and put it into WEB-INF/jar,these are special places where the container looks up for class files.

Go through this,this might be helpful
Scriptless JSP

Regards,
Srikkanth.M
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!