• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Copying code from .html to .jsp produces unexpected results.

 
Tom Hilliard
Ranch Hand
Posts: 39
Netbeans IDE Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have addaccommodation.html which is a simple form to take the details of an accommopdation.



Which produces this SEE ATTACHMENT Add Accommodation... Notice the map feature to set the lat and long.

Now, once an accommodation has been added I want to be able to edit it. So I copy and paste the code from addaccommodation.html to editaccommodation.jsp. Then I add the EL to use the parameter to prefill the form to give me this SEE ATTACHMENT Edit Accommodation

The code for editaccommodation.jsp


Now my problem is that the map is not appearing on editaccommodation.jsp and I'm struggling to understand why as its copied and pasted from a working page (map shows on addaccommodation.html)

Any help with this to get the map showing on editaccommodation.jsp would be greatly appreciated

Regards

TH
addscreen.png
[Thumbnail for addscreen.png]
Add Accommodation
editscreen.png
[Thumbnail for editscreen.png]
Edit Accommodation
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65124
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all, you should have to have tow files. You can use the same file for the initial fill-in and the later edit. That'll solve one maintenance headache.

As to why it isn't working. Do a View Source at the browser for the working and the non-working version, and see that the difference are.
 
Tom Hilliard
Ranch Hand
Posts: 39
Netbeans IDE Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
missing from editaccommodation.jsp! FACEPALM! God knows how that ended up like that. I had sat and gone through the source of both but obviously overlooked the standard declarations (or whatever the <meta> bit is).

Cheers Bear, works as expected now.

Regards

TH
 
Tom Hilliard
Ranch Hand
Posts: 39
Netbeans IDE Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And I did question my method when I was copying code... Can I do this once is what I asked myself. Could you point me to a reference I can have a read on? Im guessing I can create the form once and call it as and when?

Cheers

TH
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic