File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

useBean class attribute in direct transfer from html to jsp

 
shivam singhal
Ranch Hand
Posts: 231
Java Notepad Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when we directly pass parameters from *.html page to *.jsp page without using SERVLETS
and in JSP page we are using beans,,
then should be placed in class attribute of useBean tag??

like
HTML PAGE

<html>
<body>
Enter your name :
<form method="post" action="DirectJsp.jsp">
<input type="text" name="name">
<br>
Enter your Id :
<br>
<input type="text" name="id">
<input type="submit" type="Enter">
</form>
</body>
</html>

DirectJsp.jsp ::

<html>
<body>
your name is
<jsp:useBean id="DirectNameJsp" type="Name" class="Name" >
<jsp:setProperty name="DirectNameJsp" param="name" property="name" />
</jsp:useBean>
your Name is
<jsp:getProperty name="DirectNameJsp" property="name" />
</body>
</html>
 
shivam singhal
Ranch Hand
Posts: 231
Java Notepad Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here,, we need atleast a java file,, where we set and get the parameters.
 
Stefan Evans
Bartender
Posts: 1640
9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "class" attribute of the useBean tag remains what it always was - specifying the fully specified java class to use for that bean.
Because your bean is in a package (it is in a package right?) I would expect something like

 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic