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

Move from one project to another in jsp

sonu raj
Ranch Hand

Joined: Jul 31, 2012
Posts: 43

Anyone please tell how to move from one jsp to another?
Remember I need to move from one jsp file to another jsp file in diffrent projects with the parameters
for example

suppose i have one.jsp


I want to go to two.jsp which is in another project on local tomcat server with name and password.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60057
    
  65

HTML links or forms that address the URL of the target page.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
sonu raj
Ranch Hand

Joined: Jul 31, 2012
Posts: 43

Bear Bibeault wrote:HTML links or forms that address the URL of the target page.

I tried hyperlink but it do not carry value to the next page.
and about the forms : I don't know why it is not working
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18135
    
    8

sonu raj wrote:I tried hyperlink but it do not carry value to the next page.


Then the hyperlink is not correct.

and about the forms : I don't know why it is not working


For this and the hyperlink: It looks like your knowledge of HTML is inadequate, and that you don't know how to format a hyperlink or create an HTML form. For a first step, then, forget about JSP and just write hardcoded HTML which does what you want. Once you have that working well, then write a JSP which generates the HTML which you want.

I find that the <c:url> JSTL tag is the most practical JSP tool for generating hyperlinks. For an HTML form you don't really need any special JSP tool, usually you just generate the <form> element and its children in the natural way.
G krishna kumar
Greenhorn

Joined: Oct 10, 2012
Posts: 14
<form action="http://localhost:8000/webapp/two.jsp" method="post" >
UserName:<input type="text" name="user"><br>
Password:<input type="password" name="pass"><br>

<input type="submit">
</form>

here in the above jsp i have hard coded the url of another project.. so when ever you click on submit button it will check for the what action to performed.
goes to the project folder webapp and check for the resource two.jsp ans display the result.
Ashwini Kashyap
Ranch Hand

Joined: Aug 30, 2012
Posts: 90
Hi,

Communicating between two projects can be done using HttpClient.

Refer HttpClient tutorial.

Regards,
Ashwini Kashyap
 
jQuery in Action, 2nd edition
 
subject: Move from one project to another in jsp
 
Similar Threads
Is submitting a form send-redirect or forward?
Logging into a tomcat applications from an external form
Two forms with two submit buttons
Writing to a text file using servlet
how to add data in request object and pass it to next page?