This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Move from one project to another in jsp

 
sonu raj
Ranch Hand
Posts: 43
Android C++ Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65228
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HTML links or forms that address the URL of the target page.
 
sonu raj
Ranch Hand
Posts: 43
Android C++ Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<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
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Communicating between two projects can be done using HttpClient.

Refer HttpClient tutorial.

Regards,
Ashwini Kashyap
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic