aspose file tools*
The moose likes JSP and the fly likes Copying code from .html to .jsp produces unexpected results. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Copying code from .html to .jsp produces unexpected results." Watch "Copying code from .html to .jsp produces unexpected results." New topic
Author

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

Tom Hilliard
Ranch Hand

Joined: Feb 03, 2012
Posts: 39

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



[Thumbnail for addscreen.png]


[Thumbnail for editscreen.png]

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Tom Hilliard
Ranch Hand

Joined: Feb 03, 2012
Posts: 39

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

Joined: Feb 03, 2012
Posts: 39

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Copying code from .html to .jsp produces unexpected results.
 
Similar Threads
recod is not inserting in mysql databse
Display simple address on google maps
Assinging JavaScript variable as a textbox id
getElementById("flight_no") returns undefined
how to put a pin in a google maps location