aspose file tools*
The moose likes JSP and the fly likes useBean class attribute in direct transfer from html to jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "useBean class attribute in direct transfer from html to jsp" Watch "useBean class attribute in direct transfer from html to jsp" New topic
Author

useBean class attribute in direct transfer from html to jsp

shivam singhal
Ranch Hand

Joined: Jul 15, 2012
Posts: 226

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

Joined: Jul 15, 2012
Posts: 226

here,, we need atleast a java file,, where we set and get the parameters.
Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1018
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
 
subject: useBean class attribute in direct transfer from html to jsp